-
Notifications
You must be signed in to change notification settings - Fork 299
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
PROJ 6.3.0 dropping ellps in P4 string #1231
Comments
Problem reduced to one of finding out which environment/settings knitr is using in building the PROJ6_GDAL3.Rmd vignette. Failing chunks succeed when run manually in RStudio and in the R console (inside and outside RStudio), but fail with |
Test notebook, fails at critical points (renamed *.txt, move back to *.Rmd): |
Snippet failing:
|
Perhaps resolved with rev 910, declaring |
Not resolved, CMD check passing but |
Now failing vignette builds for |
Rev 914 checks for PROJ < 6.3.0 and branches in vignette line 847 to avoid trying to rebuild the CRS from the broken PROJ string; in spTransform the grid example for scot_BNG does the same on line 144. |
Rev 915 reverts the branching in 914 on >= 6.3.0, by intervening earlier. If the PROJ string is missing |
I'll build a docker image with these GDAL/PROJ versions, and will check with sf. |
Ok, thanks. I think it is about not handling or freeing OGRSpatialReference
right, and some change in proj makes the datum node vanish.
Roger Bivand
Falsensvei 32
5063 Bergen
ons. 1. jan. 2020, 20.14 skrev Edzer Pebesma <[email protected]>:
… I'll build a docker image with these GDAL/PROJ versions, and will check
with sf.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1231?email_source=notifications&email_token=ACNZ3BGEZOF4Q3GYZELB463Q3TTQLA5CNFSM4KBWKGWKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEH5K2GA#issuecomment-570076440>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACNZ3BC73GGPFGOTOXHX2R3Q3TTQLANCNFSM4KBWKGWA>
.
|
First results: with library(sf)
# Linking to GEOS 3.8.0, GDAL 3.1.0dev-bb67ec3, PROJ 6.3.0 the following breaks now: library(sf)
p1 = st_point(c(7,52))
p2 = st_point(c(-30,20))
sfc = st_sfc(p1, p2, crs = 4326)
st_transform(sfc, "+init=epsg:3857") with
The following does NOT break: library(sf)
p1 = st_point(c(7,52))
p2 = st_point(c(-30,20))
sfc = st_sfc(p1, p2, crs = 4326)
try(st_transform(sfc, "+init=epsg:3857"))
st_transform(sfc, 3857) but in the following, the LAST command now breaks too: library(sf)
p1 = st_point(c(7,52))
p2 = st_point(c(-30,20))
sfc = st_sfc(p1, p2, crs = 4326)
try(st_transform(sfc, "+init=epsg:3857"))
st_transform(sfc, 3857) valgrind gives strange memory errors, the whole thing smells fishy. |
Thanks, now whack a fish after whack a mole? Is it replicable in C++? To
get Even to look, that would help, but my attempt in the proj list thread
wasn't successful.
Roger Bivand
Falsensvei 32
5063 Bergen
ons. 1. jan. 2020, 22.14 skrev Edzer Pebesma <[email protected]>:
… First results: with
library(sf)# Linking to GEOS 3.8.0, GDAL 3.1.0dev-bb67ec3, PROJ 6.3.0
the following breaks now:
library(sf)p1 = st_point(c(7,52))p2 = st_point(c(-30,20))sfc = st_sfc(p1, p2, crs = 4326)
st_transform(sfc, "+init=epsg:3857")
with
Error in CPL_transform(x, crs$proj4string) :
OGRCreateCoordinateTransformation() returned NULL: PROJ available?
In addition: Warning messages:
1: In CPL_crs_from_proj4string(x) :
GDAL Message 1: +init=epsg:XXXX syntax is deprecated. It might return a CRS with a non-EPSG compliant axis order.
2: In CPL_transform(x, crs$proj4string) :
GDAL Error 1: PROJ: proj_create_operations: At least one of the operation lacks a source and/or target CRS
3: In CPL_transform(x, crs$proj4string) :
GDAL Error 6: Cannot find coordinate operations from `GEOGCRS["unknown",DATUM["World Geodetic System 1984",ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ID["EPSG",6326]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8901]],CS[ellipsoidal,2],AXIS["longitude",east,ORDER[1],ANGLEUNIT["degree",0.0174532925199433,ID["EPSG",9122]]],AXIS["latitude",north,ORDER[2],ANGLEUNIT["degree",0.0174532925199433,ID["EPSG",9122]]]]' to `PROJCRS["WGS 84 / Pseudo-Mercator",BASEGEOGCRS["WGS 84",DATUM["World Geodetic System 1984",ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",4326]],CONVERSION["unnamed",METHOD["Popular Visualisation Pseudo Mercator",ID["EPSG",1024]],PARAMETER["Latitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8801]],PARAMETER["Longitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["False eastin [... truncated]
The following does NOT break:
library(sf)p1 = st_point(c(7,52))p2 = st_point(c(-30,20))sfc = st_sfc(p1, p2, crs = 4326)
try(st_transform(sfc, "+init=epsg:3857"))
st_transform(sfc, 3857)
but in the following, the LAST command now breaks too:
library(sf)p1 = st_point(c(7,52))p2 = st_point(c(-30,20))sfc = st_sfc(p1, p2, crs = 4326)
try(st_transform(sfc, "+init=epsg:3857"))
st_transform(sfc, 3857)
valgrind gives strange memory errors, the whole thing smells fishy.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1231?email_source=notifications&email_token=ACNZ3BFJSFLRC4GIYXKJA4TQ3UBULA5CNFSM4KBWKGWKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEH5MV7A#issuecomment-570084092>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACNZ3BFNBLR73BG2J3BWIU3Q3UBULANCNFSM4KBWKGWA>
.
|
No: I see root@f2b1ca036605:/# echo "151.2093 -33" | cs2cs "+proj=longlat +datum=WGS84 +no_defs" "+init=epsg:3857"
16832542.28 -3895303.96 0.00
root@f2b1ca036605:/# echo "151.2093 -33" | cs2cs "+proj=longlat +datum=WGS84 +no_defs" "+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs"
16832542.28 -3895303.96 0.00 |
Right, staying just on the PROJ side seems consistent, I think. But when
GDAL gets involved, I think odder things start seeming to appear that
weren't there with 6.2.1.
Roger Bivand
Falsensvei 32
5063 Bergen
ons. 1. jan. 2020, 22.39 skrev Edzer Pebesma <[email protected]>:
… No: I see
***@***.***:/# echo "151.2093 -33" | cs2cs "+proj=longlat +datum=WGS84 +no_defs" "+init=epsg:3857"
16832542.28 -3895303.96 0.00
***@***.***:/# echo "151.2093 -33" | cs2cs "+proj=longlat +datum=WGS84 +no_defs" "+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m ***@***.*** +wktext +no_defs"
16832542.28 -3895303.96 0.00
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1231?email_source=notifications&email_token=ACNZ3BELGCZVSO6CA2HYMOTQ3UEP3A5CNFSM4KBWKGWKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEH5NBVI#issuecomment-570085589>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACNZ3BEEP5CFSNVJ5NU6W4TQ3UEP3ANCNFSM4KBWKGWA>
.
|
On your script (posted above) I see:
(now building a container with GDAL from git & PROJ 6.2.0) |
Done changing all rgdal OGRSpatialReference declarations to pointers, committed at rev 918. Don't see any changes so far but need to check properly.
|
Rev 919 to catch a missed ./-> change in GDAL 2 code found on R-Forge. |
With sf master I can replicate with PROJ 6.3.0 and GDAL 3.1 master:
|
With sf master and GDAL 3.0.3 and PROJ 6.3.0 released, the problem I saw above no longer happens. I hope that means it's fixed! |
Now +towgs84= ? #1328 |
Hi I am encountering the same error. following change of GDAL version 2.4.2 from ( I think) 2.2.x on ubuntu 18.04, current cran verions of rgdal(1.4-8), and sf(0.9-2)
from Edzer's commnet above if I update GDAL and proj 4 ( not sure how to acheive the latter) then the issue is fixed? is this correct? thanks |
Not sure it belongs here, but similar issues were raised in the history of the issue. Happy to post in the correct one. Having trouble too, but I am on GEOS 3.8.1, GDAL 3.0.4, PROJ 7.0.0. (I am, however, using In short, I am trying to Modifying the example in
And get this error message:
FWIW, when I explicitly include the entire proj4string, it does work. Relevant info here:
|
@jcvdav your problem is different. To specify CRS using the ESRI code, you should use: st_transform(sfc, 'ESRI:54009') |
Ah, that makes sense. Sorry about that. This used to work before, but this time I was running it on a new machine, so I assumed it had to do with how I had set up and linked GDAL or PROJ. Was this a recent change in |
No, in PROJ. |
More #1187 fun.
See https://lists.osgeo.org/pipermail/proj/2019-December/009166.html. Even seems to think that the OGRSpatialReference object may be subject to short-term volatility. rgdal functions
P6_SRID_show()
andogrP4S()
affected. All works fine in PROJ 6.2.1, for EPSG:27700+ellps=
and+units=
omitted inexportToProj4()
. I tried to check sf but don't know which branch I'm checking, there is an error in R check. Hope PRØJ gives us a break in 2020.The text was updated successfully, but these errors were encountered: