Velox is decrapated: we should move to exactextractr
It seems velox is not under development anymore. From a comment on an issue in the velox
GitHub repository it is suggested that exactextract
does the job, and most of the cases it performs better than velox
:
exactextractr
(https://github.com/isciences/exactextractr and on CRAN) package which, not only benchmarks better thanvelox
, but does not require any object coercion to a different object class.
For rasterization we should use fasterize
.
The
exactextractr
package is intended for only extracting raster values and does not provide rasterization functionality. For this, I use thefasterize
(https://github.com/ecohealthalliance/fasterize and on CRAN) package, which has also recently updated its C code to work under C++17 compiler requirements. Both of these packages require asf
class object but are easily coercible tosp
classes usingx <- methods::as(x, "Spatial")
.