View source: R/create_analysis_region.R
create_analysis_region_mask | R Documentation |
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.
create_analysis_region_mask(
raster,
points,
mask_vars = NULL,
expansion_factor = 1
)
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. |
SpatRaster with NA values everywhere outside analysis region and 1 everywhere within the analysis region.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.