Learn R Programming

README

Sebastiano Trevisani

July 29, 2024

SurfRough

Algorithms for surface texture (roughness) and image texture analysis using a geostatistical based approach from https://doi.org/10.1016/j.catena.2023.106927

Installation

Update 6 Sept. 2024 The package has been published in Cran repository: https://cran.r-project.org/package=SurfRough So you can install it with the usual R method (install.packages())

To install this package first install the remotes package if you do not have it using the code install.packages("remotes"). Then this package can be installed from github using the code remotes::install_github("strevisani/SurfRough"). This will install SurfRough and its dependencies such as terra which is used for the handling of spatial raster data.

Copy Link

Version

Install

install.packages('SurfRough')

Monthly Downloads

291

Version

0.0.1.2

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Sebastiano Trevisani

Last Published

January 27th, 2026

Functions in SurfRough (0.0.1.2)

k1ck4

basic kernels
anisoRL

Calculate the index of anisotropy considering the spatial variability along 4 directions
circularDispersionGV

Compute circular variance of aspect (i.e. of the gradient vector)
stdST

stdST: standard deviation in a moving window
RRIk4

RRIk4: Radial Roughness index with fourth order differences
circularDispersionNV

Compute circular variance of normal vectors to surface
TRIbi

TRIbi: TRI with bilinear interpolation along diagonals
circularEigenNV

Compute circular variance of normal vectors to surface
Trik2

Improved TRI (with differences of order 2), reducing/removing slope dependence (for testing purposes)
k1ck2

basic kernels
Trik2.SpatRaster

Improved TRI (with differences of order 2), reducing/removing slope dependence (for testing purposes).
k1c

basic kernels
k2c

basic kernels
k2ck2

basic kernels
Trik2.numeric

Improved TRI (with differences of order 2), reducing/removing slope dependence (for testing purposes)
k4c

basic kernels
k05ck2

basic kernels
iqrST

iqrST: interquartile range in a moving window
anisoDir

Calculate the direction of maximum continuity considering 4 directions
k6c

basic kernels
k8c

basic kernels
Meanscan

Calculate less robust geostatistical indices (mean of absolute differences raised to an exponent)
RRI

RRI: Radial Roughness index
CalcMeans

Calculate the mean of absolute values raised to an exponent found in a search window
RRIK3

RRIK3: Radial Roughness index with differences of order 3
RRIMax

RRIMax: Maximum Radial Roughness index
Madscan

Calculate MAD basic indices
KernelCircular

Build a circular moving window
MadscanL

Calculate MAD basic indices (version for large files)
KernelRectangular

Build a rectangular kernel of size X x Y
CalcMedians

Calculate the median of absolute values found in a search window for each raster in a list
anisoR

Calculate the index of anisotropy considering the spatial variability along 4 directions
RRIMin

RRIMin: Minimum Radial Roughness index
RRIcore

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

Calculate the direction of maximum continuity considering 4 directions