create_analysis_region_mask: Create Analysis Region Mask

View source: R/create_analysis_region.R

create_analysis_region_maskR Documentation

Create Analysis Region Mask

Description

Create a mask of the same size and shape as raster with NA values everywhere outside of the analysis region. Cells included in the anlaysis region are determined by the range of cell values covered by points. First, the range of cell values which fall under points for each raster layer included in mask_vars is calculated, and only cells whose values fall within that range are included in the analysis region. The range can be expanded by a factor indicated by expansion_factor.

Usage

create_analysis_region_mask(
  raster,
  points,
  mask_vars = NULL,
  expansion_factor = 1
)

Arguments

raster

SpatRaster with layers for each analysis variable

points

SpatVector of points or polygons to be used for calculating range of allowed values for the analysis region

mask_vars

character vector of names of raster layers to include in calculating allowable ranges. If NULL, all layers will be included.

expansion_factor

Factor to expand the range by. Default is 1, which indicates no expansion. 0.5 will reduce the range by 50 range.

Value

SpatRaster with NA values everywhere outside analysis region and 1 everywhere within the analysis region.


tabrasel/WetlandTools documentation built on Dec. 20, 2024, 8:50 a.m.