patch_areas: Extract patch areas from a categorical raster

View source: R/internal_functions.R

patch_areasR Documentation

Extract patch areas from a categorical raster

Description

The function extracts patch areas from a categorical raster

Usage

patch_areas(raster, class, edge_size = 0, neighborhood = 8, surf_min = 0)

Arguments

raster

A RasterLayer object corresponding to a categorical raster layer

class

An integer value or vector with the value(s) corresponding to the code values of the raster layer within which points will be sampled. are computed.

edge_size

An integer value indicating the width of the edge (in meters) of the raster layer which is ignored during the sampling (default = 0). It prevents from sampling in the margins of the study area.

neighborhood

An integer value indicating which cells are considered adjacent when contiguous patches are delineated (it should be 8 (default, Queen's case) or 4 (Rook's case)). This parameter is ignored when by_patch = FALSE.

surf_min

An integer value indicating the minimum surface of a patch considered for the sampling in number of raster cells. This parameter is used whatever the by_patch argument is. Default is 0.

Value

A data.frame with the areas of the patches

Author(s)

P. Savary


graph4lg documentation built on Feb. 16, 2023, 5:43 p.m.