You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Will summary(new("SpatialPolygons")) really need sf? #125
options(sp_evolution_status=2)
library("sp")
prototype<- new("SpatialPolygons")
summary(prototype)
## Error in is.projected(p4str) : sf required for evolution_status==2L
str(prototype@proj4string)
## Formal class 'CRS' [package "sp"] with 1 slot## ..@ projargs: chr NA
is.projected(CRS())
## Error in is.projected(CRS()) : sf required for evolution_status==2L
This is because the trivial NA check in the current evolution-2 code of sp:::is.projectedCRS()
comes only after leveraging the "heavy" sf::st_is_longlat(obj).
Could the order be changed such that is.projected() for (legacy) Spatial objects with unknown CRS won't need sf?
( This is from experimenting with surveillance, which currently does not need rgdal, but with evolution 2 would unnecessarily load sf just to get a missing value from is.projected() for maps with unknown projection. )
Activity
edzer commentedon Dec 21, 2022
Makes total sense - thanks!
return fast for default Spatial objects with unset CRS
Merge pull request #144 from bastistician/refix125