Raster
In [1]:
Copied!
#!pip install geotask
#!pip install geotask
In [2]:
Copied!
import geotask
import geotask
In [3]:
Copied!
m = geotask.Map(add_layer_control=False)
data = 'https://github.com/opengeos/datasets/releases/download/raster/srtm90.tif'
m.add_raster(data, name = 'DEM')
m.add_layers_control()
m
m = geotask.Map(add_layer_control=False)
data = 'https://github.com/opengeos/datasets/releases/download/raster/srtm90.tif'
m.add_raster(data, name = 'DEM')
m.add_layers_control()
m
Out[3]:
In [4]:
Copied!
m.layers[0].interact(opacity=(0.0,1.0,0.1))
m.layers[0].interact(opacity=(0.0,1.0,0.1))
Out[4]:
In [5]:
Copied!
m.layers
m.layers
Out[5]:
(TileLayer(attribution='© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors', base=True, max_zoom=19, min_zoom=1, name='OpenStreetMap.Mapnik', options=['attribution', 'bounds', 'detect_retina', 'max_native_zoom', 'max_zoom', 'min_native_zoom', 'min_zoom', 'no_wrap', 'tile_size', 'tms', 'zoom_offset'], url='https://tile.openstreetmap.org/{z}/{x}/{y}.png'), BoundTileLayer(attribution="Raster file served by <a href='https://github.com/banesullivan/localtileserver' target='_blank'>localtileserver</a>.", bounds=((36.634011, -120.755927), (38.626923, -117.30451)), max_native_zoom=30, max_zoom=30, name='DEM', options=['attribution', 'bounds', 'detect_retina', 'max_native_zoom', 'max_zoom', 'min_native_zoom', 'min_zoom', 'no_wrap', 'tile_size', 'tms', 'zoom_offset'], show_loading=True, url='http://127.0.0.1:36031/api/tiles/{z}/{x}/{y}.png?&filename=%2Fvsicurl%3Furl%3Dhttps%253A%252F%252Fgithub.com%252Fopengeos%252Fdatasets%252Freleases%252Fdownload%252Fraster%252Fsrtm90.tif%26use_head%3Dno%26list_dir%3Dno'))