LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

gdaldem

analyzes and visualizes terrain elevation

TLDR

Generate a hillshade from a DEM
$ gdaldem hillshade [dem.tif] [hillshade.tif]
copy
Create a slope map in degrees
$ gdaldem slope [dem.tif] [slope.tif]
copy
Generate an aspect map
$ gdaldem aspect [dem.tif] [aspect.tif]
copy
Create color relief using a color table file
$ gdaldem color-relief [dem.tif] [colors.txt] [relief.tif]
copy
Generate hillshade with custom light direction and altitude
$ gdaldem hillshade -az [315] -alt [45] [dem.tif] [hillshade.tif]
copy
Compute Terrain Ruggedness Index
$ gdaldem TRI [dem.tif] [tri.tif]
copy

SYNOPSIS

gdaldem mode [options] input output

DESCRIPTION

gdaldem analyzes and visualizes digital elevation models. It generates terrain derivatives including hillshade, slope, aspect, and various roughness indices.The tool produces visualization-ready output from raw elevation data. Hillshading creates realistic terrain lighting. Slope and aspect support terrain analysis.gdaldem is essential for cartographic terrain representation and geomorphological analysis.

PARAMETERS

MODE

Operation: hillshade, slope, aspect, color-relief, TRI, TPI, roughness.
INPUT
Input DEM raster.
OUTPUT
Output raster file.
-az DEGREES
Light azimuth for hillshade.
-alt DEGREES
Light altitude for hillshade.
-s SCALE
Ratio of vertical to horizontal units (e.g., 111120 for feet with degree coordinates).
-z FACTOR
Vertical exaggeration factor.
-of FORMAT
Output raster format (default: GTiff).
-compute_edges
Compute values at raster edges and nodata boundaries.
--help
Display help information.

CAVEATS

Requires properly scaled DEM. Edge effects at boundaries. Large files need more memory.

HISTORY

gdaldem is part of GDAL (Geospatial Data Abstraction Library), providing DEM analysis tools for terrain visualization and analysis.

SEE ALSO

Copied to clipboard
Kai