landscapemetrics (version 1.4.4)

scale_sample: scale_sample

Description

Metrics on changing sample scale

Usage

scale_sample(landscape, y, shape, size, max_size, verbose, progress, ...)

# S3 method for RasterLayer scale_sample( landscape, y, shape = "square", size, max_size, verbose = TRUE, progress = FALSE, ... )

# S3 method for RasterStack scale_sample( landscape, y, shape = "square", size, max_size, verbose = TRUE, progress = FALSE, ... )

# S3 method for RasterBrick scale_sample( landscape, y, shape = "square", size, max_size, verbose = TRUE, progress = FALSE, ... )

# S3 method for stars scale_sample( landscape, y, shape = "square", size, max_size, verbose = TRUE, progress = FALSE, ... )

# S3 method for list scale_sample( landscape, y, shape = "square", size, max_size, verbose = TRUE, progress = FALSE, ... )

Arguments

landscape

Raster* Layer, Stack, Brick or a list of rasterLayers.

y

2-column matrix with coordinates or SpatialPoints.

shape

String specifying plot shape. Either "circle" or "square"

size

Approximated size of sample plot. Equals the radius for circles or half of the side-length for squares in mapunits. For lines size equals the width of the buffer.

max_size

Maximum size to which sample plot size is summed up.

verbose

Print warning messages.

progress

Print progress report.

...

Arguments passed on to calculate_lsm().

Value

tibble

Details

This function calculates the selected metrics in subsequential buffers around a/multiple point(s) of interest.

The size of the actual sampled landscape can be different to the provided size due to two reasons. Firstly, because clipping raster cells using a circle or a sample plot not directly at a cell center lead to inaccuracies. Secondly, sample plots can exceed the landscape boundary. Therefore, we report the actual clipped sample plot area relative in relation to the theoretical, maximum sample plot area e.g. a sample plot only half within the landscape will have a percentage_inside = 50. Please be aware that the output is sligthly different to all other lsm-function of landscapemetrics.

The metrics can be specified by the arguments what, level, metric, name and/or type (combinations of different arguments are possible (e.g. level = "class", type = "aggregation metric"). If an argument is not provided, automatically all possibilities are selected. Therefore, to get all available metrics, don't specify any of the above arguments.

See Also

list_lsm calculate_lsm sample_lsm construct_buffer

Examples

Run this code
# NOT RUN {
my_points = matrix(c(1265000, 1250000, 1255000, 1257000),
                  ncol = 2, byrow = TRUE)

scale_sample(landscape = augusta_nlcd, y = my_points,
size = 500, max_size = 5000, what = c("lsm_l_ent", "lsm_l_mutinf"))

# }

Run the code above in your browser using DataLab