categorical_boundary: Define the boundary elements of a SpatRaster with categorical...

View source: R/categorical_boundary.R

categorical_boundaryR Documentation

Define the boundary elements of a SpatRaster with categorical data

Description

This function is deprecated. Please use define_boundary

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)



BoundaryStats documentation built on Aug. 8, 2025, 6:12 p.m.