70 linked maps
In [1]:
Copied!
# !pip install geemap
# !pip install geemap
In [2]:
Copied!
import ee
import geemap
import ee
import geemap
In [3]:
Copied!
# geemap.update_package()
# geemap.update_package()
In [4]:
Copied!
geemap.ee_initialize()
geemap.ee_initialize()
In [5]:
Copied!
geemap.linked_maps(rows=1, cols=2, height="400px", center=[38.4151, 21.2712], zoom=12)
geemap.linked_maps(rows=1, cols=2, height="400px", center=[38.4151, 21.2712], zoom=12)
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Input In [5], in <cell line: 1>() ----> 1 geemap.linked_maps(rows=1, cols=2, height="400px", center=[38.4151, 21.2712], zoom=12) AttributeError: module 'geemap' has no attribute 'linked_maps'
In [6]:
Copied!
image = (
ee.ImageCollection('COPERNICUS/S2')
.filterDate('2018-09-01', '2018-09-30')
.map(lambda img: img.divide(10000))
.median()
)
image = (
ee.ImageCollection('COPERNICUS/S2')
.filterDate('2018-09-01', '2018-09-30')
.map(lambda img: img.divide(10000))
.median()
)
In [7]:
Copied!
vis_params = [
{'bands': ['B4', 'B3', 'B2'], 'min': 0, 'max': 0.3, 'gamma': 1.3},
{'bands': ['B8', 'B11', 'B4'], 'min': 0, 'max': 0.3, 'gamma': 1.3},
{'bands': ['B8', 'B4', 'B3'], 'min': 0, 'max': 0.3, 'gamma': 1.3},
{'bands': ['B12', 'B12', 'B4'], 'min': 0, 'max': 0.3, 'gamma': 1.3},
]
vis_params = [
{'bands': ['B4', 'B3', 'B2'], 'min': 0, 'max': 0.3, 'gamma': 1.3},
{'bands': ['B8', 'B11', 'B4'], 'min': 0, 'max': 0.3, 'gamma': 1.3},
{'bands': ['B8', 'B4', 'B3'], 'min': 0, 'max': 0.3, 'gamma': 1.3},
{'bands': ['B12', 'B12', 'B4'], 'min': 0, 'max': 0.3, 'gamma': 1.3},
]
In [8]:
Copied!
labels = [
'Natural Color (B4/B3/B2)',
'Land/Water (B8/B11/B4)',
'Color Infrared (B8/B4/B3)',
'Vegetation (B12/B11/B4)',
]
labels = [
'Natural Color (B4/B3/B2)',
'Land/Water (B8/B11/B4)',
'Color Infrared (B8/B4/B3)',
'Vegetation (B12/B11/B4)',
]
In [9]:
Copied!
geemap.linked_maps(
rows=2,
cols=2,
height="400px",
center=[38.4151, 21.2712],
zoom=12,
ee_objects=[image],
vis_params=vis_params,
labels=labels,
label_position="topright",
)
geemap.linked_maps(
rows=2,
cols=2,
height="400px",
center=[38.4151, 21.2712],
zoom=12,
ee_objects=[image],
vis_params=vis_params,
labels=labels,
label_position="topright",
)
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) Input In [9], in <cell line: 1>() ----> 1 geemap.linked_maps( 2 rows=2, 3 cols=2, 4 height="400px", 5 center=[38.4151, 21.2712], 6 zoom=12, 7 ee_objects=[image], 8 vis_params=vis_params, 9 labels=labels, 10 label_position="topright", 11 ) AttributeError: module 'geemap' has no attribute 'linked_maps'
Last update:
2022-03-14