Creating a shaded relief map by blending DEM and hillshade
Uncomment the following line to install geemap if needed.
# !pip install geemap
Import libraries
import ee
import geemap
import geemap.colormaps as cm
Create an interactive map
Map = geemap.Map()
Map
Add DEM and hillshade to the map
dem = ee.Image("CGIAR/SRTM90_V4")
hillsahde = ee.Terrain.hillshade(dem)
vis = {'min': 0, 'max': 6000, 'palette': cm.palettes.dem}
Map.addLayer(hillsahde, {}, 'Hillshade')
Map.addLayer(dem, vis, 'DEM')
Create a blended image by blending DEM and hillshade
blend = geemap.blend(top_layer=dem, top_vis=vis)
Map.addLayer(blend, {}, 'Blend')
Add NLCD land cover to the map
nlcd = ee.Image("USGS/NLCD_RELEASES/2019_REL/NLCD/2019").select('landcover')
nlcd_vis = {'bands': ['landcover']}
Map.addLayer(nlcd, nlcd_vis, 'NLCD')
Create a blended image by blending NLCD and DEM.
result = geemap.blend(nlcd, dem, top_vis=nlcd_vis, expression='a*b')
Map.addLayer(result, {}, 'Blend NLCD')