In some cases, extracting from a terraSpatRaster is much faster than a RasterStack or RasterLayer, e.g. https://github.com/isciences/exactextractr/issues/58#issuecomment-934614672 . Sometimes the difference is more dramatic. Sometimes there is no difference. I imagine the difference has to do with file type (whether raster is using gdal or ncdf4) the number of layers, and possibly the file chunk size.
Should exactextractr try to identify cases where there is a benefit and provide the user with a notice? Or just issue a general recommendation to always use terra?
In some cases, extracting from a
terra
SpatRaster
is much faster than aRasterStack
orRasterLayer
, e.g. https://github.com/isciences/exactextractr/issues/58#issuecomment-934614672 . Sometimes the difference is more dramatic. Sometimes there is no difference. I imagine the difference has to do with file type (whetherraster
is using gdal orncdf4
) the number of layers, and possibly the file chunk size.Should
exactextractr
try to identify cases where there is a benefit and provide the user with a notice? Or just issue a general recommendation to always useterra
?