-
Notifications
You must be signed in to change notification settings - Fork 10
Fix failing cran checks #34
Comments
@sckott I see the same CRAN errors with PROJ 7 on spatial revdeps, also with github master dplyr. The problem I see is (@edzer) that in
where x is N,E, and y is E,N, so axis-swapping in the wild? It seems to happen here |
That's right, however actual axis swapping will not occur until the user sets |
So the crs object expressses N/E when the data are actually still E/N? That would explain why the bbox values are unchanged, I'd wondered. How should
|
|
That is what is used in |
That's OK, I only assumed the reprex to be sth like library(sf)
st_crs(4326) == st_crs("+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs")
# [1] FALSE |
I looked anyway, and had bot check properly before, the PROJ test does discriminate correctly, but cannot protect against the data having a different axis order from the CRS definition:
So the PROJ function used in |
ignore axis mapping on crs comparison if not authority compliant; see discussion at ropensci-archive/scrubr#34
I think this fixes the first one: library(sf)
# Linking to GEOS 3.8.0, GDAL 3.0.4, PROJ 7.0.0
st_a <- st_crs(4326)
st_b <- st_crs("+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs")
st_a == st_b
# [1] TRUE
st_axis_order(TRUE)
st_a == st_b
# [1] TRUE I'm just suprised that the second one now is also |
For me:
With github/master GDAL, and PROJ I think 7.0.0 released. sf is 0.9-1 github/master from last Saturday I think, not folllowing your commit above. Curious what revdeps throw up ... |
Could you pls correct the output above (double outputs)? |
We now see (with GDAL >= 3): library(sf)
# Linking to GEOS 3.8.0, GDAL 3.0.4, PROJ 7.0.0
st_axis_order(FALSE)
st_a <- st_crs(4326)
st_b <- st_crs("+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs")
st_a == st_b
# [1] TRUE
st_axis_order(TRUE)
st_a == st_b
# [1] TRUE
st_axis_order(FALSE)
st_a == st_b
# [1] TRUE and, eh, so be it? |
OK, but maybe this needs to be an sf issue, so that it doesn't get neglected? |
thanks for this. so is the solution then to use |
ignore axis mapping on crs comparison if not authority compliant; see discussion at ropensci-archive/scrubr#34
failing on two platforms
https://www.r-project.org/nosvn/R.check/r-patched-linux-x86_64/scrubr-00check.html
https://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-debian-gcc/scrubr-00check.html
The text was updated successfully, but these errors were encountered: