Learn R Programming

SurfRough (version 0.0.1.0)

Madscan: Calculate MAD basic indexes

Description

Calculate MAD basic indexes considering a specif lag and difference of order K. It computes 3 indexes of roughness/image texture: isotropic/omnidirectional; direction of maximum continuity; anisotropy index. The anisotropy index is based on vector dispersion approach: 0 minimum anisotropy; 1 maximum anisotropy. The direction of anisotropy is in degrees according to geographical convention.

Usage

Madscan(inRaster, kernels, w)

Value

A list of 3 rasters: 1)isotropic roughness; 2) direction of anisotropy;3)index of anisotropy.

Arguments

inRaster

The DEM/residual-dem from which to compute the indexes

kernels

The kernels to be used for computing the directional differences (e.g. order 1 or 2 for various lags)

w

The moving window adopted for computing the geostatistical index (i.e., MAD)

References

  1. Trevisani, S. & Rocca, M. 2015. MAD: Robust image texture analysis for applications in high resolution geomorphometry. Computers and Geosciences, vol. 81, pp. 78-92.

  2. Trevisani, S. Teza, G., Guth, P., 2023. A simplified geostatistical approach for characterizing key aspects of short-range roughness. CATENA,Volume 223, ISSN 0341-8162,https://doi.org/10.1016/j.catena.2023.106927

Examples

Run this code
# MAD for lag 2 with differences of order 2 using a circular search window of radius 3.
# Using differences of order 1, you should
# apply these on a detrended surface/image.
dem=rast(paste(system.file("extdata", package = "SurfRough"), "/trento1.tif",sep=""))
w=KernelCircular(3)
rough2c=Madscan(dem,k2ck2, w)
#Plot isotropic roughness
plot(rough2c$IsoRough)
#Plot anisotropy index/strenght
plot(rough2c$AnisoR)

Run the code above in your browser using DataLab