View source: R/GeostTextureLibrarySharedRoxy.R
Madscan | R Documentation |
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.
Madscan(inRaster, kernels, w)
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) |
A list of 3 rasters: 1)isotropic roughness; 2) direction of anisotropy;3)index of anisotropy.
Trevisani, S. & Rocca, M. 2015. MAD: Robust image texture analysis for applications in high resolution geomorphometry. Computers and Geosciences, vol. 81, pp. 78-92.
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
# 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.
library(terra)
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.