Package 'landscapemetrics'

Title: Landscape Metrics for Categorical Map Patterns
Description: Calculates landscape metrics for categorical landscape patterns in a tidy workflow. 'landscapemetrics' reimplements the most common metrics from 'FRAGSTATS' (<https://www.fragstats.org/>) and new ones from the current literature on landscape metrics. This package supports 'terra' SpatRaster objects as input arguments. It further provides utility functions to visualize patches, select metrics and building blocks to develop new metrics.
Authors: Maximilian H.K. Hesselbarth [aut, cre] , Marco Sciaini [aut] , Jakub Nowosad [aut] , Sebastian Hanss [aut] , Laura J. Graham [ctb] (Input on package structure), Jeffrey Hollister [ctb] (Input on package structure), Kimberly A. With [ctb] (Input on package structure), Florian Privé [ctb] (Original author of underlying C++ code for get_nearestneighbour() function), Project Nayuki [ctb] (Original author of underlying C++ code for get_circumscribingcircle and lsm_p_circle), Matt Strimas-Mackey [ctb] (Bugfix in sample_metrics())
Maintainer: Maximilian H.K. Hesselbarth <[email protected]>
License: GPL-3
Version: 2.1.4
Built: 2024-09-21 06:45:44 UTC
Source: CRAN

Help Index


Augusta NLCD 2011

Description

A real landscape of area near Augusta, Georgia obtained from the National Land Cover Database (NLCD)

Usage

augusta_nlcd

Format

A raster object.

Source

https://www.mrlc.gov/nlcd2011.php

References

Homer, C.G., Dewitz, J.A., Yang, L., Jin, S., Danielson, P., Xian, G., Coulston, J., Herold, N.D., Wickham, J.D., and Megown, K., 2015, Completion of the 2011 National Land Cover Database for the conterminous United States-Representing a decade of land cover change information. Photogrammetric Engineering and Remote Sensing, v. 81, no. 5, p. 345-354


Calculate correlation

Description

Calculate correlation

Usage

calculate_correlation(
  metrics,
  method = "pearson",
  diag = TRUE,
  simplify = FALSE
)

Arguments

metrics

Tibble with results of as returned by the landscapemetrics package.

method

Type of correlation. See link{cor} for details.

diag

If FALSE, values on the diagonal will be NA.

simplify

If TRUE and only one level is present, only a tibble is returned.

Details

The functions calculates the correlation between all metrics. In order to calculate correlations, for the landscape level more than one landscape needs to be present. All input must be structured as returned by the landscapemetrics package.

Value

list

Examples

landscape <- terra::rast(landscapemetrics::landscape)
metrics <- calculate_lsm(landscape, what = c("patch", "class"))
calculate_correlation(metrics, method = "pearson")

calculate_lsm

Description

Calculate a selected group of metrics

Usage

calculate_lsm(
  landscape,
  level = NULL,
  metric = NULL,
  name = NULL,
  type = NULL,
  what = NULL,
  directions = 8,
  count_boundary = FALSE,
  consider_boundary = FALSE,
  edge_depth = 1,
  cell_center = FALSE,
  classes_max = NULL,
  neighbourhood = 4,
  ordered = TRUE,
  base = "log2",
  full_name = FALSE,
  verbose = TRUE,
  progress = FALSE
)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

level

Level of metrics. Either 'patch', 'class' or 'landscape' (or vector with combination).

metric

Abbreviation of metrics (e.g. 'area').

name

Full name of metrics (e.g. 'core area').

type

Type according to FRAGSTATS grouping (e.g. 'aggregation metrics').

what

Selected level of metrics: either "patch", "class" or "landscape". It is also possible to specify functions as a vector of strings, e.g. what = c("lsm_c_ca", "lsm_l_ta").

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

count_boundary

Include landscape boundary in edge length.

consider_boundary

Logical if cells that only neighbour the landscape boundary should be considered as core.

edge_depth

Distance (in cells) a cell has to be away from the patch edge to be considered as core cell.

cell_center

If true, the coordinates of the centroid are forced to be a cell center within the patch.

classes_max

Potential maximum number of present classes.

neighbourhood

The number of directions in which cell adjacencies are considered as neighbours: 4 (rook's case) or 8 (queen's case). The default is 4.

ordered

The type of pairs considered. Either ordered (TRUE) or unordered (FALSE). The default is TRUE.

base

The unit in which entropy is measured. The default is "log2", which compute entropy in "bits". "log" and "log10" can be also used.

full_name

Should the full names of all functions be included in the tibble.

verbose

Print warning messages.

progress

Print progress report.

Details

Wrapper to calculate several landscape metrics. 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.

For all metrics based on distances or areas please make sure your data is valid using check_landscape.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

list_lsm

Examples

## Not run: 
landscape <- terra::rast(landscapemetrics::landscape)
calculate_lsm(landscape, progress = TRUE)
calculate_lsm(landscape, what = c("patch", "lsm_c_te", "lsm_l_pr"))
calculate_lsm(landscape, level = c("class", "landscape"),
type = "aggregation metric")

## End(Not run)

Check input landscape

Description

Check input landscape

Usage

check_landscape(landscape, verbose = TRUE)

Arguments

landscape

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

verbose

Print warning messages.

Details

This function extracts basic information about the input landscape. It includes a type of coordinate reference system (crs) - either "geographic", "projected", or NA, units of the coordinate reference system, a class of the input landscape's values and the number of classes found in the landscape.

Value

tibble

Examples

augusta_nlcd <- terra::rast(landscapemetrics::augusta_nlcd)
check_landscape(augusta_nlcd)
podlasie_ccilc <- terra::rast(landscapemetrics::podlasie_ccilc)
check_landscape(podlasie_ccilc)
landscape <- terra::rast(landscapemetrics::landscape)
check_landscape(c(landscape, landscape))

extract_lsm

Description

Extract metrics

Usage

extract_lsm(
  landscape,
  y,
  extract_id = NULL,
  metric = NULL,
  name = NULL,
  type = NULL,
  what = NULL,
  directions = 8,
  progress = FALSE,
  verbose = TRUE,
  ...
)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

y

2-column matrix with coordinates or sf point geometries.

extract_id

Vector with id of sample points. If not provided, sample points will be labelled 1...n.

metric

Abbreviation of metrics (e.g. 'area').

name

Full name of metrics (e.g. 'core area')

type

Type according to FRAGSTATS grouping (e.g. 'aggregation metrics').

what

Selected level of metrics: either "patch", "class" or "landscape". It is also possible to specify functions as a vector of strings, e.g. what = c("lsm_c_ca", "lsm_l_ta").

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

progress

Print progress report.

verbose

Print warning messages.

...

Arguments passed to calculate_lsm().

Details

This functions extracts the metrics of all patches the spatial object(s) y (e.g. spatial points) are located within. Only patch level metrics are possible to extract. Please be aware that the output is slightly different to all other lsm-function of landscapemetrics. Returns a tibble with chosen metrics and the ID of the spatial objects.

Value

tibble

See Also

calculate_lsm

Examples

landscape <- terra::rast(landscapemetrics::landscape)

points <- matrix(c(10, 5, 25, 15, 5, 25), ncol = 2, byrow = TRUE)
extract_lsm(landscape, y = points)
extract_lsm(landscape, y = points, type = "aggregation metric")

## Not run: 
# use lines


## End(Not run)

get_adjacencies

Description

Fast calculation of adjacencies between classes in a raster

Usage

get_adjacencies(landscape, neighbourhood = 4, what = "full", upper = FALSE)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

neighbourhood

The number of directions in which cell adjacencies are considered as neighbours: 4 (rook's case), 8 (queen's case) or a binary matrix where the ones define the neighbourhood. The default is 4.

what

Which adjacencies to calculate: "full" for a full adjacency matrix, "like" for the diagonal, "unlike" for the off diagonal part of the matrix and "triangle" for a triangular matrix counting adjacencies only once.

upper

Logical value indicating whether the upper triangle of the adjacency matrix should be returned (default FALSE).

Details

A fast implementation with Rcpp to calculate the adjacency matrix for raster. The adjacency matrix is most often used in landscape metrics to describe the configuration of landscapes, is it is a cellwise count of edges between classes.

The "full" adjacency matrix is double-count method, as it contains the pairwise counts of cells between all classes. The diagonal of this matrix contains the like adjacencies, a count for how many edges a shared in each class with the same class.

The "unlike" adjacencies are counting the cellwise edges between different classes.

Value

matrix with adjacencies between classes in a raster and between cells from the same class.

Examples

landscape <- terra::rast(landscapemetrics::landscape)
# calculate full adjacency matrix
get_adjacencies(landscape, 4)

# equivalent with the terra package:
adjacencies <- terra::adjacent(landscape, 1:terra::ncell(landscape), "rook", pairs = TRUE)
table(terra::values(landscape, mat = FALSE)[adjacencies[,1]],
terra::values(landscape, mat = FALSE)[adjacencies[,2]])

# count diagonal neighbour adjacencies
diagonal_matrix <- matrix(c(1,  NA,  1,
                            NA,  0, NA,
                            1,  NA,  1), 3, 3, byrow = TRUE)
get_adjacencies(landscape, diagonal_matrix)

get_boundaries

Description

Get boundary cells of patches

Usage

get_boundaries(
  landscape,
  consider_boundary = FALSE,
  edge_depth = 1,
  as_NA = FALSE,
  patch_id = FALSE,
  return_raster = TRUE
)

Arguments

landscape

SpatRaster or matrix.

consider_boundary

Logical if cells that only neighbour the landscape boundary should be considered as edge.

edge_depth

Distance (in cells) a cell has the be away from the patch edge to be considered as core cell.

as_NA

If true, non-boundary cells area labeld NA.

patch_id

If true, boundary/edge cells are labeled with the original patch id.

return_raster

If false, matrix is returned.

Details

All boundary/edge cells are labeled 1, all non-boundary cells 0. NA values are not changed. Boundary cells are defined as cells that neighbour either a NA cell or a cell with a different value than itself. Non-boundary cells only neighbour cells with the same value than themself.

Value

List with SpatRaster or matrix

Examples

landscape <- terra::rast(landscapemetrics::landscape)
class_1 <- get_patches(landscape, class = 1)[[1]][[1]]

get_boundaries(class_1)
get_boundaries(class_1, return_raster = FALSE)

get_centroids

Description

Centroid of patches

Usage

get_centroids(
  landscape,
  directions = 8,
  cell_center = FALSE,
  return_vec = FALSE,
  verbose = TRUE
)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

cell_center

If true, the coordinates of the centroid are forced to be a cell center within the patch.

return_vec

If true, a sf object is returned.

verbose

Print warning messages

Details

Get the coordinates of the centroid of each patch. The centroid is by default defined as the mean location of all cell centers. To force the centroid to be located within each patch, use the cell_center argument. In this case, the centroid is defined as the cell center that is the closest to the mean location.

Examples

# get centroid location
landscape <- terra::rast(landscapemetrics::landscape)
get_centroids(landscape)

get_circumscribingcircle

Description

Diameter of the circumscribing circle around patches

Usage

get_circumscribingcircle(landscape, directions = 8, level = "patch")

Arguments

landscape

SpatRaster or matrix (with x, y, id columns)

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

level

Either 'patch' or 'class' for the corresponding level.

Details

The diameter of the smallest circumscribing circle around a patch in the landscape is based on the maximum distance between the corners of each cell. This ensures that all cells of the patch are included in the patch.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

References

Based on C++ code from Project Nayuki (https://www.nayuki.io/page/smallest-enclosing-circle).

Examples

landscape <- terra::rast(landscapemetrics::landscape)

# get circle around each patch
get_circumscribingcircle(landscape)

# get circle around whole class
get_circumscribingcircle(landscape, level = "class")

get_nearestneighbour

Description

Euclidean distance to nearest neighbour

Usage

get_nearestneighbour(landscape, return_id = FALSE)

Arguments

landscape

SpatRaster or matrix (with x,y,id columns).

return_id

If TRUE, also the patch ID of the nearest neighbour is returned.

Details

Fast and memory safe Rcpp implementation for calculating the minimum Euclidean distances to the nearest patch of the same class in a raster or matrix. All patches need an unique ID (see get_patches). Please be aware that the patch ID is not identical to the patch ID of all metric functions (lsm_). If return_ID = TRUE, for some focal patches several nearest neighbour patches might be returned.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

References

Based on RCpp code of Florian Privé [email protected]

Examples

# get patches for class 1
landscape <- terra::rast(landscapemetrics::landscape)
class_1 <- get_patches(landscape, class = 2)[[1]][[1]]

# calculate the distance between patches
get_nearestneighbour(class_1)
get_nearestneighbour(class_1, return_id = TRUE)

get_patches

Description

Connected components labeling to derive patches in a landscape.

Usage

get_patches(
  landscape,
  class = "all",
  directions = 8,
  to_disk = getOption("to_disk", default = FALSE),
  return_raster = TRUE
)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

class

Either "all" (default) for every class in the raster, or specify class value. See Details.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

to_disk

Logical argument, if FALSE results of get_patches are hold in memory. If true, get_patches writes temporary files and hence, does not hold everything in memory. Can be set with a global option, e.g. option(to_disk = TRUE). See Details.

return_raster

If false, matrix is returned

Details

Searches for connected patches (neighbouring cells of the same class i). The 8-neighbours rule ('queen's case) or 4-neighbours rule (rook's case) is used. Returns a list with raster. For each class the connected patches have the value 1 - n. All cells not belonging to the class are NA.

Landscape metrics rely on the delineation of patches. Hence, get_patches is heavily used in landscapemetrics. As raster can be quite big, the fact that get_patches creates a copy of the raster for each class in a landscape becomes a burden for computer memory. Hence, the argument to_disk allows to store the results of the connected labeling algorithm on disk. Furthermore, this option can be set globally, so that every function that internally uses get_patches can make use of that.

Value

List of SpatRaster

References

Vincent, L., Soille, P. 1991. Watersheds in digital spaces: an efficient algorithm based on immersion simulations. IEEE Transactions on Pattern Analysis and Machine Intelligence. 13 (6), 583-598

Examples

landscape <- terra::rast(landscapemetrics::landscape)

# check for patches of class 1
patched_raster <- get_patches(landscape, class = 1)

# count patches
nrow(terra::unique(patched_raster[[1]][[1]]))

# check for patches of every class
patched_raster <-  get_patches(landscape)

get_unique_values

Description

This function returns the unique values of an object.

Usage

get_unique_values(x, simplify = FALSE, verbose = TRUE)

Arguments

x

Vector, matrix, raster, stars, or terra object or list of previous.

simplify

If true, a vector will be returned instead of a list for 1-dimensional input

verbose

If true, warning messages are printed

Details

Fast and memory friendly Rcpp implementation to find the unique values of an object.

Examples

landscape <- terra::rast(landscapemetrics::landscape)

get_unique_values(landscape)

landscape_stack <- c(landscape, landscape, landscape)
get_unique_values(landscape_stack)

landscape_matrix <- terra::as.matrix(landscape, wide = TRUE)
get_unique_values(landscape_matrix)

x_vec <- c(1, 2, 1, 1, 2, 2)
get_unique_values(x_vec)

landscape_list <- list(landscape, landscape_matrix, x_vec)
get_unique_values(landscape_list)

Example map (random cluster neutral landscape model).

Description

An example map to show landscapemetrics functionality generated with the nlm_randomcluster() algorithm.

Usage

landscape

Format

A raster object.

Source

Simulated neutral landscape model with R. https://github.com/ropensci/NLMR/


Landscape as list

Description

Convert raster input to list

Usage

landscape_as_list(landscape)

## S3 method for class 'SpatRaster'
landscape_as_list(landscape)

## S3 method for class 'RasterLayer'
landscape_as_list(landscape)

## S3 method for class 'RasterBrick'
landscape_as_list(landscape)

## S3 method for class 'RasterStack'
landscape_as_list(landscape)

## S3 method for class 'stars'
landscape_as_list(landscape)

## S3 method for class 'list'
landscape_as_list(landscape)

## S3 method for class 'matrix'
landscape_as_list(landscape)

## S3 method for class 'numeric'
landscape_as_list(landscape)

## S3 method for class 'PackedSpatRaster'
landscape_as_list(landscape)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters

Details

Mainly for internal use

Value

list

Examples

landscape <- terra::rast(landscapemetrics::landscape)
landscape_as_list(c(landscape, landscape))

List landscape metrics

Description

List landscape metrics

Usage

list_lsm(
  level = NULL,
  metric = NULL,
  name = NULL,
  type = NULL,
  what = NULL,
  simplify = FALSE,
  verbose = TRUE
)

Arguments

level

Level of metrics. Either 'patch', 'class' or 'landscape' (or vector with combination).

metric

Abbreviation of metrics (e.g. 'area').

name

Full name of metrics (e.g. 'core area')

type

Type according to FRAGSTATS grouping (e.g. 'aggregation metrics').

what

Selected level of metrics: either "patch", "class" or "landscape". It is also possible to specify functions as a vector of strings, e.g. what = c("lsm_c_ca", "lsm_l_ta").

simplify

If true, function names are returned as vector.

verbose

Print warning messages

Details

List all available landscape metrics depending on the provided filter arguments. If an argument is not provided, automatically all possibilities are selected. Therefore, to get all available metrics, use simply list_lsm(). For all arguments with exception of the what argument, it is also possible to use a negative subset, i.e. all metrics but the selected ones. Therefore, simply use e.g. level = "-patch". Furthermore, it is possible to only get a vector with all function names instead of the full tibble.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Examples

list_lsm(level = c("patch", "landscape"), type = "aggregation metric")
list_lsm(level = "-patch", type = "area and edge metric")
list_lsm(metric = "area", simplify = TRUE)

list_lsm(metric = "area", what = "lsm_p_shape")
list_lsm(metric = "area", what = c("patch", "lsm_l_ta"))
list_lsm(what = c("lsm_c_tca", "lsm_l_ta"))

Tibble of abbreviations coming from FRAGSTATS

Description

A single tibble for every abbreviation of every metric that is reimplemented in landscapemetrics and its corresponding full name in the literature.

Usage

lsm_abbreviations_names

Format

A tibble object.

Details

Can be used after calculating the metric(s) with a join to have a more readable results tibble or for visualizing your results.

Examples

landscape <- terra::rast(landscapemetrics::landscape)
patch_area <- lsm_p_area(landscape)
patch_area <- merge(x = patch_area, y = lsm_abbreviations_names, by = c("level", "metric"))

AI (class level)

Description

Aggregation index (Aggregation metric)

Usage

lsm_c_ai(landscape)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters

Details

AI=[giimaxgii](100)AI = \Bigg[\frac{g_{ii}}{max-g_{ii}} \Bigg](100)

where giig_{ii} is the number of like adjacencies based on the single-count method and maxgiimax-g_{ii} is the classwise maximum number of like adjacencies of class i.

AI is an 'Aggregation metric'. It equals the number of like adjacencies divided by the theoretical maximum possible number of like adjacencies for that class. The metric is based on he adjacency matrix and the the single-count method.

Units

Percent

Range

0 <= AI <= 100

Behaviour

Equals 0 for maximally disaggregated and 100 for maximally aggregated classes.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

He, H. S., DeZonia, B. E., & Mladenoff, D. J. 2000. An aggregation index (AI) to quantify spatial patterns of landscapes. Landscape ecology, 15(7), 591-601.

See Also

lsm_l_ai

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_ai(landscape)

AREA_CV (class level)

Description

Coefficient of variation of patch area (Area and edge metric)

Usage

lsm_c_area_cv(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

AREACV=cv(AREA[patchij])AREA_{CV} = cv(AREA[patch_{ij}])

where AREA[patchij]AREA[patch_{ij}] is the area of each patch in hectares.

AREA_CV is an 'Area and Edge metric'. The metric summarises each class as the Coefficient of variation of all patch areas belonging to class i. The metric describes the differences among patches of the same class i in the landscape and is easily comparable because it is scaled to the mean.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Hectares

Range

AREA_CV >= 0

Behaviour

Equals AREA_CV = 0 if all patches are identical in size. Increases, without limit, as the variation of patch areas increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_p_area,
lsm_c_area_mn, lsm_c_area_sd,
lsm_l_area_mn, lsm_l_area_sd, lsm_l_area_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_area_cv(landscape)

AREA_MN (class level)

Description

Mean of patch area (Area and edge metric)

Usage

lsm_c_area_mn(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

AREAMN=mean(AREA[patchij])AREA_{MN} = mean(AREA[patch_{ij}])

where AREA[patchij]AREA[patch_{ij}] is the area of each patch in hectares

AREA_MN is an 'Area and Edge metric'. The metric summarises each class as the mean of all patch areas belonging to class i. The metric is a simple way to describe the composition of the landscape. Especially together with the total class area (lsm_c_ca), it can also give an an idea of patch structure (e.g. many small patches vs. few larges patches).

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Hectares

Range

AREA_MN > 0

Behaviour

Approaches AREA_MN = 0 if all patches are small. Increases, without limit, as the patch areas increase.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_p_area, mean,
lsm_c_area_cv, lsm_c_area_sd,
lsm_l_area_mn, lsm_l_area_sd, lsm_l_area_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_area_mn(landscape)

AREA_SD (class level)

Description

Standard deviation of patch area (Area and edge metric)

Usage

lsm_c_area_sd(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

AREASD=sd(AREA[patchij])AREA_{SD} = sd(AREA[patch_{ij}])

where AREA[patchij]AREA[patch_{ij}] is the area of each patch in hectares.

AREA_SD is an 'Area and Edge metric'. The metric summarises each class as the standard deviation of all patch areas belonging to class i. The metric describes the differences among patches of the same class i in the landscape.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Hectares

Range

AREA_SD >= 0

Behaviour

Equals AREA_SD = 0 if all patches are identical in size. Increases, without limit, as the variation of patch areas increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_p_area, sd
lsm_c_area_mn, lsm_c_area_cv,
lsm_l_area_mn, lsm_l_area_sd, lsm_l_area_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_area_sd(landscape)

CA (class level)

Description

Total (class) area (Area and edge metric)

Usage

lsm_c_ca(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

CA=sum(AREA[patchij])CA = sum(AREA[patch_{ij}])

where AREA[patchij]AREA[patch_{ij}] is the area of each patch in hectares.

CA is an 'Area and edge metric' and a measure of composition. The total (class) area sums the area of all patches belonging to class i. It shows if the landscape is e.g. dominated by one class or if all classes are equally present. CA is an absolute measure, making comparisons among landscapes with different total areas difficult.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Hectares

Range

CA > 0

Behaviour

Approaches CA > 0 as the patch areas of class i become small. Increases, without limit, as the patch areas of class i become large. CA = TA if only one class is present.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_p_area, sum,
lsm_l_ta

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_ca(landscape)

CAI_CV (class level)

Description

Coefficient of variation of core area index (Core area metric)

Usage

lsm_c_cai_cv(
  landscape,
  directions = 8,
  consider_boundary = FALSE,
  edge_depth = 1
)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

consider_boundary

Logical if cells that only neighbour the landscape boundary should be considered as core

edge_depth

Distance (in cells) a cell has the be away from the patch edge to be considered as core cell

Details

CAICV=cv(CAI[patchij]CAI_{CV} = cv(CAI[patch_{ij}]

where CAI[patchij]CAI[patch_{ij}] is the core area index of each patch.

CAI_CV is a 'Core area metric'. The metric summarises each class as the Coefficient of variation of the core area index of all patches belonging to class i. The core area index is the percentage of core area in relation to patch area. A cell is defined as core area if the cell has no neighbour with a different value than itself (rook's case). The metric describes the differences among patches of the same class i in the landscape.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Percent

Range

CAI_CV >= 0

Behaviour

Equals CAI_CV = 0 if the core area index is identical for all patches. Increases, without limit, as the variation of the core area indices increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_p_cai,
lsm_c_cai_mn, lsm_c_cai_sd,
lsm_l_cai_mn, lsm_l_cai_sd, lsm_l_cai_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_cai_cv(landscape)

CAI_MN (class level)

Description

Mean of core area index (Core area metric)

Usage

lsm_c_cai_mn(
  landscape,
  directions = 8,
  consider_boundary = FALSE,
  edge_depth = 1
)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

consider_boundary

Logical if cells that only neighbour the landscape boundary should be considered as core

edge_depth

Distance (in cells) a cell has the be away from the patch edge to be considered as core cell

Details

CAIMN=mean(CAI[patchij]CAI_{MN} = mean(CAI[patch_{ij}]

where CAI[patchij]CAI[patch_{ij}] is the core area index of each patch.

CAI_MN is a 'Core area metric'. The metric summarises each class as the mean of the core area index of all patches belonging to class i. The core area index is the percentage of core area in relation to patch area. A cell is defined as core area if the cell has no neighbour with a different value than itself (rook's case).

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Percent

Range

0 <= CAI_MN <= 100

Behaviour

CAI_MN = 0 when all patches have no core area and approaches CAI_MN = 100 with increasing percentage of core area within patches.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_p_cai, mean,
lsm_c_cai_sd, lsm_c_cai_cv,
lsm_l_cai_mn, lsm_l_cai_sd, lsm_l_cai_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_cai_mn(landscape)

CAI_SD (class level)

Description

Standard deviation of core area index (Core area metric)

Usage

lsm_c_cai_sd(
  landscape,
  directions = 8,
  consider_boundary = FALSE,
  edge_depth = 1
)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

consider_boundary

Logical if cells that only neighbour the landscape boundary should be considered as core

edge_depth

Distance (in cells) a cell has the be away from the patch edge to be considered as core cell

Details

CAISD=sd(CAI[patchij]CAI_{SD} = sd(CAI[patch_{ij}]

where CAI[patchij]CAI[patch_{ij}] is the core area index of each patch.

CAI_SD is a 'Core area metric'. The metric summarises each class as the standard deviation of the core area index of all patches belonging to class i. The core area index is the percentage of core area in relation to patch area. A cell is defined as core area if the cell has no neighbour with a different value than itself (rook's case). The metric describes the differences among patches of the same class i in the landscape.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Percent

Range

CAI_SD >= 0

Behaviour

Equals CAI_SD = 0 if the core area index is identical for all patches. Increases, without limit, as the variation of core area indices increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_p_cai, sd
lsm_c_cai_mn, lsm_c_cai_cv,
lsm_l_cai_mn, lsm_l_cai_sd, lsm_l_cai_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_cai_sd(landscape)

CIRCLE_CV (Class level)

Description

Coefficient of variation of related circumscribing circle (Shape metric)

Usage

lsm_c_circle_cv(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

CIRCLECV=cv(CIRCLE[patchij])CIRCLE_{CV} = cv(CIRCLE[patch_{ij}])

where CIRCLE[patchij]CIRCLE[patch_{ij}] is the related circumscribing circle of each patch.

CIRCLE_CV is a 'Shape metric' and summarises each class as the Coefficient of variation of the related circumscribing circle of all patches belonging to class i. CIRCLE describes the ratio between the patch area and the smallest circumscribing circle of the patch and characterises the compactness of the patch. CIRCLE_CV describes the differences among patches of the same class i in the landscape. Because it is scaled to the mean, it is easily comparable.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

None

Range

CIRCLE_CV >= 0

Behaviour

Equals CIRCLE_CV if the related circumscribing circle is identical for all patches. Increases, without limit, as the variation of related circumscribing circles increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Baker, W. L., and Y. Cai. 1992. The r.le programs for multiscale analysis of landscape structure using the GRASS geographical information system. Landscape Ecology 7: 291-302.

Based on C++ code from Project Nayuki (https://www.nayuki.io/page/smallest-enclosing-circle).

See Also

lsm_p_circle, mean,
lsm_c_circle_mn, lsm_c_circle_sd,
lsm_l_circle_mn, lsm_l_circle_sd, lsm_l_circle_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_circle_cv(landscape)

CIRCLE_MN (Class level)

Description

Mean of related circumscribing circle (Shape metric)

Usage

lsm_c_circle_mn(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

CIRCLEMN=mean(CIRCLE[patchij])CIRCLE_{MN} = mean(CIRCLE[patch_{ij}])

where CIRCLE[patchij]CIRCLE[patch_{ij}] is the related circumscribing circle of each patch.

CIRCLE_MN is a 'Shape metric' and summarises each class as the mean of the related circumscribing circle of all patches belonging to class i. CIRCLE describes the ratio between the patch area and the smallest circumscribing circle of the patch and characterises the compactness of the patch.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

None

Range

CIRCLE_MN > 0

Behaviour

Approaches CIRCLE_MN = 0 if the related circumscribing circle of all patches is small. Increases, without limit, as the related circumscribing circles increase.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Baker, W. L., and Y. Cai. 1992. The r.le programs for multiscale analysis of landscape structure using the GRASS geographical information system. Landscape Ecology 7: 291-302.

Based on C++ code from Project Nayuki (https://www.nayuki.io/page/smallest-enclosing-circle).

See Also

lsm_p_circle, mean,
lsm_c_circle_sd, lsm_c_circle_cv,
lsm_l_circle_mn, lsm_l_circle_sd, lsm_l_circle_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_circle_mn(landscape)

CIRCLE_SD (Class level)

Description

Standard deviation of related circumscribing circle (Shape metric)

Usage

lsm_c_circle_sd(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

CIRCLESD=sd(CIRCLE[patchij])CIRCLE_{SD} = sd(CIRCLE[patch_{ij}])

where CIRCLE[patchij]CIRCLE[patch_{ij}] is the related circumscribing circle of each patch.

CIRCLE_SD is a 'Shape metric' and summarises each class as the standard deviation of the related circumscribing circle of all patches belonging to class i. CIRCLE describes the ratio between the patch area and the smallest circumscribing circle of the patch and characterises the compactness of the patch. The metric describes the differences among patches of the same class i in the landscape.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

None

Range

CIRCLE_SD >= 0

Behaviour

Equals CIRCLE_SD if the related circumscribing circle is identical for all patches. Increases, without limit, as the variation of related circumscribing circles increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Baker, W. L., and Y. Cai. 1992. The r.le programs for multiscale analysis of landscape structure using the GRASS geographical information system. Landscape Ecology 7: 291-302.

Based on C++ code from Project Nayuki (https://www.nayuki.io/page/smallest-enclosing-circle).

See Also

lsm_p_circle, mean,
lsm_c_circle_mn, lsm_c_circle_cv,
lsm_l_circle_mn, lsm_l_circle_sd, lsm_l_circle_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_circle_sd(landscape)

CLUMPY (class level)

Description

Clumpiness index (Aggregation metric)

Usage

lsm_c_clumpy(landscape)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters

Details

GivenGi=(gii(k=1mgik)minei)Given G_{i} = \Bigg(\frac{g_{ii}}{ (\sum\limits_{k=1}^m g_{ik}) - min e_{i}} \Bigg)

CLUMPY=[GiPiPiforGi<Pi&Pi<.5;elseGiPi1Pi]CLUMPY = \Bigg[ \frac{G_{i} - P_{i}}{P_{i}} for G_{i} < P_{i} \& P_{i} < .5; else \\ \frac{G_{i} - P_{i}}{1 -P_{i}} \Bigg]

where giig_{ii} is the number of like adjacencies, gikg_{ik} is the classwise number of all adjacencies including the focal class, mineimin e_{i} is the minimum perimeter of the total class in terms of cell surfaces assuming total clumping and PiP_{i} is the proportion of landscape occupied by each class.

CLUMPY is an 'Aggregation metric'. It equals the proportional deviation of the proportion of like adjacencies involving the corresponding class from that expected under a spatially random distribution. The metric is based on he adjacency matrix and the the double-count method.

Units

None

Range

-1 <= CLUMPY <= 1

Behaviour

Equals -1 for maximally disaggregated, 0 for randomly distributed and 1 for maximally aggregated classes.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_clumpy(landscape)

COHESION (class level)

Description

Patch Cohesion Index (Aggregation metric)

Usage

lsm_c_cohesion(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

COHESION=1(j=1npijj=1npijaij)(11Z)1100COHESION = 1 - (\frac{\sum \limits_{j = 1}^{n} p_{ij}} {\sum \limits_{j = 1}^{n} p_{ij} \sqrt{a_{ij}}}) * (1 - \frac{1} {\sqrt{Z}}) ^ {-1} * 100

where pijp_{ij} is the perimeter in meters, aija_{ij} is the area in square meters and ZZ is the number of cells.

COHESION is an 'Aggregation metric'. It characterises the connectedness of patches belonging to class i. It can be used to asses if patches of the same class are located aggregated or rather isolated and thereby COHESION gives information about the configuration of the landscape.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Percent

Ranges

0 < COHESION < 100

Behaviour

Approaches COHESION = 0 if patches of class i become more isolated. Increases if patches of class i become more aggregated.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Schumaker, N. H. 1996. Using landscape indices to predict habitat connectivity. Ecology, 77(4), 1210-1225.

See Also

lsm_p_perim, lsm_p_area,
lsm_l_cohesion

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_cohesion(landscape)

CONTIG_CV (class level)

Description

Coefficient of variation of Contiguity index (Shape metric)

Usage

lsm_c_contig_cv(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

CONTIGCV=cv(CONTIG[patchij])CONTIG_{CV} = cv(CONTIG[patch_{ij}])

where CONTIG[patchij]CONTIG[patch_{ij}] is the contiguity of each patch.

CONTIG_CV is a 'Shape metric'. It summarises each class as the mean of each patch belonging to class i. CONTIG_CV asses the spatial connectedness (contiguity) of cells in patches. The metric coerces patch values to a value of 1 and the background to NA. A nine cell focal filter matrix:

filter_matrix <- matrix(c(1, 2, 1,
                          2, 1, 2,
                          1, 2, 1), 3, 3, byrow = T)

... is then used to weight orthogonally contiguous pixels more heavily than diagonally contiguous pixels. Therefore, larger and more connections between patch cells in the rookie case result in larger contiguity index values.

Units

None

Range

CONTIG_CV >= 0

Behaviour

CONTIG_CV = 0 if the contiguity index is identical for all patches. Increases, without limit, as the variation of CONTIG increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

LaGro, J. 1991. Assessing patch shape in landscape mosaics. Photogrammetric Engineering and Remote Sensing, 57(3), 285-293

See Also

lsm_p_contig, lsm_c_contig_mn, lsm_c_contig_cv,
lsm_l_contig_mn, lsm_l_contig_sd, lsm_l_contig_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_contig_cv(landscape)

CONTIG_MN (class level)

Description

Mean of Contiguity index (Shape metric)

Usage

lsm_c_contig_mn(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

CONTIGMN=mean(CONTIG[patchij])CONTIG_{MN} = mean(CONTIG[patch_{ij}])

where CONTIG[patchij]CONTIG[patch_{ij}] is the contiguity of each patch.

CONTIG_MN is a 'Shape metric'. It summarises each class as the mean of each patch belonging to class i. CONTIG_MN asses the spatial connectedness (contiguity) of cells in patches. The metric coerces patch values to a value of 1 and the background to NA. A nine cell focal filter matrix:

filter_matrix <- matrix(c(1, 2, 1,
                          2, 1, 2,
                          1, 2, 1), 3, 3, byrow = T)

... is then used to weight orthogonally contiguous pixels more heavily than diagonally contiguous pixels. Therefore, larger and more connections between patch cells in the rookie case result in larger contiguity index values.

Units

None

Range

0 >= CONTIG_MN <= 1

Behaviour

CONTIG equals the mean of the contiguity index on class level for all patches.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

LaGro, J. 1991. Assessing patch shape in landscape mosaics. Photogrammetric Engineering and Remote Sensing, 57(3), 285-293

See Also

lsm_p_contig, lsm_c_contig_sd, lsm_c_contig_cv,
lsm_l_contig_mn, lsm_l_contig_sd, lsm_l_contig_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_contig_mn(landscape)

CONTIG_SD (class level)

Description

Standard deviation of Contiguity index (Shape metric)

Usage

lsm_c_contig_sd(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

CONTIGSD=sd(CONTIG[patchij])CONTIG_{SD} = sd(CONTIG[patch_{ij}])

where CONTIG[patchij]CONTIG[patch_{ij}] is the contiguity of each patch.

CONTIG_SD is a 'Shape metric'. It summarises each class as the mean of each patch belonging to class i. CONTIG_SD asses the spatial connectedness (contiguity) of cells in patches. The metric coerces patch values to a value of 1 and the background to NA. A nine cell focal filter matrix:

filter_matrix <- matrix(c(1, 2, 1,
                          2, 1, 2,
                          1, 2, 1), 3, 3, byrow = T)

... is then used to weight orthogonally contiguous pixels more heavily than diagonally contiguous pixels. Therefore, larger and more connections between patch cells in the rookie case result in larger contiguity index values.

Units

None

Range

CONTIG_CV >= 0

Behaviour

CONTIG_SD = 0 if the contiguity index is identical for all patches. Increases, without limit, as the variation of CONTIG increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

LaGro, J. 1991. Assessing patch shape in landscape mosaics. Photogrammetric Engineering and Remote Sensing, 57(3), 285-293

See Also

lsm_p_contig, lsm_c_contig_mn, lsm_c_contig_cv,
lsm_l_contig_mn, lsm_l_contig_sd, lsm_l_contig_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_contig_sd(landscape)

CORE_CV (class level)

Description

Coefficient of variation of core area (Core area metric)

Usage

lsm_c_core_cv(
  landscape,
  directions = 8,
  consider_boundary = FALSE,
  edge_depth = 1
)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

consider_boundary

Logical if cells that only neighbour the landscape boundary should be considered as core

edge_depth

Distance (in cells) a cell has the be away from the patch edge to be considered as core cell

Details

CORECV=cv(CORE[patchij])CORE_{CV} = cv(CORE[patch_{ij}])

where CORE[patchij]CORE[patch_{ij}] is the core area in square meters of each patch.

CORE_CV is a 'Core area metric'. It equals the Coefficient of variation of the core area of each patch belonging to class i. The core area is defined as all cells that have no neighbour with a different value than themselves (rook's case). The metric describes the differences among patches of the same class i in the landscape and is easily comparable because it is scaled to the mean.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Hectares

Range

CORE_CV >= 0

Behaviour

Equals CORE_CV = 0 if all patches have the same core area. Increases, without limit, as the variation of patch core areas increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_p_core,
lsm_c_core_mn, lsm_c_core_sd,
lsm_l_core_mn, lsm_l_core_sd, lsm_l_core_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_core_cv(landscape)

CORE_MN (class level)

Description

Mean of core area (Core area metric)

Usage

lsm_c_core_mn(
  landscape,
  directions = 8,
  consider_boundary = FALSE,
  edge_depth = 1
)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

consider_boundary

Logical if cells that only neighbour the landscape boundary should be considered as core

edge_depth

Distance (in cells) a cell has the be away from the patch edge to be considered as core cell

Details

COREMN=mean(CORE[patchij])CORE_{MN} = mean(CORE[patch_{ij}])

where CORE[patchij]CORE[patch_{ij}] is the core area in square meters of each patch.

CORE_MN is a 'Core area metric' and equals the mean of core areas of all patches belonging to class i. The core area is defined as all cells that have no neighbour with a different value than themselves (rook's case).

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Hectares

Range

CORE_MN >= 0

Behaviour

Equals CORE_MN = 0 if CORE = 0 for all patches. Increases, without limit, as the core area indices increase.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_p_core, mean,
lsm_c_core_sd, lsm_c_core_cv,
lsm_l_core_mn, lsm_l_core_sd, lsm_l_core_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_core_mn(landscape)

CORE_SD (class level)

Description

Standard deviation patch core area (class level)

Usage

lsm_c_core_sd(
  landscape,
  directions = 8,
  consider_boundary = FALSE,
  edge_depth = 1
)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

consider_boundary

Logical if cells that only neighbour the landscape boundary should be considered as core

edge_depth

Distance (in cells) a cell has the be away from the patch edge to be considered as core cell

Details

CORESD=sd(CORE[patchij])CORE_{SD} = sd(CORE[patch_{ij}])

where CORE[patchij]CORE[patch_{ij}] is the core area in square meters of each patch.

CORE_SD is a 'Core area metric'. It equals the standard deviation of the core area of each patch belonging to class i. The core area is defined as all cells that have no neighbour with a different value than themselves (rook's case). The metric describes the differences among patches of the same class i in the landscape.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Hectares

Range

CORE_SD >= 0

Behaviour

Equals CORE_SD = 0 if all patches have the same core area. Increases, without limit, as the variation of patch core areas increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_p_core, sd
lsm_c_core_mn, lsm_c_core_cv,
lsm_l_core_mn, lsm_l_core_sd, lsm_l_core_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_core_sd(landscape)

CPLAND (class level)

Description

Core area percentage of landscape (Core area metric)

Usage

lsm_c_cpland(
  landscape,
  directions = 8,
  consider_boundary = FALSE,
  edge_depth = 1
)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

consider_boundary

Logical if cells that only neighbour the landscape boundary should be considered as core

edge_depth

Distance (in cells) a cell has the be away from the patch edge to be considered as core cell

Details

CPLAND=(j=1naijcoreA)100CPLAND = (\frac{\sum \limits_{j = 1}^{n} a_{ij}^{core}} {A}) * 100

where aijcorea_{ij}^{core} is the core area in square meters and AA is the total landscape area in square meters.

CPLAND is a 'Core area metric'. It is the percentage of core area of class i in relation to the total landscape area. A cell is defined as core area if the cell has no neighbour with a different value than itself (rook's case). Because CPLAND is a relative measure, it is comparable among landscapes with different total areas.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Percentage

Range

0 <= CPLAND < 100

Behaviour

Approaches CPLAND = 0 if CORE = 0 for all patches. Increases as the amount of core area increases, i.e. patches become larger while being rather simple in shape.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_p_core and lsm_l_ta

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_cpland(landscape)

DCAD (class level)

Description

Disjunct core area density (core area metric)

Usage

lsm_c_dcad(
  landscape,
  directions = 8,
  consider_boundary = FALSE,
  edge_depth = 1
)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

consider_boundary

Logical if cells that only neighbour the landscape boundary should be considered as core

edge_depth

Distance (in cells) a cell has the be away from the patch edge to be considered as core cell

Details

DCAD=(j=1nnijcoreA)10000100DCAD = (\frac{\sum \limits_{j = 1}^{n} n_{ij}^{core}} {A}) * 10000 * 100

where nijcoren_{ij}^{core} is the number of disjunct core areas and AA is the total landscape area in square meters.

DCAD is a 'Core area metric'. It equals the number of disjunct core areas per 100 ha relative to the total area. A disjunct core area is a 'patch within the patch' containing only core cells. A cell is defined as core area if the cell has no neighbour with a different value than itself (rook's case). The metric is relative and therefore comparable among landscapes with different total areas.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Number per 100 hectares

Range

DCAD >= 0

Behaviour

Equals DCAD = 0 when DCORE = 0, i.e. no patch of class i contains a disjunct core area. Increases, without limit, as disjunct core areas become more present, i.e. patches becoming larger and less complex.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_c_ndca, lsm_l_ta,
lsm_l_dcad

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_dcad(landscape)

DCORE_CV (class level)

Description

Coefficient of variation number of disjunct core areas (Core area metric)

Usage

lsm_c_dcore_cv(
  landscape,
  directions = 8,
  consider_boundary = FALSE,
  edge_depth = 1
)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

consider_boundary

Logical if cells that only neighbour the landscape boundary should be considered as core

edge_depth

Distance (in cells) a cell has the be away from the patch edge to be considered as core cell

Details

DCORECV=cv(NCORE[patchij])DCORE_{CV} = cv(NCORE[patch_{ij}])

where NCORE[patchij]NCORE[patch_{ij}] is the number of core areas.

DCORE_CV is an 'Core area metric'. It summarises each class as the Coefficient of variation of all patch areas belonging to class i. A cell is defined as core if the cell has no neighbour with a different value than itself (rook's case). NCORE counts the disjunct core areas, whereby a core area is a 'patch within the patch' containing only core cells. The metric describes the differences among patches of the same class i in the landscape and is easily comparable because it is scaled to the mean.

Units

None

Range

DCORE_CV >= 0

Behaviour

Equals DCORE_CV = 0 if all patches have the same number of disjunct core areas. Increases, without limit, as the variation of number of disjunct core areas increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_p_ncore,
lsm_c_dcore_mn, lsm_c_dcore_sd,
lsm_l_dcore_mn, lsm_l_dcore_sd, lsm_l_dcore_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_dcore_cv(landscape)

DCORE_MN (class level)

Description

Mean number of disjunct core areas (Core area metric)

Usage

lsm_c_dcore_mn(
  landscape,
  directions = 8,
  consider_boundary = FALSE,
  edge_depth = 1
)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

consider_boundary

Logical if cells that only neighbour the landscape boundary should be considered as core

edge_depth

Distance (in cells) a cell has the be away from the patch edge to be considered as core cell

Details

DCOREMN=mean(NCORE[patchij])DCORE_{MN} = mean(NCORE[patch_{ij}])

where NCORE[patchij]NCORE[patch_{ij}] is the number of core areas.

DCORE_MN is an 'Core area metric'. It summarises each class as the mean of all patch areas belonging to class i. A cell is defined as core if the cell has no neighbour with a different value than itself (rook's case). NCORE counts the disjunct core areas, whereby a core area is a 'patch within the patch' containing only core cells.

Units

None

Range

DCORE_MN > 0

Behaviour

Equals DCORE_MN = 0 if NCORE = 0 for all patches. Increases, without limit, as the number of disjunct core areas increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_p_ncore, mean,
lsm_c_dcore_sd, lsm_c_dcore_cv,
lsm_l_dcore_mn, lsm_l_dcore_sd, lsm_l_dcore_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_dcore_mn(landscape)

DCORE_SD (class level)

Description

Standard deviation number of disjunct core areas (Core area metric)

Usage

lsm_c_dcore_sd(
  landscape,
  directions = 8,
  consider_boundary = FALSE,
  edge_depth = 1
)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

consider_boundary

Logical if cells that only neighbour the landscape boundary should be considered as core

edge_depth

Distance (in cells) a cell has the be away from the patch edge to be considered as core cell

Details

DCORESD=sd(NCORE[patchij])DCORE_{SD} = sd(NCORE[patch_{ij}])

where NCORE[patchij]NCORE[patch_{ij}] is the number of core areas.

DCORE_SD is an 'Core area metric'. It summarises each class as the standard deviation of all patch areas belonging to class i. A cell is defined as core if the cell has no neighbour with a different value than itself (rook's case). NCORE counts the disjunct core areas, whereby a core area is a 'patch within the patch' containing only core cells. The metric describes the differences among patches of the same class i in the landscape.

Units

None

Range

DCORE_SD >= 0

Behaviour

Equals DCORE_SD = 0 if all patches have the same number of disjunct core areas. Increases, without limit, as the variation of number of disjunct core areas increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_p_ncore, sd
lsm_c_dcore_mn, lsm_c_dcore_cv,
lsm_l_dcore_mn, lsm_l_dcore_sd, lsm_l_dcore_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_dcore_sd(landscape)

DIVISION (class level)

Description

Landscape division index (Aggregation metric)

Usage

lsm_c_division(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

DIVISON=(1j=1n(aijA)2)DIVISON = (1 - \sum \limits_{j = 1}^{n} (\frac{a_{ij}} {A}) ^ 2)

where aija_{ij} is the area in square meters and AA is the total landscape area in square meters.

DIVISION is an 'Aggregation metric. It can be in as the probability that two randomly selected cells are not located in the same patch of class i. The landscape division index is negatively correlated with the effective mesh size (lsm_c_mesh).

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Proportion

Ranges

0 <= Division < 1

Behaviour

Equals DIVISION = 0 if only one patch is present. Approaches DIVISION = 1 if all patches of class i are single cells.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Jaeger, J. A. 2000. Landscape division, splitting index, and effective mesh size: new measures of landscape fragmentation. Landscape ecology, 15(2), 115-130.

See Also

lsm_p_area, lsm_l_ta,
lsm_l_division

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_division(landscape)

ED (class level)

Description

Edge Density (Area and Edge metric)

Usage

lsm_c_ed(landscape, count_boundary = FALSE, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

count_boundary

Count landscape boundary as edge.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

ED=k=1meikA10000ED = \frac{\sum \limits_{k = 1}^{m} e_{ik}} {A} * 10000

where eike_{ik} is the total edge length in meters and AA is the total landscape area in square meters.

ED is an 'Area and Edge metric'. The edge density equals the sum of all edges of class i in relation to the landscape area. The boundary of the landscape is only included in the corresponding total class edge length if count_boundary = TRUE. The metric describes the configuration of the landscape, e.g. because an aggregation of the same class will result in a low edge density. The metric is standardized to the total landscape area, and therefore comparisons among landscapes with different total areas are possible.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Meters per hectare

Range

ED >= 0

Behaviour

Equals ED = 0 if only one patch is present (and the landscape boundary is not included) and increases, without limit, as the landscapes becomes more patchy

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_c_te, lsm_l_ta,
lsm_l_ed

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_ed(landscape)

ENN_CV (class level)

Description

Coefficient of variation of euclidean nearest-neighbor distance (Aggregation metric)

Usage

lsm_c_enn_cv(landscape, directions = 8, verbose = TRUE)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

verbose

Print warning message if not sufficient patches are present

Details

ENNCV=cv(ENN[patchij])ENN_{CV} = cv(ENN[patch_{ij}])

where ENN[patchij]ENN[patch_{ij}] is the euclidean nearest-neighbor distance of each patch.

ENN_CV is an 'Aggregation metric'. It summarises each class as the Coefficient of variation of each patch belonging to class i. ENN measures the distance to the nearest neighbouring patch of the same class i. The distance is measured from edge-to-edge. The range is limited by the cell resolution on the lower limit and the landscape extent on the upper limit. The metric is a simple way to describe patch isolation. Because it is scaled to the mean, it is easily comparable among different landscapes.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Meters

Range

ENN_CV >= 0

Behaviour

Equals ENN_CV = 0 if the euclidean nearest-neighbor distance is identical for all patches. Increases, without limit, as the variation of ENN increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

McGarigal, K., and McComb, W. C. (1995). Relationships between landscape structure and breeding birds in the Oregon Coast Range. Ecological monographs, 65(3), 235-260.

See Also

lsm_p_enn,
lsm_c_enn_mn, lsm_c_enn_sd,
lsm_l_enn_mn, lsm_l_enn_sd, lsm_l_enn_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_enn_cv(landscape)

ENN_MN (class level)

Description

Mean of euclidean nearest-neighbor distance (Aggregation metric)

Usage

lsm_c_enn_mn(landscape, directions = 8, verbose = TRUE)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

verbose

Print warning message if not sufficient patches are present

Details

ENNMN=mean(ENN[patchij])ENN_{MN} = mean(ENN[patch_{ij}])

where ENN[patchij]ENN[patch_{ij}] is the euclidean nearest-neighbor distance of each patch.

ENN_MN is an 'Aggregation metric'. It summarises each class as the mean of each patch belonging to class i. ENN measures the distance to the nearest neighbouring patch of the same class i. The distance is measured from edge-to-edge. The range is limited by the cell resolution on the lower limit and the landscape extent on the upper limit.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Meters

Range

ENN_MN > 0

Behaviour

Approaches ENN_MN = 0 as the distance to the nearest neighbour decreases, i.e. patches of the same class i are more aggregated. Increases, without limit, as the distance between neighbouring patches of the same class i increases, i.e. patches are more isolated.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

McGarigal, K., and McComb, W. C. (1995). Relationships between landscape structure and breeding birds in the Oregon Coast Range. Ecological monographs, 65(3), 235-260.

See Also

lsm_p_enn, mean,
lsm_c_enn_sd, lsm_c_enn_cv,
lsm_l_enn_mn, lsm_l_enn_sd, lsm_l_enn_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_enn_mn(landscape)

ENN_SD (class level)

Description

Standard deviation of euclidean nearest-neighbor distance (Aggregation metric)

Usage

lsm_c_enn_sd(landscape, directions = 8, verbose = TRUE)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

verbose

Print warning message if not sufficient patches are present

Details

ENNSD=sd(ENN[patchij])ENN_{SD} = sd(ENN[patch_{ij}])

where ENN[patchij]ENN[patch_{ij}] is the euclidean nearest-neighbor distance of each patch.

ENN_CV is an 'Aggregation metric'. It summarises each class as the standard deviation of each patch belonging to class i. ENN measures the distance to the nearest neighbouring patch of the same class i. The distance is measured from edge-to-edge. The range is limited by the cell resolution on the lower limit and the landscape extent on the upper limit. The metric is a simple way to describe patch isolation. Because it is scaled to the mean, it is easily comparable among different landscapes.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Meters

Range

ENN_SD >= 0

Behaviour

Equals ENN_SD = 0 if the euclidean nearest-neighbor distance is identical for all patches. Increases, without limit, as the variation of ENN increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

McGarigal, K., and McComb, W. C. (1995). Relationships between landscape structure and breeding birds in the Oregon Coast Range. Ecological monographs, 65(3), 235-260.

See Also

lsm_p_enn, sd
lsm_c_enn_mn, lsm_c_enn_cv,
lsm_l_enn_mn, lsm_l_enn_sd, lsm_l_enn_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_enn_sd(landscape)

FRAC_CV (class level)

Description

Coefficient of variation fractal dimension index (Shape metric)

Usage

lsm_c_frac_cv(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

FRACCV=cv(FRAC[patchij])FRAC_{CV} = cv(FRAC[patch_{ij}])

where FRAC[patchij]FRAC[patch_{ij}] equals the fractal dimension index of each patch.

FRAC_CV is a 'Shape metric'. The metric summarises each class as the Coefficient of variation of the fractal dimension index of all patches belonging to class i. The fractal dimension index is based on the patch perimeter and the patch area and describes the patch complexity. The Coefficient of variation is scaled to the mean and comparable among different landscapes.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

None

Range

FRAC_CV >= 0

Behaviour

Equals FRAC_CV = 0 if the fractal dimension index is identical for all patches. Increases, without limit, as the variation of the fractal dimension indices increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Mandelbrot, B. B. 1977. Fractals: Form, Chance, and Dimension. San Francisco. W. H. Freeman and Company.

See Also

lsm_p_frac,
lsm_c_frac_mn, lsm_c_frac_sd,
lsm_l_frac_mn, lsm_l_frac_sd, lsm_l_frac_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_frac_cv(landscape)

FRAC_MN (class level)

Description

Mean fractal dimension index (Shape metric)

Usage

lsm_c_frac_mn(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

FRACMN=mean(FRAC[patchij])FRAC_{MN} = mean(FRAC[patch_{ij}])

where FRAC[patchij]FRAC[patch_{ij}] equals the fractal dimension index of each patch.

FRAC_MN is a 'Shape metric'. The metric summarises each class as the mean of the fractal dimension index of all patches belonging to class i. The fractal dimension index is based on the patch perimeter and the patch area and describes the patch complexity. The Coefficient of variation is scaled to the mean and comparable among different landscapes.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

None

Range

FRAC_MN > 0

Behaviour

Approaches FRAC_MN = 1 if all patches are squared and FRAC_MN = 2 if all patches are irregular.

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Mandelbrot, B. B. 1977. Fractals: Form, Chance, and Dimension. San Francisco. W. H. Freeman and Company.

See Also

lsm_p_frac, mean,
lsm_c_frac_sd, lsm_c_frac_cv,
lsm_l_frac_mn, lsm_l_frac_sd, lsm_l_frac_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_frac_mn(landscape)

FRAC_SD (class level)

Description

Standard deviation fractal dimension index (Shape metric)

Usage

lsm_c_frac_sd(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

FRACSD=sd(FRAC[patchij])FRAC_{SD} = sd(FRAC[patch_{ij}])

where FRAC[patchij]FRAC[patch_{ij}] equals the fractal dimension index of each patch.

FRAC_SD is a 'Shape metric'. The metric summarises each class as the standard deviation of the fractal dimension index of all patches belonging to class i. The fractal dimension index is based on the patch perimeter and the patch area and describes the patch complexity.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

None

Range

FRAC_SD>= 0

Behaviour

Equals FRAC_SD = 0 if the fractal dimension index is identical for all patches. Increases, without limit, as the variation of the fractal dimension indices increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Mandelbrot, B. B. 1977. Fractals: Form, Chance, and Dimension. San Francisco. W. H. Freeman and Company.

See Also

lsm_p_frac, sd
lsm_c_frac_mn, lsm_c_frac_cv,
lsm_l_frac_mn, lsm_l_frac_sd, lsm_l_frac_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_frac_sd(landscape)

GYRATE_CV (class level)

Description

Coefficient of variation radius of gyration (Area and edge metric)

Usage

lsm_c_gyrate_cv(landscape, directions = 8, cell_center = FALSE)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

cell_center

If true, the coordinates of the centroid are forced to be a cell center within the patch.

Details

GYRATECV=cv(GYRATE[patchij])GYRATE_{CV} = cv(GYRATE[patch_{ij}])

where GYRATE[patchij]GYRATE[patch_{ij}] equals the radius of gyration of each patch.

GYRATE_CV is an 'Area and edge metric'. The metric summarises each class as the Coefficient of variation of the radius of gyration of all patches belonging to class i. GYRATE measures the distance from each cell to the patch centroid and is based on cell center-to-cell center distances. The metrics characterises both the patch area and compactness. The Coefficient of variation is scaled to the mean and comparable among different landscapes.

If cell_center = TRUE some patches might have several possible cell-center centroids. In this case, the gyrate index is based on the mean distance of all cells to all possible cell-center centroids.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Meters

Range

GYRATE_CV >= 0

Behaviour

Equals GYRATE_CV = 0 if the radius of gyration is identical for all patches. Increases, without limit, as the variation of the radius of gyration increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Keitt, T. H., Urban, D. L., & Milne, B. T. 1997. Detecting critical scales in fragmented landscapes. Conservation ecology, 1(1).

See Also

lsm_p_gyrate,
lsm_c_gyrate_mn, lsm_c_gyrate_sd,
lsm_l_gyrate_mn, lsm_l_gyrate_sd, lsm_l_gyrate_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_gyrate_cv(landscape)

GYRATE_MN (class level)

Description

Mean radius of gyration (Area and edge metric)

Usage

lsm_c_gyrate_mn(landscape, directions = 8, cell_center = FALSE)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

cell_center

If true, the coordinates of the centroid are forced to be a cell center within the patch.

Details

GYRATEMN=mean(GYRATE[patchij])GYRATE_{MN} = mean(GYRATE[patch_{ij}])

where GYRATE[patchij]GYRATE[patch_{ij}] equals the radius of gyration of each patch.

GYRATE_MN is an 'Area and edge metric'. The metric summarises each class as the mean of the radius of gyration of all patches belonging to class i. GYRATE measures the distance from each cell to the patch centroid and is based on cell center-to-cell center distances. The metrics characterises both the patch area and compactness.

If cell_center = TRUE some patches might have several possible cell-center centroids. In this case, the gyrate index is based on the mean distance of all cells to all possible cell-center centroids.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Meters

Range

GYRATE_MN >= 0

Behaviour

Approaches GYRATE_MN = 0 if every patch is a single cell. Increases, without limit, when only one patch is present.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Keitt, T. H., Urban, D. L., & Milne, B. T. 1997. Detecting critical scales in fragmented landscapes. Conservation ecology, 1(1).

See Also

lsm_p_gyrate, mean,
lsm_c_gyrate_sd, lsm_c_gyrate_cv,
lsm_l_gyrate_mn, lsm_l_gyrate_sd, lsm_l_gyrate_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_gyrate_mn(landscape)

GYRATE_SD (class level)

Description

Standard deviation radius of gyration (Area and edge metric)

Usage

lsm_c_gyrate_sd(landscape, directions = 8, cell_center = FALSE)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

cell_center

If true, the coordinates of the centroid are forced to be a cell center within the patch.

Details

GYRATESD=sd(GYRATE[patchij])GYRATE_{SD} = sd(GYRATE[patch_{ij}])

where GYRATE[patchij]GYRATE[patch_{ij}] equals the radius of gyration of each patch.

GYRATE_SD is an 'Area and edge metric'. The metric summarises each class as the standard deviation of the radius of gyration of all patches belonging to class i. GYRATE measures the distance from each cell to the patch centroid and is based on cell center-to-cell center distances. The metrics characterises both the patch area and compactness.

If cell_center = TRUE some patches might have several possible cell-center centroids. In this case, the gyrate index is based on the mean distance of all cells to all possible cell-center centroids.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Meters

Range

GYRATE_SD >= 0

Behaviour

Equals GYRATE_SD = 0 if the radius of gyration is identical for all patches. Increases, without limit, as the variation of the radius of gyration increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Keitt, T. H., Urban, D. L., & Milne, B. T. 1997. Detecting critical scales in fragmented landscapes. Conservation ecology, 1(1).

See Also

lsm_p_gyrate,
lsm_c_gyrate_mn, lsm_c_gyrate_cv,
lsm_l_gyrate_mn, lsm_l_gyrate_sd, lsm_l_gyrate_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_gyrate_sd(landscape)

Interspersion and Juxtaposition index (class level)

Description

Interspersion and Juxtaposition index (Aggregation metric)

Usage

lsm_c_iji(landscape, verbose = TRUE)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

verbose

Print warning message if not sufficient patches are present

Details

IJI=k=1m[(eikk=1meik)ln(eikk=1meik)]ln(m1)100IJI = \frac{- \sum \limits_{k = 1}^{m} \Bigg[ \Bigg( \frac{e_{ik}}{\sum \limits_{k = 1}^{m} e_{ik}} \Bigg) ln \Bigg( \frac{e_{ik}}{\sum \limits_{k = 1}^{m} e_{ik}} \Bigg) \Bigg]}{ln(m - 1)} * 100

where eike_{ik} are the unique adjacencies of all classes (lower/upper triangle of the adjacency table - without the diagonal) and mm is the number of classes.

IJI is an 'Aggregation metric'. It is a so called "salt and pepper" metric and describes the intermixing of classes (i.e. without considering like adjacencies - the diagonal of the adjacency table). The number of classes to calculate IJI must be >= than 3.

Units

Percent

Range

0 < IJI <= 100

Behaviour

Approaches 0 if a class is only adjacent to a single other class and equals 100 when a class is equally adjacent to all other classes.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

McGarigal, K., & Marks, B. J. 1995. FRAGSTATS: spatial pattern analysis program for quantifying landscape structure. Gen. Tech. Rep. PNW-GTR-351. Portland, OR: US Department of Agriculture, Forest Service, Pacific Northwest Research Station. 122 p, 351.

See Also

lsm_l_iji

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_iji(landscape)

LPI (class level)

Description

Largest patch index (Area and Edge metric)

Usage

lsm_c_lpi(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

LPI=maxj=1n(aij)A100LPI = \frac{\max \limits_{j = 1}^{n} (a_{ij})} {A} * 100

where max(aij)max(a_{ij}) is the area of the patch in square meters and AA is the total landscape area in square meters.

The largest patch index is an 'Area and edge metric'. It is the percentage of the landscape covered by the corresponding largest patch of each class i. It is a simple measure of dominance.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Percentage

Range

0 < LPI <= 100

Behaviour

Approaches LPI = 0 when the largest patch is becoming small and equals LPI = 100 when only one patch is present

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_p_area, lsm_l_ta,
lsm_l_lpi

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_lpi(landscape)

LSI (class level)

Description

Landscape shape index (Aggregation metric)

Usage

lsm_c_lsi(landscape)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

Details

LSI=eimineiLSI = \frac{e_{i}} {\min e_{i}}

where eie_{i} is the total edge length in cell surfaces and minei\min e_{i} is the minimum total edge length in cell surfaces.

LSI is an 'Aggregation metric'. It is the ratio between the actual edge length of class i and the hypothetical minimum edge length of class i. The minimum edge length equals the edge length if class i would be maximally aggregated.

Units

None

Ranges

LSI >= 1

Behaviour

Equals LSI = 1 when only one squared patch is present or all patches are maximally aggregated. Increases, without limit, as the length of the actual edges increases, i.e. the patches become less compact.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Patton, D. R. 1975. A diversity index for quantifying habitat "edge". Wildl. Soc.Bull. 3:171-173.

See Also

lsm_p_shape,
lsm_l_lsi

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_lsi(landscape)

MESH (class level)

Description

Effective Mesh Size (Aggregation metric)

Usage

lsm_c_mesh(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

MESH=j=1naij2A110000MESH = \frac{\sum \limits_{j = 1}^{n} a_{ij} ^ 2} {A} * \frac{1} {10000}

where aija_{ij} is the patch area in square meters and AA is the total landscape area in square meters.

The effective mesh size is an 'Aggregation metric'. Because each patch is squared before the sums for each group i are calculated and the sum is standardized by the total landscape area, MESH is a relative measure of patch structure. MESH is perfectly, negatively correlated to lsm_c_division.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Hectares

Range

cell size / total area <= MESH <= total area

Behaviour

Equals cellsize/total area if class covers only one cell and equals total area if only one patch is present.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Jaeger, J. A. 2000. Landscape division, splitting index, and effective mesh size: new measures of landscape fragmentation. Landscape ecology, 15(2), 115-130.

See Also

lsm_p_area, lsm_l_ta,
lsm_l_mesh

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_mesh(landscape)

NDCA (class level)

Description

Number of disjunct core areas (Core area metric)

Usage

lsm_c_ndca(
  landscape,
  directions = 8,
  consider_boundary = FALSE,
  edge_depth = 1
)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

consider_boundary

Logical if cells that only neighbour the landscape boundary should be considered as core

edge_depth

Distance (in cells) a cell has the be away from the patch edge to be considered as core cell

Details

NDCA=j=1nnijcoreNDCA = \sum \limits_{j = 1}^{n} n_{ij}^{core}

where nijcoren_{ij}^{core} is the number of disjunct core areas.

NDCA is a 'Core area metric'. The metric summarises class i as the sum of all patches belonging to class i. A cell is defined as core if the cell has no neighbour with a different value than itself (rook's case). NDCA counts the disjunct core areas, whereby a core area is a 'patch within the patch' containing only core cells. It describes patch area and shape simultaneously (more core area when the patch is large, however, the shape must allow disjunct core areas). Thereby, a compact shape (e.g. a square) will contain less disjunct core areas than a more irregular patch.

Units

None

Range

NDCA >= 0

Behaviour

NDCA = 0 when TCA = 0, i.e. every cell in patches of class i is an edge. NDCA increases, with out limit, as core area increases and patch shapes allow disjunct core areas (i.e. patch shapes become rather complex).

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_c_tca,
lsm_p_ncore, lsm_l_ndca

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_ndca(landscape)

nLSI (class level)

Description

Normalized landscape shape index (Aggregation metric)

Usage

lsm_c_nlsi(landscape)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

Details

nLSI=eimineimaxeimineinLSI = \frac{e_{i} - \min e_{i}} {\max e_{i} - \min e_{i}}

where eie_{i} is the total edge length in cell surfaces and minei\min e_{i} maxei\max e_{i} are the minimum and maximum total edge length in cell surfaces, respectively.

nLSI is an 'Aggregation metric'. It is closely related to the lsm_c_lsi and describes the ratio of the actual edge length of class i in relation to the hypothetical range of possible edge lengths of class i (min/max).

Currently, nLSI ignores all background cells when calculating the minimum and maximum total edge length. Also, a correct calculation of the minimum and maximum total edge length is currently only possible for rectangular landscapes.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

None

Ranges

0 <= nlsi <= 1

Behaviour

Equals nLSI = 0 when only one squared patch is present. nLSI increases the more disaggregated patches are and equals nLSI = 1 for a maximal disaggregated (i.e. a "checkerboard pattern").

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Patton, D. R. 1975. A diversity index for quantifying habitat "edge". Wildl. Soc.Bull. 3:171-173.

See Also

lsm_c_lsi lsm_l_lsi

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_nlsi(landscape)

NP (class level)

Description

Number of patches (Aggregation metric)

Usage

lsm_c_np(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

NP=niNP = n_{i}

where nin_{i} is the number of patches.

NP is an 'Aggregation metric'. It describes the fragmentation of a class, however, does not necessarily contain information about the configuration or composition of the class.

Units

None

Ranges

NP >= 1

Behaviour

Equals NP = 1 when only one patch is present and increases, without limit, as the number of patches increases

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_l_np

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_np(landscape)

PAFRAC (class level)

Description

Perimeter-Area Fractal Dimension (Shape metric)

Usage

lsm_c_pafrac(landscape, directions = 8, verbose = TRUE)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

verbose

Print warning message if not sufficient patches are present

Details

PAFRAC=2βPAFRAC = \frac{2}{\beta}

where β\beta is the slope of the regression of the area against the perimeter (logarithm) nij=1nlnaij=a+βnij=1nlnpijn_{i}\sum \limits_{j = 1}^{n} \ln a_{ij} = a + \beta n_{i}\sum \limits_{j = 1}^{n} \ln p_{ij}

PAFRAC is a 'Shape metric'. It describes the patch complexity of class i while being scale independent. This means that increasing the patch size while not changing the patch form will not change the metric. However, it is only meaningful if the relationship between the area and perimeter is linear on a logarithmic scale. Furthermore, if there are less than 10 patches in class i, the metric returns NA because of the small-sample issue.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

None

Range

1 <= PAFRAC <= 2

Behaviour

Approaches PAFRAC = 1 for patches with simple shapes and approaches PAFRAC = 2 for irregular shapes

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Burrough, P. A. 1986. Principles of Geographical Information Systems for Land Resources Assessment. Monographs on Soil and Resources Survey No. 12. Clarendon Press, Oxford

See Also

lsm_p_area, lsm_p_perim,
lsm_l_pafrac

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_pafrac(landscape)

PARA_CV (class level)

Description

Coefficient of variation perimeter-area ratio (Shape metric)

Usage

lsm_c_para_cv(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

PARACV=cv(PARA[patchij]PARA_{CV} = cv(PARA[patch_{ij}]

where PARA[patchij]PARA[patch_{ij}] is the perimeter area ratio of each patch.

PARA_CV is a 'Shape metric'. It summarises each class as the Coefficient of variation of each patch belonging to class i. The perimeter-area ratio describes the patch complexity in a straightforward way. However, because it is not standarised to a certain shape (e.g. a square), it is not scale independent, meaning that increasing the patch size while not changing the patch form will change the ratio.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

None

Range

PARA_CV >= 0

Behaviour

Equals PARA_CV = 0 if the perimeter-area ratio is identical for all patches. Increases, without limit, as the variation of the perimeter-area ratio increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_p_para,
lsm_c_para_mn, lsm_c_para_sd,
lsm_l_para_mn, lsm_l_para_sd, lsm_l_para_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_para_cv(landscape)

PARA_MN (class level)

Description

Mean perimeter-area ratio (Shape metric)

Usage

lsm_c_para_mn(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

PARAMN=mean(PARA[patchij]PARA_{MN} = mean(PARA[patch_{ij}]

where PARA[patchij]PARA[patch_{ij}] is the perimeter area ratio of each patch.

PARA_MN is a 'Shape metric'. It summarises each class as the mean of each patch belonging to class i. The perimeter-area ratio describes the patch complexity in a straightforward way. However, because it is not standarised to a certain shape (e.g. a square), it is not scale independent, meaning that increasing the patch size while not changing the patch form will change the ratio.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

None

Range

PARA_MN > 0

Behaviour

Approaches PARA_MN > 0 if PARA for each patch approaches PARA > 0, i.e. the form approaches a rather small square. Increases, without limit, as PARA increases, i.e. patches become more complex.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_p_para, mean,
lsm_c_para_sd, lsm_c_para_cv,
lsm_l_para_mn, lsm_l_para_sd, lsm_l_para_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_para_mn(landscape)

PARA_SD (class level)

Description

Standard deviation perimeter-area ratio (Shape metric)

Usage

lsm_c_para_sd(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

PARASD=sd(PARA[patchij]PARA_{SD} = sd(PARA[patch_{ij}]

where PARA[patchij]PARA[patch_{ij}] is the perimeter area ratio of each patch.

PARA_SD is a 'Shape metric'. It summarises each class as the standard deviation of each patch belonging to class i. The perimeter-area ratio describes the patch complexity in a straightforward way. However, because it is not standarised to a certain shape (e.g. a square), it is not scale independent, meaning that increasing the patch size while not changing the patch form will change the ratio.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

None

Range

PARA_SD >= 0

Behaviour

Equals PARA_SD = 0 if the perimeter-area ratio is identical for all patches. Increases, without limit, as the variation of the perimeter-area ratio increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_p_para, sd
lsm_c_para_mn, lsm_c_para_cv,
lsm_l_para_mn, lsm_l_para_sd, lsm_l_para_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_para_sd(landscape)

PD (class level)

Description

Patch density (Aggregation metric)

Usage

lsm_c_pd(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

PD=niA10000100PD = \frac{n_{i}} {A} * 10000 * 100

where nin_{i} is the number of patches and AA is the total landscape area in square meters.

PD is an 'Aggregation metric'. It describes the fragmentation of a class, however, does not necessarily contain information about the configuration or composition of the class. In contrast to lsm_c_np it is standardized to the area and comparisons among landscapes with different total area are possible.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Number per 100 hectares

Ranges

0 < PD <= 1e+06

Behaviour

Increases as the landscape gets more patchy. Reaches its maximum if every cell is a different patch.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_c_np, lsm_l_ta,
lsm_l_pd

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_pd(landscape)

PLADJ (class level)

Description

Percentage of Like Adjacencies (Aggregation metric)

Usage

lsm_c_pladj(landscape)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

Details

PLADJ=(gijk=1mgik)100PLADJ = (\frac{g_{ij}} {\sum \limits_{k = 1}^{m} g_{ik}}) * 100

where giig_{ii} is the number of adjacencies between cells of class i and gikg_{ik} is the number of adjacencies between cells of class i and k.

PLADJ is an 'Aggregation metric'. It calculates the frequency how often patches of different classes i (focal class) and k are next to each other, and following is a measure of class aggregation. The adjacencies are counted using the double-count method.

Units

Percent

Ranges

0 <= PLADJ <= 100

Behaviour

Equals PLADJ = 0 if class i is maximal disaggregated, i.e. every cell is a different patch. Equals PLADJ = 100 when the only one patch is present.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org.

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_pladj(landscape)

PLAND (class level)

Description

Percentage of landscape of class (Area and Edge metric)

Usage

lsm_c_pland(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

PLAND=j=1naijA100PLAND = \frac{\sum \limits_{j = 1}^{n} a_{ij}} {A} * 100

where aija_{ij} is the area of each patch and AA is the total landscape area.

PLAND is an 'Area and edge metric'. It is the percentage of the landscape belonging to class i. It is a measure of composition and because of the relative character directly comparable among landscapes with different total areas.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Percentage

Range

0 < PLAND <= 100

Behaviour

Approaches PLAND = 0 when the proportional class area is decreasing. Equals PLAND = 100 when only one patch is present.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_c_ca, lsm_l_ta

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_pland(landscape)

SHAPE_CV (class level)

Description

Covariance of variation shape index (Shape metric)

Usage

lsm_c_shape_cv(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

SHAPECV=cv(SHAPE[patchij])SHAPE_{CV} = cv(SHAPE[patch_{ij}])

where SHAPE[patchij]SHAPE[patch_{ij}] is the shape index of each patch.

SHAPE_CV is a 'Shape metric'. Each class is summarised as the Coefficient of variation of each patch belonging to class i. SHAPE describes the ratio between the actual perimeter of the patch and the square root of patch area.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

None

Range

SHAPE_CV >= 0

Behaviour

Equals SHAPE_CV = 0 if all patches have an identical shape index. Increases, without limit, as the variation of the shape index increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Patton, D. R. 1975. A diversity index for quantifying habitat "edge". Wildl. Soc.Bull. 3:171-173.

See Also

lsm_p_shape,
lsm_c_shape_mn, lsm_c_shape_sd,
lsm_l_shape_mn, lsm_l_shape_sd, lsm_l_shape_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_shape_cv(landscape)

SHAPE_MN (class level)

Description

Mean shape index (Shape metric)

Usage

lsm_c_shape_mn(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

SHAPEMN=mean(SHAPE[patchij])SHAPE_{MN} = mean(SHAPE[patch_{ij}])

where SHAPE[patchij]SHAPE[patch_{ij}] is the shape index of each patch.

SHAPE_MN is a 'Shape metric'. Each class is summarised as the mean of each patch belonging to class i. SHAPE describes the ratio between the actual perimeter of the patch and the square root of patch area.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

None

Range

SHAPE_SD >= 1

Behaviour

Equals SHAPE_MN = 1 if all patches are squares. Increases, without limit, as the shapes of patches become more complex.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Patton, D. R. 1975. A diversity index for quantifying habitat "edge". Wildl. Soc.Bull. 3:171-173.

See Also

lsm_p_shape, mean,
lsm_c_shape_sd, lsm_c_shape_cv,
lsm_l_shape_mn, lsm_l_shape_sd, lsm_l_shape_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_shape_mn(landscape)

SHAPE_SD (class level)

Description

Standard deviation shape index (Shape metric)

Usage

lsm_c_shape_sd(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

SHAPESD=sd(SHAPE[patchij])SHAPE_{SD} = sd(SHAPE[patch_{ij}])

where SHAPE[patchij]SHAPE[patch_{ij}] is the shape index of each patch.

SHAPE_SD is a 'Shape metric'. Each class is summarised as the standard deviation of each patch belonging to class i. SHAPE describes the ratio between the actual perimeter of the patch and the square root of patch area.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

None

Range

SHAPE_SD >= 0

Behaviour

Equals SHAPE_SD = 0 if all patches have an identical shape index. Increases, without limit, as the variation of the shape index increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Patton, D. R. 1975. A diversity index for quantifying habitat "edge". Wildl. Soc.Bull. 3:171-173.

See Also

lsm_p_shape, sd
lsm_c_shape_mn, lsm_c_shape_cv,
lsm_l_shape_mn, lsm_l_shape_sd, lsm_l_shape_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_shape_sd(landscape)

SPLIT (class level)

Description

Splitting index (Aggregation metric)

Usage

lsm_c_split(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

SPLIT=A2j=1naij2SPLIT = \frac{A^2} {\sum \limits_{j = 1}^{n} a_{ij}^2}

where aija_{ij} is the patch area in square meters and AA is the total landscape area.

SPLIT is an 'Aggregation metric'. It describes the number of patches if all patches of class i would be divided into equally sized patches.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

None

Range

1 <= SPLIT <= Number of cells squared

Behaviour

Equals SPLIT = 1 if only one patch is present. Increases as the number of patches of class i increases and is limited if all cells are a patch

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Jaeger, J. A. 2000. Landscape division, splitting index, and effective mesh size: new measures of landscape fragmentation. Landscape ecology, 15(2), 115-130.

See Also

lsm_p_area, lsm_l_ta,
lsm_l_split

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_split(landscape)

TCA (class level)

Description

Total core area (Core area metric)

Usage

lsm_c_tca(landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

consider_boundary

Logical if cells that only neighbour the landscape boundary should be considered as core

edge_depth

Distance (in cells) a cell has the be away from the patch edge to be considered as core cell

Details

TCA=j=1naijcore(110000)TCA = \sum_{j = 1}^{n} a_{ij}^{core} * (\frac{1} {10000})

where here aijcorea_{ij}^{core} is the core area in square meters.

TCA is a 'Core area metric' and equals the sum of core areas of all patches belonging to class i. A cell is defined as core area if the cell has no neighbour with a different value than itself (rook's case). In other words, the core area of a patch is all area that is not an edge. It characterises patch areas and shapes of patches belonging to class i simultaneously (more core area when the patch is large and the shape is rather compact, i.e. a square). Additionally, TCA is a measure for the configuration of the landscape, because the sum of edges increase as patches are less aggregated.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Hectares

Range

TCA >= 0

Behaviour

Increases, without limit, as patch areas increase and patch shapes simplify. TCA = 0 when every cell in every patch of class i is an edge.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_p_core, lsm_l_tca

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_tca(landscape)

TE (class level)

Description

Total (class) edge (Area and Edge metric)

Usage

lsm_c_te(landscape, count_boundary = FALSE, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

count_boundary

Include landscape boundary in edge length

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

TE=k=1meikTE = \sum \limits_{k = 1}^{m} e_{ik}

where eike_{ik} is the edge lengths in meters. TE is an 'Area and edge metric'. Total (class) edge includes all edges between class i and all other classes k. It measures the configuration of the landscape because a highly fragmented landscape will have many edges. However, total edge is an absolute measure, making comparisons among landscapes with different total areas difficult. If count_boundary = TRUE also edges to the landscape boundary are included.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Meters

Range

TE >= 0

Behaviour

Equals TE = 0 if all cells are edge cells. Increases, without limit, as landscape becomes more fragmented

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_p_perim lsm_l_te

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_c_te(landscape)

AI (landscape level)

Description

Aggregation index (Aggregation metric)

Usage

lsm_l_ai(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

AI=[i=1m(giimaxgii)Pi](100)AI = \Bigg[\sum\limits_{i=1}^m \Big( \frac{g_{ii}}{max-g_{ii}} \Big) P_{i} \Bigg](100)

where giig_{ii} is the number of like adjacencies based on the single-count method and maxgiimax-g_{ii} is the classwise maximum number of like adjacencies of class i and PiP_{i} the proportion of landscape compromised of class i.

AI is an 'Aggregation metric'. It equals the number of like adjacencies divided by the theoretical maximum possible number of like adjacencies for that class summed over each class for the entire landscape. The metric is based on the adjacency matrix and the single-count method.

Units

Percent

Range

0 <= AI <= 100

Behaviour

Equals 0 for maximally disaggregated and 100 for maximally aggregated classes.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

He, H. S., DeZonia, B. E., & Mladenoff, D. J. 2000. An aggregation index (AI) to quantify spatial patterns of landscapes. Landscape ecology, 15(7), 591-601.

See Also

lsm_c_ai

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_ai(landscape)

AREA_CV (landscape level)

Description

Coefficient of variation of patch area (Area and edge metric)

Usage

lsm_l_area_cv(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

AREACV=cv(AREA[patchij])AREA_{CV} = cv(AREA[patch_{ij}])

where AREA[patchij]AREA[patch_{ij}] is the area of each patch in hectares.

AREA_CV is an 'Area and Edge metric'. The metric summarises the landscape as the Coefficient of variation of all patches in the landscape. The metric describes the differences among patches in the landscape and is easily comparable because it is scaled to the mean.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Hectares

Range

AREA_CV >= 0

Behaviour

Equals AREA_CV = 0 if all patches are identical in size. Increases, without limit, as the variation of patch areas increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_p_area,
lsm_c_area_mn, lsm_c_area_sd, lsm_c_area_cv,
lsm_l_area_mn, lsm_l_area_sd

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_area_cv(landscape)

AREA_MN (landscape level)

Description

Mean of patch area (Area and edge metric)

Usage

lsm_l_area_mn(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

AREAMN=mean(AREA[patchij])AREA_{MN} = mean(AREA[patch_{ij}])

where AREA[patchij]AREA[patch_{ij}] is the area of each patch in hectares

AREA_MN is an 'Area and Edge metric'. The metric summarises the landscape as the mean of all patch in the landscape. The metric is a simple way to describe the composition of the landscape. Especially together with the total landscape area (lsm_l_ta), it can also give an an idea of patch structure (e.g. many small patches vs. few larges patches).

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Hectares

Range

AREA_MN > 0

Behaviour

Approaches AREA_MN = 0 if all patches are small. Increases, without limit, as the patch areas increase.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_p_area, mean,
lsm_c_area_mn, lsm_c_area_sd, lsm_c_area_cv
lsm_l_area_sd, lsm_l_area_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_area_mn(landscape)

AREA_SD (landscape level)

Description

Standard deviation of patch area (Area and edge metric)

Usage

lsm_l_area_sd(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

AREASD=sd(AREA[patchij])AREA_{SD} = sd(AREA[patch_{ij}])

where AREA[patchij]AREA[patch_{ij}] is the area of each patch in hectares.

AREA_SD is an 'Area and Edge metric'. The metric summarises the landscape as the standard deviation of all patch in the landscape. The metric describes the differences among all patches in the landscape.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Hectares

Range

AREA_SD >= 0

Behaviour

Equals AREA_SD = 0 if all patches are identical in size. Increases, without limit, as the variation of patch areas increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_p_area, sd
lsm_c_area_mn, lsm_c_area_sd, lsm_c_area_cv
lsm_l_area_mn, lsm_l_area_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_area_sd(landscape)

CAI_CV (landscape level)

Description

Coefficient of variation of core area index (Core area metric)

Usage

lsm_l_cai_cv(
  landscape,
  directions = 8,
  consider_boundary = FALSE,
  edge_depth = 1
)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

consider_boundary

Logical if cells that only neighbour the landscape boundary should be considered as core

edge_depth

Distance (in cells) a cell has the be away from the patch edge to be considered as core cell

Details

CAICV=cv(CAI[patchij]CAI_{CV} = cv(CAI[patch_{ij}]

where CAI[patchij]CAI[patch_{ij}] is the core area index of each patch.

CAI_CV is a 'Core area metric'. The metric summarises the landscape as the Coefficient of variation of the core area index of all patches in the landscape. The core area index is the percentage of core area in relation to patch area. A cell is defined as core area if the cell has no neighbour with a different value than itself (rook's case). The metric describes the differences among all patches in the landscape. Because it is scaled to the mean, it is easily comparable.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Percent

Range

CAI_CV >= 0

Behaviour

Equals CAI_CV = 0 if the core area index is identical for all patches. Increases, without limit, as the variation of the core area indices increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_p_cai,
lsm_c_cai_mn, lsm_c_cai_sd, lsm_c_cai_cv,
lsm_l_cai_mn, lsm_l_cai_sd

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_cai_cv(landscape)

CAI_MN (landscape level)

Description

Mean of core area index (Core area metric)

Usage

lsm_l_cai_mn(
  landscape,
  directions = 8,
  consider_boundary = FALSE,
  edge_depth = 1
)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

consider_boundary

Logical if cells that only neighbour the landscape boundary should be considered as core

edge_depth

Distance (in cells) a cell has the be away from the patch edge to be considered as core cell

Details

CAIMN=mean(CAI[patchij]CAI_{MN} = mean(CAI[patch_{ij}]

where CAI[patchij]CAI[patch_{ij}] is the core area index of each patch.

CAI_MN is a 'Core area metric'. The metric summarises the landscape as the mean of the core area index of all patches in the landscape. The core area index is the percentage of core area in relation to patch area. A cell is defined as core area if the cell has no neighbour with a different value than itself (rook's case).

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Percent

Range

0 <= CAI_MN <= 100

Behaviour

CAI_MN = 0 when all patches have no core area and approaches CAI_MN = 100 with increasing percentage of core area within patches.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_p_cai, mean,
lsm_c_cai_sd, lsm_c_cai_sd, lsm_c_cai_cv,
lsm_l_cai_sd, lsm_l_cai_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_cai_mn(landscape)

CAI_SD (landscape level)

Description

Standard deviation of core area index (Core area metric)

Usage

lsm_l_cai_sd(
  landscape,
  directions = 8,
  consider_boundary = FALSE,
  edge_depth = 1
)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

consider_boundary

Logical if cells that only neighbour the landscape boundary should be considered as core

edge_depth

Distance (in cells) a cell has the be away from the patch edge to be considered as core cell

Details

CAISD=sd(CAI[patchij]CAI_{SD} = sd(CAI[patch_{ij}]

where CAI[patchij]CAI[patch_{ij}] is the core area index of each patch.

CAI_SD is a 'Core area metric'. The metric summarises the landscape as the standard deviation of the core area index of all patches in the landscape. The core area index is the percentage of core area in relation to patch area. A cell is defined as core area if the cell has no neighbour with a different value than itself (rook's case). The metric describes the differences among all patches in the landscape.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Percent

Range

CAI_SD >= 0

Behaviour

Equals CAI_SD = 0 if the core area index is identical for all patches. Increases, without limit, as the variation of core area indices increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_p_cai, sd
lsm_c_cai_mn, lsm_c_cai_sd, lsm_c_cai_cv,
lsm_l_cai_mn, lsm_l_cai_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_cai_sd(landscape)

CIRCLE_CV (landscape level)

Description

Coefficient of variation of related circumscribing circle (Shape metric)

Usage

lsm_l_circle_cv(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

CIRCLECV=cv(CIRCLE[patchij])CIRCLE_{CV} = cv(CIRCLE[patch_{ij}])

where CIRCLE[patchij]CIRCLE[patch_{ij}] is the related circumscribing circle of each patch.

CIRCLE_CV is a 'Shape metric' and summarises the landscape as the Coefficient of variation of the related circumscribing circle of all patches in the landscape. CIRCLE describes the ratio between the patch area and the smallest circumscribing circle of the patch and characterises the compactness of the patch. CIRCLE_CV describes the differences among all patches in the landscape. Because it is scaled to the mean, it is easily comparable.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

None

Range

CIRCLE_CV >= 0

Behaviour

Equals CIRCLE_CV if the related circumscribing circle is identical for all patches. Increases, without limit, as the variation of related circumscribing circles increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Baker, W. L., and Y. Cai. 1992. The r.le programs for multiscale analysis of landscape structure using the GRASS geographical information system. Landscape Ecology 7: 291-302.

Based on C++ code from Project Nayuki (https://www.nayuki.io/page/smallest-enclosing-circle).

See Also

lsm_p_circle, mean,
lsm_c_circle_mn, lsm_c_circle_sd, lsm_c_circle_cv,
lsm_l_circle_mn, lsm_l_circle_sd

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_circle_cv(landscape)

CIRCLE_MN (landscape level)

Description

Mean of related circumscribing circle (Shape metric)

Usage

lsm_l_circle_mn(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

CIRCLEMN=mean(CIRCLE[patchij])CIRCLE_{MN} = mean(CIRCLE[patch_{ij}])

where CIRCLE[patchij]CIRCLE[patch_{ij}] is the related circumscribing circle of each patch.

CIRCLE_MN is a 'Shape metric' and summarises the landscape as the mean of the related circumscribing circle of all patches in the landscape. CIRCLE describes the ratio between the patch area and the smallest circumscribing circle of the patch and characterises the compactness of the patch.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

None

Range

CIRCLE_MN > 0

Behaviour

Approaches CIRCLE_MN = 0 if the related circumscribing circle of all patches is small. Increases, without limit, as the related circumscribing circles increase.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Baker, W. L., and Y. Cai. 1992. The r.le programs for multiscale analysis of landscape structure using the GRASS geographical information system. Landscape Ecology 7: 291-302.

Based on C++ code from Project Nayuki (https://www.nayuki.io/page/smallest-enclosing-circle).

See Also

lsm_p_circle, mean,
lsm_c_circle_mn, lsm_c_circle_sd, lsm_c_circle_cv,
lsm_l_circle_sd, lsm_l_circle_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_circle_mn(landscape)

CIRCLE_SD (landscape level)

Description

Standard deviation of related circumscribing circle (Shape metric)

Usage

lsm_l_circle_sd(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

CIRCLESD=sd(CIRCLE[patchij])CIRCLE_{SD} = sd(CIRCLE[patch_{ij}])

where CIRCLE[patchij]CIRCLE[patch_{ij}] is the related circumscribing circle of each patch.

CIRCLE_SD is a 'Shape metric' and summarises the landscape as the standard deviation of the related circumscribing circle of all patches in the landscape. CIRCLE describes the ratio between the patch area and the smallest circumscribing circle of the patch and characterises the compactness of the patch. The metric describes the differences among all patches of the landscape.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

None

Range

CIRCLE_SD >= 0

Behaviour

Equals CIRCLE_SD if the related circumscribing circle is identical for all patches. Increases, without limit, as the variation of related circumscribing circles increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Baker, W. L., and Y. Cai. 1992. The r.le programs for multiscale analysis of landscape structure using the GRASS geographical information system. Landscape Ecology 7: 291-302.

Based on C++ code from Project Nayuki (https://www.nayuki.io/page/smallest-enclosing-circle).

See Also

lsm_p_circle, mean,
lsm_c_circle_mn, lsm_c_circle_sd, lsm_c_circle_cv,
lsm_l_circle_mn, lsm_l_circle_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_circle_sd(landscape)

COHESION (landscape level)

Description

Patch Cohesion Index (Aggregation metric)

Usage

lsm_l_cohesion(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

COHESION=1(i=1mj=1npiji=1mj=1npijaij)(11Z)1100COHESION = 1 - (\frac{\sum \limits_{i = 1}^{m} \sum \limits_{j = 1}^{n} p_{ij}} {\sum \limits_{i = 1}^{m} \sum \limits_{j = 1}^{n} p_{ij} \sqrt{a_{ij}}}) * (1 - \frac{1} {\sqrt{Z}}) ^ {-1} * 100

where pijp_{ij} is the perimeter in meters, aija_{ij} is the area in square meters and ZZ is the number of cells.

COHESION is an 'Aggregation metric'.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Percent

Ranges

Unknown

Behaviour

Unknown

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Schumaker, N. H. 1996. Using landscape indices to predict habitat connectivity. Ecology, 77(4), 1210-1225.

See Also

lsm_p_perim, lsm_p_area,
lsm_l_cohesion

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_cohesion(landscape)

Conditional entropy (landscape level)

Description

Conditional entropy \[H(y|x)\]

Usage

lsm_l_condent(landscape, neighbourhood = 4, ordered = TRUE, base = "log2")

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

neighbourhood

The number of directions in which cell adjacencies are considered as neighbours: 4 (rook's case) or 8 (queen's case). The default is 4.

ordered

The type of pairs considered. Either ordered (TRUE) or unordered (FALSE). The default is TRUE.

base

The unit in which entropy is measured. The default is "log2", which compute entropy in "bits". "log" and "log10" can be also used.

Details

Complexity of a landscape pattern configuration. It measures a only a geometric intricacy (configurational complexity) of a landscape pattern.

Value

tibble

References

Nowosad J., TF Stepinski. 2019. Information theory as a consistent framework for quantification and classification of landscape patterns. https://doi.org/10.1007/s10980-019-00830-x

See Also

lsm_l_ent, lsm_l_mutinf, lsm_l_joinent, lsm_l_relmutinf

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_condent(landscape)

CONTAG (landscape level)

Description

Contagion (Aggregation metric)

Usage

lsm_l_contag(landscape, verbose = TRUE)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

verbose

Print warning message if not sufficient patches are present

Details

CONTAG=1+q=1napqln(pq)2ln(t)CONTAG = 1 + \frac{\sum \limits_{q = 1}^{n_{a}} p_{q} ln(p_{q})}{2ln(t)}

where pqp_{q} the adjacency table for all classes divided by the sum of that table and tt the number of classes in the landscape.

CONTAG is an 'Aggregation metric'. It is based on cell adjacencies and describes the probability of two random cells belonging to the same class. pqp_{q} is the cell adjacency table, where the order is preserved and pairs of adjacent cells are counted twice. Contagion is affected by both the dispersion and interspersion of classes. E.g., low class dispersion (= high proportion of like adjacencies) and low interspersion (= uneven distribution of pairwise adjacencies) lead to a high contagion value.

The number of classes to calculate CONTAG must be >= than 2.

Units

Percent

Range

0 < Contag <=100

Behaviour

Approaches CONTAG = 0 if all cells are unevenly distributed and 100 indicates that all cells are equally adjacent to all other classes.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Riitters, K.H., O'Neill, R.V., Wickham, J.D. & Jones, K.B. (1996). A note on contagion indices for landscape analysis. Landscape ecology, 11, 197-202.

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_contag(landscape)

CONTIG_CV (landscape level)

Description

Coefficient of variation of Contiguity index (Shape metric)

Usage

lsm_l_contig_cv(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

CONTIGCV=cv(CONTIG[patchij])CONTIG_{CV} = cv(CONTIG[patch_{ij}])

where CONTIG[patchij]CONTIG[patch_{ij}] is the contiguity of each patch.

CONTIG_CV is a 'Shape metric'. It summarises the landscape as the coefficient of variation of all patches in the landscape. CONTIG_CV asses the spatial connectedness (contiguity) of cells in patches. The metric coerces patch values to a value of 1 and the background to NA. A nine cell focal filter matrix:

filter_matrix <- matrix(c(1, 2, 1,
                          2, 1, 2,
                          1, 2, 1), 3, 3, byrow = T)

... is then used to weight orthogonally contiguous pixels more heavily than diagonally contiguous pixels. Therefore, larger and more connections between patch cells in the rookie case result in larger contiguity index values.

Units

None

Range

CONTIG_CV >= 0

Behaviour

CONTIG_CV = 0 if the contiguity index is identical for all patches. Increases, without limit, as the variation of CONTIG increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

LaGro, J. 1991. Assessing patch shape in landscape mosaics. Photogrammetric Engineering and Remote Sensing, 57(3), 285-293

See Also

lsm_p_contig, lsm_c_contig_sd, lsm_c_contig_cv, lsm_c_contig_mn,
lsm_l_contig_sd, lsm_l_contig_mn

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_contig_cv(landscape)

CONTIG_MN (landscape level)

Description

Mean of Contiguity index (Shape metric)

Usage

lsm_l_contig_mn(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

CONTIGMN=mean(CONTIG[patchi])CONTIG_{MN} = mean(CONTIG[patch_{i}])

where CONTIG[patchij]CONTIG[patch_{ij}] is the contiguity of each patch.

CONTIG_MN is a 'Shape metric'. It summarises the landscape as the mean of all patches in the landscape. CONTIG_MN asses the spatial connectedness (contiguity) of cells in patches. The metric coerces patch values to a value of 1 and the background to NA. A nine cell focal filter matrix:

filter_matrix <- matrix(c(1, 2, 1,
                          2, 1, 2,
                          1, 2, 1), 3, 3, byrow = T)

... is then used to weight orthogonally contiguous pixels more heavily than diagonally contiguous pixels. Therefore, larger and more connections between patch cells in the rookie case result in larger contiguity index values.

Units

None

Range

0 >= CONTIG_MN <= 1

Behaviour

CONTIG equals the mean of the contiguity index on landscape level for all patches.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

LaGro, J. 1991. Assessing patch shape in landscape mosaics. Photogrammetric Engineering and Remote Sensing, 57(3), 285-293

See Also

lsm_p_contig, lsm_c_contig_sd, lsm_c_contig_cv, lsm_c_contig_mn,
lsm_l_contig_sd, lsm_l_contig_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_contig_mn(landscape)

CONTIG_SD (landscape level)

Description

Standard deviation of Contiguity index (Shape metric)

Usage

lsm_l_contig_sd(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

CONTIGSD=sd(CONTIG[patchij])CONTIG_{SD} = sd(CONTIG[patch_{ij}])

where CONTIG[patchij]CONTIG[patch_{ij}] is the contiguity of each patch.

CONTIG_SD is a 'Shape metric'. It summarises the landscape as the standard deviation of all patches in the landscape. CONTIG_SD asses the spatial connectedness (contiguity) of cells in patches. The metric coerces patch values to a value of 1 and the background to NA. A nine cell focal filter matrix:

filter_matrix <- matrix(c(1, 2, 1,
                          2, 1, 2,
                          1, 2, 1), 3, 3, byrow = TRUE)

... is then used to weight orthogonally contiguous pixels more heavily than diagonally contiguous pixels. Therefore, larger and more connections between patch cells in the rookie case result in larger contiguity index values.

Units

None

Range

CONTIG_SD >= 0

Behaviour

CONTIG_SD = 0 if the contiguity index is identical for all patches. Increases, without limit, as the variation of CONTIG increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

LaGro, J. 1991. Assessing patch shape in landscape mosaics. Photogrammetric Engineering and Remote Sensing, 57(3), 285-293

See Also

lsm_p_contig, lsm_c_contig_sd, lsm_c_contig_cv, lsm_c_contig_mn,
lsm_l_contig_cv, lsm_l_contig_mn

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_contig_sd(landscape)

CORE_CV (landscape level)

Description

Coefficient of variation of core area (Core area metric)

Usage

lsm_l_core_cv(
  landscape,
  directions = 8,
  consider_boundary = FALSE,
  edge_depth = 1
)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

consider_boundary

Logical if cells that only neighbour the landscape boundary should be considered as core

edge_depth

Distance (in cells) a cell has the be away from the patch edge to be considered as core cell

Details

CORECV=cv(CORE[patchij])CORE_{CV} = cv(CORE[patch_{ij}])

where CORE[patchij]CORE[patch_{ij}] is the core area in square meters of each patch.

CORE_CV is a 'Core area metric'. It equals the Coefficient of variation of the core area of each patch in the landscape. The core area is defined as all cells that have no neighbour with a different value than themselves (rook's case). The metric describes the differences among all patches in the landscape and is easily comparable because it is scaled to the mean.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Hectares

Range

CORE_CV >= 0

Behaviour

Equals CORE_CV = 0 if all patches have the same core area. Increases, without limit, as the variation of patch core areas increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_p_core,
lsm_c_core_mn, lsm_c_core_sd, lsm_c_core_cv,
lsm_l_core_mn, lsm_l_core_sd

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_core_cv(landscape)

CORE_MN (landscape level)

Description

Mean of core area (Core area metric)

Usage

lsm_l_core_mn(
  landscape,
  directions = 8,
  consider_boundary = FALSE,
  edge_depth = 1
)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

consider_boundary

Logical if cells that only neighbour the landscape boundary should be considered as core

edge_depth

Distance (in cells) a cell has the be away from the patch edge to be considered as core cell

Details

COREMN=mean(CORE[patchij])CORE_{MN} = mean(CORE[patch_{ij}])

where CORE[patchij]CORE[patch_{ij}] is the core area in square meters of each patch.

CORE_MN is a 'Core area metric' and equals the mean of core areas of all patches in the landscape. The core area is defined as all cells that have no neighbour with a different value than themselves (rook's case).

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Hectares

Range

CORE_MN >= 0

Behaviour

Equals CORE_MN = 0 if CORE = 0 for all patches. Increases, without limit, as the core area indices increase.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_p_core, mean,
lsm_c_core_mn, lsm_c_core_sd, lsm_c_core_cv,
lsm_l_core_sd, lsm_l_core_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_core_mn(landscape)

CORE_SD (landscape level)

Description

Standard deviation of patch core area (class level)

Usage

lsm_l_core_sd(
  landscape,
  directions = 8,
  consider_boundary = FALSE,
  edge_depth = 1
)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

consider_boundary

Logical if cells that only neighbour the landscape boundary should be considered as core

edge_depth

Distance (in cells) a cell has the be away from the patch edge to be considered as core cell

Details

CORESD=sd(CORE[patchij])CORE_{SD} = sd(CORE[patch_{ij}])

where CORE[patchij]CORE[patch_{ij}] is the core area in square meters of each patch.

CORE_SD is a 'Core area metric'. It equals the standard deviation of the core area of all patches in the landscape. The core area is defined as all cells that have no neighbour with a different value than themselves (rook's case). The metric describes the differences among all patches in the landscape.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Hectares

Range

CORE_SD >= 0

Behaviour

Equals CORE_SD = 0 if all patches have the same core area. Increases, without limit, as the variation of patch core areas increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_p_core, sd
lsm_c_core_mn, lsm_c_core_sd, lsm_c_core_cv,
lsm_l_core_mn, lsm_l_core_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_core_sd(landscape)

DCAD (landscape level)

Description

Disjunct core area density (core area metric)

Usage

lsm_l_dcad(
  landscape,
  directions = 8,
  consider_boundary = FALSE,
  edge_depth = 1
)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

consider_boundary

Logical if cells that only neighbour the landscape boundary should be considered as core

edge_depth

Distance (in cells) a cell has the be away from the patch edge to be considered as core cell

Details

DCAD=(i=1mj=1nnijcoreA)10000100DCAD = (\frac{\sum \limits_{i = 1}^{m} \sum \limits_{j = 1}^{n} n_{ij}^{core}} {A}) * 10000 * 100

where nijcoren_{ij}^{core} is the number of disjunct core areas and AA is the total landscape area in square meters.

DCAD is a 'Core area metric'. It equals the number of disjunct core areas per 100 ha relative to the total area. A disjunct core area is a 'patch within the patch' containing only core cells. A cell is defined as core area if the cell has no neighbour with a different value than itself (rook's case). The metric is relative and therefore comparable among landscapes with different total areas.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Number per 100 hectares

Range

DCAD >= 0

Behaviour

Equals DCAD = 0 when DCORE = 0, i.e. no patch contains a disjunct core area. Increases, without limit, as disjunct core areas become more present, i.e. patches becoming larger and less complex.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_c_ndca, lsm_l_ta,
lsm_c_dcad

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_dcad(landscape)

DCORE_CV (landscape level)

Description

Coefficient of variation number of disjunct core areas (Core area metric)

Usage

lsm_l_dcore_cv(
  landscape,
  directions = 8,
  consider_boundary = FALSE,
  edge_depth = 1
)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

consider_boundary

Logical if cells that only neighbour the landscape boundary should be considered as core

edge_depth

Distance (in cells) a cell has the be away from the patch edge to be considered as core cell

Details

DCORECV=cv(NCORE[patchij])DCORE_{CV} = cv(NCORE[patch_{ij}])

where NCORE[patchij]NCORE[patch_{ij}] is the number of core areas.

DCORE_CV is an 'Core area metric'. It summarises the landscape as the Coefficient of variation of all patches belonging to the landscape. A cell is defined as core if the cell has no neighbour with a different value than itself (rook's case). NCORE counts the disjunct core areas, whereby a core area is a 'patch within the patch' containing only core cells. The metric describes the differences among all patches in the landscape and is easily comparable because it is scaled to the mean.

Units

None

Range

DCORE_CV >= 0

Behaviour

Equals DCORE_CV = 0 if all patches have the same number of disjunct core areas. Increases, without limit, as the variation of number of disjunct core areas increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_p_ncore,
lsm_c_dcore_mn, lsm_c_dcore_sd, lsm_c_dcore_cv,
lsm_l_dcore_mn, lsm_l_dcore_sd

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_dcore_cv(landscape)

DCORE_MN (landscape level)

Description

Mean number of disjunct core areas (Core area metric)

Usage

lsm_l_dcore_mn(
  landscape,
  directions = 8,
  consider_boundary = FALSE,
  edge_depth = 1
)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

consider_boundary

Logical if cells that only neighbour the landscape boundary should be considered as core

edge_depth

Distance (in cells) a cell has the be away from the patch edge to be considered as core cell

Details

DCOREMN=mean(NCORE[patchij])DCORE_{MN} = mean(NCORE[patch_{ij}])

where NCORE[patchij]NCORE[patch_{ij}] is the number of core areas.

DCORE_MN is an 'Core area metric'. It summarises the landscape as the mean of all patches in the landscape. A cell is defined as core if the cell has no neighbour with a different value than itself (rook's case). NCORE counts the disjunct core areas, whereby a core area is a 'patch within the patch' containing only core cells.

Units

None

Range

DCORE_MN > 0

Behaviour

Equals DCORE_MN = 0 if NCORE = 0 for all patches. Increases, without limit, as the number of disjunct core areas increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_p_ncore, mean,
lsm_c_dcore_mn, lsm_c_dcore_sd, lsm_c_dcore_cv,
lsm_l_dcore_sd, lsm_l_dcore_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_dcore_mn(landscape)

DCORE_SD (landscape level)

Description

Standard deviation number of disjunct core areas (Core area metric)

Usage

lsm_l_dcore_sd(
  landscape,
  directions = 8,
  consider_boundary = FALSE,
  edge_depth = 1
)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

consider_boundary

Logical if cells that only neighbour the landscape boundary should be considered as core

edge_depth

Distance (in cells) a cell has the be away from the patch edge to be considered as core cell

Details

DCORESD=sd(NCORE[patchij])DCORE_{SD} = sd(NCORE[patch_{ij}])

where NCORE[patchij]NCORE[patch_{ij}] is the number of core areas.

DCORE_SD is an 'Core area metric'. It summarises the landscape as the standard deviation of all patches. A cell is defined as core if the cell has no neighbour with a different value than itself (rook's case). NCORE counts the disjunct core areas, whereby a core area is a 'patch within the patch' containing only core cells. The metric describes the differences among all patches in the landscape.

Units

None

Range

DCORE_SD >= 0

Behaviour

Equals DCORE_SD = 0 if all patches have the same number of disjunct core areas. Increases, without limit, as the variation of number of disjunct core areas increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_p_ncore, sd
lsm_c_dcore_mn, lsm_c_dcore_sd,
lsm_c_dcore_cv, lsm_l_dcore_mn, lsm_l_dcore_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_dcore_sd(landscape)

DIVISION (landscape level)

Description

Landscape division index (Aggregation metric)

Usage

lsm_l_division(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

DIVISON=(1i=1mj=1n(aijA)2)DIVISON = (1 - \sum \limits_{i = 1}^{m} \sum \limits_{j = 1}^{n} (\frac{a_{ij}} {A}) ^ 2)

where aija_{ij} is the area in square meters and AA is the total landscape area in square meters.

DIVISION is an 'Aggregation metric. It can be in as the probability that two randomly selected cells are not located in the same patch. The landscape division index is negatively correlated with the effective mesh size (lsm_l_mesh).

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Proportion

Ranges

0 <= Division < 1

Behaviour

Equals DIVISION = 0 if only one patch is present. Approaches DIVISION = 1 if all patches of class i are single cells.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Jaeger, J. A. 2000. Landscape division, splitting index, and effective mesh size: new measures of landscape fragmentation. Landscape ecology, 15(2), 115-130.

See Also

lsm_p_area, lsm_l_ta,
lsm_c_division

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_division(landscape)

ED (landscape level)

Description

Edge Density (Area and Edge metric)

Usage

lsm_l_ed(landscape, count_boundary = FALSE, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

count_boundary

Count landscape boundary as edge

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

ED=EA10000ED = \frac{E} {A} * 10000

where EE is the total landscape edge in meters and AA is the total landscape area in square meters.

ED is an 'Area and Edge metric'. The edge density equals all edges in the landscape in relation to the landscape area. The boundary of the landscape is only included in the corresponding total class edge length if count_boundary = TRUE. The metric describes the configuration of the landscape, e.g. because an overall aggregation of classes will result in a low edge density. The metric is standardized to the total landscape area, and therefore comparisons among landscapes with different total areas are possible.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Meters per hectare

Range

ED >= 0

Behaviour

Equals ED = 0 if only one patch is present (and the landscape boundary is not included) and increases, without limit, as the landscapes becomes more patchy

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_l_te, lsm_l_ta,
lsm_c_ed

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_ed(landscape)

ENN_CV (landscape level)

Description

Coefficient of variation of euclidean nearest-neighbor distance (Aggregation metric)

Usage

lsm_l_enn_cv(landscape, directions = 8, verbose = TRUE)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

verbose

Print warning message if not sufficient patches are present

Details

ENNCV=cv(ENN[patchij])ENN_{CV} = cv(ENN[patch_{ij}])

where ENN[patchij]ENN[patch_{ij}] is the euclidean nearest-neighbor distance of each patch.

ENN_CV is an 'Aggregation metric'. It summarises the landscape as the Coefficient of variation of all patches in the landscape. ENN measures the distance to the nearest neighbouring patch of the same class i. The distance is measured from edge-to-edge. The range is limited by the cell resolution on the lower limit and the landscape extent on the upper limit. The metric is a simple way to describe patch isolation. Because it is scaled to the mean, it is easily comparable among different landscapes.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Meters

Range

ENN_CV >= 0

Behaviour

Equals ENN_CV = 0 if the euclidean nearest-neighbor distance is identical for all patches. Increases, without limit, as the variation of ENN increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

McGarigal, K., and McComb, W. C. (1995). Relationships between landscape structure and breeding birds in the Oregon Coast Range. Ecological monographs, 65(3), 235-260.

See Also

lsm_p_enn,
lsm_c_enn_mn, lsm_c_enn_sd, lsm_c_enn_cv,
lsm_l_enn_mn, lsm_l_enn_sd,

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_enn_cv(landscape)

ENN_MN (landscape level)

Description

Mean of euclidean nearest-neighbor distance (Aggregation metric)

Usage

lsm_l_enn_mn(landscape, directions = 8, verbose = TRUE)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

verbose

Print warning message if not sufficient patches are present

Details

ENNMN=cv(mean[patchij])ENN_{MN} = cv(mean[patch_{ij}])

where ENN[patchij]ENN[patch_{ij}] is the euclidean nearest-neighbor distance of each patch.

ENN_CV is an 'Aggregation metric'. It summarises the landscape as the mean of all patches in the landscape. ENN measures the distance to the nearest neighbouring patch of the same class i. The distance is measured from edge-to-edge. The range is limited by the cell resolution on the lower limit and the landscape extent on the upper limit.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Meters

Range

ENN_MN > 0

Behaviour

Approaches ENN_MN = 0 as the distance to the nearest neighbour decreases, i.e. patches of the same class i are more aggregated. Increases, without limit, as the distance between neighbouring patches of the same class i increases, i.e. patches are more isolated.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

McGarigal, K., and McComb, W. C. (1995). Relationships between landscape structure and breeding birds in the Oregon Coast Range. Ecological monographs, 65(3), 235-260.

See Also

lsm_p_enn, mean,
lsm_c_enn_mn, lsm_c_enn_sd, lsm_c_enn_cv,
lsm_l_enn_sd, lsm_l_enn_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_enn_mn(landscape)

ENN_SD (landscape level)

Description

Standard deviation of euclidean nearest-neighbor distance (Aggregation metric)

Usage

lsm_l_enn_sd(landscape, directions = 8, verbose = TRUE)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

verbose

Print warning message if not sufficient patches are present

Details

ENNSD=sd(ENN[patchij])ENN_{SD} = sd(ENN[patch_{ij}])

where ENN[patchij]ENN[patch_{ij}] is the euclidean nearest-neighbor distance of each patch.

ENN_CV is an 'Aggregation metric'. It summarises in the landscape as the standard deviation of all patches in the landscape. ENN measures the distance to the nearest neighbouring patch of the same class i. The distance is measured from edge-to-edge. The range is limited by the cell resolution on the lower limit and the landscape extent on the upper limit. The metric is a simple way to describe patch isolation. Because it is scaled to the mean, it is easily comparable among different landscapes.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Meters

Range

ENN_SD >= 0

Behaviour

Equals ENN_SD = 0 if the euclidean nearest-neighbor distance is identical for all patches. Increases, without limit, as the variation of ENN increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

McGarigal, K., and McComb, W. C. (1995). Relationships between landscape structure and breeding birds in the Oregon Coast Range. Ecological monographs, 65(3), 235-260.

See Also

lsm_p_enn, sd
lsm_c_enn_mn, lsm_c_enn_sd, lsm_c_enn_cv,
lsm_l_enn_mn, lsm_l_enn_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_enn_sd(landscape)

ENT (landscape level)

Description

Marginal entropy \[H(x)\]

Usage

lsm_l_ent(landscape, neighbourhood = 4, base = "log2")

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

neighbourhood

The number of directions in which cell adjacencies are considered as neighbours: 4 (rook's case) or 8 (queen's case). The default is 4.

base

The unit in which entropy is measured. The default is "log2", which compute entropy in "bits". "log" and "log10" can be also used.

Details

It measures a diversity (thematic complexity) of landscape classes.

Value

tibble

References

Nowosad J., TF Stepinski. 2019. Information theory as a consistent framework for quantification and classification of landscape patterns. https://doi.org/10.1007/s10980-019-00830-x

See Also

lsm_l_condent, lsm_l_mutinf, lsm_l_joinent, lsm_l_relmutinf

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_ent(landscape)

FRAC_CV (landscape level)

Description

Coefficient of variation fractal dimension index (Shape metric)

Usage

lsm_l_frac_cv(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

FRACCV=cv(FRAC[patchij])FRAC_{CV} = cv(FRAC[patch_{ij}])

where FRAC[patchij]FRAC[patch_{ij}] equals the fractal dimension index of each patch.

FRAC_CV is a 'Shape metric'. The metric summarises the landscape as the Coefficient of variation of the fractal dimension index of all patches in the landscape. The fractal dimension index is based on the patch perimeter and the patch area and describes the patch complexity. The Coefficient of variation is scaled to the mean and comparable among different landscapes.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

None

Range

FRAC_CV >= 0

Behaviour

Equals FRAC_CV = 0 if the fractal dimension index is identical for all patches. Increases, without limit, as the variation of the fractal dimension indices increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Mandelbrot, B. B. 1977. Fractals: Form, Chance, and Dimension. San Francisco. W. H. Freeman and Company.

See Also

lsm_p_frac,
lsm_c_frac_mn, lsm_c_frac_sd, lsm_c_frac_cv,
lsm_l_frac_mn, lsm_l_frac_sd,

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_frac_cv(landscape)

FRAC_MN (landscape level)

Description

Mean fractal dimension index (Shape metric)

Usage

lsm_l_frac_mn(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

FRACMN=mean(FRAC[patchij])FRAC_{MN} = mean(FRAC[patch_{ij}])

where FRAC[patchij]FRAC[patch_{ij}] equals the fractal dimension index of each patch.

FRAC_MN is a 'Shape metric'. The metric summarises the landscape as the mean of the fractal dimension index of all patches in the landscape. The fractal dimension index is based on the patch perimeter and the patch area and describes the patch complexity. The Coefficient of variation is scaled to the mean and comparable among different landscapes.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

None

Range

FRAC_MN > 0

Behaviour

Approaches FRAC_MN = 1 if all patches are squared and FRAC_MN = 2 if all patches are irregular.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Mandelbrot, B. B. 1977. Fractals: Form, Chance, and Dimension. San Francisco. W. H. Freeman and Company.

See Also

lsm_p_frac, mean,
lsm_c_frac_mn, lsm_c_frac_sd, lsm_c_frac_cv,
lsm_l_frac_sd, lsm_l_frac_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_frac_mn(landscape)

FRAC_SD (landscape level)

Description

Standard deviation fractal dimension index (Shape metric)

Usage

lsm_l_frac_sd(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

FRACSD=sd(FRAC[patchij])FRAC_{SD} = sd(FRAC[patch_{ij}])

where FRAC[patchij]FRAC[patch_{ij}] equals the fractal dimension index of each patch.

FRAC_SD is a 'Shape metric'. The metric summarises the landscape as the standard deviation of the fractal dimension index of all patches in the landscape. The fractal dimension index is based on the patch perimeter and the patch area and describes the patch complexity.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

None

Range

FRAC_SD>= 0

Behaviour

Equals FRAC_SD = 0 if the fractal dimension index is identical for all patches. Increases, without limit, as the variation of the fractal dimension indices increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Mandelbrot, B. B. 1977. Fractals: Form, Chance, and Dimension. San Francisco. W. H. Freeman and Company.

See Also

lsm_p_frac, sd
lsm_c_frac_mn, lsm_c_frac_sd, lsm_c_frac_cv,
lsm_l_frac_mn, lsm_l_frac_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_frac_sd(landscape)

GYRATE_CV (landscape level)

Description

Coefficient of variation radius of gyration (Area and edge metric)

Usage

lsm_l_gyrate_cv(landscape, directions = 8, cell_center = FALSE)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

cell_center

If true, the coordinates of the centroid are forced to be a cell center within the patch.

Details

GYRATECV=cv(GYRATE[patchij])GYRATE_{CV} = cv(GYRATE[patch_{ij}])

where GYRATE[patchij]GYRATE[patch_{ij}] equals the radius of gyration of each patch.

GYRATE_CV is an 'Area and edge metric'. The metric summarises the landscape as the Coefficient of variation of the radius of gyration of all patches in the landscape. GYRATE measures the distance from each cell to the patch centroid and is based on cell center-to-cell center distances. The metrics characterises both the patch area and compactness. The Coefficient of variation is scaled to the mean and comparable among different landscapes.

If cell_center = TRUE some patches might have several possible cell-center centroids. In this case, the gyrate index is based on the mean distance of all cells to all possible cell-center centroids.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Meters

Range

GYRATE_CV >= 0

Behaviour

Equals GYRATE_CV = 0 if the radius of gyration is identical for all patches. Increases, without limit, as the variation of the radius of gyration increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Keitt, T. H., Urban, D. L., & Milne, B. T. 1997. Detecting critical scales in fragmented landscapes. Conservation ecology, 1(1).

See Also

lsm_p_gyrate,
lsm_c_gyrate_mn, lsm_c_gyrate_sd, lsm_c_gyrate_cv,
lsm_l_gyrate_mn, lsm_l_gyrate_sd

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_gyrate_cv(landscape)

GYRATE_MN (landscape level)

Description

Mean radius of gyration (Area and edge metric)

Usage

lsm_l_gyrate_mn(landscape, directions = 8, cell_center = FALSE)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

cell_center

If true, the coordinates of the centroid are forced to be a cell center within the patch.

Details

GYRATEMN=mean(GYRATE[patchij])GYRATE_{MN} = mean(GYRATE[patch_{ij}])

where GYRATE[patchij]GYRATE[patch_{ij}] equals the radius of gyration of each patch.

GYRATE_MN is an 'Area and edge metric'. The metric summarises the landscape as the mean of the radius of gyration of all patches in the landscape. GYRATE measures the distance from each cell to the patch centroid and is based on cell center-to-cell center distances. The metrics characterises both the patch area and compactness.

If cell_center = TRUE some patches might have several possible cell-center centroids. In this case, the gyrate index is based on the mean distance of all cells to all possible cell-center centroids.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Meters

Range

GYRATE_MN >= 0

Behaviour

Approaches GYRATE_MN = 0 if every patch is a single cell. Increases, without limit, when only one patch is present.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Keitt, T. H., Urban, D. L., & Milne, B. T. 1997. Detecting critical scales in fragmented landscapes. Conservation ecology, 1(1).

See Also

lsm_p_gyrate, mean,
lsm_c_gyrate_mn, lsm_c_gyrate_sd, lsm_c_gyrate_cv,
lsm_l_gyrate_sd, lsm_l_gyrate_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_gyrate_mn(landscape)

GYRATE_SD (landscape level)

Description

Standard deviation radius of gyration (Area and edge metric)

Usage

lsm_l_gyrate_sd(landscape, directions = 8, cell_center = FALSE)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

cell_center

If true, the coordinates of the centroid are forced to be a cell center within the patch.

Details

GYRATESD=sd(GYRATE[patchij])GYRATE_{SD} = sd(GYRATE[patch_{ij}])

where GYRATE[patchij]GYRATE[patch_{ij}] equals the radius of gyration of each patch.

GYRATE_SD is an 'Area and edge metric'. The metric summarises the landscape as the standard deviation of the radius of gyration of all patches in the landscape. GYRATE measures the distance from each cell to the patch centroid and is based on cell center-to-cell center distances. The metrics characterises both the patch area and compactness.

If cell_center = TRUE some patches might have several possible cell-center centroids. In this case, the gyrate index is based on the mean distance of all cells to all possible cell-center centroids.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Meters

Range

GYRATE_SD >= 0

Behaviour

Equals GYRATE_SD = 0 if the radius of gyration is identical for all patches. Increases, without limit, as the variation of the radius of gyration increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Keitt, T. H., Urban, D. L., & Milne, B. T. 1997. Detecting critical scales in fragmented landscapes. Conservation ecology, 1(1).

See Also

lsm_p_gyrate,
lsm_c_gyrate_mn, lsm_c_gyrate_sd, lsm_c_gyrate_cv,
lsm_l_gyrate_mn, lsm_l_gyrate_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_gyrate_sd(landscape)

Interspersion and Juxtaposition index (landscape level)

Description

Interspersion and Juxtaposition index (Aggregation metric)

Usage

lsm_l_iji(landscape, verbose = TRUE)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

verbose

Print warning message if not sufficient patches are present

Details

IJI=i=1mk=i+1m[(eikE)ln(eikE)]ln(0.5[m(m1)])100IJI = \frac{- \sum \limits_{i = 1}^{m} \sum \limits_{k = i + 1}^{m} \Bigg[ \Bigg( \frac{e_{ik}}{E} \Bigg) ln \Bigg( \frac{e_{ik}}{E} \Bigg) \Bigg]}{ln(0.5[m(m - 1)])} * 100

where eike_{ik} are the unique adjacencies of all classes (lower/upper triangle of the adjacency table - without the diagonal), EE is the total length of edges in the landscape and mm is the number of classes.

IJI is an 'Aggregation metric'. It is a so called "salt and pepper" metric and describes the intermixing of classes (i.e. without considering like adjacencies - the diagonal of the adjacency table). The number of classes to calculate IJI must be >= than 3.

Units

Percent

Range

0 < IJI <= 100

Behaviour

Approaches 0 if a class is only adjacent to a single other class and equals 100 when a class is equally adjacent to all other classes.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

McGarigal, K., & Marks, B. J. 1995. FRAGSTATS: spatial pattern analysis program for quantifying landscape structure. Gen. Tech. Rep. PNW-GTR-351. Portland, OR: US Department of Agriculture, Forest Service, Pacific Northwest Research Station. 122 p, 351.

See Also

lsm_c_iji

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_iji(landscape)

JOINENT (landscape level)

Description

Joint entropy \[H(x, y)\]

Usage

lsm_l_joinent(landscape, neighbourhood = 4, ordered = TRUE, base = "log2")

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

neighbourhood

The number of directions in which cell adjacencies are considered as neighbours: 4 (rook's case) or 8 (queen's case). The default is 4.

ordered

The type of pairs considered. Either ordered (TRUE) or unordered (FALSE). The default is TRUE.

base

The unit in which entropy is measured. The default is "log2", which compute entropy in "bits". "log" and "log10" can be also used.

Details

Complexity of a landscape pattern. An overall spatio-thematic complexity metric.

Value

tibble

References

Nowosad J., TF Stepinski. 2019. Information theory as a consistent framework for quantification and classification of landscape patterns. https://doi.org/10.1007/s10980-019-00830-x

See Also

lsm_l_ent, lsm_l_condent, lsm_l_mutinf, lsm_l_relmutinf

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_joinent(landscape)

LPI (landscape level)

Description

Largest patch index (Area and Edge metric)

Usage

lsm_l_lpi(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

LPI=max(aij)A100LPI = \frac{\max (a_{ij})} {A} * 100

where max(aij)max(a_{ij}) is the area of the patch in square meters and AA is the total landscape area in square meters.

The largest patch index is an 'Area and edge metric'. It is the percentage of the landscape covered by the largest patch in the landscape. It is a simple measure of dominance.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Percentage

Range

0 < LPI <= 100

Behaviour

Approaches LPI = 0 when the largest patch is becoming small and equals LPI = 100 when only one patch is present

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_p_area, lsm_l_ta,
lsm_c_lpi

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_lpi(landscape)

LSI (landscape level)

Description

Landscape shape index (Aggregation metric)

Usage

lsm_l_lsi(landscape)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

Details

LSI=EminELSI = \frac{E} {\min E}

where EE is the total edge length in cell surfaces and minE\min E is the minimum total edge length in cell surfaces.

LSI is an 'Aggregation metric'. It is the ratio between the actual landscape edge length and the hypothetical minimum edge length. The minimum edge length equals the edge length if only one patch would be present.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

None

Ranges

LSI >= 1

Behaviour

Equals LSI = 1 when only one squared patch is present. Increases, without limit, as the length of the actual edges increases, i.e. the patches become less compact.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Patton, D. R. 1975. A diversity index for quantifying habitat "edge". Wildl. Soc.Bull. 3:171-173.

See Also

lsm_p_shape,
lsm_c_lsi

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_lsi(landscape)

MESH (landscape level)

Description

Effective Mesh Size (Aggregation metric)

Usage

lsm_l_mesh(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

MESH=i=1mj=1naij2A110000MESH = \frac{\sum \limits_{i = 1}^{m} \sum \limits_{j = 1}^{n} a_{ij} ^ 2}{A} * \frac{1} {10000}

where aija_{ij} is the patch area in square meters and AA is the total landscape area in square meters.

The effective mesh size is an 'Aggregation metric'. Because each patch is squared before the sum is calculated and the sum is standardized by the total landscape area, MESH is a relative measure of patch structure. MESH is perfectly, negatively correlated to lsm_l_division.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Hectares

Range

cell size / total area <= MESH <= total area

Behaviour

Equals cellsize/total area if class covers only one cell and equals total area if only one patch is present.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Jaeger, J. A. 2000. Landscape division, splitting index, and effective mesh size: new measures of landscape fragmentation. Landscape ecology, 15(2), 115-130.

See Also

lsm_p_area, lsm_l_ta,
lsm_c_mesh

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_mesh(landscape)

MSIDI (landscape level)

Description

Modified Simpson's diversity index (Diversity metric)

Usage

lsm_l_msidi(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

MSIDI=lni=1mPi2MSIDI = -\ln \sum \limits_{i = 1}^{m} P_{i}^{2}

where PiP_{i} is the landscape area proportion of class i.

MSIDI is a 'Diversity metric'.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

None

Range

MSIDI >= 0

Behaviour

MSIDI = 0 if only one patch is present and increases, without limit, as the amount of patches with equally distributed landscape proportions increases

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Simpson, E. H. 1949. Measurement of diversity. Nature 163:688

Pielou, E. C. 1975. Ecological Diversity. Wiley-Interscience, New York.

Romme, W. H. 1982. Fire and landscapediversity in subalpine forests of Yellowstone National Park.Ecol.Monogr. 52:199-221

See Also

lsm_l_sidi

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_msidi(landscape)

MSIEI (landscape level)

Description

Modified Simpson's evenness index (Diversity metric)

Usage

lsm_l_msiei(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

MSIEi=lni=1mPi2lnmMSIEi = \frac{- \ln \sum \limits_{i = 1}^{m} P_{i}^{2}} {\ln m}

where PiP_{i} is the landscape area proportion of class i and mm is the number of classes.

MSIEI is a 'Diversity metric'.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

None

Range

0 <= MSIEI < 1

Behaviour

MSIEI = 0 when only one patch is present and approaches MSIEI = 1 as the proportional distribution of patches becomes more even

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Simpson, E. H. 1949. Measurement of diversity. Nature 163:688

Pielou, E. C. 1975. Ecological Diversity. Wiley-Interscience, New York.

See Also

lsm_l_siei

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_msiei(landscape)

MUTINF (landscape level)

Description

Mutual information \[I(y,x)\]

Usage

lsm_l_mutinf(landscape, neighbourhood = 4, ordered = TRUE, base = "log2")

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

neighbourhood

The number of directions in which cell adjacencies are considered as neighbours: 4 (rook's case) or 8 (queen's case). The default is 4.

ordered

The type of pairs considered. Either ordered (TRUE) or unordered (FALSE). The default is TRUE.

base

The unit in which entropy is measured. The default is "log2", which compute entropy in "bits". "log" and "log10" can be also used.

Details

It disambiguates landscape pattern types characterize by the same value of an overall complexity (lsm_l_joinent).

Value

tibble

References

Nowosad J., TF Stepinski. 2019. Information theory as a consistent framework for quantification and classification of landscape patterns. https://doi.org/10.1007/s10980-019-00830-x

See Also

lsm_l_ent, lsm_l_condent, lsm_l_joinent, lsm_l_relmutinf

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_mutinf(landscape)

NDCA (landscape level)

Description

Number of disjunct core areas (Core area metric)

Usage

lsm_l_ndca(
  landscape,
  directions = 8,
  consider_boundary = FALSE,
  edge_depth = 1
)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

consider_boundary

Logical if cells that only neighbour the landscape boundary should be considered as core

edge_depth

Distance (in cells) a cell has the be away from the patch edge to be considered as core cell

Details

NDCA=i=1mj=1nnijcoreNDCA = \sum \limits_{i = 1}^{m} \sum \limits_{j = 1}^{n} n_{ij}^{core}

where nijcoren_{ij}^{core} is the number of disjunct core areas.

NDCA is a 'Core area metric'. The metric summarises the landscape as the sum of all patches in the landscape. A cell is defined as core if the cell has no neighbour with a different value than itself (rook's case). NDCA counts the disjunct core areas, whereby a core area is a 'patch within the patch' containing only core cells. It describes patch area and shape simultaneously (more core area when the patch is large, however, the shape must allow disjunct core areas). Thereby, a compact shape (e.g. a square) will contain less disjunct core areas than a more irregular patch.

Units

None

Range

NDCA >= 0

Behaviour

NDCA = 0 when TCA = 0, i.e. every cell in the landscape is an edge cell. NDCA increases, with out limit, as core area increases and patch shapes allow disjunct core areas (i.e. patch shapes become rather complex).

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_c_tca,
lsm_p_ncore, lsm_c_ndca

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_ndca(landscape)

NP (landscape level)

Description

Number of patches (Aggregation metric)

Usage

lsm_l_np(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

NP=NNP = N

where NN is the number of patches.

NP is an 'Aggregation metric'. It describes the fragmentation of the landscape, however, does not necessarily contain information about the configuration or composition of the landscape.

Units

None

Ranges

NP >= 1

Behaviour

Equals NP = 1 when only one patch is present and increases, without limit, as the number of patches increases

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_c_np

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_np(landscape)

PAFRAC (landscape level)

Description

Perimeter-Area Fractal Dimension (Shape metric)

Usage

lsm_l_pafrac(landscape, directions = 8, verbose = TRUE)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

verbose

Print warning message if not sufficient patches are present

Details

PAFRAC=2βPAFRAC = \frac{2}{\beta}

where β\beta is the slope of the regression of the area against the perimeter (logarithm) Ni=1mj=1nlnaij=a+βNi=1mj=1nlnpijN \sum \limits_{i = 1}^{m} \sum \limits_{j = 1}^{n} \ln a_{ij} = a + \beta N \sum \limits_{i = 1}^{m} \sum \limits_{j = 1}^{n} \ln p_{ij}

PAFRAC is a 'Shape metric'. It describes the patch complexity of the landscape while being scale independent. This means that increasing the patch size while not changing the patch form will not change the metric. However, it is only meaningful if the relationship between the area and perimeter is linear on a logarithmic scale. Furthermore, if there are less than 10 patches in the landscape, the metric returns NA because of the small-sample issue.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

None

Range

1 <= PAFRAC <= 2

Behaviour

Approaches PAFRAC = 1 for patches with simple shapes and approaches PAFRAC = 2 for irregular shapes

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Burrough, P. A. 1986. Principles of Geographical Information Systems for Land Resources Assessment. Monographs on Soil and Resources Survey No. 12. Clarendon Press, Oxford

See Also

lsm_p_area, lsm_p_perim,
lsm_c_pafrac

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_pafrac(landscape)

PARA_CV (landscape level)

Description

Coefficient of variation perimeter-area ratio (Shape metric)

Usage

lsm_l_para_cv(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

PARACV=cv(PARA[patchij]PARA_{CV} = cv(PARA[patch_{ij}]

where PARA[patchij]PARA[patch_{ij}] is the perimeter area ratio of each patch.

PARA_CV is a 'Shape metric'. It summarises the landscape as the Coefficient of variation of each patch belonging in the landscape The perimeter-area ratio describes the patch complexity in a straightforward way. However, because it is not standarised to a certain shape (e.g. a square), it is not scale independent, meaning that increasing the patch size while not changing the patch form will change the ratio.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

None

Range

PARA_CV >= 0

Behaviour

Equals PARA_CV = 0 if the perimeter-area ratio is identical for all patches. Increases, without limit, as the variation of the perimeter-area ratio increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_p_para,
lsm_c_para_mn, lsm_c_para_sd, lsm_c_para_cv,
lsm_l_para_mn, lsm_l_para_sd

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_para_cv(landscape)

PARA_MN (landscape level)

Description

Mean perimeter-area ratio (Shape metric)

Usage

lsm_l_para_mn(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

PARAMN=mean(PARA[patchij]PARA_{MN} = mean(PARA[patch_{ij}]

where PARA[patchij]PARA[patch_{ij}] is the perimeter area ratio of each patch.

PARA_MN is a 'Shape metric'. It summarises the landscape as the mean of each patch in the landscape. The perimeter-area ratio describes the patch complexity in a straightforward way. However, because it is not standarised to a certain shape (e.g. a square), it is not scale independent, meaning that increasing the patch size while not changing the patch form will change the ratio.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

None

Range

PARA_MN > 0

Behaviour

Approaches PARA_MN > 0 if PARA for each patch approaches PARA > 0, i.e. the form approaches a rather small square. Increases, without limit, as PARA increases, i.e. patches become more complex.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_p_para, mean,
lsm_c_para_mn, lsm_c_para_sd, lsm_c_para_cv,
lsm_l_para_sd, lsm_l_para_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_para_mn(landscape)

PARA_SD (landscape level)

Description

Standard deviation perimeter-area ratio (Shape metric)

Usage

lsm_l_para_sd(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

PARASD=sd(PARA[patchij]PARA_{SD} = sd(PARA[patch_{ij}]

where PARA[patchij]PARA[patch_{ij}] is the perimeter area ratio of each patch.

PARA_SD is a 'Shape metric'. It summarises the landscape as the standard deviation of each patch belonging in the landscape. The perimeter-area ratio describes the patch complexity in a straightforward way. However, because it is not standarised to a certain shape (e.g. a square), it is not scale independent, meaning that increasing the patch size while not changing the patch form will change the ratio.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

None

Range

PARA_SD >= 0

Behaviour

Equals PARA_SD = 0 if the perimeter-area ratio is identical for all patches. Increases, without limit, as the variation of the perimeter-area ratio increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_p_para, sd
lsm_c_para_mn, lsm_c_para_sd, lsm_c_para_cv,
lsm_l_para_mn, lsm_l_para_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_para_sd(landscape)

PD (landscape level)

Description

Patch density (Aggregation metric)

Usage

lsm_l_pd(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

PD=NA10000100PD = \frac{N} {A} * 10000 * 100

where NN is the number of patches and AA is the total landscape area in square meters.

PD is an 'Aggregation metric'. It describes the fragmentation the landscape, however, does not necessarily contain information about the configuration or composition of the landscape. In contrast to lsm_l_np it is standardized to the area and comparisons among landscapes with different total area are possible.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Number per 100 hectares

Ranges

0 < PD <= 1e+06

Behaviour

Increases as the landscape gets more patchy. Reaches its maximum if every cell is a different patch.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_c_np, lsm_l_ta,
lsm_c_pd

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_pd(landscape)

PLADJ (landscape level)

Description

Percentage of Like Adjacencies (Aggregation metric)

Usage

lsm_l_pladj(landscape)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

Details

PLADJ=(gijk=1mgik)100PLADJ = (\frac{g_{ij}} {\sum \limits_{k = 1}^{m} g_{ik}}) * 100

where giig_{ii} is the number of adjacencies between cells of class i and gikg_{ik} is the number of adjacencies between cells of class i and k.

PLADJ is an 'Aggregation metric'. It calculates the frequency how often patches of different classes i (focal class) and k are next to each other, and following is a measure of class aggregation. The adjacencies are counted using the double-count method.

Units

Percent

Ranges

0 <= PLADJ <= 100

Behaviour

Equals PLADJ = 0 if class i is maximal disaggregated, i.e. every cell is a different patch. Equals PLADJ = 100 when the only one patch is present.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org.

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_pladj(landscape)

PR (landscape level)

Description

Patch richness (Diversity metric)

Usage

lsm_l_pr(landscape)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

Details

PR=mPR = m

where mm is the number of classes

PR is a 'Diversity metric'. It is one of the simplest diversity and composition measures. However, because of its absolute nature, it is not comparable among landscapes with different total areas.

Units

None

Range

PR >= 1

Behaviour

Equals PR = 1 when only one patch is present and increases, without limit, as the number of classes increases

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_pr(landscape)

PRD (landscape level)

Description

Patch richness density (Diversity metric)

Usage

lsm_l_prd(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

PRD=mA10000100PRD = \frac{m} {A} * 10000 * 100

where mm is the number of classes and AA is the total landscape area in square meters.

PRD is a 'Diversity metric'. It is one of the simplest diversity and composition measures. In contrast to lsm_l_pr, it is a relative measure and following, comparable among landscapes with different total landscape areas.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Number per 100 hectares

Range

PR > 0

Behaviour

Approaches PRD > 1 when only one patch is present and the landscape is rather large. Increases, without limit, as the number of classes increases and the total landscape area decreases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_prd(landscape)

RELMUTINF (landscape level)

Description

Relative mutual information

Usage

lsm_l_relmutinf(landscape, neighbourhood = 4, ordered = TRUE, base = "log2")

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

neighbourhood

The number of directions in which cell adjacencies are considered as neighbours: 4 (rook's case) or 8 (queen's case). The default is 4.

ordered

The type of pairs considered. Either ordered (TRUE) or unordered (FALSE). The default is TRUE.

base

The unit in which entropy is measured. The default is "log2", which compute entropy in "bits". "log" and "log10" can be also used.

Details

Due to the spatial autocorrelation, the value of mutual information tends to grow with a diversity of the landscape (marginal entropy). To adjust this tendency, it is possible to calculate relative mutual information by dividing the mutual information by the marginal entropy. Relative mutual information always has a range between 0 and 1 and can be used to compare spatial data with different number and distribution of categories. When the value of mutual information equals to 0, then relative mutual information is 1.

Value

tibble

References

Nowosad J., TF Stepinski. 2019. Information theory as a consistent framework for quantification and classification of landscape patterns. https://doi.org/10.1007/s10980-019-00830-x

See Also

lsm_l_ent, lsm_l_condent, lsm_l_joinent, lsm_l_mutinf

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_relmutinf(landscape)

RPD (landscape level)

Description

Relative patch richness (Diversity metric)

Usage

lsm_l_rpr(landscape, classes_max = NULL, verbose = TRUE)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

classes_max

Potential maximum number of present classes

verbose

Print warning message if not sufficient patches are present

Details

RPR=mmmax100RPR = \frac{m} {m_{max}} * 100

where mm is the number of classes and mmaxm_{max} is the (theoretical) maximum number of classes.

RPR is an 'Diversity metric'. The metric calculates the percentage of present classes in the landscape in relation to a (theoretical) number of maximum classes. The user has to specify the maximum number of classes. Note, that if classes_max is not provided, the functions returns NA.

Units

Percentage

Ranges

0 < RPR <= 100

Behaviour

Approaches RPR > 0 when only one class type is present, but the maximum number of classes is large. Equals RPR = 100 when m = m_max

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Romme, W. H. 1982. Fire and landscapediversity in subalpine forests of Yellowstone National Park.Ecol.Monogr. 52:199-221

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_rpr(landscape, classes_max = 5)

SHAPE_CV (landscape level)

Description

Coefficient of variation shape index (Shape metric)

Usage

lsm_l_shape_cv(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

SHAPECV=cv(SHAPE[patchij])SHAPE_{CV} = cv(SHAPE[patch_{ij}])

where SHAPE[patchij]SHAPE[patch_{ij}] is the shape index of each patch.

SHAPE_CV is a 'Shape metric'. The landscape is summarised as the Coefficient of variation of all patches in the landscape. SHAPE describes the ratio between the actual perimeter of the patch and the square root of patch area.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

None

Range

SHAPE_CV >= 0

Behaviour

Equals SHAPE_CV = 0 if all patches have an identical shape index. Increases, without limit, as the variation of the shape index increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Patton, D. R. 1975. A diversity index for quantifying habitat "edge". Wildl. Soc.Bull. 3:171-173.

See Also

lsm_p_shape,
lsm_c_shape_mn, lsm_c_shape_sd,
lsm_c_shape_cv, lsm_l_shape_mn, lsm_l_shape_sd

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_shape_cv(landscape)

SHAPE_MN (landscape level)

Description

Mean shape index (Shape metric)

Usage

lsm_l_shape_mn(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

SHAPEMN=mean(SHAPE[patchij])SHAPE_{MN} = mean(SHAPE[patch_{ij}])

where SHAPE[patchij]SHAPE[patch_{ij}] is the shape index of each patch.

SHAPE_MN is a 'Shape metric'. The landscape is summarised as the mean of all patches in the landscape. SHAPE describes the ratio between the actual perimeter of the patch and the square root of patch area.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

None

Range

SHAPE_SD >= 1

Behaviour

Equals SHAPE_MN = 1 if all patches are squares. Increases, without limit, as the shapes of patches become more complex.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Patton, D. R. 1975. A diversity index for quantifying habitat "edge". Wildl. Soc.Bull. 3:171-173.

See Also

lsm_p_shape, mean,
lsm_c_shape_mn, lsm_c_shape_sd, lsm_c_shape_cv,
lsm_l_shape_sd, lsm_l_shape_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_shape_mn(landscape)

SHAPE_SD (landscape level)

Description

Standard deviation shape index (Shape metric)

Usage

lsm_l_shape_sd(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

SHAPESD=sd(SHAPE[patchij])SHAPE_{SD} = sd(SHAPE[patch_{ij}])

where SHAPE[patchij]SHAPE[patch_{ij}] is the shape index of each patch.

SHAPE_SD is a 'Shape metric'. The landscape summarised as the standard deviation of all patches in the landscape. SHAPE describes the ratio between the actual perimeter of the patch and the square root of patch area.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

None

Range

SHAPE_SD >= 0

Behaviour

Equals SHAPE_SD = 0 if all patches have an identical shape index. Increases, without limit, as the variation of the shape index increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Patton, D. R. 1975. A diversity index for quantifying habitat "edge". Wildl. Soc.Bull. 3:171-173.

See Also

lsm_p_shape, sd
lsm_c_shape_mn, lsm_c_shape_sd, lsm_c_shape_cv,
lsm_l_shape_mn, lsm_l_shape_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_shape_sd(landscape)

SHDI (landscape level)

Description

Shannon's diversity index (Diversity metric)

Usage

lsm_l_shdi(landscape)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

Details

SHDI=i=1m(PilnPi)SHDI = - \sum \limits_{i = 1}^{m} (P_{i} * \ln P_{i})

where PiP_{i} is the proportion of class i.

SHDI is a 'Diversity metric'. It is a widely used metric in biodiversity and ecology and takes both the number of classes and the abundance of each class into account.

Units

None

Range

SHDI >= 0

Behaviour

Equals SHDI = 0 when only one patch is present and increases, without limit, as the number of classes increases while the proportions are equally distributed

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Shannon, C., and W. Weaver. 1949. The mathematical theory of communication. Univ. IllinoisPress, Urbana

See Also

lsm_c_pland

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_shdi(landscape)

SHEI (landscape level)

Description

Shannons's evenness index (Diversity metric)

Usage

lsm_l_shei(landscape)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

Details

SHEI=i=1m(PilnPi)lnmSHEI = \frac{- \sum \limits_{i = 1} ^ {m} (P_{i} * \ln P_{i})} {\ln m}

where PiP_{i} is the proportion of class i and mm is the number of classes.

SHEI is a 'Diversity metric'. It is the ratio between the actual Shannon's diversity index and and the theoretical maximum of the Shannon diversity index. It can be understood as a measure of dominance.

Units

None

Range

0 <= SHEI < 1

Behaviour

Equals SHEI = 0 when only one patch present and equals SHEI = 1 when the proportion of classes is completely equally distributed

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Shannon, C., and W. Weaver. 1949. The mathematical theory of communication. Univ. IllinoisPress, Urbana

See Also

lsm_c_pland, lsm_l_pr

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_shei(landscape)

SIDI (landscape level)

Description

Simpson's diversity index (Diversity metric)

Usage

lsm_l_sidi(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

SIDI=1i=1mPi2SIDI = 1 - \sum \limits_{i = 1}^{m} P_{i}^{2}

where PiP_{i} is the proportion of class i and mm is the number of classes.

SIDI is a 'Diversity metric'. It is widely used in biodiversity and ecology. It is less sensitive to rare class types than lsm_l_shdi. It can be interpreted as the probability that two randomly selected cells belong to the same class.

Units

None

Range

0 <= SIDI < 1

Behaviour

Equals SIDI = 0 when only one patch is present and approaches SIDI < 1 when the number of class types increases while the proportions are equally distributed

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Simpson, E. H. 1949. Measurement of diversity. Nature 163:688

See Also

lsm_c_pland, lsm_l_pr

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_sidi(landscape)

SIEI (landscape level)

Description

Simpson's evenness index (Diversity metric)

Usage

lsm_l_siei(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

SIEI=1i=1mPi211mSIEI = \frac{1 - \sum \limits_{i = 1}^{m} P_{i}^{2}} {1 - \frac{1} {m}}

where PiP_{i} is the proportion of class i and mm is the number of classes.

SIEI is a 'Diversity metric'. The metric is widely used in biodiversity and ecology. It is the ratio between the actual Simpson's diversity index and the theoretical maximum Simpson's diversity index.

Units

None

Range

0 < SIEI <= 1

Behaviour

Equals SIEI = 0 when only one patch is present and approaches SIEI = 1 when the number of class types increases while the proportions are equally distributed

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Simpson, E. H. 1949. Measurement of diversity. Nature 163:688

See Also

lsm_c_pland, lsm_l_pr

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_siei(landscape)

SPLIT (landscape level)

Description

Splitting index (Aggregation metric)

Usage

lsm_l_split(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

SSPLIT=A2i=1mj=1naij2SSPLIT = \frac{A^2} {\sum \limits_{i = 1}^{m} \sum \limits_{j = 1}^{n} a_{ij}^2}

where aija_{ij} is the patch area in square meters and AA is the total landscape area.

SPLIT is an 'Aggregation metric'. It describes the number of patches if all patches the landscape would be divided into equally sized patches.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

None

Range

1 <= SPLIT <= Number of cells squared

Behaviour

Equals SPLIT = 1 if only one patch is present. Increases as the number of patches increases and is limited if all cells are a patch

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Jaeger, J. A. 2000. Landscape division, splitting index, and effective mesh size: new measures of landscape fragmentation. Landscape ecology, 15(2), 115-130.

See Also

lsm_p_area, lsm_l_ta,
lsm_c_split

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_split(landscape)

TA (landscape level)

Description

Total area (Area and edge metric)

Usage

lsm_l_ta(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

CA=sum(AREA[patchij])CA = sum(AREA[patch_{ij}])

where AREA[patchij]AREA[patch_{ij}] is the area of each patch in hectares.

TA is an 'Area and edge metric'. The total (class) area sums the area of all patches in the landscape. It is the area of the observation area.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Hectares

Range

TA > 0

Behaviour

Approaches TA > 0 if the landscape is small and increases, without limit, as the size of the landscape increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_p_area, sum,
lsm_c_ca

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_ta(landscape)

TCA (landscape level)

Description

Total core area (Core area metric)

Usage

lsm_l_tca(landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

consider_boundary

Logical if cells that only neighbour the landscape boundary should be considered as core

edge_depth

Distance (in cells) a cell has the be away from the patch edge to be considered as core cell

Details

TCA=j=1naijcore(110000)TCA = \sum \limits_{j = 1}^{n} a_{ij}^{core} * (\frac{1} {10000})

where here aijcorea_{ij}^{core} is the core area in square meters.

TCA is a 'Core area metric' and equals the sum of core areas of all patches in the landscape. A cell is defined as core area if the cell has no neighbour with a different value than itself (rook's case). In other words, the core area of a patch is all area that is not an edge. It characterises patch areas and shapes of all patches in the landscape simultaneously (more core area when the patch is large and the shape is rather compact, i.e. a square). Additionally, TCA is a measure for the configuration of the landscape, because the sum of edges increase as patches are less aggregated.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Hectares

Range

TCA >= 0

Behaviour

Increases, without limit, as patch areas increase and patch shapes simplify. TCA = 0 when every cell in every patch is an edge.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_p_core, lsm_c_tca

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_tca(landscape)

TE (landscape level)

Description

Total edge (Area and Edge metric)

Usage

lsm_l_te(landscape, count_boundary = FALSE)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

count_boundary

Include landscape boundary in edge length

Details

TE=k=1meikTE = \sum \limits_{k = 1}^{m} e_{ik}

where eike_{ik} is the edge lengths in meters. TE is an 'Area and edge metric'. Total edge includes all edges. It measures the configuration of the landscape because a highly fragmented landscape will have many edges. However, total edge is an absolute measure, making comparisons among landscapes with different total areas difficult. If count_boundary = TRUE also edges to the landscape boundary are included.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Meters

Range

TE >= 0

Behaviour

Equals TE = 0 if all cells are edge cells. Increases, without limit, as landscape becomes more fragmented

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_p_perim lsm_l_te

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_te(landscape)

AREA (patch level)

Description

Patch area (Area and edge metric)

Usage

lsm_p_area(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

AREA=aij(110000)AREA = a_{ij} * (\frac{1} {10000})

where aija_{ij} is the area in square meters.

AREA is an 'Area and edge metric' and equals the area of each patch in hectares. The lower limit of AREA is limited by the resolution of the input raster, i.e. AREA can't be smaller than the resolution squared (in hectares). It is one of the most basic, but also most important metrics, to characterise a landscape. The metric is the simplest measure of composition.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Hectares

Range

AREA > 0

Behaviour

Increases, without limit, as the patch size increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_c_area_mn, lsm_c_area_sd, lsm_c_area_cv, lsm_c_ca,
lsm_l_area_mn, lsm_l_area_sd, lsm_l_area_cv, lsm_l_ta

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_p_area(landscape)

CAI (patch level)

Description

Core area index (Core area metric)

Usage

lsm_p_cai(landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

consider_boundary

Logical if cells that only neighbour the landscape boundary should be considered as core

edge_depth

Distance (in cells) a cell has the be away from the patch edge to be considered as core cell

Details

CAI=(aijcoreaij)100CAI = (\frac{a_{ij}^{core}} {a_{ij}}) * 100

where aijcorea_{ij}^{core} is the core area in square meters and aija_{ij} is the area in square meters.

CAI is a 'Core area metric'. It equals the percentage of a patch that is core area. A cell is defined as core area if the cell has no neighbour with a different value than itself (rook's case). It describes patch area and shape simultaneously (more core area when the patch is large and the shape is rather compact, i.e. a square). Because the index is relative, it is comparable among patches with different area.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Percent

Range

0 <= CAI <= 100

Behaviour

CAI = 0 when the patch has no core area and approaches CAI = 100 with increasing percentage of core area within a patch.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_p_core, lsm_p_area,
lsm_c_cai_mn, lsm_c_cai_sd, lsm_c_cai_cv, lsm_c_cpland,
lsm_l_cai_mn, lsm_l_cai_sd, lsm_l_cai_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_p_cai(landscape)

CIRCLE (patch level)

Description

Related Circumscribing Circle (Shape metric)

Usage

lsm_p_circle(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

CIRCLE=1(aijaijcircle)CIRCLE = 1 - (\frac{a_{ij}} {a_{ij}^{circle}})

where aija_{ij} is the area in square meters and aijcirclea_{ij}^{circle} the area of the smallest circumscribing circle.

CIRCLE is a 'Shape metric'. The metric is the ratio between the patch area and the smallest circumscribing circle of the patch. The diameter of the smallest circumscribing circle is the 'diameter' of the patch connecting the opposing corner points of the two cells that are the furthest away from each other. The metric characterises the compactness of the patch and is comparable among patches with different area.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

None

Range

0 <= CIRCLE < 1

Behaviour

CIRCLE = 0 for a circular patch and approaches CIRCLE = 1 for a linear patch.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Baker, W. L., and Y. Cai. 1992. The r.le programs for multiscale analysis of landscape structure using the GRASS geographical information system. Landscape Ecology 7: 291-302.

Based on C++ code from Project Nayuki (https://www.nayuki.io/page/smallest-enclosing-circle).

See Also

lsm_p_area,
lsm_c_circle_mn, lsm_c_circle_sd, lsm_c_circle_cv,
lsm_l_circle_mn, lsm_l_circle_sd, lsm_l_circle_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_p_circle(landscape)

CONTIG (patch level)

Description

Contiguity index (Shape metric)

Usage

lsm_p_contig(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

CONTIG=[r=1zcijraij]1v1CONTIG = \frac{\Bigg[\frac{\sum\limits_{r=1}^z c_{ijr}}{a_{ij}}\Bigg] - 1 }{ v - 1}

where cijrc_{ijr} is the contiguity value for pixel r in patch ij, aija_{ij} the area of the respective patch (number of cells) and vv is the size of the filter matrix (13 in this case).

CONTIG is a 'Shape metric'. It asses the spatial connectedness (contiguity) of cells in patches. CONTIG coerces patch values to a value of 1 and the background to NA. A nine cell focal filter matrix:

filter_matrix <- matrix(c(1, 2, 1,
                          2, 1, 2,
                          1, 2, 1), 3, 3, byrow = T)

... is then used to weight orthogonally contiguous pixels more heavily than diagonally contiguous pixels. Therefore, larger and more connections between patch cells in the rookie case result in larger contiguity index values.

Units

None

Range

0 >= CONTIG <= 1

Behaviour

Equals 0 for one-pixel patches and increases to a limit of 1 (fully connected patch).

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

LaGro, J. 1991. Assessing patch shape in landscape mosaics. Photogrammetric Engineering and Remote Sensing, 57(3), 285-293

See Also

lsm_c_contig_mn, lsm_c_contig_sd, lsm_c_contig_cv,
lsm_l_contig_mn, lsm_l_contig_sd, lsm_l_contig_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_p_contig(landscape)

CORE (patch level)

Description

Core area (Core area metric)

Usage

lsm_p_core(
  landscape,
  directions = 8,
  consider_boundary = FALSE,
  edge_depth = 1
)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

consider_boundary

Logical if cells that only neighbour the landscape boundary should be considered as core

edge_depth

Distance (in cells) a cell has the be away from the patch edge to be considered as core cell

Details

CORE=aijcoreCORE = a_{ij}^{core}

where aijcorea_{ij}^{core} is the core area in square meters

CORE is a 'Core area metric' and equals the area within a patch that is not on the edge of it. A cell is defined as core area if the cell has no neighbour with a different value than itself (rook's case). It describes patch area and shape simultaneously (more core area when the patch is large and the shape is rather compact, i.e. a square).

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Hectares

Range

CORE >= 0

Behaviour

Increases, without limit, as the patch area increases and the patch shape simplifies (more core area). CORE = 0 when every cell in the patch is an edge.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_c_core_mn, lsm_c_core_sd, lsm_c_core_cv, lsm_c_tca,
lsm_l_core_mn, lsm_l_core_sd, lsm_l_core_cv, lsm_l_tca

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_p_core(landscape)

ENN (patch level)

Description

Euclidean Nearest-Neighbor Distance (Aggregation metric)

Usage

lsm_p_enn(landscape, directions = 8, verbose = TRUE)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

verbose

Print warning message if not sufficient patches are present

Details

ENN=hijENN = h_{ij}

where hijh_{ij} is the distance to the nearest neighbouring patch of the same class i in meters

ENN is an 'Aggregation metric'. The distance to the nearest neighbouring patch of the same class i. The distance is measured from edge-to-edge. The range is limited by the cell resolution on the lower limit and the landscape extent on the upper limit. The metric is a simple way to describe patch isolation.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Meters

Range

ENN > 0

Behaviour

Approaches ENN = 0 as the distance to the nearest neighbour decreases, i.e. patches of the same class i are more aggregated. Increases, without limit, as the distance between neighbouring patches of the same class i increases, i.e. patches are more isolated.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

McGarigal, K., and McComb, W. C. (1995). Relationships between landscape structure and breeding birds in the Oregon Coast Range. Ecological monographs, 65(3), 235-260.

See Also

lsm_c_enn_mn, lsm_c_enn_sd, lsm_c_enn_cv,
lsm_l_enn_mn, lsm_l_enn_sd, lsm_l_enn_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_p_enn(landscape)

FRAC (patch level)

Description

Fractal dimension index (Shape metric)

Usage

lsm_p_frac(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

FRAC=2ln(0.25pij)lnaijFRAC = \frac{2 * \ln * (0.25 * p_{ij})} {\ln a_{ij}}

where pijp_{ij} is the perimeter in meters and aija_{ij} is the area in square meters

FRAC is a 'Shape metric'. The index is based on the patch perimeter and the patch area and describes the patch complexity. Because it is standardized, it is scale independent, meaning that increasing the patch size while not changing the patch form will not change the ratio.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

None

Range

1 <= FRAC <= 2

Behaviour

Approaches FRAC = 1 for a squared patch shape form and FRAC = 2 for a irregular patch shape.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Mandelbrot, B. B. 1977. Fractals: Form, Chance, and Dimension. San Francisco. W. H. Freeman and Company.

See Also

lsm_p_area, lsm_p_perim,
lsm_c_frac_mn, lsm_c_frac_sd, lsm_c_frac_cv,
lsm_l_frac_mn, lsm_l_frac_sd, lsm_l_frac_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_p_frac(landscape)

GYRATE (patch level)

Description

Radius of Gyration (Area and edge metric)

Usage

lsm_p_gyrate(landscape, directions = 8, cell_center = FALSE)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

cell_center

If true, the coordinates of the centroid are forced to be a cell center within the patch.

Details

GYRATE=r=1zhijrzGYRATE = \sum \limits_{r = 1}^{z} \frac{h_{ijr}} {z}

where hijrh_{ijr} is the distance from each cell to the centroid of the patch and zz is the number of cells.

GYRATE is an 'Area and edge metric'. The distance from each cell to the patch centroid is based on cell center to centroid distances. The metric characterises both the patch area and compactness.

If cell_center = TRUE some patches might have several possible cell-center centroids. In this case, the gyrate index is based on the mean distance of all cells to all possible cell-center centroids.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Meters

Range

GYRATE >= 0

Behaviour

Approaches GYRATE = 0 if patch is a single cell. Increases, without limit, when only one patch is present.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Keitt, T. H., Urban, D. L., & Milne, B. T. 1997. Detecting critical scales in fragmented landscapes. Conservation ecology, 1(1).

See Also

lsm_c_gyrate_mn, lsm_c_gyrate_sd, lsm_c_gyrate_cv,
lsm_l_gyrate_mn, lsm_l_gyrate_sd, lsm_l_gyrate_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_p_gyrate(landscape)

NCORE (patch level)

Description

Number of core areas (Core area metric)

Usage

lsm_p_ncore(
  landscape,
  directions = 8,
  consider_boundary = FALSE,
  edge_depth = 1
)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

consider_boundary

Logical if cells that only neighbour the landscape boundary should be considered as core

edge_depth

Distance (in cells) a cell has the be away from the patch edge to be considered as core cell

#' @details

NCORE=nijcoreNCORE = n_{ij}^{core}

where nijcoren_{ij}^{core} is the number of disjunct core areas.

NCORE is a 'Core area metric'. A cell is defined as core if the cell has no neighbour with a different value than itself (rook's case). The metric counts the disjunct core areas, whereby a core area is a 'patch within the patch' containing only core cells. It describes patch area and shape simultaneously (more core area when the patch is large, however, the shape must allow disjunct core areas). Thereby, a compact shape (e.g. a square) will contain less disjunct core areas than a more irregular patch.

Units

None

Range

NCORE >= 0

Behaviour

NCORE = 0 when CORE = 0, i.e. every cell in patch is edge. Increases, without limit, as core area increases and patch shape allows disjunct core areas (i.e. patch shape becomes rather complex).

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_c_dcore_mn, lsm_c_dcore_sd, lsm_c_dcore_cv, lsm_c_ndca,
lsm_l_dcore_mn, lsm_l_dcore_sd, lsm_l_dcore_cv, lsm_l_ndca

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_p_ncore(landscape)

PARA (patch level)

Description

Perimeter-Area ratio (Shape metric)

Usage

lsm_p_para(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

PARA=pijaijPARA = \frac{p_{ij}} {a_{ij}}

where pijp_{ij} is the perimeter in meters and aija_{ij} is the area in square meters.

PARA is a 'Shape metric'. It describes the patch complexity in a straightforward way. However, because it is not standarised to a certain shape (e.g. a square), it is not scale independent, meaning that increasing the patch size while not changing the patch form will change the ratio.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

None

Range

PARA > 0

Behaviour

Increases, without limit, as the shape complexity increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

lsm_p_area, lsm_p_perim,
lsm_c_para_mn, lsm_c_para_sd, lsm_c_para_cv,
lsm_l_para_mn, lsm_l_para_sd, lsm_l_para_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_p_para(landscape)

PERIM (patch level)

Description

Perimeter (Area and edge metric)

Usage

lsm_p_perim(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

PERIM=pijPERIM = p_{ij}

where pijp_{ij} is the perimeter in meters.

PERIM is an 'Area and edge metric'. It equals the perimeter of the patch including also the edge to the landscape boundary. The metric describes patch area (larger perimeter for larger patches), but also patch shape (large perimeter for irregular shapes).

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

Meters

Range

PERIM > 0

Behaviour

Increases, without limit, as patch size and complexity increases.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_p_perim(landscape)

SHAPE (patch level)

Description

Shape index (Shape metric)

Usage

lsm_p_shape(landscape, directions = 8)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

Details

SHAPE=0.25pijaijSHAPE = \frac{0.25 * p_{ij}} {\sqrt a_{ij}}

where pijp_{ij} is the perimeter (m) and aija_{ij} is the area (m2).

SHAPE is a 'Shape metric'. It describes the ratio between the actual perimeter of the patch and the square root of patch area and thus adjusting for a square standard. Thus, it is a simple measure of shape complexity.

Because the metric is based on distances or areas please make sure your data is valid using check_landscape.

Units

None

Range

SHAPE >= 1

Behaviour

Equals SHAPE = 1 for a squared patch and increases, without limit, as the patch shape becomes more complex.

Value

tibble

References

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

Patton, D. R. 1975. A diversity index for quantifying habitat "edge". Wildl. Soc.Bull. 3:171-173.

See Also

lsm_p_perim, lsm_p_area,
lsm_c_shape_mn, lsm_c_shape_sd, lsm_c_shape_cv,
lsm_l_shape_mn, lsm_l_shape_sd, lsm_l_shape_cv

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_p_shape(landscape)

options_landscapemetrics

Description

Sets global options for landscapemetrics

Usage

options_landscapemetrics(to_disk = NULL)

Arguments

to_disk

Logical argument, if FALSE results of get_patches are hold in memory. If true, get_patches writes temporary files and hence, does not hold everything in memory. Can be set with a global option, e.g. options(to_disk = TRUE). See Details.

Details

Landscape metrics rely on the delineation of patches. Hence, get_patches is heavily used in landscapemetrics. As raster can be quite big, the fact that get_patches creates a copy of the raster for each class in a landscape becomes a burden for computer memory. Hence, the argument to_disk allows to store the results of the connected labeling algorithm on disk. Furthermore, this option can be set globally, so that every function that internally uses get_patches can make use of that.

Value

Global option to be used internally in the package


Podlasie ESA CCI LC

Description

A real landscape of the Podlasie region in Poland from the ESA CCI Land Cover

Usage

podlasie_ccilc

Format

A raster object.

Source

http://maps.elie.ucl.ac.be/CCI/viewer/


sample_lsm

Description

Sample metrics

Usage

sample_lsm(
  landscape,
  y,
  plot_id = NULL,
  shape = "square",
  size = NULL,
  all_classes = FALSE,
  return_raster = FALSE,
  verbose = TRUE,
  progress = FALSE,
  ...
)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

y

2-column matrix with coordinates or sf point geometries.

plot_id

Vector with id of sample points. If not provided, sample points will be labelled 1...n.

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 map units. For lines size equals the width of the buffer.

all_classes

Logical if NA should be returned for classes not present in some sample plots.

return_raster

Logical if the clipped raster of the sample plot should be returned

verbose

Print warning messages.

progress

Print progress report.

...

Arguments passed on to calculate_lsm().

Details

This function samples the selected metrics in a buffer area (sample plot) around sample points, sample lines or within provided polygons. 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. Additionally, if the polygon representing the sample plot is smaller than the cell size of the raster, the percentage_inside may exceed 100%.Please be aware that the output is slightly different to all other lsm-function of landscapemetrics.

Please be aware that the function behaves differently for POLYGONS and MULTIPOLYGONS. In the first case, each polygon is used as a singular sample area, while in the second case all polygons are used as one sample area.

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.

For all metrics based on distances or areas please make sure your data is valid using check_landscape.

Value

tibble

See Also

list_lsm
calculate_lsm

Examples

landscape <- terra::rast(landscapemetrics::landscape)

# use a matrix
sample_points <- matrix(c(10, 5, 25, 15, 5, 25), ncol = 2, byrow = TRUE)
sample_lsm(landscape, y = sample_points, size = 15, what = "lsm_l_np")

Show core area

Description

Show core area

Usage

show_cores(
  landscape,
  directions = 8,
  class = "all",
  labels = FALSE,
  nrow = NULL,
  ncol = NULL,
  consider_boundary = TRUE,
  edge_depth = 1
)

Arguments

landscape

Raster object

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

class

How to show the core area: "global" (single map), "all" (every class as facet), or a vector with the specific classes one wants to show (every selected class as facet).

labels

Logical flag indicating whether to print or not to print core labels. boundary should be considered as core

nrow, ncol

Number of rows and columns for the facet.

consider_boundary

Logical if cells that only neighbour the landscape boundary should be considered as core.

edge_depth

Distance (in cells) a cell has the be away from the patch edge to be considered as core cell

Details

The functions plots the core area of patches labeled with the corresponding patch id. The edges are the grey cells surrounding the patches and are always shown.

Value

ggplot

Examples

landscape <- terra::rast(landscapemetrics::landscape)

# show "global" core area
show_cores(landscape, class = "global", labels = FALSE)

# show the core area of every class as facet
show_cores(landscape, class = "all", labels = FALSE)

# show only the core area of class 1 and 3
show_cores(landscape, class = c(1, 3), labels = TRUE)

Show correlation

Description

Show correlation

Usage

show_correlation(
  data,
  method = "pearson",
  diag = TRUE,
  labels = FALSE,
  vjust = 0,
  text_size = 15
)

Arguments

data

Tibble with results of as returned by the landscapemetrics package.

method

Type of correlation. See link{cor} for details.

diag

If FALSE, values on the diagonal will be NA and not plotted.

labels

If TRUE, the correlation value will be added as text.

vjust

Will be passed on to ggplot2 as vertical justification of x-axis text.

text_size

Text size of the plot.

Details

The functions calculates the correlation between all metrics. In order to calculate correlations, for the landscape level more than one landscape needs to be present. All input must be structured as returned by the landscapemetrics package.

For all metrics based on distances or areas please make sure your data is valid using check_landscape.

Value

ggplot

Examples

landscape <- terra::rast(landscapemetrics::landscape)

metrics <- calculate_lsm(landscape, what = c("patch", "class"))
show_correlation(data = metrics, method = "pearson")

## Not run: 
metrics <- calculate_lsm(landscape, what = c("patch", "class"))
correlations <- calculate_correlation(metrics)
show_correlation(data = correlations, method = "pearson")

## End(Not run)

Show landscape metrics

Description

Show landscape metrics on patch level printed in their corresponding patch.

Usage

show_lsm(
  landscape,
  what,
  class = "global",
  directions = 8,
  consider_boundary = FALSE,
  edge_depth = 1,
  labels = FALSE,
  label_lsm = FALSE,
  nrow = NULL,
  ncol = NULL
)

Arguments

landscape

*Raster object

what

Patch level what to plot

class

How to show the labeled patches: "global" (single map), "all" (every class as facet), or a vector with the specific classes one wants to show (every selected class as facet).

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

consider_boundary

Logical if cells that only neighbour the landscape boundary should be considered as core

edge_depth

Distance (in cells) a cell has the be away from the patch edge to be considered as core cell

labels

Logical flag indicating whether to print or not to print patch labels.

label_lsm

If true, the value of the landscape metric is used as label

nrow, ncol

Number of rows and columns for the facet.

Details

The function plots all patches with a fill corresponding to the value of the chosen landscape metric on patch level.

For all metrics based on distances or areas please make sure your data is valid using check_landscape.

Value

ggplot

Examples

landscape <- terra::rast(landscapemetrics::landscape)

show_lsm(landscape, what = "lsm_p_area", directions = 4)
show_lsm(landscape, what = "lsm_p_shape", class = c(1, 2), label_lsm = TRUE)
show_lsm(landscape, what = "lsm_p_circle", class = 3, labels = TRUE)

Show patches

Description

Show patches

Usage

show_patches(
  landscape,
  class = "global",
  directions = 8,
  labels = FALSE,
  nrow = NULL,
  ncol = NULL
)

Arguments

landscape

*Raster object

class

How to show the labeled patches: "global" (single map), "all" (every class as facet), or a vector with the specific classes one wants to show (every selected class as facet).

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

labels

Logical flag indicating whether to print or not to print patch labels.

nrow, ncol

Number of rows and columns for the facet.

Details

The functions plots the landscape with the patches labeled with the corresponding patch id.

Value

ggplot

Examples

landscape <- terra::rast(landscapemetrics::landscape)

show_patches(landscape)
show_patches(landscape, class = c(1, 2))
show_patches(landscape, class = 3, labels = FALSE)

spatialize_lsm

Description

Spatialize landscape metric values

Usage

spatialize_lsm(
  landscape,
  level = "patch",
  metric = NULL,
  name = NULL,
  type = NULL,
  what = NULL,
  directions = 8,
  progress = FALSE,
  to_disk = getOption("to_disk", default = FALSE),
  ...
)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

level

Level of metrics. Either 'patch', 'class' or 'landscape' (or vector with combination).

metric

Abbreviation of metrics (e.g. 'area').

name

Full name of metrics (e.g. 'core area')

type

Type according to FRAGSTATS grouping (e.g. 'aggregation metrics').

what

Selected level of metrics: either "patch", "class" or "landscape". It is also possible to specify functions as a vector of strings, e.g. what = c("lsm_c_ca", "lsm_l_ta").

directions

The number of directions in which patches should be connected: 4 (rook's case) or 8 (queen's case).

progress

Print progress report.

to_disk

If TRUE raster will be saved to disk.

...

Arguments passed on to calculate_lsm().

Details

The functions returns a nested list with RasterLayers. The first level contains each input layer (only one element if RasterLayer was provided). The second level contains a RasterLayer for each selected metric (see list_lsm for details) where each cell has the landscape metric value of the patch it belongs to. Only patch level metrics are allowed.

For all metrics based on distances or areas please make sure your data is valid using check_landscape.

Value

list

See Also

list_lsm
show_lsm

Examples

landscape <- terra::rast(landscapemetrics::landscape)
p_area_raster <- spatialize_lsm(landscape, what = "lsm_p_area")
terra::plot(p_area_raster[[1]][[1]])

window_lsm

Description

Moving window

Usage

window_lsm(
  landscape,
  window,
  level = "landscape",
  metric = NULL,
  name = NULL,
  type = NULL,
  what = NULL,
  progress = FALSE,
  ...
)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters.

window

Moving window matrix.

level

Level of metrics. Either 'patch', 'class' or 'landscape' (or vector with combination).

metric

Abbreviation of metrics (e.g. 'area').

name

Full name of metrics (e.g. 'core area')

type

Type according to FRAGSTATS grouping (e.g. 'aggregation metrics').

what

Selected level of metrics: either "patch", "class" or "landscape". It is also possible to specify functions as a vector of strings, e.g. what = c("lsm_c_ca", "lsm_l_ta").

progress

Print progress report.

...

Arguments passed on to calculate_lsm().

Details

The function calculates for each focal cell the selected landscape metrics (currently only landscape level metrics are allowed) for a local neighbourhood. The neighbourhood can be specified using a matrix. For more details, see ?terra::focal(). The result will be a RasterLayer in which each focal cell includes the value of its neighbourhood and thereby allows to show gradients and variability in the landscape (Hagen-Zanker 2016). To be type stable, the actual result is always a nested list (first level for RasterStack layers, second level for selected landscape metrics).

Note, that in situations when the moving window does not contain any patches, the result is NA.

Value

list

References

Fletcher, R., Fortin, M.-J. 2018. Spatial Ecology and Conservation Modeling: Applications with R. Springer International Publishing. 523 pages

Hagen-Zanker, A. (2016). A computational framework for generalized moving windows and its application to landscape pattern analysis. International journal of applied earth observation and geoinformation, 44, 205-216.

McGarigal K., SA Cushman, and E Ene. 2023. FRAGSTATS v4: Spatial Pattern Analysis Program for Categorical Maps. Computer software program produced by the authors; available at the following web site: https://www.fragstats.org

See Also

list_lsm
calculate_lsm
focal

Examples

## Not run: 
landscape <- terra::rast(landscapemetrics::landscape)
landscape_stack <- c(landscape, landscape)
window <- matrix(1, nrow = 5,ncol = 5)
window_lsm(landscape, window = window, what = c("lsm_l_pr", "lsm_l_joinent"))
window_lsm(landscape_stack, window = window, what = c("lsm_l_pr", "lsm_l_joinent"))

window_circular <- matrix(c(NA, 1, NA, 1, 1, 1, NA, 1, NA), nrow = 3, ncol = 3)
window_lsm(landscape, window = window_circular, what = c("lsm_l_pr", "lsm_l_joinent"))

## End(Not run)