04 split panel map
Uncomment the following line to install geemap if needed.
In [1]:
Copied!
# !pip install geemap
# !pip install geemap
In [2]:
Copied!
import geemap
import geemap
In [3]:
Copied!
geemap.show_youtube('9EUTX8j-YVM')
geemap.show_youtube('9EUTX8j-YVM')
In [4]:
Copied!
Map = geemap.Map()
Map.split_map()
Map
Map = geemap.Map()
Map.split_map()
Map
Out[4]:
Make this Notebook Trusted to load map: File -> Trust Notebook
In [5]:
Copied!
Map = geemap.Map()
Map.split_map(left_layer='HYBRID', right_layer='ROADMAP')
Map
Map = geemap.Map()
Map.split_map(left_layer='HYBRID', right_layer='ROADMAP')
Map
Out[5]:
Make this Notebook Trusted to load map: File -> Trust Notebook
In [6]:
Copied!
basemaps = geemap.basemaps.keys()
print(basemaps)
basemaps = geemap.basemaps.keys()
print(basemaps)
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Input In [6], in <cell line: 1>() ----> 1 basemaps = geemap.basemaps.keys() 2 print(basemaps) AttributeError: module 'geemap.basemaps' has no attribute 'keys'
In [7]:
Copied!
for basemap in basemaps:
print(basemap)
for basemap in basemaps:
print(basemap)
--------------------------------------------------------------------------- NameError Traceback (most recent call last) Input In [7], in <cell line: 1>() ----> 1 for basemap in basemaps: 2 print(basemap) NameError: name 'basemaps' is not defined
In [8]:
Copied!
Map = geemap.Map()
Map.split_map(
left_layer='NLCD 2016 CONUS Land Cover', right_layer='NLCD 2001 CONUS Land Cover'
)
Map
Map = geemap.Map()
Map.split_map(
left_layer='NLCD 2016 CONUS Land Cover', right_layer='NLCD 2001 CONUS Land Cover'
)
Map
Out[8]:
Make this Notebook Trusted to load map: File -> Trust Notebook
In [9]:
Copied!
import ee
import ee
In [10]:
Copied!
# https://developers.google.com/earth-engine/datasets/catalog/USGS_NLCD
collection = ee.ImageCollection("USGS/NLCD")
print(collection.aggregate_array('system:id').getInfo())
# https://developers.google.com/earth-engine/datasets/catalog/USGS_NLCD
collection = ee.ImageCollection("USGS/NLCD")
print(collection.aggregate_array('system:id').getInfo())
['USGS/NLCD/NLCD1992', 'USGS/NLCD/NLCD2001', 'USGS/NLCD/NLCD2001_AK', 'USGS/NLCD/NLCD2001_HI', 'USGS/NLCD/NLCD2001_PR', 'USGS/NLCD/NLCD2004', 'USGS/NLCD/NLCD2006', 'USGS/NLCD/NLCD2008', 'USGS/NLCD/NLCD2011', 'USGS/NLCD/NLCD2011_AK', 'USGS/NLCD/NLCD2011_HI', 'USGS/NLCD/NLCD2011_PR', 'USGS/NLCD/NLCD2013', 'USGS/NLCD/NLCD2016']
In [11]:
Copied!
nlcd_2001 = ee.Image('USGS/NLCD/NLCD2001').select('landcover')
nlcd_2016 = ee.Image('USGS/NLCD/NLCD2016').select('landcover')
left_layer = geemap.ee_tile_layer(nlcd_2001, {}, 'NLCD 2001')
right_layer = geemap.ee_tile_layer(nlcd_2016, {}, 'NLCD 2016')
Map = geemap.Map()
Map.split_map(left_layer, right_layer)
Map
nlcd_2001 = ee.Image('USGS/NLCD/NLCD2001').select('landcover')
nlcd_2016 = ee.Image('USGS/NLCD/NLCD2016').select('landcover')
left_layer = geemap.ee_tile_layer(nlcd_2001, {}, 'NLCD 2001')
right_layer = geemap.ee_tile_layer(nlcd_2016, {}, 'NLCD 2016')
Map = geemap.Map()
Map.split_map(left_layer, right_layer)
Map
Out[11]:
Make this Notebook Trusted to load map: File -> Trust Notebook
Last update:
2022-03-14