diff options
| -rw-r--r-- | ChangeLog | 7 | ||||
| -rw-r--r-- | src/PJ_krovak.c | 15 |
2 files changed, 22 insertions, 0 deletions
@@ -1,3 +1,10 @@ +2006-09-14 Frank Warmerdam <warmerdam@pobox.com> + + * src/PJ_krovak.c: Add +czech flag to apply non-useful sign reversal + that someone once apparently thought was a good idea. By default work + like folks want. Contributed by Martin Landa and Radim Blazek. + Bug 1133, and 147. + 2006-07-07 Frank Warmerdam <warmerdam@pobox.com> * Added esri.extra and other.extra to distributed and installed files diff --git a/src/PJ_krovak.c b/src/PJ_krovak.c index 0bffe188..8cdbda1f 100644 --- a/src/PJ_krovak.c +++ b/src/PJ_krovak.c @@ -30,6 +30,9 @@ ****************************************************************************** * * $Log$ + * Revision 1.6 2006/09/14 13:10:50 fwarmerdam + * Add +czech flag to control reversal of signs (bug 1133,147) + * * Revision 1.5 2006/03/30 01:22:48 fwarmerdam * Removed win32 only debug hack. * @@ -139,6 +142,12 @@ FORWARD(s_forward); /* spheroid */ xy.y = ro * cos(eps) / a; xy.x = ro * sin(eps) / a; + if( !pj_param(P -> params, "tczech").i ) + { + xy.y *= -1.0; + xy.x *= -1.0; + } + return (xy); } @@ -188,6 +197,12 @@ INVERSE(s_inverse); /* spheroid */ xy.x=xy.y; xy.y=xy0; + if( !pj_param(P -> params, "tczech").i ) + { + xy.x *= -1.0; + xy.y *= -1.0; + } + ro = sqrt(xy.x * xy.x + xy.y * xy.y); eps = atan2(xy.y, xy.x); d = eps / sin(s0); |
