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

rgeos not all gone yet #207

Closed
rsbivand opened this issue Sep 5, 2023 · 3 comments
Closed

rgeos not all gone yet #207

rsbivand opened this issue Sep 5, 2023 · 3 comments

Comments

@rsbivand
Copy link

rsbivand commented Sep 5, 2023

Following 0.11.1 and 0.11.2, I'm afraid that I still see references to the "SpatialRing" etc., classes which are defined in rgeos not sp, so #185 probably isn't done yet: https://github.com/search?q=repo%3Aropensci%2Fgeojsonio%20SpatialRing&type=code. The CMD check 00install.out log is:

00install.out.log

@mikemahoney218
Copy link
Member

Thanks @rsbivand -- as always, I highly appreciate the amount of work & care you're doing to retire these packages.

I believe the bits in the install log come from here, where these functions are made defunct:

geojsonio/R/deprecated.R

Lines 77 to 106 in 6202af0

## SpatialRings to SpatialPolygonsDataFrame
as_SpatialPolygonsDataFrame.SpatialRings <- function(from) {
lifecycle::deprecate_stop(
"0.10.0",
"as.SpatialPolygonsDataFrame.SpatialRings()",
details = "Due to the pending retirement of rgeos in 2023, please migrate any existing code away from using rgeos."
)
}
setAs(
"SpatialRings", "SpatialPolygonsDataFrame",
as_SpatialPolygonsDataFrame.SpatialRings
)
## SpatialRingsDataFrame to SpatialPolygonsDataFrame
as_SpatialPolygonsDataFrame.SpatialRingsDataFrame <- function(from) {
lifecycle::deprecate_stop(
"0.10.0",
"as.SpatialPolygonsDataFrame.SpatialRingsDataFrame()",
details = "Due to the pending retirement of rgeos in 2023, please migrate any existing code away from using rgeos."
)
}
setAs(
"SpatialRingsDataFrame", "SpatialPolygonsDataFrame",
as_SpatialPolygonsDataFrame.SpatialRingsDataFrame
)

Do you know if those install messages will cause issues with CRAN? I can drop those defunct functions entirely if so; otherwise, it might be nice to leave the deprecation messages in place.

That said, there's a few spots in the code search that definitely should be removed, thank you for flagging!

@rsbivand
Copy link
Author

rsbivand commented Sep 5, 2023

Thanks. "SpatialCollections" are from rgeos too, though:

> getClass("Spatial")
Class "Spatial" [package "sp"]

Slots:
                              
Name:         bbox proj4string
Class:      matrix         CRS

Known Subclasses: 
Class "SpatialPoints", directly
Class "SpatialMultiPoints", directly
Class "SpatialGrid", directly
Class "SpatialLines", directly
Class "SpatialPolygons", directly
Class "SpatialPointsDataFrame", by class "SpatialPoints", distance 2
Class "SpatialPixels", by class "SpatialPoints", distance 2
Class "SpatialMultiPointsDataFrame", by class "SpatialMultiPoints", distance 2
Class "SpatialGridDataFrame", by class "SpatialGrid", distance 2
Class "SpatialLinesDataFrame", by class "SpatialLines", distance 2
Class "SpatialPixelsDataFrame", by class "SpatialPoints", distance 3
Class "SpatialPolygonsDataFrame", by class "SpatialPolygons", distance 2
> library(rgeos)
> getClass("SpatialCollections")
Class "SpatialCollections" [package "rgeos"]

Slots:
                                                                  
Name:             pointobj             lineobj             ringobj
Class:   SpatialPointsNULL    SpatialLinesNULL    SpatialRingsNULL
                                                                  
Name:              polyobj           plotOrder                bbox
Class: SpatialPolygonsNULL             integer              matrix
                          
Name:          proj4string
Class:                 CRS

Extends: "Spatial"

@mikemahoney218
Copy link
Member

Thanks again -- went through and removed the SpatialRing and SpatialCollections references throughout the package and cut a new release, so the CRAN version should be rgeos-free.

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