split map with 'custom' image collection? #2094
-
I'm trying to show a split map using this tutorial but I want to use ESRI_Global-LULC_10m_TS in both half-maps (i.e. different periods). When I try to do that, I get the error that the maps shown can only be one of the following set (see below).
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The collection has over 5000 elements. You need to do some pre-processing before you can use split map. import ee
import geemap
m = geemap.Map()
esri_lulc_ts= ee.ImageCollection("projects/sat-io/open-datasets/landcover/ESRI_Global-LULC_10m_TS")
year_2017 = esri_lulc_ts.filterDate('2017-01-01','2017-12-31').mosaic().remap([1,2,4,5,7,8,9,10,11],[1,2,3,4,5,6,7,8,9])
year_2023 = esri_lulc_ts.filterDate('2023-01-01','2023-12-31').mosaic().remap([1,2,4,5,7,8,9,10,11],[1,2,3,4,5,6,7,8,9])
lengend_dict = geemap.builtin_legends['ESRI_LandCover_TS']
vis_params = {"min": 1, "max": 9, "palette": list(lengend_dict.values())}
layer_2017 = geemap.ee_tile_layer(year_2017, vis_params, '2017')
layer_2023 = geemap.ee_tile_layer(year_2023, vis_params, '2023')
m.split_map(layer_2017, layer_2023)
m |
Beta Was this translation helpful? Give feedback.
The collection has over 5000 elements. You need to do some pre-processing before you can use split map.