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-11-07 05:44:25 UTC |
Source: | https://github.com/r-spatialecology/landscapemetrics |
A real landscape of area near Augusta, Georgia obtained from the National Land Cover Database (NLCD)
augusta_nlcd
augusta_nlcd
A raster object.
https://www.mrlc.gov/nlcd2011.php
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
calculate_correlation( metrics, method = "pearson", diag = TRUE, simplify = FALSE )
calculate_correlation( metrics, method = "pearson", diag = TRUE, simplify = FALSE )
metrics |
Tibble with results of as returned by the landscapemetrics package. |
method |
Type of correlation. See |
diag |
If FALSE, values on the diagonal will be NA. |
simplify |
If TRUE and only one level is present, only a tibble is returned. |
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.
list
landscape <- terra::rast(landscapemetrics::landscape) metrics <- calculate_lsm(landscape, what = c("patch", "class")) calculate_correlation(metrics, method = "pearson")
landscape <- terra::rast(landscapemetrics::landscape) metrics <- calculate_lsm(landscape, what = c("patch", "class")) calculate_correlation(metrics, method = "pearson")
Calculate a selected group of metrics
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 )
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 )
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. |
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. |
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
.
tibble
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
## 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)
## 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
check_landscape(landscape, verbose = TRUE)
check_landscape(landscape, verbose = TRUE)
landscape |
Raster* Layer, Stack, Brick, Stars or a list of rasterLayers |
verbose |
Print warning messages. |
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.
tibble
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))
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 metrics
extract_lsm( landscape, y, extract_id = NULL, metric = NULL, name = NULL, type = NULL, what = NULL, directions = 8, progress = FALSE, verbose = TRUE, ... )
extract_lsm( landscape, y, extract_id = NULL, metric = NULL, name = NULL, type = NULL, what = NULL, directions = 8, progress = FALSE, verbose = TRUE, ... )
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. |
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 |
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.
tibble
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)
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)
Fast calculation of adjacencies between classes in a raster
get_adjacencies(landscape, neighbourhood = 4, what = "full", upper = FALSE)
get_adjacencies(landscape, neighbourhood = 4, what = "full", upper = FALSE)
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). |
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.
matrix with adjacencies between classes in a raster and between cells from the same class.
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)
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 boundary cells of patches
get_boundaries( landscape, consider_boundary = FALSE, edge_depth = 1, as_NA = FALSE, patch_id = FALSE, return_raster = TRUE )
get_boundaries( landscape, consider_boundary = FALSE, edge_depth = 1, as_NA = FALSE, patch_id = FALSE, return_raster = TRUE )
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. |
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.
List with SpatRaster or matrix
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)
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)
Centroid of patches
get_centroids( landscape, directions = 8, cell_center = FALSE, return_vec = FALSE, verbose = TRUE )
get_centroids( landscape, directions = 8, cell_center = FALSE, return_vec = FALSE, verbose = TRUE )
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 |
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.
# get centroid location landscape <- terra::rast(landscapemetrics::landscape) get_centroids(landscape)
# get centroid location landscape <- terra::rast(landscapemetrics::landscape) get_centroids(landscape)
Diameter of the circumscribing circle around patches
get_circumscribingcircle(landscape, directions = 8, level = "patch")
get_circumscribingcircle(landscape, directions = 8, level = "patch")
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. |
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
.
Based on C++ code from Project Nayuki (https://www.nayuki.io/page/smallest-enclosing-circle).
landscape <- terra::rast(landscapemetrics::landscape) # get circle around each patch get_circumscribingcircle(landscape) # get circle around whole class get_circumscribingcircle(landscape, level = "class")
landscape <- terra::rast(landscapemetrics::landscape) # get circle around each patch get_circumscribingcircle(landscape) # get circle around whole class get_circumscribingcircle(landscape, level = "class")
Euclidean distance to nearest neighbour
get_nearestneighbour(landscape, return_id = FALSE)
get_nearestneighbour(landscape, return_id = FALSE)
landscape |
SpatRaster or matrix (with x,y,id columns). |
return_id |
If TRUE, also the patch ID of the nearest neighbour is returned. |
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
.
Based on RCpp code of Florian Privé [email protected]
# 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 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)
Connected components labeling to derive patches in a landscape.
get_patches( landscape, class = "all", directions = 8, to_disk = getOption("to_disk", default = FALSE), return_raster = TRUE )
get_patches( landscape, class = "all", directions = 8, to_disk = getOption("to_disk", default = FALSE), return_raster = TRUE )
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. |
return_raster |
If false, matrix is returned |
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.
List of SpatRaster
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
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)
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)
This function returns the unique values of an object.
get_unique_values(x, simplify = FALSE, verbose = TRUE)
get_unique_values(x, simplify = FALSE, verbose = TRUE)
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 |
Fast and memory friendly Rcpp implementation to find the unique values of an object.
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)
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)
An example map to show landscapemetrics functionality
generated with the nlm_randomcluster()
algorithm.
landscape
landscape
A raster object.
Simulated neutral landscape model with R. https://github.com/ropensci/NLMR/
Convert raster input to list
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)
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)
landscape |
A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters |
Mainly for internal use
list
landscape <- terra::rast(landscapemetrics::landscape) landscape_as_list(c(landscape, landscape))
landscape <- terra::rast(landscapemetrics::landscape) landscape_as_list(c(landscape, landscape))
List landscape metrics
list_lsm( level = NULL, metric = NULL, name = NULL, type = NULL, what = NULL, simplify = FALSE, verbose = TRUE )
list_lsm( level = NULL, metric = NULL, name = NULL, type = NULL, what = NULL, simplify = FALSE, verbose = TRUE )
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. |
simplify |
If true, function names are returned as vector. |
verbose |
Print warning messages |
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.
tibble
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
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"))
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"))
A single tibble for every abbreviation of every metric that is reimplemented in landscapemetrics and its corresponding full name in the literature.
lsm_abbreviations_names
lsm_abbreviations_names
A tibble object.
Can be used after calculating the metric(s) with a join to have a more readable results tibble or for visualizing your results.
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"))
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"))
Aggregation index (Aggregation metric)
lsm_c_ai(landscape)
lsm_c_ai(landscape)
landscape |
A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters |
where is the number of like adjacencies based on the single-count method and
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.
Percent
0 <= AI <= 100
Equals 0 for maximally disaggregated and 100 for maximally aggregated classes.
tibble
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.
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_ai(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_ai(landscape)
Coefficient of variation of patch area (Area and edge metric)
lsm_c_area_cv(landscape, directions = 8)
lsm_c_area_cv(landscape, directions = 8)
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). |
where 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
.
Hectares
AREA_CV >= 0
Equals AREA_CV = 0 if all patches are identical in size. Increases, without limit, as the variation of patch areas increases.
tibble
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
lsm_p_area
, lsm_c_area_mn
,
lsm_c_area_sd
, lsm_l_area_mn
,
lsm_l_area_sd
,
lsm_l_area_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_area_cv(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_area_cv(landscape)
Mean of patch area (Area and edge metric)
lsm_c_area_mn(landscape, directions = 8)
lsm_c_area_mn(landscape, directions = 8)
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). |
where 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
.
Hectares
AREA_MN > 0
Approaches AREA_MN = 0 if all patches are small. Increases, without limit, as the patch areas increase.
tibble
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
lsm_p_area
,
mean
, lsm_c_area_cv
,
lsm_c_area_sd
, lsm_l_area_mn
,
lsm_l_area_sd
,
lsm_l_area_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_area_mn(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_area_mn(landscape)
Standard deviation of patch area (Area and edge metric)
lsm_c_area_sd(landscape, directions = 8)
lsm_c_area_sd(landscape, directions = 8)
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). |
where 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
.
Hectares
AREA_SD >= 0
Equals AREA_SD = 0 if all patches are identical in size. Increases, without limit, as the variation of patch areas increases.
tibble
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
lsm_p_area
,
sd
lsm_c_area_mn
,
lsm_c_area_cv
, lsm_l_area_mn
,
lsm_l_area_sd
,
lsm_l_area_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_area_sd(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_area_sd(landscape)
Total (class) area (Area and edge metric)
lsm_c_ca(landscape, directions = 8)
lsm_c_ca(landscape, directions = 8)
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). |
where 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
.
Hectares
CA > 0
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.
tibble
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
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_ca(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_ca(landscape)
Coefficient of variation of core area index (Core area metric)
lsm_c_cai_cv( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
lsm_c_cai_cv( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
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 |
where 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
.
Percent
CAI_CV >= 0
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.
tibble
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
lsm_p_cai
, lsm_c_cai_mn
,
lsm_c_cai_sd
, lsm_l_cai_mn
,
lsm_l_cai_sd
,
lsm_l_cai_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_cai_cv(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_cai_cv(landscape)
Mean of core area index (Core area metric)
lsm_c_cai_mn( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
lsm_c_cai_mn( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
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 |
where 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
.
Percent
0 <= CAI_MN <= 100
CAI_MN = 0 when all patches have no core area and approaches CAI_MN = 100 with increasing percentage of core area within patches.
tibble
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
lsm_p_cai
,
mean
, lsm_c_cai_sd
,
lsm_c_cai_cv
, lsm_l_cai_mn
,
lsm_l_cai_sd
,
lsm_l_cai_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_cai_mn(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_cai_mn(landscape)
Standard deviation of core area index (Core area metric)
lsm_c_cai_sd( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
lsm_c_cai_sd( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
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 |
where 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
.
Percent
CAI_SD >= 0
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.
tibble
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
lsm_p_cai
,
sd
lsm_c_cai_mn
,
lsm_c_cai_cv
, lsm_l_cai_mn
,
lsm_l_cai_sd
,
lsm_l_cai_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_cai_sd(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_cai_sd(landscape)
Coefficient of variation of related circumscribing circle (Shape metric)
lsm_c_circle_cv(landscape, directions = 8)
lsm_c_circle_cv(landscape, directions = 8)
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). |
where 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
.
None
CIRCLE_CV >= 0
Equals CIRCLE_CV if the related circumscribing circle is identical for all patches. Increases, without limit, as the variation of related circumscribing circles increases.
tibble
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).
lsm_p_circle
,
mean
, lsm_c_circle_mn
,
lsm_c_circle_sd
, lsm_l_circle_mn
,
lsm_l_circle_sd
,
lsm_l_circle_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_circle_cv(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_circle_cv(landscape)
Mean of related circumscribing circle (Shape metric)
lsm_c_circle_mn(landscape, directions = 8)
lsm_c_circle_mn(landscape, directions = 8)
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). |
where 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
.
None
CIRCLE_MN > 0
Approaches CIRCLE_MN = 0 if the related circumscribing circle of all patches is small. Increases, without limit, as the related circumscribing circles increase.
tibble
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).
lsm_p_circle
,
mean
, lsm_c_circle_sd
,
lsm_c_circle_cv
, lsm_l_circle_mn
,
lsm_l_circle_sd
,
lsm_l_circle_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_circle_mn(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_circle_mn(landscape)
Standard deviation of related circumscribing circle (Shape metric)
lsm_c_circle_sd(landscape, directions = 8)
lsm_c_circle_sd(landscape, directions = 8)
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). |
where 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
.
None
CIRCLE_SD >= 0
Equals CIRCLE_SD if the related circumscribing circle is identical for all patches. Increases, without limit, as the variation of related circumscribing circles increases.
tibble
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).
lsm_p_circle
,
mean
, lsm_c_circle_mn
,
lsm_c_circle_cv
, lsm_l_circle_mn
,
lsm_l_circle_sd
,
lsm_l_circle_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_circle_sd(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_circle_sd(landscape)
Clumpiness index (Aggregation metric)
lsm_c_clumpy(landscape)
lsm_c_clumpy(landscape)
landscape |
A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters |
where is the number of like adjacencies,
is the classwise
number of all adjacencies including the focal class,
is the
minimum perimeter of the total class in terms of cell surfaces assuming total clumping and
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.
None
-1 <= CLUMPY <= 1
Equals -1 for maximally disaggregated, 0 for randomly distributed and 1 for maximally aggregated classes.
tibble
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
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_clumpy(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_clumpy(landscape)
Patch Cohesion Index (Aggregation metric)
lsm_c_cohesion(landscape, directions = 8)
lsm_c_cohesion(landscape, directions = 8)
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). |
where is the perimeter in meters,
is the area in square
meters and
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
.
Percent
0 < COHESION < 100
Approaches COHESION = 0 if patches of class i become more isolated. Increases if patches of class i become more aggregated.
tibble
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.
lsm_p_perim
,
lsm_p_area
, lsm_l_cohesion
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_cohesion(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_cohesion(landscape)
Coefficient of variation of Contiguity index (Shape metric)
lsm_c_contig_cv(landscape, directions = 8)
lsm_c_contig_cv(landscape, directions = 8)
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). |
where 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.
None
CONTIG_CV >= 0
CONTIG_CV = 0 if the contiguity index is identical for all patches. Increases, without limit, as the variation of CONTIG increases.
tibble
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
lsm_p_contig
,
lsm_c_contig_mn
,
lsm_c_contig_cv
, lsm_l_contig_mn
,
lsm_l_contig_sd
,
lsm_l_contig_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_contig_cv(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_contig_cv(landscape)
Mean of Contiguity index (Shape metric)
lsm_c_contig_mn(landscape, directions = 8)
lsm_c_contig_mn(landscape, directions = 8)
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). |
where 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.
None
0 >= CONTIG_MN <= 1
CONTIG equals the mean of the contiguity index on class level for all patches.
tibble
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
lsm_p_contig
,
lsm_c_contig_sd
,
lsm_c_contig_cv
, lsm_l_contig_mn
,
lsm_l_contig_sd
,
lsm_l_contig_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_contig_mn(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_contig_mn(landscape)
Standard deviation of Contiguity index (Shape metric)
lsm_c_contig_sd(landscape, directions = 8)
lsm_c_contig_sd(landscape, directions = 8)
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). |
where 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.
None
CONTIG_CV >= 0
CONTIG_SD = 0 if the contiguity index is identical for all patches. Increases, without limit, as the variation of CONTIG increases.
tibble
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
lsm_p_contig
,
lsm_c_contig_mn
,
lsm_c_contig_cv
, lsm_l_contig_mn
,
lsm_l_contig_sd
,
lsm_l_contig_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_contig_sd(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_contig_sd(landscape)
Coefficient of variation of core area (Core area metric)
lsm_c_core_cv( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
lsm_c_core_cv( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
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 |
where 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
.
Hectares
CORE_CV >= 0
Equals CORE_CV = 0 if all patches have the same core area. Increases, without limit, as the variation of patch core areas increases.
tibble
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
lsm_p_core
, lsm_c_core_mn
,
lsm_c_core_sd
, lsm_l_core_mn
,
lsm_l_core_sd
,
lsm_l_core_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_core_cv(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_core_cv(landscape)
Mean of core area (Core area metric)
lsm_c_core_mn( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
lsm_c_core_mn( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
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 |
where 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
.
Hectares
CORE_MN >= 0
Equals CORE_MN = 0 if CORE = 0 for all patches. Increases, without limit, as the core area indices increase.
tibble
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
lsm_p_core
,
mean
, lsm_c_core_sd
,
lsm_c_core_cv
, lsm_l_core_mn
,
lsm_l_core_sd
,
lsm_l_core_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_core_mn(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_core_mn(landscape)
Standard deviation patch core area (class level)
lsm_c_core_sd( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
lsm_c_core_sd( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
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 |
where 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
.
Hectares
CORE_SD >= 0
Equals CORE_SD = 0 if all patches have the same core area. Increases, without limit, as the variation of patch core areas increases.
tibble
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
lsm_p_core
,
sd
lsm_c_core_mn
,
lsm_c_core_cv
, lsm_l_core_mn
,
lsm_l_core_sd
,
lsm_l_core_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_core_sd(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_core_sd(landscape)
Core area percentage of landscape (Core area metric)
lsm_c_cpland( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
lsm_c_cpland( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
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 |
where is the core area in square meters and
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
.
Percentage
0 <= CPLAND < 100
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.
tibble
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
lsm_p_core
and lsm_l_ta
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_cpland(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_cpland(landscape)
Disjunct core area density (core area metric)
lsm_c_dcad( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
lsm_c_dcad( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
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 |
where is the number of disjunct core areas and
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
.
Number per 100 hectares
DCAD >= 0
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.
tibble
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
lsm_c_ndca
,
lsm_l_ta
, lsm_l_dcad
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_dcad(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_dcad(landscape)
Coefficient of variation number of disjunct core areas (Core area metric)
lsm_c_dcore_cv( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
lsm_c_dcore_cv( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
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 |
where 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.
None
DCORE_CV >= 0
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.
tibble
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
lsm_p_ncore
, lsm_c_dcore_mn
,
lsm_c_dcore_sd
, lsm_l_dcore_mn
,
lsm_l_dcore_sd
,
lsm_l_dcore_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_dcore_cv(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_dcore_cv(landscape)
Mean number of disjunct core areas (Core area metric)
lsm_c_dcore_mn( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
lsm_c_dcore_mn( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
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 |
where 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.
None
DCORE_MN > 0
Equals DCORE_MN = 0 if NCORE = 0 for all patches. Increases, without limit, as the number of disjunct core areas increases.
tibble
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
lsm_p_ncore
,
mean
, lsm_c_dcore_sd
,
lsm_c_dcore_cv
, lsm_l_dcore_mn
,
lsm_l_dcore_sd
,
lsm_l_dcore_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_dcore_mn(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_dcore_mn(landscape)
Standard deviation number of disjunct core areas (Core area metric)
lsm_c_dcore_sd( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
lsm_c_dcore_sd( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
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 |
where 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.
None
DCORE_SD >= 0
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.
tibble
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
lsm_p_ncore
,
sd
lsm_c_dcore_mn
,
lsm_c_dcore_cv
, lsm_l_dcore_mn
,
lsm_l_dcore_sd
,
lsm_l_dcore_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_dcore_sd(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_dcore_sd(landscape)
Landscape division index (Aggregation metric)
lsm_c_division(landscape, directions = 8)
lsm_c_division(landscape, directions = 8)
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). |
where is the area in square meters and
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
.
Proportion
0 <= Division < 1
Equals DIVISION = 0 if only one patch is present. Approaches DIVISION = 1 if all patches of class i are single cells.
tibble
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.
lsm_p_area
,
lsm_l_ta
, lsm_l_division
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_division(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_division(landscape)
Edge Density (Area and Edge metric)
lsm_c_ed(landscape, count_boundary = FALSE, directions = 8)
lsm_c_ed(landscape, count_boundary = FALSE, directions = 8)
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). |
where is the total edge length in meters and
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
.
Meters per hectare
ED >= 0
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
tibble
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
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_ed(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_ed(landscape)
Coefficient of variation of euclidean nearest-neighbor distance (Aggregation metric)
lsm_c_enn_cv(landscape, directions = 8, verbose = TRUE)
lsm_c_enn_cv(landscape, directions = 8, verbose = TRUE)
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 |
where 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
.
Meters
ENN_CV >= 0
Equals ENN_CV = 0 if the euclidean nearest-neighbor distance is identical for all patches. Increases, without limit, as the variation of ENN increases.
tibble
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.
lsm_p_enn
, lsm_c_enn_mn
,
lsm_c_enn_sd
, lsm_l_enn_mn
,
lsm_l_enn_sd
,
lsm_l_enn_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_enn_cv(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_enn_cv(landscape)
Mean of euclidean nearest-neighbor distance (Aggregation metric)
lsm_c_enn_mn(landscape, directions = 8, verbose = TRUE)
lsm_c_enn_mn(landscape, directions = 8, verbose = TRUE)
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 |
where 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
.
Meters
ENN_MN > 0
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.
tibble
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.
lsm_p_enn
,
mean
, lsm_c_enn_sd
,
lsm_c_enn_cv
, lsm_l_enn_mn
,
lsm_l_enn_sd
,
lsm_l_enn_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_enn_mn(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_enn_mn(landscape)
Standard deviation of euclidean nearest-neighbor distance (Aggregation metric)
lsm_c_enn_sd(landscape, directions = 8, verbose = TRUE)
lsm_c_enn_sd(landscape, directions = 8, verbose = TRUE)
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 |
where 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
.
Meters
ENN_SD >= 0
Equals ENN_SD = 0 if the euclidean nearest-neighbor distance is identical for all patches. Increases, without limit, as the variation of ENN increases.
tibble
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.
lsm_p_enn
,
sd
lsm_c_enn_mn
,
lsm_c_enn_cv
, lsm_l_enn_mn
,
lsm_l_enn_sd
,
lsm_l_enn_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_enn_sd(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_enn_sd(landscape)
Coefficient of variation fractal dimension index (Shape metric)
lsm_c_frac_cv(landscape, directions = 8)
lsm_c_frac_cv(landscape, directions = 8)
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). |
where 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
.
None
FRAC_CV >= 0
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.
tibble
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.
lsm_p_frac
, lsm_c_frac_mn
,
lsm_c_frac_sd
, lsm_l_frac_mn
,
lsm_l_frac_sd
,
lsm_l_frac_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_frac_cv(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_frac_cv(landscape)
Mean fractal dimension index (Shape metric)
lsm_c_frac_mn(landscape, directions = 8)
lsm_c_frac_mn(landscape, directions = 8)
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). |
where 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
.
None
FRAC_MN > 0
Approaches FRAC_MN = 1 if all patches are squared and FRAC_MN = 2 if all patches are irregular.
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.
lsm_p_frac
,
mean
, lsm_c_frac_sd
,
lsm_c_frac_cv
, lsm_l_frac_mn
,
lsm_l_frac_sd
,
lsm_l_frac_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_frac_mn(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_frac_mn(landscape)
Standard deviation fractal dimension index (Shape metric)
lsm_c_frac_sd(landscape, directions = 8)
lsm_c_frac_sd(landscape, directions = 8)
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). |
where 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
.
None
FRAC_SD>= 0
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.
tibble
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.
lsm_p_frac
,
sd
lsm_c_frac_mn
,
lsm_c_frac_cv
, lsm_l_frac_mn
,
lsm_l_frac_sd
,
lsm_l_frac_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_frac_sd(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_frac_sd(landscape)
Coefficient of variation radius of gyration (Area and edge metric)
lsm_c_gyrate_cv(landscape, directions = 8, cell_center = FALSE)
lsm_c_gyrate_cv(landscape, directions = 8, cell_center = FALSE)
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. |
where 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
.
Meters
GYRATE_CV >= 0
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.
tibble
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).
lsm_p_gyrate
, lsm_c_gyrate_mn
,
lsm_c_gyrate_sd
, lsm_l_gyrate_mn
,
lsm_l_gyrate_sd
,
lsm_l_gyrate_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_gyrate_cv(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_gyrate_cv(landscape)
Mean radius of gyration (Area and edge metric)
lsm_c_gyrate_mn(landscape, directions = 8, cell_center = FALSE)
lsm_c_gyrate_mn(landscape, directions = 8, cell_center = FALSE)
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. |
where 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
.
Meters
GYRATE_MN >= 0
Approaches GYRATE_MN = 0 if every patch is a single cell. Increases, without limit, when only one patch is present.
tibble
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).
lsm_p_gyrate
,
mean
, lsm_c_gyrate_sd
,
lsm_c_gyrate_cv
, lsm_l_gyrate_mn
,
lsm_l_gyrate_sd
,
lsm_l_gyrate_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_gyrate_mn(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_gyrate_mn(landscape)
Standard deviation radius of gyration (Area and edge metric)
lsm_c_gyrate_sd(landscape, directions = 8, cell_center = FALSE)
lsm_c_gyrate_sd(landscape, directions = 8, cell_center = FALSE)
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. |
where 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
.
Meters
GYRATE_SD >= 0
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.
tibble
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).
lsm_p_gyrate
, lsm_c_gyrate_mn
,
lsm_c_gyrate_cv
, lsm_l_gyrate_mn
,
lsm_l_gyrate_sd
,
lsm_l_gyrate_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_gyrate_sd(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_gyrate_sd(landscape)
Interspersion and Juxtaposition index (Aggregation metric)
lsm_c_iji(landscape, verbose = TRUE)
lsm_c_iji(landscape, verbose = TRUE)
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 |
where are the unique adjacencies of all classes (lower/upper triangle of
the adjacency table - without the diagonal) and
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.
Percent
0 < IJI <= 100
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.
tibble
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.
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_iji(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_iji(landscape)
Largest patch index (Area and Edge metric)
lsm_c_lpi(landscape, directions = 8)
lsm_c_lpi(landscape, directions = 8)
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). |
where is the area of the patch in square meters and
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
.
Percentage
0 < LPI <= 100
Approaches LPI = 0 when the largest patch is becoming small and equals LPI = 100 when only one patch is present
tibble
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
lsm_p_area
,
lsm_l_ta
, lsm_l_lpi
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_lpi(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_lpi(landscape)
Landscape shape index (Aggregation metric)
lsm_c_lsi(landscape)
lsm_c_lsi(landscape)
landscape |
A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters. |
where is the total edge length in cell surfaces and
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.
None
LSI >= 1
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
.
tibble
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.
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_lsi(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_lsi(landscape)
Effective Mesh Size (Aggregation metric)
lsm_c_mesh(landscape, directions = 8)
lsm_c_mesh(landscape, directions = 8)
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). |
where is the patch area in square meters and
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
.
Hectares
cell size / total area <= MESH <= total area
Equals cellsize/total area if class covers only one cell and equals total area if only one patch is present.
tibble
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.
lsm_p_area
,
lsm_l_ta
, lsm_l_mesh
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_mesh(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_mesh(landscape)
Number of disjunct core areas (Core area metric)
lsm_c_ndca( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
lsm_c_ndca( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
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 |
where 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.
None
NDCA >= 0
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).
tibble
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
lsm_c_tca
, lsm_p_ncore
,
lsm_l_ndca
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_ndca(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_ndca(landscape)
Normalized landscape shape index (Aggregation metric)
lsm_c_nlsi(landscape)
lsm_c_nlsi(landscape)
landscape |
A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters. |
where is the total edge length in cell surfaces and
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
.
None
0 <= nlsi <= 1
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").
tibble
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.
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_nlsi(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_nlsi(landscape)
Number of patches (Aggregation metric)
lsm_c_np(landscape, directions = 8)
lsm_c_np(landscape, directions = 8)
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). |
where 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.
None
NP >= 1
Equals NP = 1 when only one patch is present and increases, without limit, as the number of patches increases
tibble
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
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_np(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_np(landscape)
Perimeter-Area Fractal Dimension (Shape metric)
lsm_c_pafrac(landscape, directions = 8, verbose = TRUE)
lsm_c_pafrac(landscape, directions = 8, verbose = TRUE)
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 |
where is the slope of the regression of the area against the perimeter
(logarithm)
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
.
None
1 <= PAFRAC <= 2
Approaches PAFRAC = 1 for patches with simple shapes and approaches PAFRAC = 2 for irregular shapes
tibble
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
lsm_p_area
,
lsm_p_perim
, lsm_l_pafrac
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_pafrac(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_pafrac(landscape)
Coefficient of variation perimeter-area ratio (Shape metric)
lsm_c_para_cv(landscape, directions = 8)
lsm_c_para_cv(landscape, directions = 8)
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). |
where 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
.
None
PARA_CV >= 0
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.
tibble
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
lsm_p_para
, lsm_c_para_mn
,
lsm_c_para_sd
, lsm_l_para_mn
,
lsm_l_para_sd
,
lsm_l_para_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_para_cv(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_para_cv(landscape)
Mean perimeter-area ratio (Shape metric)
lsm_c_para_mn(landscape, directions = 8)
lsm_c_para_mn(landscape, directions = 8)
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). |
where 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
.
None
PARA_MN > 0
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.
tibble
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
lsm_p_para
,
mean
, lsm_c_para_sd
,
lsm_c_para_cv
, lsm_l_para_mn
,
lsm_l_para_sd
,
lsm_l_para_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_para_mn(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_para_mn(landscape)
Standard deviation perimeter-area ratio (Shape metric)
lsm_c_para_sd(landscape, directions = 8)
lsm_c_para_sd(landscape, directions = 8)
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). |
where 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
.
None
PARA_SD >= 0
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.
tibble
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
lsm_p_para
,
sd
lsm_c_para_mn
,
lsm_c_para_cv
, lsm_l_para_mn
,
lsm_l_para_sd
,
lsm_l_para_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_para_sd(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_para_sd(landscape)
Patch density (Aggregation metric)
lsm_c_pd(landscape, directions = 8)
lsm_c_pd(landscape, directions = 8)
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). |
where is the number of patches and
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
.
Number per 100 hectares
0 < PD <= 1e+06
Increases as the landscape gets more patchy. Reaches its maximum if every cell is a different patch.
tibble
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
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_pd(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_pd(landscape)
Percentage of Like Adjacencies (Aggregation metric)
lsm_c_pladj(landscape)
lsm_c_pladj(landscape)
landscape |
A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters. |
where is the number of adjacencies between cells of class i
and
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.
Percent
0 <= PLADJ <= 100
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.
tibble
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.
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_pladj(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_pladj(landscape)
Percentage of landscape of class (Area and Edge metric)
lsm_c_pland(landscape, directions = 8)
lsm_c_pland(landscape, directions = 8)
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). |
where is the area of each patch and
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
.
Percentage
0 < PLAND <= 100
Approaches PLAND = 0 when the proportional class area is decreasing. Equals PLAND = 100 when only one patch is present.
tibble
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
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_pland(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_pland(landscape)
Covariance of variation shape index (Shape metric)
lsm_c_shape_cv(landscape, directions = 8)
lsm_c_shape_cv(landscape, directions = 8)
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). |
where 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
.
None
SHAPE_CV >= 0
Equals SHAPE_CV = 0 if all patches have an identical shape index. Increases, without limit, as the variation of the shape index increases.
tibble
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.
lsm_p_shape
, lsm_c_shape_mn
,
lsm_c_shape_sd
, lsm_l_shape_mn
,
lsm_l_shape_sd
,
lsm_l_shape_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_shape_cv(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_shape_cv(landscape)
Mean shape index (Shape metric)
lsm_c_shape_mn(landscape, directions = 8)
lsm_c_shape_mn(landscape, directions = 8)
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). |
where 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
.
None
SHAPE_SD >= 1
Equals SHAPE_MN = 1 if all patches are squares. Increases, without limit, as the shapes of patches become more complex.
tibble
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.
lsm_p_shape
,
mean
, lsm_c_shape_sd
,
lsm_c_shape_cv
, lsm_l_shape_mn
,
lsm_l_shape_sd
,
lsm_l_shape_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_shape_mn(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_shape_mn(landscape)
Standard deviation shape index (Shape metric)
lsm_c_shape_sd(landscape, directions = 8)
lsm_c_shape_sd(landscape, directions = 8)
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). |
where 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
.
None
SHAPE_SD >= 0
Equals SHAPE_SD = 0 if all patches have an identical shape index. Increases, without limit, as the variation of the shape index increases.
tibble
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.
lsm_p_shape
,
sd
lsm_c_shape_mn
,
lsm_c_shape_cv
, lsm_l_shape_mn
,
lsm_l_shape_sd
,
lsm_l_shape_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_shape_sd(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_shape_sd(landscape)
Splitting index (Aggregation metric)
lsm_c_split(landscape, directions = 8)
lsm_c_split(landscape, directions = 8)
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). |
where is the patch area in square meters and
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
.
None
1 <= SPLIT <= Number of cells squared
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
tibble
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.
lsm_p_area
,
lsm_l_ta
, lsm_l_split
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_split(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_split(landscape)
Total core area (Core area metric)
lsm_c_tca(landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1)
lsm_c_tca(landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1)
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 |
where here 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
.
Hectares
TCA >= 0
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.
tibble
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
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_tca(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_tca(landscape)
Total (class) edge (Area and Edge metric)
lsm_c_te(landscape, count_boundary = FALSE, directions = 8)
lsm_c_te(landscape, count_boundary = FALSE, directions = 8)
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). |
where 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
.
Meters
TE >= 0
Equals TE = 0 if all cells are edge cells. Increases, without limit, as landscape becomes more fragmented
tibble
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
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_te(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_c_te(landscape)
Aggregation index (Aggregation metric)
lsm_l_ai(landscape, directions = 8)
lsm_l_ai(landscape, directions = 8)
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). |
where is the number of like adjacencies based on the single-count method and
is the classwise maximum number of like adjacencies of class i and
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.
Percent
0 <= AI <= 100
Equals 0 for maximally disaggregated and 100 for maximally aggregated classes.
tibble
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.
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_ai(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_ai(landscape)
Coefficient of variation of patch area (Area and edge metric)
lsm_l_area_cv(landscape, directions = 8)
lsm_l_area_cv(landscape, directions = 8)
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). |
where 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
.
Hectares
AREA_CV >= 0
Equals AREA_CV = 0 if all patches are identical in size. Increases, without limit, as the variation of patch areas increases.
tibble
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
lsm_p_area
, lsm_c_area_mn
,
lsm_c_area_sd
,
lsm_c_area_cv
, lsm_l_area_mn
,
lsm_l_area_sd
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_area_cv(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_area_cv(landscape)
Mean of patch area (Area and edge metric)
lsm_l_area_mn(landscape, directions = 8)
lsm_l_area_mn(landscape, directions = 8)
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). |
where 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
.
Hectares
AREA_MN > 0
Approaches AREA_MN = 0 if all patches are small. Increases, without limit, as the patch areas increase.
tibble
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
lsm_p_area
,
mean
, lsm_c_area_mn
,
lsm_c_area_sd
,
lsm_c_area_cv
lsm_l_area_sd
,
lsm_l_area_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_area_mn(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_area_mn(landscape)
Standard deviation of patch area (Area and edge metric)
lsm_l_area_sd(landscape, directions = 8)
lsm_l_area_sd(landscape, directions = 8)
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). |
where 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
.
Hectares
AREA_SD >= 0
Equals AREA_SD = 0 if all patches are identical in size. Increases, without limit, as the variation of patch areas increases.
tibble
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
lsm_p_area
,
sd
lsm_c_area_mn
,
lsm_c_area_sd
,
lsm_c_area_cv
lsm_l_area_mn
,
lsm_l_area_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_area_sd(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_area_sd(landscape)
Coefficient of variation of core area index (Core area metric)
lsm_l_cai_cv( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
lsm_l_cai_cv( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
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 |
where 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
.
Percent
CAI_CV >= 0
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.
tibble
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
lsm_p_cai
, lsm_c_cai_mn
,
lsm_c_cai_sd
,
lsm_c_cai_cv
, lsm_l_cai_mn
,
lsm_l_cai_sd
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_cai_cv(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_cai_cv(landscape)
Mean of core area index (Core area metric)
lsm_l_cai_mn( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
lsm_l_cai_mn( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
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 |
where 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
.
Percent
0 <= CAI_MN <= 100
CAI_MN = 0 when all patches have no core area and approaches CAI_MN = 100 with increasing percentage of core area within patches.
tibble
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
lsm_p_cai
,
mean
, lsm_c_cai_sd
,
lsm_c_cai_sd
,
lsm_c_cai_cv
, lsm_l_cai_sd
,
lsm_l_cai_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_cai_mn(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_cai_mn(landscape)
Standard deviation of core area index (Core area metric)
lsm_l_cai_sd( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
lsm_l_cai_sd( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
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 |
where 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
.
Percent
CAI_SD >= 0
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.
tibble
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
lsm_p_cai
,
sd
lsm_c_cai_mn
,
lsm_c_cai_sd
,
lsm_c_cai_cv
, lsm_l_cai_mn
,
lsm_l_cai_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_cai_sd(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_cai_sd(landscape)
Coefficient of variation of related circumscribing circle (Shape metric)
lsm_l_circle_cv(landscape, directions = 8)
lsm_l_circle_cv(landscape, directions = 8)
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). |
where 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
.
None
CIRCLE_CV >= 0
Equals CIRCLE_CV if the related circumscribing circle is identical for all patches. Increases, without limit, as the variation of related circumscribing circles increases.
tibble
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).
lsm_p_circle
,
mean
, lsm_c_circle_mn
,
lsm_c_circle_sd
,
lsm_c_circle_cv
, lsm_l_circle_mn
,
lsm_l_circle_sd
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_circle_cv(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_circle_cv(landscape)
Mean of related circumscribing circle (Shape metric)
lsm_l_circle_mn(landscape, directions = 8)
lsm_l_circle_mn(landscape, directions = 8)
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). |
where 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
.
None
CIRCLE_MN > 0
Approaches CIRCLE_MN = 0 if the related circumscribing circle of all patches is small. Increases, without limit, as the related circumscribing circles increase.
tibble
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).
lsm_p_circle
,
mean
, lsm_c_circle_mn
,
lsm_c_circle_sd
,
lsm_c_circle_cv
, lsm_l_circle_sd
,
lsm_l_circle_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_circle_mn(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_circle_mn(landscape)
Standard deviation of related circumscribing circle (Shape metric)
lsm_l_circle_sd(landscape, directions = 8)
lsm_l_circle_sd(landscape, directions = 8)
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). |
where 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
.
None
CIRCLE_SD >= 0
Equals CIRCLE_SD if the related circumscribing circle is identical for all patches. Increases, without limit, as the variation of related circumscribing circles increases.
tibble
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).
lsm_p_circle
,
mean
, lsm_c_circle_mn
,
lsm_c_circle_sd
,
lsm_c_circle_cv
, lsm_l_circle_mn
,
lsm_l_circle_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_circle_sd(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_circle_sd(landscape)
Patch Cohesion Index (Aggregation metric)
lsm_l_cohesion(landscape, directions = 8)
lsm_l_cohesion(landscape, directions = 8)
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). |
where is the perimeter in meters,
is the area in square
meters and
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
.
Percent
Unknown
Unknown
tibble
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.
lsm_p_perim
,
lsm_p_area
, lsm_l_cohesion
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_cohesion(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_cohesion(landscape)
Conditional entropy \[H(y|x)\]
lsm_l_condent(landscape, neighbourhood = 4, ordered = TRUE, base = "log2")
lsm_l_condent(landscape, neighbourhood = 4, ordered = TRUE, base = "log2")
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. |
Complexity of a landscape pattern configuration. It measures a only a geometric intricacy (configurational complexity) of a landscape pattern.
tibble
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
lsm_l_ent
,
lsm_l_mutinf
,
lsm_l_joinent
,
lsm_l_relmutinf
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_condent(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_condent(landscape)
Contagion (Aggregation metric)
lsm_l_contag(landscape, verbose = TRUE)
lsm_l_contag(landscape, verbose = TRUE)
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 |
where the adjacency table for all classes divided by the sum of that table and
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. 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.
Percent
0 < Contag <=100
Approaches CONTAG = 0 if all cells are unevenly distributed and 100 indicates that all cells are equally adjacent to all other classes.
tibble
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.
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_contag(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_contag(landscape)
Coefficient of variation of Contiguity index (Shape metric)
lsm_l_contig_cv(landscape, directions = 8)
lsm_l_contig_cv(landscape, directions = 8)
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). |
where 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.
None
CONTIG_CV >= 0
CONTIG_CV = 0 if the contiguity index is identical for all patches. Increases, without limit, as the variation of CONTIG increases.
tibble
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
lsm_p_contig
,
lsm_c_contig_sd
,
lsm_c_contig_cv
,
lsm_c_contig_mn
, lsm_l_contig_sd
,
lsm_l_contig_mn
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_contig_cv(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_contig_cv(landscape)
Mean of Contiguity index (Shape metric)
lsm_l_contig_mn(landscape, directions = 8)
lsm_l_contig_mn(landscape, directions = 8)
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). |
where 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.
None
0 >= CONTIG_MN <= 1
CONTIG equals the mean of the contiguity index on landscape level for all patches.
tibble
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
lsm_p_contig
,
lsm_c_contig_sd
,
lsm_c_contig_cv
,
lsm_c_contig_mn
, lsm_l_contig_sd
,
lsm_l_contig_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_contig_mn(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_contig_mn(landscape)
Standard deviation of Contiguity index (Shape metric)
lsm_l_contig_sd(landscape, directions = 8)
lsm_l_contig_sd(landscape, directions = 8)
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). |
where 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.
None
CONTIG_SD >= 0
CONTIG_SD = 0 if the contiguity index is identical for all patches. Increases, without limit, as the variation of CONTIG increases.
tibble
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
lsm_p_contig
,
lsm_c_contig_sd
,
lsm_c_contig_cv
,
lsm_c_contig_mn
, lsm_l_contig_cv
,
lsm_l_contig_mn
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_contig_sd(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_contig_sd(landscape)
Coefficient of variation of core area (Core area metric)
lsm_l_core_cv( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
lsm_l_core_cv( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
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 |
where 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
.
Hectares
CORE_CV >= 0
Equals CORE_CV = 0 if all patches have the same core area. Increases, without limit, as the variation of patch core areas increases.
tibble
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
lsm_p_core
, lsm_c_core_mn
,
lsm_c_core_sd
,
lsm_c_core_cv
, lsm_l_core_mn
,
lsm_l_core_sd
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_core_cv(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_core_cv(landscape)
Mean of core area (Core area metric)
lsm_l_core_mn( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
lsm_l_core_mn( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
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 |
where 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
.
Hectares
CORE_MN >= 0
Equals CORE_MN = 0 if CORE = 0 for all patches. Increases, without limit, as the core area indices increase.
tibble
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
lsm_p_core
,
mean
, lsm_c_core_mn
,
lsm_c_core_sd
,
lsm_c_core_cv
, lsm_l_core_sd
,
lsm_l_core_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_core_mn(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_core_mn(landscape)
Standard deviation of patch core area (class level)
lsm_l_core_sd( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
lsm_l_core_sd( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
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 |
where 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
.
Hectares
CORE_SD >= 0
Equals CORE_SD = 0 if all patches have the same core area. Increases, without limit, as the variation of patch core areas increases.
tibble
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
lsm_p_core
,
sd
lsm_c_core_mn
,
lsm_c_core_sd
,
lsm_c_core_cv
, lsm_l_core_mn
,
lsm_l_core_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_core_sd(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_core_sd(landscape)
Disjunct core area density (core area metric)
lsm_l_dcad( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
lsm_l_dcad( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
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 |
where is the number of disjunct core areas and
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
.
Number per 100 hectares
DCAD >= 0
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.
tibble
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
lsm_c_ndca
,
lsm_l_ta
, lsm_c_dcad
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_dcad(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_dcad(landscape)
Coefficient of variation number of disjunct core areas (Core area metric)
lsm_l_dcore_cv( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
lsm_l_dcore_cv( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
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 |
where 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.
None
DCORE_CV >= 0
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.
tibble
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
lsm_p_ncore
, lsm_c_dcore_mn
,
lsm_c_dcore_sd
,
lsm_c_dcore_cv
, lsm_l_dcore_mn
,
lsm_l_dcore_sd
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_dcore_cv(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_dcore_cv(landscape)
Mean number of disjunct core areas (Core area metric)
lsm_l_dcore_mn( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
lsm_l_dcore_mn( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
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 |
where 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.
None
DCORE_MN > 0
Equals DCORE_MN = 0 if NCORE = 0 for all patches. Increases, without limit, as the number of disjunct core areas increases.
tibble
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
lsm_p_ncore
,
mean
, lsm_c_dcore_mn
,
lsm_c_dcore_sd
,
lsm_c_dcore_cv
, lsm_l_dcore_sd
,
lsm_l_dcore_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_dcore_mn(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_dcore_mn(landscape)
Standard deviation number of disjunct core areas (Core area metric)
lsm_l_dcore_sd( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
lsm_l_dcore_sd( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
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 |
where 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.
None
DCORE_SD >= 0
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.
tibble
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
lsm_p_ncore
,
sd
lsm_c_dcore_mn
,
lsm_c_dcore_sd
, lsm_c_dcore_cv
,
lsm_l_dcore_mn
,
lsm_l_dcore_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_dcore_sd(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_dcore_sd(landscape)
Landscape division index (Aggregation metric)
lsm_l_division(landscape, directions = 8)
lsm_l_division(landscape, directions = 8)
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). |
where is the area in square meters and
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
.
Proportion
0 <= Division < 1
Equals DIVISION = 0 if only one patch is present. Approaches DIVISION = 1 if all patches of class i are single cells.
tibble
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.
lsm_p_area
,
lsm_l_ta
, lsm_c_division
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_division(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_division(landscape)
Edge Density (Area and Edge metric)
lsm_l_ed(landscape, count_boundary = FALSE, directions = 8)
lsm_l_ed(landscape, count_boundary = FALSE, directions = 8)
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). |
where is the total landscape edge in meters and
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
.
Meters per hectare
ED >= 0
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
tibble
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
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_ed(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_ed(landscape)
Coefficient of variation of euclidean nearest-neighbor distance (Aggregation metric)
lsm_l_enn_cv(landscape, directions = 8, verbose = TRUE)
lsm_l_enn_cv(landscape, directions = 8, verbose = TRUE)
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 |
where 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
.
Meters
ENN_CV >= 0
Equals ENN_CV = 0 if the euclidean nearest-neighbor distance is identical for all patches. Increases, without limit, as the variation of ENN increases.
tibble
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.
lsm_p_enn
, lsm_c_enn_mn
,
lsm_c_enn_sd
,
lsm_c_enn_cv
, lsm_l_enn_mn
,
lsm_l_enn_sd
,
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_enn_cv(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_enn_cv(landscape)
Mean of euclidean nearest-neighbor distance (Aggregation metric)
lsm_l_enn_mn(landscape, directions = 8, verbose = TRUE)
lsm_l_enn_mn(landscape, directions = 8, verbose = TRUE)
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 |
where 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
.
Meters
ENN_MN > 0
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.
tibble
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.
lsm_p_enn
,
mean
, lsm_c_enn_mn
,
lsm_c_enn_sd
,
lsm_c_enn_cv
, lsm_l_enn_sd
,
lsm_l_enn_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_enn_mn(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_enn_mn(landscape)
Standard deviation of euclidean nearest-neighbor distance (Aggregation metric)
lsm_l_enn_sd(landscape, directions = 8, verbose = TRUE)
lsm_l_enn_sd(landscape, directions = 8, verbose = TRUE)
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 |
where 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
.
Meters
ENN_SD >= 0
Equals ENN_SD = 0 if the euclidean nearest-neighbor distance is identical for all patches. Increases, without limit, as the variation of ENN increases.
tibble
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.
lsm_p_enn
,
sd
lsm_c_enn_mn
,
lsm_c_enn_sd
,
lsm_c_enn_cv
, lsm_l_enn_mn
,
lsm_l_enn_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_enn_sd(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_enn_sd(landscape)
Marginal entropy \[H(x)\]
lsm_l_ent(landscape, neighbourhood = 4, base = "log2")
lsm_l_ent(landscape, neighbourhood = 4, base = "log2")
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. |
It measures a diversity (thematic complexity) of landscape classes.
tibble
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
lsm_l_condent
,
lsm_l_mutinf
,
lsm_l_joinent
,
lsm_l_relmutinf
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_ent(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_ent(landscape)
Coefficient of variation fractal dimension index (Shape metric)
lsm_l_frac_cv(landscape, directions = 8)
lsm_l_frac_cv(landscape, directions = 8)
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). |
where 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
.
None
FRAC_CV >= 0
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.
tibble
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.
lsm_p_frac
, lsm_c_frac_mn
,
lsm_c_frac_sd
,
lsm_c_frac_cv
, lsm_l_frac_mn
,
lsm_l_frac_sd
,
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_frac_cv(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_frac_cv(landscape)
Mean fractal dimension index (Shape metric)
lsm_l_frac_mn(landscape, directions = 8)
lsm_l_frac_mn(landscape, directions = 8)
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). |
where 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
.
None
FRAC_MN > 0
Approaches FRAC_MN = 1 if all patches are squared and FRAC_MN = 2 if all patches are irregular.
tibble
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.
lsm_p_frac
,
mean
, lsm_c_frac_mn
,
lsm_c_frac_sd
,
lsm_c_frac_cv
, lsm_l_frac_sd
,
lsm_l_frac_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_frac_mn(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_frac_mn(landscape)
Standard deviation fractal dimension index (Shape metric)
lsm_l_frac_sd(landscape, directions = 8)
lsm_l_frac_sd(landscape, directions = 8)
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). |
where 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
.
None
FRAC_SD>= 0
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.
tibble
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.
lsm_p_frac
,
sd
lsm_c_frac_mn
,
lsm_c_frac_sd
,
lsm_c_frac_cv
, lsm_l_frac_mn
,
lsm_l_frac_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_frac_sd(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_frac_sd(landscape)
Coefficient of variation radius of gyration (Area and edge metric)
lsm_l_gyrate_cv(landscape, directions = 8, cell_center = FALSE)
lsm_l_gyrate_cv(landscape, directions = 8, cell_center = FALSE)
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. |
where 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
.
Meters
GYRATE_CV >= 0
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.
tibble
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).
lsm_p_gyrate
, lsm_c_gyrate_mn
,
lsm_c_gyrate_sd
,
lsm_c_gyrate_cv
, lsm_l_gyrate_mn
,
lsm_l_gyrate_sd
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_gyrate_cv(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_gyrate_cv(landscape)
Mean radius of gyration (Area and edge metric)
lsm_l_gyrate_mn(landscape, directions = 8, cell_center = FALSE)
lsm_l_gyrate_mn(landscape, directions = 8, cell_center = FALSE)
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. |
where 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
.
Meters
GYRATE_MN >= 0
Approaches GYRATE_MN = 0 if every patch is a single cell. Increases, without limit, when only one patch is present.
tibble
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).
lsm_p_gyrate
,
mean
, lsm_c_gyrate_mn
,
lsm_c_gyrate_sd
,
lsm_c_gyrate_cv
, lsm_l_gyrate_sd
,
lsm_l_gyrate_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_gyrate_mn(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_gyrate_mn(landscape)
Standard deviation radius of gyration (Area and edge metric)
lsm_l_gyrate_sd(landscape, directions = 8, cell_center = FALSE)
lsm_l_gyrate_sd(landscape, directions = 8, cell_center = FALSE)
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. |
where 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
.
Meters
GYRATE_SD >= 0
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.
tibble
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).
lsm_p_gyrate
, lsm_c_gyrate_mn
,
lsm_c_gyrate_sd
,
lsm_c_gyrate_cv
, lsm_l_gyrate_mn
,
lsm_l_gyrate_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_gyrate_sd(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_gyrate_sd(landscape)
Interspersion and Juxtaposition index (Aggregation metric)
lsm_l_iji(landscape, verbose = TRUE)
lsm_l_iji(landscape, verbose = TRUE)
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 |
where are the unique adjacencies of all classes (lower/upper triangle of
the adjacency table - without the diagonal),
is the total length of edges in the landscape
and
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.
Percent
0 < IJI <= 100
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.
tibble
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.
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_iji(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_iji(landscape)
Joint entropy \[H(x, y)\]
lsm_l_joinent(landscape, neighbourhood = 4, ordered = TRUE, base = "log2")
lsm_l_joinent(landscape, neighbourhood = 4, ordered = TRUE, base = "log2")
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. |
Complexity of a landscape pattern. An overall spatio-thematic complexity metric.
tibble
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
lsm_l_ent
,
lsm_l_condent
,
lsm_l_mutinf
,
lsm_l_relmutinf
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_joinent(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_joinent(landscape)
Largest patch index (Area and Edge metric)
lsm_l_lpi(landscape, directions = 8)
lsm_l_lpi(landscape, directions = 8)
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). |
where is the area of the patch in square meters and
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
.
Percentage
0 < LPI <= 100
Approaches LPI = 0 when the largest patch is becoming small and equals LPI = 100 when only one patch is present
tibble
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
lsm_p_area
,
lsm_l_ta
, lsm_c_lpi
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_lpi(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_lpi(landscape)
Landscape shape index (Aggregation metric)
lsm_l_lsi(landscape)
lsm_l_lsi(landscape)
landscape |
A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters. |
where is the total edge length in cell surfaces and
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
.
None
LSI >= 1
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.
tibble
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.
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_lsi(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_lsi(landscape)
Effective Mesh Size (Aggregation metric)
lsm_l_mesh(landscape, directions = 8)
lsm_l_mesh(landscape, directions = 8)
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). |
where is the patch area in square meters and
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
.
Hectares
cell size / total area <= MESH <= total area
Equals cellsize/total area if class covers only one cell and equals total area if only one patch is present.
tibble
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.
lsm_p_area
,
lsm_l_ta
, lsm_c_mesh
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_mesh(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_mesh(landscape)
Modified Simpson's diversity index (Diversity metric)
lsm_l_msidi(landscape, directions = 8)
lsm_l_msidi(landscape, directions = 8)
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). |
where 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
.
None
MSIDI >= 0
MSIDI = 0 if only one patch is present and increases, without limit, as the amount of patches with equally distributed landscape proportions increases
tibble
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
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_msidi(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_msidi(landscape)
Modified Simpson's evenness index (Diversity metric)
lsm_l_msiei(landscape, directions = 8)
lsm_l_msiei(landscape, directions = 8)
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). |
where is the landscape area proportion of class i and
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
.
None
0 <= MSIEI < 1
MSIEI = 0 when only one patch is present and approaches MSIEI = 1 as the proportional distribution of patches becomes more even
tibble
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.
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_msiei(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_msiei(landscape)
Mutual information \[I(y,x)\]
lsm_l_mutinf(landscape, neighbourhood = 4, ordered = TRUE, base = "log2")
lsm_l_mutinf(landscape, neighbourhood = 4, ordered = TRUE, base = "log2")
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. |
It disambiguates landscape pattern types characterize by the same value of an
overall complexity (lsm_l_joinent
).
tibble
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
lsm_l_ent
,
lsm_l_condent
,
lsm_l_joinent
,
lsm_l_relmutinf
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_mutinf(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_mutinf(landscape)
Number of disjunct core areas (Core area metric)
lsm_l_ndca( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
lsm_l_ndca( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
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 |
where 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.
None
NDCA >= 0
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).
tibble
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
lsm_c_tca
, lsm_p_ncore
,
lsm_c_ndca
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_ndca(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_ndca(landscape)
Number of patches (Aggregation metric)
lsm_l_np(landscape, directions = 8)
lsm_l_np(landscape, directions = 8)
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). |
where 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.
None
NP >= 1
Equals NP = 1 when only one patch is present and increases, without limit, as the number of patches increases
tibble
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
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_np(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_np(landscape)
Perimeter-Area Fractal Dimension (Shape metric)
lsm_l_pafrac(landscape, directions = 8, verbose = TRUE)
lsm_l_pafrac(landscape, directions = 8, verbose = TRUE)
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 |
where is the slope of the regression of the area against the perimeter
(logarithm)
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
.
None
1 <= PAFRAC <= 2
Approaches PAFRAC = 1 for patches with simple shapes and approaches PAFRAC = 2 for irregular shapes
tibble
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
lsm_p_area
,
lsm_p_perim
, lsm_c_pafrac
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_pafrac(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_pafrac(landscape)
Coefficient of variation perimeter-area ratio (Shape metric)
lsm_l_para_cv(landscape, directions = 8)
lsm_l_para_cv(landscape, directions = 8)
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). |
where 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
.
None
PARA_CV >= 0
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.
tibble
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
lsm_p_para
, lsm_c_para_mn
,
lsm_c_para_sd
,
lsm_c_para_cv
, lsm_l_para_mn
,
lsm_l_para_sd
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_para_cv(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_para_cv(landscape)
Mean perimeter-area ratio (Shape metric)
lsm_l_para_mn(landscape, directions = 8)
lsm_l_para_mn(landscape, directions = 8)
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). |
where 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
.
None
PARA_MN > 0
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.
tibble
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
lsm_p_para
,
mean
, lsm_c_para_mn
,
lsm_c_para_sd
,
lsm_c_para_cv
, lsm_l_para_sd
,
lsm_l_para_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_para_mn(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_para_mn(landscape)
Standard deviation perimeter-area ratio (Shape metric)
lsm_l_para_sd(landscape, directions = 8)
lsm_l_para_sd(landscape, directions = 8)
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). |
where 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
.
None
PARA_SD >= 0
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.
tibble
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
lsm_p_para
,
sd
lsm_c_para_mn
,
lsm_c_para_sd
,
lsm_c_para_cv
, lsm_l_para_mn
,
lsm_l_para_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_para_sd(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_para_sd(landscape)
Patch density (Aggregation metric)
lsm_l_pd(landscape, directions = 8)
lsm_l_pd(landscape, directions = 8)
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). |
where is the number of patches and
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
.
Number per 100 hectares
0 < PD <= 1e+06
Increases as the landscape gets more patchy. Reaches its maximum if every cell is a different patch.
tibble
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
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_pd(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_pd(landscape)
Percentage of Like Adjacencies (Aggregation metric)
lsm_l_pladj(landscape)
lsm_l_pladj(landscape)
landscape |
A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters. |
where is the number of adjacencies between cells of class i
and
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.
Percent
0 <= PLADJ <= 100
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.
tibble
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.
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_pladj(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_pladj(landscape)
Patch richness (Diversity metric)
lsm_l_pr(landscape)
lsm_l_pr(landscape)
landscape |
A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters. |
where 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.
None
PR >= 1
Equals PR = 1 when only one patch is present and increases, without limit, as the number of classes increases
tibble
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
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_pr(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_pr(landscape)
Patch richness density (Diversity metric)
lsm_l_prd(landscape, directions = 8)
lsm_l_prd(landscape, directions = 8)
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). |
where is the number of classes and
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
.
Number per 100 hectares
PR > 0
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.
tibble
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
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_prd(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_prd(landscape)
Relative mutual information
lsm_l_relmutinf(landscape, neighbourhood = 4, ordered = TRUE, base = "log2")
lsm_l_relmutinf(landscape, neighbourhood = 4, ordered = TRUE, base = "log2")
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. |
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.
tibble
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
lsm_l_ent
,
lsm_l_condent
,
lsm_l_joinent
,
lsm_l_mutinf
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_relmutinf(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_relmutinf(landscape)
Relative patch richness (Diversity metric)
lsm_l_rpr(landscape, classes_max = NULL, verbose = TRUE)
lsm_l_rpr(landscape, classes_max = NULL, verbose = TRUE)
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 |
where is the number of classes and
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
.
Percentage
0 < RPR <= 100
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
tibble
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
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_rpr(landscape, classes_max = 5)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_rpr(landscape, classes_max = 5)
Coefficient of variation shape index (Shape metric)
lsm_l_shape_cv(landscape, directions = 8)
lsm_l_shape_cv(landscape, directions = 8)
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). |
where 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
.
None
SHAPE_CV >= 0
Equals SHAPE_CV = 0 if all patches have an identical shape index. Increases, without limit, as the variation of the shape index increases.
tibble
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.
lsm_p_shape
, lsm_c_shape_mn
,
lsm_c_shape_sd
, lsm_c_shape_cv
,
lsm_l_shape_mn
,
lsm_l_shape_sd
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_shape_cv(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_shape_cv(landscape)
Mean shape index (Shape metric)
lsm_l_shape_mn(landscape, directions = 8)
lsm_l_shape_mn(landscape, directions = 8)
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). |
where 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
.
None
SHAPE_SD >= 1
Equals SHAPE_MN = 1 if all patches are squares. Increases, without limit, as the shapes of patches become more complex.
tibble
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.
lsm_p_shape
,
mean
, lsm_c_shape_mn
,
lsm_c_shape_sd
,
lsm_c_shape_cv
, lsm_l_shape_sd
,
lsm_l_shape_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_shape_mn(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_shape_mn(landscape)
Standard deviation shape index (Shape metric)
lsm_l_shape_sd(landscape, directions = 8)
lsm_l_shape_sd(landscape, directions = 8)
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). |
where 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
.
None
SHAPE_SD >= 0
Equals SHAPE_SD = 0 if all patches have an identical shape index. Increases, without limit, as the variation of the shape index increases.
tibble
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.
lsm_p_shape
,
sd
lsm_c_shape_mn
,
lsm_c_shape_sd
,
lsm_c_shape_cv
, lsm_l_shape_mn
,
lsm_l_shape_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_shape_sd(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_shape_sd(landscape)
Shannon's diversity index (Diversity metric)
lsm_l_shdi(landscape)
lsm_l_shdi(landscape)
landscape |
A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters. |
where 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.
None
SHDI >= 0
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
tibble
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
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_shdi(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_shdi(landscape)
Shannons's evenness index (Diversity metric)
lsm_l_shei(landscape)
lsm_l_shei(landscape)
landscape |
A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters. |
where is the proportion of class i and
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.
None
0 <= SHEI < 1
Equals SHEI = 0 when only one patch present and equals SHEI = 1 when the proportion of classes is completely equally distributed
tibble
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
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_shei(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_shei(landscape)
Simpson's diversity index (Diversity metric)
lsm_l_sidi(landscape, directions = 8)
lsm_l_sidi(landscape, directions = 8)
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). |
where is the proportion of class i and
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.
None
0 <= SIDI < 1
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
tibble
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
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_sidi(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_sidi(landscape)
Simpson's evenness index (Diversity metric)
lsm_l_siei(landscape, directions = 8)
lsm_l_siei(landscape, directions = 8)
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). |
where is the proportion of class i and
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.
None
0 < SIEI <= 1
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
tibble
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
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_siei(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_siei(landscape)
Splitting index (Aggregation metric)
lsm_l_split(landscape, directions = 8)
lsm_l_split(landscape, directions = 8)
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). |
where is the patch area in square meters and
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
.
None
1 <= SPLIT <= Number of cells squared
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
tibble
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.
lsm_p_area
,
lsm_l_ta
, lsm_c_split
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_split(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_split(landscape)
Total area (Area and edge metric)
lsm_l_ta(landscape, directions = 8)
lsm_l_ta(landscape, directions = 8)
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). |
where 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
.
Hectares
TA > 0
Approaches TA > 0 if the landscape is small and increases, without limit, as the size of the landscape increases.
tibble
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
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_ta(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_ta(landscape)
Total core area (Core area metric)
lsm_l_tca(landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1)
lsm_l_tca(landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1)
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 |
where here 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
.
Hectares
TCA >= 0
Increases, without limit, as patch areas increase and patch shapes simplify. TCA = 0 when every cell in every patch is an edge.
tibble
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
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_tca(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_tca(landscape)
Total edge (Area and Edge metric)
lsm_l_te(landscape, count_boundary = FALSE)
lsm_l_te(landscape, count_boundary = FALSE)
landscape |
A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters. |
count_boundary |
Include landscape boundary in edge length |
where 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
.
Meters
TE >= 0
Equals TE = 0 if all cells are edge cells. Increases, without limit, as landscape becomes more fragmented
tibble
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
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_te(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_l_te(landscape)
Patch area (Area and edge metric)
lsm_p_area(landscape, directions = 8)
lsm_p_area(landscape, directions = 8)
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). |
where 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
.
Hectares
AREA > 0
Increases, without limit, as the patch size increases.
tibble
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
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
landscape <- terra::rast(landscapemetrics::landscape) lsm_p_area(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_p_area(landscape)
Core area index (Core area metric)
lsm_p_cai(landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1)
lsm_p_cai(landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1)
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 |
where is the core area in square meters and
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
.
Percent
0 <= CAI <= 100
CAI = 0 when the patch has no core area and approaches CAI = 100 with increasing percentage of core area within a patch.
tibble
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
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
landscape <- terra::rast(landscapemetrics::landscape) lsm_p_cai(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_p_cai(landscape)
Related Circumscribing Circle (Shape metric)
lsm_p_circle(landscape, directions = 8)
lsm_p_circle(landscape, directions = 8)
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). |
where is the area in square meters and
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
.
None
0 <= CIRCLE < 1
CIRCLE = 0 for a circular patch and approaches CIRCLE = 1 for a linear patch.
tibble
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).
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
landscape <- terra::rast(landscapemetrics::landscape) lsm_p_circle(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_p_circle(landscape)
Contiguity index (Shape metric)
lsm_p_contig(landscape, directions = 8)
lsm_p_contig(landscape, directions = 8)
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). |
where is the contiguity value for pixel r in patch ij,
the area of the respective patch (number of cells) and
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.
None
0 >= CONTIG <= 1
Equals 0 for one-pixel patches and increases to a limit of 1 (fully connected patch).
tibble
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
lsm_c_contig_mn
,
lsm_c_contig_sd
,
lsm_c_contig_cv
, lsm_l_contig_mn
,
lsm_l_contig_sd
,
lsm_l_contig_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_p_contig(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_p_contig(landscape)
Core area (Core area metric)
lsm_p_core( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
lsm_p_core( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
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 |
where 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
.
Hectares
CORE >= 0
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.
tibble
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
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
landscape <- terra::rast(landscapemetrics::landscape) lsm_p_core(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_p_core(landscape)
Euclidean Nearest-Neighbor Distance (Aggregation metric)
lsm_p_enn(landscape, directions = 8, verbose = TRUE)
lsm_p_enn(landscape, directions = 8, verbose = TRUE)
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 |
where 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
.
Meters
ENN > 0
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.
tibble
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.
lsm_c_enn_mn
,
lsm_c_enn_sd
,
lsm_c_enn_cv
, lsm_l_enn_mn
,
lsm_l_enn_sd
,
lsm_l_enn_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_p_enn(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_p_enn(landscape)
Fractal dimension index (Shape metric)
lsm_p_frac(landscape, directions = 8)
lsm_p_frac(landscape, directions = 8)
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). |
where is the perimeter in meters and
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
.
None
1 <= FRAC <= 2
Approaches FRAC = 1 for a squared patch shape form and FRAC = 2 for a irregular patch shape.
tibble
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.
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
landscape <- terra::rast(landscapemetrics::landscape) lsm_p_frac(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_p_frac(landscape)
Radius of Gyration (Area and edge metric)
lsm_p_gyrate(landscape, directions = 8, cell_center = FALSE)
lsm_p_gyrate(landscape, directions = 8, cell_center = FALSE)
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. |
where is the distance from each cell to the centroid of the
patch and
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
.
Meters
GYRATE >= 0
Approaches GYRATE = 0 if patch is a single cell. Increases, without limit, when only one patch is present.
tibble
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).
lsm_c_gyrate_mn
,
lsm_c_gyrate_sd
,
lsm_c_gyrate_cv
, lsm_l_gyrate_mn
,
lsm_l_gyrate_sd
,
lsm_l_gyrate_cv
landscape <- terra::rast(landscapemetrics::landscape) lsm_p_gyrate(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_p_gyrate(landscape)
Number of core areas (Core area metric)
lsm_p_ncore( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
lsm_p_ncore( landscape, directions = 8, consider_boundary = FALSE, edge_depth = 1 )
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
where 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. UnitsNone RangeNCORE >= 0 BehaviourNCORE = 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). |
tibble
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
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
landscape <- terra::rast(landscapemetrics::landscape) lsm_p_ncore(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_p_ncore(landscape)
Perimeter-Area ratio (Shape metric)
lsm_p_para(landscape, directions = 8)
lsm_p_para(landscape, directions = 8)
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). |
where is the perimeter in meters and
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
.
None
PARA > 0
Increases, without limit, as the shape complexity increases.
tibble
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
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
landscape <- terra::rast(landscapemetrics::landscape) lsm_p_para(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_p_para(landscape)
Perimeter (Area and edge metric)
lsm_p_perim(landscape, directions = 8)
lsm_p_perim(landscape, directions = 8)
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). |
where 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
.
Meters
PERIM > 0
Increases, without limit, as patch size and complexity increases.
tibble
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
landscape <- terra::rast(landscapemetrics::landscape) lsm_p_perim(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_p_perim(landscape)
Shape index (Shape metric)
lsm_p_shape(landscape, directions = 8)
lsm_p_shape(landscape, directions = 8)
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). |
where is the perimeter (m) and
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
.
None
SHAPE >= 1
Equals SHAPE = 1 for a squared patch and increases, without limit, as the patch shape becomes more complex.
tibble
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.
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
landscape <- terra::rast(landscapemetrics::landscape) lsm_p_shape(landscape)
landscape <- terra::rast(landscapemetrics::landscape) lsm_p_shape(landscape)
Sets global options for landscapemetrics
options_landscapemetrics(to_disk = NULL)
options_landscapemetrics(to_disk = NULL)
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. |
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.
Global option to be used internally in the package
A real landscape of the Podlasie region in Poland from the ESA CCI Land Cover
podlasie_ccilc
podlasie_ccilc
A raster object.
http://maps.elie.ucl.ac.be/CCI/viewer/
Sample metrics
sample_lsm( landscape, y, plot_id = NULL, shape = "square", size = NULL, all_classes = FALSE, return_raster = FALSE, verbose = TRUE, progress = FALSE, ... )
sample_lsm( landscape, y, plot_id = NULL, shape = "square", size = NULL, all_classes = FALSE, return_raster = FALSE, verbose = TRUE, progress = FALSE, ... )
landscape |
A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters. |
y |
2-column matrix with coordinates, sf point geometries, or sf polygon 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 |
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
.
tibble
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")
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
show_cores( landscape, directions = 8, class = "all", labels = FALSE, nrow = NULL, ncol = NULL, consider_boundary = TRUE, edge_depth = 1 )
show_cores( landscape, directions = 8, class = "all", labels = FALSE, nrow = NULL, ncol = NULL, consider_boundary = TRUE, edge_depth = 1 )
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 |
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.
ggplot
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)
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
show_correlation( data, method = "pearson", diag = TRUE, labels = FALSE, vjust = 0, text_size = 15 )
show_correlation( data, method = "pearson", diag = TRUE, labels = FALSE, vjust = 0, text_size = 15 )
data |
Tibble with results of as returned by the landscapemetrics package. |
method |
Type of correlation. See |
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. |
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
.
ggplot
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)
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 on patch level printed in their corresponding patch.
show_lsm( landscape, what, class = "global", directions = 8, consider_boundary = FALSE, edge_depth = 1, labels = FALSE, label_lsm = FALSE, nrow = NULL, ncol = NULL )
show_lsm( landscape, what, class = "global", directions = 8, consider_boundary = FALSE, edge_depth = 1, labels = FALSE, label_lsm = FALSE, nrow = NULL, ncol = NULL )
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. |
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
.
ggplot
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)
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
show_patches( landscape, class = "global", directions = 8, labels = FALSE, nrow = NULL, ncol = NULL )
show_patches( landscape, class = "global", directions = 8, labels = FALSE, nrow = NULL, ncol = NULL )
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. |
The functions plots the landscape with the patches labeled with the corresponding patch id.
ggplot
landscape <- terra::rast(landscapemetrics::landscape) show_patches(landscape) show_patches(landscape, class = c(1, 2)) show_patches(landscape, class = 3, labels = FALSE)
landscape <- terra::rast(landscapemetrics::landscape) show_patches(landscape) show_patches(landscape, class = c(1, 2)) show_patches(landscape, class = 3, labels = FALSE)
Spatialize landscape metric values
spatialize_lsm( landscape, level = "patch", metric = NULL, name = NULL, type = NULL, what = NULL, directions = 8, progress = FALSE, to_disk = getOption("to_disk", default = FALSE), ... )
spatialize_lsm( landscape, level = "patch", metric = NULL, name = NULL, type = NULL, what = NULL, directions = 8, progress = FALSE, to_disk = getOption("to_disk", default = FALSE), ... )
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. |
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 |
The functions returns a nested list with RasterLayer
s. 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
.
list
landscape <- terra::rast(landscapemetrics::landscape) p_area_raster <- spatialize_lsm(landscape, what = "lsm_p_area") terra::plot(p_area_raster[[1]][[1]])
landscape <- terra::rast(landscapemetrics::landscape) p_area_raster <- spatialize_lsm(landscape, what = "lsm_p_area") terra::plot(p_area_raster[[1]][[1]])
Moving window
window_lsm( landscape, window, level = "landscape", metric = NULL, name = NULL, type = NULL, what = NULL, progress = FALSE, ... )
window_lsm( landscape, window, level = "landscape", metric = NULL, name = NULL, type = NULL, what = NULL, progress = FALSE, ... )
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. |
progress |
Print progress report. |
... |
Arguments passed on to |
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.
list
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
## 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)
## 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)