R-package icon indicating copy to clipboard operation
R-package copied to clipboard

Check package for dependencies expiring soon.

Open ohagen opened this issue 2 years ago • 3 comments

Check gen3sis

rgdal and rgeos will be retired by end of 2023. Gen3sis imports raster and sp.

Package sp currently suggests both rgeos and rgdal. It uses rgdal for the validation of CRS objects (proj4string or WKT descriptions of coordinate reference systems), and it uses rgeos to sort out which rings are holes when a SpatialPolygons object does not have a flag indicating this. This only happens for saved objects that are at least 10 years old. Both functionalities (CRS validation, hole detection) can however easily be substituted by functions in package sf.

Package “sp” is modified such that it no longer depends on “rgdal” or “rgeos” - Branch evolution of Roger Bivand’s fork of sp, which can be installed with

devtools::install_github("rsbivand/sp@evolution")

contains conditional code that prevents sp to call code in rgdal or rgeos. This can be enabled by setting

Sys.setenv("SP_EVOLUTION_STATUS"=2)

after that, e.g. a call to CRS("+proj=longlat") calls sf::st_crs() to validate the coordinate reference system and retrieve the WKT representation.

ohagen avatar Oct 31 '22 22:10 ohagen

Probably related, a clean install of R 4.2.2 and install.packages("gen3sis") errors out on dependencies:

image

I installed raster (3.5_21) using conda and then tried the gen3sis install again and it worked. conda install -c conda-forge r-raster.

isaacovercast avatar Jan 03 '23 19:01 isaacovercast

Raster moved on to rely on terra and will stay in basic maintenance for the moment: https://github.com/rspatial/raster/issues/325 . Gen3sis and it's dependencies should be installable (tested with R4.3.2 on Ubuntu) I think that means gDistance will remain on raster for the immediate future. I suggest we follow gDistance here as it's our critical external dependency...

@isaacovercast sorry for the long silence. Iirc the was a transition period where not all dependencies where in sync on what packages they relied on from this whole story. That resolved itself eventually.

@ohagen I suggest we leave this ticket open as a reminder to check on gDistance from time to time

benj919 avatar Nov 30 '23 10:11 benj919

@benj919 Thanks Benji, I like the idea... otherwise we just forget!

@isaacovercast Sorry for the silence too, somehow I did not see this here... I guess all working. :)

ohagen avatar Nov 30 '23 12:11 ohagen