window_metric {geodiv} | R Documentation |
Calculate Texture Metric for Single Pixel
Description
Calculates the various texture metrics over a window centered on an individual pixel.
Usage
window_metric(
x,
coords,
window_type = "square",
size = 11,
metric,
args = NULL
)
Arguments
x |
A raster or matrix. |
coords |
Dataframe. Coordinates of window edges. |
window_type |
Character. Type of window, either circular or square. |
size |
Numeric. Edge length or diameter of window in number of pixels. |
metric |
Character. Metric to calculate for each window. Metrics from the geodiv package are listed below. |
args |
List. Arguments from function to be applied over each window (e.g., list(threshold = 0.2)). |
Details
Metrics from geodiv package:
'sa'
: average surface roughness'sq'
: root mean square roughness's10z'
: ten-point height'sdq'
: root mean square slope of surface, 2-point method'sdq6'
: root mean square slope of surface, 7-point method'sdr'
: surface area ratio'sbi'
: surface bearing index'sci'
: core fluid retention index'ssk'
: skewness'sku'
: kurtosis'sds'
: summit density'sfd'
: 3d fractal dimension'srw'
: dominant radial wavelength, radial wavelength index, mean half wavelength'std'
: angle of dominating texture, texture direction index'svi'
: valley fluid retention index'stxr'
: texture aspect ratio'ssc'
: mean summit curvature'sv'
: maximum valley depth'sph'
: maximum peak height'sk'
: core roughness depth'smean'
: mean peak height'svk'
: reduced valley depth'spk'
: reduced peak height'scl'
: correlation length'sdc'
: bearing area curve height interval
Value
A raster with pixel values representative of the metric value for the window surrounding that pixel.
Note
Note that if calculating the metric at the edge of a raster or matrix,
the input raster/matrix must be padded. This can be done using the pad_edges
function.