Learn R Programming

SurfRough (version 0.0.1.2)

RRIcore: RRIcore: RRI using only the four inner second order directional differences of the RRI kernel

Description

RRIcore is like RRI, but it just uses the four inner second order directional differences, using a 3x3 kernel. There are some analogies with Casorati curvature. The input is the DEM/image (no need to detrend).

Usage

RRIcore(x, ...)

# S3 method for numeric RRIcore(x, ...)

# S3 method for SpatRaster RRIcore(x, ..., .method = c("rcpp", "r"))

Value

RRIcore (in the same units of input)

Arguments

x

A DEM/image as a SpatRaster or a vector of numeric values from a focal window in a DEM from which to compute the index

...

reserved for future use

.method

Either r or rcpp (fast batch processing using C++)

References

Trevisani S., Teza G., Guth P.L., 2023. Hacking the topographic ruggedness index. Geomorphology, tools:::Rd_expr_doi("doi:10.1016/j.geomorph.2023.108838").

Examples

Run this code
library(terra)
dem= rast(paste(system.file("extdata", package = "SurfRough"), "/trento1.tif",sep=""))
roughRRIcore=RRIcore(dem)
plot(roughRRIcore)

Run the code above in your browser using DataLab