Calculates the various texture metrics over a window centered on an individual pixel.
window_metric(
x,
coords,
window_type = "square",
size = 11,
metric,
args = NULL
)
A raster with pixel values representative of the metric value for the window surrounding that pixel.
A raster or matrix.
Dataframe. Coordinates of window edges.
Character. Type of window, either circular or square.
Numeric. Edge length or diameter of window in number of pixels.
Character. Metric to calculate for each window. Metrics from the geodiv package are listed below.
List. Arguments from function to be applied over each window (e.g., list(threshold = 0.2)).
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