Learn R Programming

SurfRough (version 0.0.1.2)

RRIk4: RRIk4: Radial Roughness index with fourth order differences

Description

RRI based on increments of order 4, permits the filtering of curvature (filters a polynomial of order 3), always using a 5x5 kernel. The input is the DEM/image (no need to detrend).

Usage

RRIk4(x, ...)

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

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

Value

RRIk4 (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

  1. 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").

  2. Trevisani, S., Guth, P.L., 2025. Surface Roughness in Geomorphometry: From Basic Metrics Toward a Coherent Framework. Remote Sensing 17, tools:::Rd_expr_doi("doi:10.3390/rs17233864").

Examples

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

Run the code above in your browser using DataLab