ruggedness,GRaster-method {fasterRaster} | R Documentation |
Terrain ruggedness index
Description
For a given focal grid cell, the terrain ruggedness index (TRI) is calculated by taking the square root of the average of the squared difference between the focal cell's elevation and the elevations of the 8 surrounding cells, or
\sqrt(\sum_{i = 1}^{8}(m_i - m_0)^2 / 8)
where m_0
is the elevation of the focal cell and m_i
is the elevation of the ith grid cell.
Usage
## S4 method for signature 'GRaster'
ruggedness(x)
Arguments
x |
A |
Value
A GRaster
.
References
Riley, S.J., DeGloria, S.D., and Elliot, R. 1999. A terrain ruggedness index that quantifies topographic heterogeneity. Intermountain Journal of Sciences 5:23-27.
See Also
terrain()
, wetness()
, geomorphons()
Examples
if (grassStarted()) {
# Setup
library(terra)
# Elevation raster
madElev <- fastData("madElev")
# Convert to GRaster:
elev <- fast(madElev)
# Terrain ruggedness index:
tri <- ruggedness(elev)
plot(c(elev, tri))
# Topographic wetness index:
twi <- wetness(elev)
plot(c(elev, twi))
}
[Package fasterRaster version 8.4.0.3 Index]