Mask raster to polygon

mask_raster_to_polygon(raster_object, polygon)

Arguments

raster_object

character. An object of class RasterLayer.

polygon

character. A polygon to define spatial boundary of raster value counts (e.g. a given city's watersheds)

Details

This function masks a raster file against a chosen polygon. This function differs from a normal mask because it makes sure the projections are the same for both layers.

Author

Sean Turner (sean.turner@pnnl.gov)