[OSRS-PROJ] Inverse function of a quadrant is wrong?
Alexander Weidauer
alex.weidauer at huckfinn.de
Wed Apr 9 04:47:58 PDT 2003
Hi Folks,
I have a probleem with inverse projection.
To test my API in terms of NAN results
use following code:
Writeln;
Writeln('-------------------------------------------------------------------');
Writeln(' Numeric vaidation test');
Writeln('-------------------------------------------------------------------');
Writeln('..open "+ellps=WGS72 +proj=stere +lon_0=0 +lat_0=0"');
Proj.Open('+ellps=WGS72 +proj=stere +lon_0=0 +lat_0=0');
Writeln('-------------------------------------------------------------------');
Writeln('srcX [deg] srcY [deg]: destX [m] destY[m] , backX [deg]
backY [deg]');
Writeln('-------------------------------------------------------------------');
Calc(-180,-180);
Calc(-135, -135);
Calc( -90, -90);
Calc( -45, -45);
Calc( 0, 0);
Calc( 45, 45);
Calc( 90, 90);
Calc( 135, 135);
Calc( 180, 180);
Calc(-180, 180);
Calc( -90, 90);
Calc( -45, 45);
Calc( 45, -45);
Calc( 90, -90);
Calc( 135,-135);
Calc( 180,-180);
Writeln;
and got a strage response:
..open "+ellps=WGS72 +proj=stere +lon_0=0 +lat_0=0"
-------------------------------------------------------------------
srcX [deg] srcY [deg]: destX [m] destY[m] , backX [deg] backY [deg]
-------------------------------------------------------------------
-180 dg -180 dg : INF m INF m : no solution
-135 dg -135 dg : INF m INF m : no solution
-90 dg -90 dg : 0.00 m -25512540.00 m : 0.00 deg 0.00 deg
-45 dg -45 dg : -8523156.44 m -11972917.88 m : 0.00 deg 0.00 deg
0 dg 0 dg : 0.00 m 0.00 m : 0.00 deg 0.00 deg
45 dg 45 dg : 8523156.44 m 11972917.88 m : 0.00 deg 0.00 deg
90 dg 90 dg : 0.00 m 25512540.00 m : 0.00 deg 0.00 deg
135 dg 135 dg : INF m INF m : no solution
180 dg 180 dg : INF m INF m : no solution
-180 dg 180 dg : INF m INF m : no solution
-90 dg 90 dg : 0.00 m 25512540.00 m : 0.00 deg 0.00 deg
-45 dg 45 dg : -8523156.44 m 11972917.88 m : 0.00 deg 0.00 deg
45 dg -45 dg : 8523156.44 m -11972917.88 m : 0.00 deg 0.00 deg
90 dg -90 dg : 0.00 m -25512540.00 m : 0.00 deg 0.00 deg
135 dg -135 dg : INF m INF m : no solution
180 dg -180 dg : INF m INF m : no solution
-------------------------------------------------------------------
So I test it in the origianl proj tool
[~ !] proj +ellps=WGS72 +proj=stere +lon_0=0 +lat_0=0
90 90
0.00 25512540.00
-90 -90
-0.00 -25512540.00
0 90
0.00 25512540.00
90 0
25512540.00 -0.00
0 0
0.00 -0.00
If use this pairs in the inverse function I go this
[~ !] invproj +ellps=WGS72 +proj=stere +lon_0=0 +lat_0=0
0.00 25512540.00
0dE 0dS
-0.00 -25512540.00
0dE 0dS
0.00 25512540.00
0dE 0dS
0.00 -0.00
0dE 0dS
what is wrong ?
If I use an other projection every thing is fine
..open "+ellps=WGS72 +proj=merc +lon_0=0 +lat_0=0"
-------------------------------------------------------------------
srcX [deg] srcY [deg]: destX [m] destY[m] , backX [deg] backY [deg]
-------------------------------------------------------------------
-180 dg -180 dg : INF m INF m : no solution
-135 dg -135 dg : INF m INF m : no solution
-90 dg -90 dg : INF m INF m : no solution
-45 dg -45 dg : -5009375.51 m -5591294.45 m : -45.00 deg -45.00 deg
0 dg 0 dg : 0.00 m 0.00 m : 0.00 deg 0.00 deg
45 dg 45 dg : 5009375.51 m 5591294.45 m : 45.00 deg 45.00 deg
90 dg 90 dg : INF m INF m : no solution
135 dg 135 dg : INF m INF m : no solution
180 dg 180 dg : INF m INF m : no solution
-180 dg 180 dg : INF m INF m : no solution
-90 dg 90 dg : INF m INF m : no solution
-45 dg 45 dg : -5009375.51 m 5591294.45 m : -45.00 deg 45.00 deg
45 dg -45 dg : 5009375.51 m -5591294.45 m : 45.00 deg -45.00 deg
90 dg -90 dg : INF m INF m : no solution
135 dg -135 dg : INF m INF m : no solution
180 dg -180 dg : INF m INF m : no solution
-------------------------------------------------------------------
----------------------------------------
PROJ.4 Discussion List
See http://www.remotesensing.org/proj for subscription, unsubscription
and other information.
More information about the Proj
mailing list