Skip to contents

Slope (radians) from Horn's (1981) finite differences (neighbors = 4: Fleming and Hoffer), aspect (radians clockwise from north), TPI, TRI (Wilson et al. 2007), TRI of Riley et al. (1999), TRI root mean square, roughness; edge cells NA. Identical to the Python arm morie.fn.demops.terrain_indices.

Usage

TerrainIndices(dem, res = 1, neighbors = 8)

Arguments

dem

Elevation matrix (rows from north to south).

res

Cell size.

neighbors

4 or 8.

Value

List of matrices.

References

Horn, B. K. P. (1981). Hill shading and the reflectance map. Proceedings of the IEEE 69, 14-47.

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.

Examples

TerrainIndices(rbind(c(3, 3, 3), c(2, 2, 2), c(1, 1, 1)))$aspect
#>      [,1]     [,2] [,3]
#> [1,]  NaN      NaN  NaN
#> [2,]  NaN 3.141593  NaN
#> [3,]  NaN      NaN  NaN