NAME
r.richdem.terrainattribute - Calculate terrain attributes using RichDEM
KEYWORDS
raster,
terrain,
geomorphology
SYNOPSIS
r.richdem.terrainattribute
r.richdem.terrainattribute --help
r.richdem.terrainattribute input=name output=name [attribute=string] [zscale=float] [--overwrite] [--help] [--verbose] [--quiet] [--ui]
Flags:
- --overwrite
- Allow output files to overwrite existing files
- --help
- Print usage summary
- --verbose
- Verbose module output
- --quiet
- Quiet module output
- --ui
- Force launching GUI dialog
Parameters:
- input=name [required]
- Input elevation raster
- output=name [required]
- Output terrain attribute raster
- attribute=string
- Terrain attribute to calculate
- Options: slope_riserun, slope_percentage, slope_degrees, slope_radians, aspect, curvature, planform_curvature, profile_curvature
- zscale=float
- Z-axis scale factor applied before calculation
- Default: 1.0
r.richdem.terrainattribute calculates first- and second-order terrain
attributes from a digital elevation model. Available attributes are slope (in
four unit systems), aspect, and three curvature measures.
Slope is the magnitude of the terrain gradient—the rate of elevation change in
the steepest downhill direction. It is computed using the Horn (1981) method,
which uses a weighted average of finite differences over a 3×3 neighborhood to
estimate the east–west and north–south gradient components. Slope is available
in four unit systems:
- slope_riserun — dimensionless rise/run ratio (tan of slope angle)
- slope_percentage — rise/run expressed as a percentage
- slope_degrees — angle in degrees from horizontal
- slope_radians — angle in radians from horizontal
aspect is the compass direction of the steepest downhill gradient,
measured in degrees clockwise from north (0–360°), using the Horn (1981)
method.
Curvature describes the rate of change of slope and is useful for identifying
ridges, valleys, and areas of flow convergence or divergence. Three curvature
attributes are available, following Zevenbergen and Thorne (1987):
- curvature — total (mean) curvature; positive values indicate
convex surfaces, negative indicate concave surfaces.
- planform_curvature — curvature of the contour line perpendicular
to the slope direction; positive values indicate flow divergence,
negative indicate convergence.
- profile_curvature — curvature in the slope direction; positive
values indicate slope acceleration (convex profile), negative indicate
slope deceleration (concave profile).
The optional
zscale parameter multiplies elevation values before
computation. This is useful when the vertical and horizontal units differ
(e.g., elevation in meters, horizontal units in degrees for geographic
coordinates). A common choice for degree-unit data is
zscale = 1/111000 to convert degrees to meters.
Computations use a 3×3 moving window and assume a planar local coordinate
system. For data in geographic (latitude/longitude) coordinates, the
horizontal scale varies with latitude and slope results will be approximate.
In such cases, project to an equal-area or conformal coordinate system before
computing terrain attributes, or apply an appropriate
zscale.
To compute slope and aspect simultaneously in GRASS, consider
r.slope.aspect. For more
morphometric parameters computed over variable window sizes, see
r.param.scale.
This module requires the
RichDEM Python package,
which is not a standard GRASS GIS dependency and must be installed separately:
If pip install richdem fails (the package requires a C++ compiler),
build from source:
git clone https://github.com/r-barnes/richdem.git
cd richdem/wrappers/pyrichdem
pip install -e .
Ensure that RichDEM is installed into the same Python environment used by GRASS GIS.
Calculate slope in degrees:
r.richdem.terrainattribute input=dem output=slope attribute=slope_degrees
Calculate aspect:
r.richdem.terrainattribute input=dem output=aspect attribute=aspect
Calculate planform curvature:
r.richdem.terrainattribute input=dem output=planform_curv attribute=planform_curvature
Scale vertical units (elevation in feet, horizontal in feet):
r.richdem.terrainattribute input=dem_ft output=slope attribute=slope_degrees zscale=1.0
- Horn, B.K.P. (1981).
Hill shading and the reflectance map.
Proceedings of the IEEE Vol 69(1), pp 14–47.
DOI: 10.1109/PROC.1981.11918
- Zevenbergen, L.W., Thorne, C.R. (1987).
Quantitative analysis of land surface topography.
Earth Surface Processes and Landforms Vol 12(1), pp 47–56.
DOI: 10.1002/esp.3290120107
- Barnes, R. (2016). RichDEM: Terrain Analysis Software.
URL: http://github.com/r-barnes/richdem
r.slope.aspect,
r.param.scale,
r.richdem.flowaccumulation
Richard Barnes (RichDEM library)
GRASS GIS bindings: Andrew D. Wickert, with assistance from Claude Sonnet 4.6
SOURCE CODE
Available at:
r.richdem.terrainattribute source code
(history)
Latest change: Saturday May 30 11:40:25 2026 in commit: 6b92b3683d38e4bda357b11ae56563b8ba60d0ce
Main index |
Raster index |
Topics index |
Keywords index |
Graphical index |
Full index
© 2003-2026
GRASS Development Team,
GRASS 8.5.1dev Reference Manual