This function summarizes predictors to dual mesh. Predictors are assumed to be numerical values.
Arguments
- dmesh
A dual mesh
- predictors
A SpatRaster with predictor values. If processing in parallel, the SpatRaster needs to be wrapped using
terra::wrap
.- ...
Further arguments to pass to
exactextractr::exact_extract
, such asprogress = TRUE
.
Details
Parallelization can be enabled by choosing a plan from the future package and the mesh will be splitted in chunks detemined by the number of workers. Don't forget to reset the plan to sequential when done.
When the predictors do not cover the extent of the dual mesh, empty cells will be filled with the value of the nearest neighbour cell.