-
Notifications
You must be signed in to change notification settings - Fork 803
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
How to correctly handle coordinates in gradians in GIGS 5102.2 #3800
Comments
Something doesn't look quite right. The GIGS gie files are quite old and haven't really been updated to the more modern ways of PROJ, so I'm not sure they are the best starting point here. Trying the conversion using
If we inspect the transformation we get the following pipeline, which indeed does include the gradian to radian conversion but I suspect it isn't applied correctly for some reason.
A simple unit conversion confirms that something is fishy:
I'm not entirely sure what's going on here, since it seems there are situations where the gradinan->radian conversion works (e.g. the original example) and others were it doesn't. |
Yes. I'm also aware of this The simple unit conversion works when specifying > echo 64.44444444 2.9586342556 0 0 | cct +proj=unitconvert +xy_in=grad +xy_out=rad
57.9999999960 2.6627708300 0.0000 0.0000 |
That's simply me mistyping and should be disregarded. Good catch! |
fix in #3878 |
cs2cs: fix handling of input coordinates in grad (fixes #3800)
[Backport 9.3] cs2cs: fix handling of input coordinates in grad (fixes #3800)
I recently investigated some issues related to coordinate transformations between EPSG:4807 and EPSG:27572 and noticed that the GIGS test
5102.2.gie.failing
is failing. For example, the following projection gives750546.04 4202212.53
, while the expected result is760724.023 3457334.864
:After doing some investigations I found that the EPSG:4807 coordinates in the GIGS tests are in gradians, while proj interprets input coordinates as degrees. Adding a
unitconvert
to the pipeline made proj produce the expected result:Then we can make the test pass by inserting
unitconvert
to all the gie operations.gie ./5102.2.gie.failing ------------------------------------------------------------------------------- Reading file './5102.2.gie.failing' ------------------------------------------------------------------------------- total: 57 tests succeeded, 0 tests skipped, 0 tests failed. -------------------------------------------------------------------------------
Is this a correct fix, or how to handle grads coordinates correctly in proj? This manual unit conversion looks weird since EPSG:4807 coordinates were supposed to be in grads.
The text was updated successfully, but these errors were encountered: