-
Notifications
You must be signed in to change notification settings - Fork 751
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
Option +over broken in PROJ 7.2 #2510
Comments
Quite likely this is related to #941. If so, it is not a bug, rather a bug that was fixed. Why do you need |
This was a test simplified to a single coordinate. Sure, I will get the correct result I want when I remove +over for this test, but I have not gotten into our bigger tests yet which include polygon and raster data in longitude range 0...360, which is common for global weather models. Even if our remaining tests work too, this could still break somebody else's code. +over should not change the expected result of 20 degrees to radians, and do something more complicated for the latitude. As such I do not quite see how this could be related to ticket #941 you mentioned. |
I mentioned that ticket since the +over behaviour changed from 4 to 5. You are making quiting a jump from 4.8.0 to 7.2, this was first on the list of likely issues. I agree that it probably isn't what's wrong here. As you may be aware of, PROJ 7 is an entirely different beast than PROJ.4 and one of the big differences is the way transformations are instantiated. The PROJ.4 way of using projstrings as CRS definitions is now deprecated and should be avoided where possible. Use EPSG-codes or WKT2 descriptions instead if at all possible. By "modernizing" your projstrings a bit I can at least get around the radian issue:
In the above I've removed To explain what's wrong with the latitude we can investigate the transformation with
From the resulting pipeline we can see that the input coordinate is not transformed to radians before being passed to
The problem here is that Depending on your use case and surrounding setup we may be able to come up with a work around. |
Fix handling of +proj=ob_tran +o_proj=longlat combined with +over (fixes #2510)
Example of problem
The following command line converts between normal and rotated longlat coordinates, and works fine with PROJ 4.8, the result is the configured location of the south pole:
However, with PROJ 7.2 one gets the expected result only by removing the +over option:
The unexpected result seems to have the longitude in radians, but the latitude is broken in some more complicated way.
Environment Information
The text was updated successfully, but these errors were encountered: