layer_mask: Apply Polygon Mask to Raster Layers

View source: R/process_layers.R

layer_maskR Documentation

Apply Polygon Mask to Raster Layers

Description

This function crops and extends raster layers to a study area extent (bbox) defined by longitude and latitude then applies a mask based on a provided spatial polygon to remove areas outside the polygon.

Usage

layer_mask(layers, study_area)

Arguments

layers

A stack of raster layers ('SpatRaster' object) to be processed.

study_area

A spatial polygon ('sf' object) used to mask the raster layers.

Value

A 'SpatRaster' object representing the masked raster layers.


glossa documentation built on Oct. 15, 2024, 5:08 p.m.

Related to layer_mask in glossa...