Split a large geom into blocks small enough to ask the API for rasters

ca_biggeom_blocks(x)

Arguments

x

A big geom

Value

A polygon simple feature data frame covering the same extent as x

Details

The Cal-Adapt API has a limit of around 20,000 mi^2 as the maximum area for which you can download a raster. This function will take a sf data frame larger than this and return blocks that cover the same extent. Subsequently you can download rasters for the individual blocks and mosaic them into the full area using ca_stars_mosaic.

Note while this function can help you work around the maximum area you can download tifs via the API, it won't help you get spatially aggregated values from a large area using the API. For that, you would need to a) use this function to download rasters, b) mosaic them, and c) do a spatial aggregration on the large area-of-interest.

If your study areas encompasses the entire Cal-Adapt coverage area, you'd be better off downloading the individual rasters from the [Cal-Adapt Data Server](http://albers.cnr.berkeley.edu/data/).

Examples

if (FALSE) {


}