Learn R Programming

SurfRough (version 0.0.1.2)

RRIK3: RRIK3: Radial Roughness index with differences of order 3

Description

Extension of RRI using differences of order 3, with a 5x5 kernel. Accordingly, this version filters out a trend of order 2, so it reduces still more the dependence on slope and partially on curvature (for filtering of curvature better to select RRIk4()). The input is the DEM/image (no need to detrend).

Usage

RRIK3(x, ...)

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

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

Value

isotropic roughness (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++, still to implement)

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=""))
roughRRIK3=RRIK3(dem)
plot(roughRRIK3)

Run the code above in your browser using DataLab