Calculates a measure of local topographic relief. The TRI computes the root-mean-square-deviation (RMSD) for each grid cell in a DEM by calculating the residuals between a cell and its eight neighbors.
Arguments
- dem
Raster object of class WhiteboxRaster. See
wbw_read_raster()
for more details.
Value
WhiteboxRaster object containing TRI values
Details
Unlike the original Riley et al. (1999) TRI, this implementation normalizes for the number of cells in the local window. This modification allows for varying numbers of neighboring cells along grid edges and areas bordering NoData cells. Note that this means output values cannot be directly compared with the index ranges (level to extremely rugged terrain) provided in Riley et al. (1999).
References
Riley, S. J., DeGloria, S. D., and Elliot, R. (1999). Index that quantifies topographic heterogeneity. Intermountain Journal of Sciences, 5(1-4), 23-27.
For more information, see https://www.whiteboxgeo.com/manual/wbw-user-manual/book/tool_help.html#ruggedness_index
Examples
f <- system.file("extdata/dem.tif", package = "wbw")
wbw_read_raster(f) |>
wbw_ruggedness_index()
#> +-----------------------------------------------+
#> | WhiteboxRaster |
#> | TRI |
#> |...............................................|
#> | bands : 1 |
#> | dimensions : 726, 800 (nrow, ncol) |
#> | resolution : 5.002392, 5.000243 (x, y) |
#> | EPSG : 2193 (Linear_Meter) |
#> | extent : 1925449 1929446 5582091 5585717 |
#> | min value : 0.000000 |
#> | max value : 11.271574 |
#> +-----------------------------------------------+