geo-registry

Terrain Ruggedness Index

How much each cell of an elevation raster differs in height from its eight neighbours.

Pitfall. Engines use different formulas under the same name (a square root of summed squares, a mean of absolute differences, a root mean square), which differ by a factor of 2 or more.
Pitfall. Cells on the raster's edge have incomplete neighbourhoods; engines leave them nodata or compute them differently.
About this operation
Also called TRI, ruggedness index, Riley TRI, gdaldem TRI
Group raster/terrain
Checks raster.nodata
Pitfalls 2 listed above
Columbus tool Not stated
Notes Not stated
Status active
Broader Not stated
Narrower Not stated
Related

Parameters

Name Type Required Default Values Note
algorithm enum no riley riley, wilson, rmsd riley: square root of the sum of squared differences (Riley and others, 1999); wilson: mean absolute difference (Wilson and others, 2007); rmsd: root mean square difference.

Inputs and outputs

Direction Name Type Geometry Note
Input raster raster Not stated An elevation model.
Output output raster Not stated Not stated

In each engine

Engine Tool Parameters Differences
gdal gdal raster tri
  • algorithm → algorithm : riley = Riley; wilson = Wilson. not supported: rmsd
  • raster → input
  • output → output
  • Edge cells are computed from incomplete neighbourhoods unless --no-edges leaves them as nodata.
postgis-raster st_tri
  • algorithm always wilson
  • raster → rast
  • The mean of the absolute differences from the eight neighbours.
qgis gdal:triterrainruggednessindex
  • algorithm always riley
  • raster → INPUT
  • output → OUTPUT
  • Cells on the raster's edge are left as nodata unless edges are computed (COMPUTE_EDGES).
qgis native:ruggednessindex
  • algorithm always riley
  • raster → INPUT
  • output → OUTPUT
  • Z_FACTOR scales the elevations first; edge cells are computed from the neighbours that exist.
terra terra::terrain
  • algorithm → v : riley = TRIriley; wilson = TRI; rmsd = TRIrmsd
  • raster → x
  • v = 'TRI' is the mean absolute difference; 'TRIriley' Riley's index; 'TRIrmsd' the root mean square difference.
whiteboxtools RuggednessIndex
  • algorithm always rmsd
  • raster → dem
  • output → output
  • Described as Riley's index, but computes the root mean square of the differences from the eight neighbours (Riley's value divided by the square root of 8).