intersect_masks: Intersect Two Masks

Description Usage Arguments Value See Also Examples

Description

Intersects two masks to identify cells that meet both criteria for corresponding layers. Grid cells that satisfy both criteria are reclassified as 1, grid cells that fail at least one criteria are reclassified as 0.

Usage

1
intersect_masks(temp.mask, precip.mask, filename = "", ...)

Arguments

temp.mask

Raster* object. Mask of grid cells that meet minimum temperature threshold, may be result of mask_grids. Object may be single or multi-layer.

precip.mask

Raster* object. Mask of grid cells that meet minimum precipitation threshold, may be result of mask_grids. Object may be single or multi-layer.

filename

Character. Optional output root filename passed to writeRaster, default output file type is GeoTiff. If not specified, output is written to a temporary file.

...

Other arguments passed to writeRaster.

Value

RasterBrick. One output mask layer for each input layer. If filename is specified, output file format is GeoTiff with unsigned integer data type.

See Also

mask_grids, overlay.

Examples

1
2
3
4
5
6
7
8
# Generate masks of grid cells that satisfy C4-climate criteria
C4_mask <- intersect_masks(C4_temp_mask, precip_mask)

# Generate masks of grid cells that satisfy growing-season climate criteria
GS_mask <- intersect_masks(GS_temp_mask, precip_mask)

# Plot monthly growing-season masks
plot(GS_mask)

rebeccalpowell/grassmapr documentation built on June 20, 2019, 8:07 p.m.