Calculate landscape metrics from a classified raster, at specific point locations and buffer radii.
Usage
calc_lsm(
raster,
points,
buffer_sizes,
class_names = NULL,
class_values = NULL,
landscape_name = NULL,
point_id = "point_id",
period = "period",
what = NULL,
level = NULL,
...
)
Arguments
- raster
SpatRaster object (
terra::rast()
). Classified land cover raster object to be analysed. The number of layers should correspond to the number of survey periods present inpoints
.- points
Points locations (sf object) to calculate the metrics.
- buffer_sizes
Radius of circle (in mapunits) for each point location; metrics will be calculated within the buffer area.
- 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
raster
. Should not include the value0
.- landscape_name
Character string for name of landscape. Used to label landscape-level metrics.
- point_id
Column name of the sampling point id within the
points
sf.- period
Column name of the survey period within the
points
sf. The column should contain integers that correspond to the number of layers inraster
.- what
Argument passed to
landscapemetrics::calculate_lsm()
. Currently only supports class- and landscape-level metrics- level
Argument passed to
landscapemetrics::calculate_lsm()
. Currently only supports class- and landscape-level metrics.- ...
Additional arguments (e.g.
type=
) passed tolandscapemetrics::calculate_lsm()
.