Cidree / rpostgis

rpostgis: R Interface to a 'PostGIS' Database
http://cidree.github.io/rpostgis/
77 stars 14 forks source link

terra support #21

Closed marcosci closed 4 years ago

marcosci commented 4 years ago

Hey Mathieu!

I really liked playing around with rpostgis recently.

Is there any chance that the package will get a minor upgrade any time soon that incorporates the new terra package? Currently, pgWriteRast fails with a SpatRast object because it doesn't know how to handle the CRS.

Cheers Marco

basille commented 4 years ago

Hey Marco!

That would be interesting… but I'd like to understand the aim of the terra package better. If it is supposed to be a replacement for raster, is it considered stable enough yet? The intent of the developers is not crystal clear to me. As such, I doubt we will invest much time on this in the foreseeable future (in all honesty, this should come with a major update of the package to deal with sf objects).

I'm closing this issue for now. This said, if you feel like it, we'd be happy to include it if you want to work on a PR (would be in an experimental branch first).

achubaty commented 2 years ago

It's probably worth revisiting this, as terra is poised to supplant raster (likewise, sf will replace sp).

@rsbivand has previously confirmed that "rgdal, rgeos and maptools will not be developed further, and will be withdrawn by 2024-01-01 at the latest. This means that you should transition to sf and either stars or terra (raster uses rgdal and rgeos)".

Of particular note is that terra is so much faster than raster, so it really is the prefered package, especially for new projects.

ailich commented 1 year ago

I was wondering if there's been any development on this. By now terra is better and I'd argue more stable than raster and Robert Hijmans has largely told people to migrate their workflows to terra.

basille commented 1 year ago

Indeed, this should be the way to go. This would mean a major overhaul of rpostgis, and honestly, I don't have the time and resources to plan and work on such an update. Points to consider:

These are rather complex questions (all are moot points actually if the answer to the first is negative). I'd be happy to help anybody interested to tackle this (and even hand over rpostgis altogether), as long as there is a long-term commitment to the project, and a clear plan about this transition.