[Proj] Problem with inverse stereo projection
glynn at gclements.plus.com
Fri May 14 12:56:22 EST 2010
massimo costantini wrote:
> someone can tell me why if I set a center o stereo projection on lat 0.0 and
> lon 0.0 the inverse projection (stereo to geo), return always 0E 0N.
It works for a sphere, but not an ellipsoid.
The problem is that the setup function doesn't initialise all of the
values that it needs for the ellipsoid, inverse, equatorial case.
In the forward and spherical inverse cases, the equatorial case
(|phi0| < 1e-10) is a simplification of the oblique case, and requires
fewer parameters. However, for the ellipsoid inverse case (e_inverse),
the oblique calculation is used, but the setup function doesn't
initialise all of the parameters.
Modifying the setup() function in PJ_stere.c so that EQUIT and OBLIQ
use the same code should fix the problem.
--- PJ_stere.c 2001-02-07 17:55:05.000000000 +0000
+++ PJ_stere.c.tmp 2010-05-14 18:55:26.000000000 +0100
@@ -195,8 +195,6 @@
- P->akm1 = 2. * P->k0;
t = sin(P->phi0);
X = 2. * atan(ssfn_(P->phi0, t, P->e)) - HALFPI;
Glynn Clements <glynn at gclements.plus.com>
More information about the Proj