View source: R/GeostTextureLibrarySharedRoxy.R
Meanscan | R Documentation |
With this you can compute variogram and madogram (but remember that for classical geostatistical indexes you need to divide the derived isotropic index by 2!). Moreover you can calibrate the exponent in order to filter or enhance hotspots and discontinuities
Meanscan(inRaster, kernels, w, exponent)
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) |
exponent |
The exponent: increasing the exponent increase the sensitivity to outliers. Set 2 for Variogram and 1 for Madogram. |
A SpatRaster with 3 layers: 1)isotropic roughness; 2) direction of anisotropy; 3)index of anisotropy.
#' Variogram-like 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=Meanscan(dem,k2ck2, w,2)
#(divide by two if you need classical estimator)
plot(rough2c$IsoRough)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.