cv_clip_basin {CMIP6VisR}R Documentation

Get zones and areas that clip rasters from a given basin polygon

Description

Takes the SpatRaster that represents zones and areas and clips them from polygon basin

Usage

cv_clip_basin(za_rast, basin)

Arguments

za_rast

SpatRaster of the zones and areas

basin

SpatVector of the basin to clip to

Value

Returns a list with 3 elements: 1) raster (rasters of cell areas for each zone), 2) area total area of each zone in the basin, and 3) zone zone numbers.

Author(s)

Kostas Andreadis

See Also

cv_basin_daily_precip

Examples

{
library(terra)
az_raster <- cv_zone_area_raster()
fpath <- system.file("extdata", "07BF001.shp", package = "CMIP6VisR")
basin_vector <- vect(fpath)
basin_areas <- cv_clip_basin(az_raster, basin_vector)
}


[Package CMIP6VisR version 1.0.0 Index]