PecanProject / pecan

The Predictive Ecosystem Analyzer (PEcAn) is an integrated ecological bioinformatics toolbox.
www.pecanproject.org
Other
200 stars 231 forks source link

Migrate geospatial tools from the rgdal ecosystem (rgdal, rgeos, maptools) depends to sf & terra #2914

Open serbinsh opened 2 years ago

serbinsh commented 2 years ago

Description

Apparently, the R spatial world is shifting away from rgdal, rgeos, and maptools toward sf and terra. rgdal, rgeos, and maptools all scheduled for retirement at the end of 2023. Thanks for the heads up @infotroph

https://mobile.twitter.com/RogerBivand/status/1407705212538822656 https://cran.r-project.org/web/packages/rgdal/index.html

raster doesnt yet have a retirement date, but its suggested to move toward terra

Proposed Solution

So to me this means right now is a great time to overhaul our spatial dependencies. First start with simpler functions toward sf/terra (e.g. in data.remote) but we need to develop a list of all functions that use these tools and then schedule the order for updating.

Alternatives Considered

none

Additional Context

[](https://twitter.com/@RogerBivand)[Roger Bivand](https://twitter.com/@RogerBivand)Roger Bivand [@RogerBivand](https://twitter.com/@RogerBivand)
[@edzerpebesma](https://twitter.com/edzerpebesma) I'm not sure that taking over maintenance is a sensible use of effort (add maptools to that list). The main condition for this will be transition from raster to terra, as raster uses rgdal heavily. If sf/stars and terra become the main workflow bases, things get simplified.
TwitterTwitter | [Jun 23rd, 2021](https://mobile.twitter.com/RogerBivand/status/1407705212538822656)

Some other issues - if we need to buffer points to average pixels when extracting does terra support that like raster?

Aariq commented 1 year ago

related: https://github.com/PecanProject/pecan/issues/2913

Aariq commented 1 year ago

more details: https://github.com/r-spatial/evolution

Aariq commented 1 year ago

Appearances of rgdal:

https://github.com/PecanProject/pecan/blob/1043bfd57becbb79885e9455439308c68b9816ca/modules/data.land/R/gis.functions.R#L71-L72

https://github.com/PecanProject/pecan/blob/1043bfd57becbb79885e9455439308c68b9816ca/modules/data.remote/R/NLCD.R#L72

https://github.com/PecanProject/pecan/blob/1043bfd57becbb79885e9455439308c68b9816ca/modules/data.atmosphere/R/GEFS_helper_functions.R#L248

Plus a LOT of scripts and vignettes

Aariq commented 9 months ago

It's October. rgdal will disappear from CRAN soon and CI will start breaking.

mdietze commented 9 months ago

@DongchenZ @Shuohanz I'm assigning the GEFS part of this to you two, since you're actively working on that code already.

The NLCD and shp2kml bits are not core so could be temporarily deactiviated if no one steps up.