-
Notifications
You must be signed in to change notification settings - Fork 773
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
peirce_q - proj string to WKT convertion not working for all +shapes #3056
Labels
Comments
rouault
added a commit
to rouault/PROJ
that referenced
this issue
Feb 14, 2022
… from square or diamond. Follow-up of OSGeo#3014. Fixes OSGeo#3056. master only
This would be invalid WKT. The BNF of the WKT CRS spec mandates per http://docs.opengeospatial.org/is/18-010r7/18-010r7.html#77 that the parameter value is numeric. With #3057, we'll get the generic PROJ WKT form when there's no known (most EPSG driven) official WKT:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Not all peirce_q methods seem to be convertible to (or findable in) pseudo-WKT2 form from proj string.
Noticed this issue while attempting to test
peirce_q
from current post-8.2.1 HEAD/master branch with external software which uses PROJ (R-spatial/sf and Rspatial/rgdal).*Creating CRS using a proj string using
+shape=horizontal
,+shape=vertical
,+shape=shemisphere
silently returns METHOD["Peirce Quincuncial (Square)"]. cf. r-spatial/sf#1904 *For example, run in R, this seems ok-
But this is not correct (and identical to above), as it assumes horizontal is the same as square:-
Good news
+shape=diamond
works as expected.Problem description
This effect is problematic when using external tools which are increasingly converting proj strings to WKT format before accessing further proj/gdal tools/api, as there is no way to specify the other methods (afaik).
Suspect this is caused by a call to API
proj_create
using the proj string from rgdal and it is PROJ'sproj_create
which returns the faulty WKT2 conversion (maybe a test for "diamond" and then otherwise assigns "square") but not tracked down where.The current convertion to WKT was primarily to allow matching of square and diamond to ESRI's equivalent methods (introduced during other fixes: peirce_q: rename +type parameter wrongly introduced in 8.2.1 to +shape (fixes #3011) #3014 ), but it seems a pity to restrict only to ESRI options. It also makes it harder to access alternative projections such as Grieger Triptychial, which are based on peirce_q.
Expected Output
IMHO:-
+shape
should be passable directly within proj's WKT (and generated), using suitable a PARAMETER declaration. Then METHOD would be simply be ["Peirce Quincuncial"] for all.+shape=square
/METHOD["Peirce Quincuncial (Square)"]
e.g. Something along lines of:-
Would be happy to contribute again with guidance, just unclear exactly how best to do so!
Environment Information (fwiw)
proj
) - current HEAD (reports as 8.2.0, but is actually post-8.2.1)Installation method (fwiw)
brew install proj --head --build-from-source
etc.)The text was updated successfully, but these errors were encountered: