ee.Terrain.hillshade

  • Computes a hillshade, which is a shaded relief map, from a Digital Elevation Model (DEM) to visualize terrain.

  • The ee.Terrain.hillshade() function takes an elevation image, azimuth, and elevation as input to generate the hillshade.

  • Users can customize the illumination direction by specifying the azimuth (direction) and elevation (angle) of the light source.

  • An example is provided using the ETOPO1 bedrock elevation data to demonstrate hillshade creation and visualization.

Computes a simple hillshade from a DEM.

UsageReturns
ee.Terrain.hillshade(input, azimuth, elevation)Image
ArgumentTypeDetails
inputImageAn elevation image, in meters.
azimuthFloat, default: 270The illumination azimuth in degrees from north.
elevationFloat, default: 45The illumination elevation in degrees.

Examples

Code Editor (JavaScript)

var elevation = ee.Image('NOAA/NGDC/ETOPO1').select('bedrock');
var exaggeration = 20;
var hillshade = ee.Terrain.hillshade(elevation.multiply(exaggeration));
Map.addLayer(hillshade, null, 'ETOPO1 Hillshade');

Python setup

See the Python Environment page for information on the Python API and using geemap for interactive development.

import ee
import geemap.core as geemap

Colab (Python)

elevation = ee.Image('NOAA/NGDC/ETOPO1').select('bedrock')
exaggeration = 20
hillshade = ee.Terrain.hillshade(elevation.multiply(exaggeration))
m = geemap.Map()
m.add_layer(hillshade, None, 'ETOPO1 Hillshade')
m