Skip to contents

Marginal entropy \[H(x)\]

Usage

lsm_l_ent(landscape, neighbourhood = 4, base = "log2")

Arguments

landscape

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

neighbourhood

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

base

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

Value

tibble

Details

It measures a diversity (thematic complexity) of landscape classes.

References

Nowosad J., TF Stepinski. 2019. Information theory as a consistent framework for quantification and classification of landscape patterns. https://doi.org/10.1007/s10980-019-00830-x

Examples

landscape <- terra::rast(landscapemetrics::landscape)
lsm_l_ent(landscape)
#> # A tibble: 1 × 6
#>   layer level     class    id metric value
#>   <int> <chr>     <int> <int> <chr>  <dbl>
#> 1     1 landscape    NA    NA ent     1.46