
Calculate specific landscape metrics at point locations
Source:R/calc_specfic_lsm.R
calc_specific_lsm.RdCalculate specific landscape metrics at point locations, for classified raster object. Calls the function calc_lsm() internally.
The character vector of predictor names include the specified buffer radii within which to summarise each metric.
Refer to landscapemetrics::list_lsm() for the full list of metric names and abbreviations.
Usage
calc_specific_lsm(
raster,
class_names,
class_values,
predictors_lsm,
points,
na_threshold = 90,
point_id = "point_id",
...
)Arguments
- raster
A classified SpatRaster object (
terra::rast()). Pixels have integer values.- class_names
Vector (character) of land cover class names to be used to identify the corresponding integer values in
class_values.- class_values
Vector of (integer) values of interest within the classified rasters in
raster. Should not include the value0.- predictors_lsm
Vector (character) of predictor variables to be calculated from the raster(s). The naming format is
r<radius of point buffer in metres>m_lsm_<class>_<metric>(e.g.r50m_lsm_veg_pland). Refer tolandscapemetrics::list_lsm()for the full list of metrics.- points
Points locations (sf object) to calculate the metrics.
- na_threshold
Value for calculated predictor will be
NAif the percentage of raster data within the respective point buffer areas is less than this value (0to100).- point_id
Column name of the sampling point id within the
pointssf. Defaults to"point_id".- ...
Arguments passed on to
calc_lsm()