rvalavi / blockCV

The blockCV package creates spatially or environmentally separated training and testing folds for cross-validation to provide a robust error estimation in spatially structured environments. See
https://doi.org/10.1111/2041-210X.13107
GNU General Public License v3.0
107 stars 24 forks source link

implement terra 'SpatRaster' and 'SpatVector' inputs #20

Closed AMBarbosa closed 1 year ago

AMBarbosa commented 2 years ago

Hi, the 'terra' package is becoming increasingly used, as it replaces both 'raster' and 'sp'+'rgdal' and makes everything much faster. Would you be willing to implement the 'SpatRaster' and 'SpatVector' input formats too? In my experience, transition from 'sp'+'raster' was quite easy, and I've already implemented it in my own packages. Cheers!

rvalavi commented 2 years ago

Hi @AMBarbosa Thanks for the recommendation. I've already moved to terra in my own codes but haven't implemented it here. I'll move to terra as soon as I have some time. The major update (v2.0) was moving away from sp to sf. Replacing raster with terra should be relatively easy.

rvalavi commented 2 years ago

I'll keep this issue open until the updating process is done!

AMBarbosa commented 2 years ago

Cool, thanks! Please remember to implement also 'SpatVector', as it is a sound and simple alternative to 'sf' that many users prefer.

rvalavi commented 1 year ago

Good news! blockCV is no update with all raster operations in terra and sf.