HannaMeyer/CAST

Incompability with terra SpatRaster objects

goergen95 opened this issue · 2 comments

Hello @HannaMeyer,

in a current use-case I came across the issue that terra's SpatRaster objects are currently not supported by CAST.
Of course users can coerce their SpatRaster objects to RasterStack before using CAST functionality. However, in a recent PR #15 I included that functionality within the aoa and calibrate_aoa functions so that SpatRasters now won't throw an error and the output is also a SpatRaster object. Its a rather "dirty" solution but I was wondering if a transition to terra is something you are interested in for the package? And if so, should Raster objects still be supported since existing code might rely on the raster package? In that regard, if a transition to terra is considered valuable for CAST I guess it would make sense to "flip" the dependencies so that the general code base works on SpatRasters and Raster objects would be coerced beforehand?
Let me know if that is something you are interested in and I could put in some work on the mentioned PR.

Thanks Darius for adding the support for SpatRaster. It is currently not intended to move to terra but we're considering to have stars as the main package here.

Ok, thanks for the info and accepting the changes. Would be great to see terra support in the future development of the package.