Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please remove dependencies on **rgdal**, **rgeos**, and/or **maptools** #7

Open
rsbivand opened this issue Dec 15, 2022 · 7 comments
Open

Comments

@rsbivand
Copy link
Contributor

This package depends on (depends, imports or suggests) raster and one or more of the retiring packages rgdal, rgeos or maptools (https://r-spatial.org/r/2022/04/12/evolution.html, https://r-spatial.org/r/2022/12/14/evolution2.html). Since raster 3.6.3, all use of external FOSS library functionality has been transferred to terra, making the retiring packages very likely redundant. It would help greatly if you could remove dependencies on the retiring packages as soon as possible.

@michaeldorman
Copy link
Owner

Thank you @rsbivand 🙏

@rsbivand
Copy link
Contributor Author

The import of 'rgeos' uses rgeos::gBuffer rgeos::gCentroid rgeos::gConvexHull rgeos::gDistance rgeos::gIntersection rgeos::gIntersects rgeos::gLength rgeos::gLineMerge rgeos::gUnaryUnion rgeos::gUnion as found by pkgapi. Most have terra alternatives, discussed in https://r-spatial.org/r/2023/04/10/evolution3.html, https://github.com/r-spatial/evolution/blob/main/pkgapi_230305_refs.csv and https://r-spatial.github.io/evolution/diffs/cm2_terra_diff.html. If you are coming to the OGH summer school, we could review your progress there if you like. Please fix best by June, latest October 2023.

@michaeldorman
Copy link
Owner

Dear @rsbivand ,
Thank you very much for your help and guidance about the package migration. Unfortunately I don't have time to maintain the shadow package at the moment, and in the foreseeable future. I understand the implication that it may be removed from CRAN if those changes aren't made. Just wanted to let you know meanwhile, so that not to take from your time, and if the situation changes will be very happy for guidance.
Sincerely,
Michael

@rsbivand
Copy link
Contributor Author

Thanks. If you are coming to the OGH summer school in Poznan, maybe this package and plotKML might be exercises for my talk on R spatial package ecosystem evolution?

A small question - do you only shift to spherical coordinates in order to find solar positions? That is, are the rgeos operations done on planar geometries? If on spherical, we'd need to either go with terra which uses GEOS on both, or negotiate the s2/GEOS distinction in sf.

@michaeldorman
Copy link
Owner

Sure. Hopefully I'm coming to OGH, but not sure yet.

Yes, all calculations are planar. lon/lat are only used to find the solar position.

@rsbivand
Copy link
Contributor Author

rsbivand commented Jun 9, 2023

Expect package to fail CRAN CMD check with _R_CHECK_SUGGESTS_ONLY_=true when sp 2.0-0 is published very soon, if sf is not added to Suggests:

@rsbivand
Copy link
Contributor Author

rsbivand commented Aug 28, 2023

rgeos::gBuffer terra::buffer sf::st_buffer
rgeos::gCentroid terra::centroids sf::st_centroid
rgeos::gConvexHull terra::convHull sf::st_convex_hull
rgeos::gDistance terra::distance sf::st_distance
rgeos::gIntersection terra::crop sf::st_intersection
rgeos::gIntersects terra::relate sf::st_intersects
rgeos::gLength terra::perim sf::st_length
rgeos::gLineMerge terra::aggregate sf::st_aggregate
rgeos::gUnaryUnion terra::aggregate sf::st_union
rgeos::gUnion terra::union sf::st_union
rgeos::readWKT terra::vect sf::st_as_sfc
rgeos::gEnvelope terra::ext sf::st_bbox
rgeos::gArea terra::expanse sf::st_area
rgeoos::Class-SpatialCollections sf::st_collection_extract

Update: added sf and terra alternatives.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants