categorical_boundary {BoundaryStats} | R Documentation |
Define the boundary elements of a SpatRaster with categorical data
Description
Creates boundary element cells where patches of two categories meet.
Usage
categorical_boundary(x)
Arguments
x |
A SpatRaster object. |
Value
A SpatRaster object with cell values 1 for boundary elements and 0 for other cells
Author(s)
Amy Luo
Examples
data(grassland)
grassland <- terra::rast(grassland_matrix, crs = grassland_crs)
terra::ext(grassland) <- grassland_ext
grassland_boundaries <- categorical_boundary(grassland)
[Package BoundaryStats version 2.1.1 Index]