Skip to contents

Related Circumscribing Circle (Shape metric)

Usage

lsm_p_circle(landscape, directions = 8)

Arguments

landscape

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

directions

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

Value

tibble

Details

$$CIRCLE = 1 - (\frac{a_{ij}} {a_{ij}^{circle}})$$ where \(a_{ij}\) is the area in square meters and \(a_{ij}^{circle}\) the area of the smallest circumscribing circle.

CIRCLE is a 'Shape metric'. The metric is the ratio between the patch area and the smallest circumscribing circle of the patch. The diameter of the smallest circumscribing circle is the 'diameter' of the patch connecting the opposing corner points of the two cells that are the furthest away from each other. The metric characterises the compactness of the patch and is comparable among patches with different area.

Units

None

Range

0 <= CIRCLE < 1

Behaviour

CIRCLE = 0 for a circular patch and approaches CIRCLE = 1 for a linear patch.

References

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

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

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

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_p_circle(landscape)
#> # A tibble: 28 × 6
#>    layer level class    id metric value
#>    <int> <chr> <int> <int> <chr>  <dbl>
#>  1     1 patch     1     1 circle 0.363
#>  2     1 patch     1     2 circle 0.626
#>  3     1 patch     1     3 circle 0.616
#>  4     1 patch     1     4 circle 0.363
#>  5     1 patch     1     5 circle 0.363
#>  6     1 patch     1     6 circle 0.628
#>  7     1 patch     1     7 circle 0.547
#>  8     1 patch     1     8 circle 0.706
#>  9     1 patch     1     9 circle 0.510
#> 10     1 patch     2    10 circle 0.628
#> # ℹ 18 more rows