Skip to content

Add support for local raster datasets and remote COGs using localtileserver#769

Merged
giswqs merged 2 commits intomasterfrom
local-tile
Nov 28, 2021
Merged

Add support for local raster datasets and remote COGs using localtileserver#769
giswqs merged 2 commits intomasterfrom
local-tile

Conversation

@giswqs
Copy link
Member

@giswqs giswqs commented Nov 28, 2021

Built upon the amazing localtileserver package by @banesullivan, geemap now supports loading local raster dataset and remote Cloud Optimized GeoTIFF (COG) with only one line of code.

It supports both the ipyleaflet and folium plotting backends. Use either import geemap or import geemap.foliumap as geemap. The remaining code stays the same.

Add a local raster dataset

import geemap
m = geemap.Map()
m.add_local_tile('dem.tif', palette='matplotlib.Viridis_10', layer_name="DEM")
m

Add a remote COG

import geemap
m = geemap.Map()
url = 'https://opendata.digitalglobe.com/events/california-fire-2020/pre-event/2018-02-16/pine-gulch-fire20/1030010076004E00.tif'
m.add_remote_tile(url, layer_name="CA Fire")
m

Local tile:
image

Remote COG:
image

@giswqs giswqs added the Feature Request New feature or request label Nov 28, 2021
@giswqs giswqs self-assigned this Nov 28, 2021
@giswqs giswqs linked an issue Nov 28, 2021 that may be closed by this pull request
@giswqs giswqs merged commit 43cfc08 into master Nov 28, 2021
@giswqs giswqs deleted the local-tile branch November 28, 2021 05:27
@lgtm-com
Copy link

lgtm-com bot commented Nov 28, 2021

This pull request introduces 1 alert when merging 8b11896 into 5750d9c - view on LGTM.com

new alerts:

  • 1 for Except block handles 'BaseException'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature Request New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for local raster datasets using localtileserver

1 participant