-
Notifications
You must be signed in to change notification settings - Fork 15
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
Upcoming sf breaks fasterize #31
Comments
thanks @rsbivand @noamross I suggest removing the two blocks that copy the sf crs to the raster, it's currently doing the wrong thing if the sf and raster objects do not share the same projection (assigning the polygon's projection to the raster, no checks are done), and so this is more consistent anyway. If users need to project the polygons to the grid they can do that upfront. If you agree I can PR it - I'll look at adding some logic to compare the crs, fall back etc. - but the same issue will affect the raster package too - so might need to wait and see what happens there. |
Testing on sf@jeroen-gdal3-rwinlib I see
Because now (PROJ6 in sp, and sf but still with *current sf structure *) we see old behaviour in sf but new behaviour in sp: f <- system.file("gpkg/nc.gpkg", package = "sf", mustWork = TRUE)
sf::st_crs(sf::read_sf(f))
Coordinate Reference System:
EPSG: 4267
proj4string: "+proj=longlat +datum=NAD27 +no_defs"
## but
sp::CRS(sp::proj4string(r_nc))
CRS arguments:
+proj=longlat +datum=NAD27 +no_defs +ellps=clrk66
+nadgrids=@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat Suggest just remove these tests, since they break the new sf structure anyway (sorry I missed in the PR). I also see
(Doing that makes that test pass). |
Good. I can't see whether |
I was wondering that myself, I'll be looking at this again on @noamross's behalf so I'll check this out properly. |
I've submitted sf to CRAN; this causes an error in package NLMR, see https://win-builder.r-project.org/incoming_pretest/sf_0.9-0_20200319_213604/reverseDependencies/summary.txt |
Pkg rasterDT also affected, see link above. |
Also package reproducible, see link above. |
Upcoming sf changes the
"crs"
object which will not have a"proj4string"
component. See: edzer/sp#73 for example found running revdeps with sf 0.8-2 probablySetFromUserInput
branch.The text was updated successfully, but these errors were encountered: