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
spherical tmerc with negative northing gives inverted latitude #138
Comments
Comment by dstahlke on 24 Jan 2012 00:31 UTC |
Comment by warmerdam on 3 Mar 2012 22:29 UTC |
Modified by warmerdam on 3 Mar 2012 22:29 UTC |
Reported by dstahlke on 20 Jan 2012 20:32 UTC
It would seem the coordinate (0,-1) would give a result close to (lon_0,lat_0). However, the latitude is inverted in the case where northing is negative and the globe is spherical. If I make the globe elliptical, then it works fine.
I believe the problem is related to line 126 of PJ_tmerc.c where the test "xy.y < 0" is done. I don't know enough about proj.4 to give a proper fix.
As a workaround, the spherical function can be disabled and the elliptical version used always. On line 139 of PJ_tmerc.c, change "if(P->es)" to "if(1 || P->es)".
Migrated-From: https://trac.osgeo.org/proj/ticket/138
The text was updated successfully, but these errors were encountered: