edenToRSM | R Documentation |
Coarsen eden data to match RSM mesh cells. Function extracts data are mesh cell locations and returns a SpatVector object with the result.
edenToRSM( data, mesh = vect(system.file("extdata/gis/COP_mesh", "mesh.shp", package = "RSM"), "mesh"), maskToEDEN = FALSE, func = mean )
data |
Input data, either SpatRaster or eden class. |
mesh |
Geometry used for output. A SpatVector with mesh cells. |
maskToEDEN |
Should data be masked to the EDEN domain? If FALSE the entire mesh is returned, including cells outside EDEN grid. If TRUE, mesh is masked to EDEN grid. |
func |
Function to apply when multiple EDEN cells are within a mesh cell. Typically, a measure of central tendency. |
Depending on the class of the input data, either a SpatVector or an eden object (list with date and data elements)
## Not run: edenDat <- fireHydro::getEDEN(returnType = 'terra', quarterly = TRUE) eden_mesh <- edenToRSM(data = edenDat, maskToEDEN = TRUE) plot(eden_mesh$data, ncol(eden_mesh$data), axes = FALSE, type = 'continuous') ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.