Linux command
gdaldem 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Generate a hillshade
gdaldem hillshade [dem.tif] [hillshade.tif]
Create a slope map
gdaldem slope [dem.tif] [slope.tif]
Generate an aspect map
gdaldem aspect [dem.tif] [aspect.tif]
Create color relief
gdaldem color-relief [dem.tif] [colors.txt] [relief.tif]
Generate hillshade with custom
gdaldem hillshade -az [315] -alt [45] [dem.tif] [hillshade.tif]
Compute Terrain Ruggedness Index
gdaldem TRI [dem.tif] [tri.tif]
说明
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.
参数
- -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.
FAQ
What is the gdaldem command used for?
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.
How do I run a basic gdaldem example?
Run `gdaldem hillshade [dem.tif] [hillshade.tif]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -az _DEGREES_ do in gdaldem?
Light azimuth for hillshade.