I am trying to download an image from gee using the geemap python library, from the Dynamic Earth land cover dataset for a particular lat/long.
However, I'm struggling using the geemap.download_ee_image() function as the land cover data is not stored in a single layer or as a ee.Image object.
I have been following this guide, but the input data don't seem to match up
Any ideas of what I could do?
Here is the code I'm trying to modify:
Map = geemap.Map()
region = ee.Geometry.BBox(-89.7088, 42.9006, -89.0647, 43.2167)
start_date = '2021-01-01'
end_date = '2022-01-01'
dw_class = geemap.dynamic_world(region, start_date, end_date, return_type='class')
dw = geemap.dynamic_world(region, start_date, end_date, return_type='hillshade')
dw_vis = {
"min": 0,
"max": 8,
"palette": [
"#419BDF",
"#397D49",
"#88B053",
"#7A87C6",
"#E49635",
"#DFC35A",
"#C4281B",
"#A59B8F",
"#B39FE1",
],
}
Map.addLayer(dw_class, dw_vis, 'DW Land Cover', False)
Map.addLayer(dw, {}, 'DW Land Cover Hillshade')
Map.add_legend(title="Dynamic World Land Cover", builtin_legend='Dynamic_World')
Map.setCenter(region)
Map