Calculates the various texture metrics over a window centered
on an individual pixel. This function is modified slightly from the
calculate_lsm_focal
function in the landscapemetrics package (Hesselbarth et al. 2019).
.calculate_met_focal(landscape, n_row, n_col, points, what, ...)
The metric value over the window.
A raster or matrix.
Numeric. Number of rows in focal window.
Numeric. Number of columns in focal window.
Dataframe. Coordinates and values of cells, calculated with the *landscapemetrics*
raster_to_points
function.
Character. Metric to calculate for each window. Metrics from the geodiv package are listed below.
Additional arguments for the metric functions. All applicable arguments will be applied to the entire list of metrics.
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
Hesselbarth, M.H.K., Sciaini, M., With, K.A., Wiegand, K., Nowosad, J. 2019. landscapemetrics: an open-source R tool to calculate landscape metrics. - Ecography 42:1648-1657(ver. 0).