ra_mask: Function to mask/filter a raster object to a spatial polygon.

View source: R/ra_mask.R

ra_maskR Documentation

Function to mask/filter a raster object to a spatial polygon.

Description

Masking a raster object will filter the object to a spatial polygon with potentially complicated geometries while ra_crop will crop the object to a rectangular extent.

Usage

ra_mask(ra, sp_polygon, pre_crop = TRUE, inverse = FALSE)

Arguments

ra

Raster object to be masked/filtered.

sp_polygon

Spatial polygon to be used as the filter.

pre_crop

Should the raster object be cropped before being masked? Note, the default is TRUE.

inverse

Should an inverse/punch/erase mask be conducted?

Value

Raster object.

Author(s)

Stuart K. Grange.

See Also

ra_crop


skgrange/gissr documentation built on June 20, 2024, 12:02 a.m.