Google Earth Engine Tutorial: Compare Terrain Morphometry and Elevation
Credit: Youtube Channel “Terra Spatial, Learn how to compare terrain morphometry and elevation patterns using SRTM and ALOS DSM datasets.”
You can see all the tutorials from here: Techgeo Academy.
Google Earth Engine Tutorial: Compare Terrain Morphometry and Elevation
Google Earth Engine (GEE) offers powerful tools for analyzing terrain characteristics. This tutorial demonstrates how to compare elevation data with morphometric parameters like slope, aspect, and curvature using GEE. These metrics are crucial for understanding landscape features and their implications in environmental studies, geology, and urban planning.
Step 1: Accessing Elevation Data
Begin by loading a global elevation dataset. A commonly used dataset is the SRTM (Shuttle Radar Topography Mission). Use the following code to access it:
var elevation = ee.Image("USGS/SRTMGL1/SRTMGL1_003");Visualize the elevation layer using a color palette to highlight variations in height:
Map.addLayer(elevation, {min: 0, max: 3000, palette: ['0000ff', '00ff00', 'ff0000']}, 'Elevation');Step 2: Calculating Terrain Morphometry
GEE’s ee.Algorithms.Terrain module provides functions to compute slope, aspect, and curvature. Run the following code to generate these parameters:
var terrain = ee.Algorithms.Terrain(elevation);
var slope = terrain.select('slope');
var aspect = terrain.select('aspect');
var curvature = terrain.select('curvature');Visualizing these layers helps identify features like steep slopes, direction of sunlight exposure (aspect), and landform shapes (curvature).
Step 3: Overlaying and Comparing Layers
Create a composite image to compare elevation and morphometry. This can be done by overlaying layers with transparency or using multiple panels:
Map.setOptions('hybrid');
Map.addLayer(elevation, {min: 0, max: 3000, palette: ['0000ff', '00ff00', 'ff0000']}, 'Elevation');
Map.addLayer(slope, {min: 0, max: 90, palette: ['green', 'yellow', 'red']}, 'Slope');
Map.addLayer(aspect, {min: 0, max: 360, palette: ['blue', 'green', 'pink']}, 'Aspect');Use the Inspector tool in GEE to click on the map and retrieve values from all layers simultaneously for analysis.
Step 4: Exporting and Analyzing Results
Export the computed layers as GeoTIFF files for further analysis in GIS software:
Export.image.toDrive({
image: slope,
description: 'slope_export',
folder: 'GEE_Exports',
fileNamePrefix: 'slope_raster',
region: geometry,
scale: 30,
maxPixels: 1e10
});Analyze the output to discern patterns such as how steep the area is relative to elevation, or how aspect influences solar radiation exposure.
Customizing Visual Aids
Adjust the visualization parameters: add legends, change color schemes, or overlay vector data (e.g., rivers, roads) to contextualize morphometric data better.
FAQ
What datasets are best for elevation analysis in GEE?
The SRTM dataset is widely used for its global coverage and high accuracy. Other options include the ASTER GDEM and MERIT elevation data.
How do slope, aspect, and curvature relate to terrain?
Slope measures steepness, aspect indicates the direction a slope faces, and curvature describes the shape of the terrain (convex, concave, flat). These metrics help understand erosion patterns, hydrology, and land use suitability.
Why is morphometry important in GIS studies?
Morphometry quantifies landform features, enabling spatial analysis of drainage systems, landslide risks, and ecological zones. It complements elevation data by highlighting form rather than just height.
Can I use other elevation datasets besides SRTM?
Yes, GEE supports multiple elevation datasets. Replace the dataset name in the ee.Image function with the desired source, such as “NASA/NASADEM_HGT” for higher-resolution data.
How do I handle large datasets in GEE?
Use the clip method to limit the area of interest. Explore reproject and reduceRegion for efficient processing and analysis at scale.






