You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have found strange results for meridian convergence in non-conformal projections. As we know from map projection books (with Gauss-Bomford convention for convergence), meridian convergence should be calculated by formula fac->conv = - atan2(fac->der.x_p , fac->der.y_p).
Current formula used in Proj4 is fac->conv = - atan2(fac->der.y_l , fac->der.x_l), which can be useful only for conformal projections (due to Cauchy-Riemann equations), and in fact should be without minus sign, i.e. fac->conv = atan2(fac->der.y_l , fac->der.x_l). For non-conformal projections we now get angle between parallel and x-axis, instead of meridian convergence.
Minus sign currently used in formula comes from fact that fac->der.x_p and fac->der.y_l are calculated with opposite signs.
Line 72
instead of:
fac->conv = - atan2(fac->der.y_l, fac->der.x_l);
should be: fac->conv = - atan2(fac->der.x_p, fac->der.y_p);
One can question the practical use of meridian convergence in non-conformal projections, but nevertheless, it would be nice to have it calculated correctly.
The text was updated successfully, but these errors were encountered:
kbevers
added a commit
to kbevers/PROJ
that referenced
this issue
Jun 21, 2017
I am not able to comment on the details of this without researching a bit first, but at least it sounds sensible.
I have created a pull request with your changes in #527. I have reformatted the code as well. Please check that the changes are equivalent to your suggestion.
I have found strange results for meridian convergence in non-conformal projections. As we know from map projection books (with Gauss-Bomford convention for convergence), meridian convergence should be calculated by formula fac->conv = - atan2(fac->der.x_p , fac->der.y_p).
Current formula used in Proj4 is fac->conv = - atan2(fac->der.y_l , fac->der.x_l), which can be useful only for conformal projections (due to Cauchy-Riemann equations), and in fact should be without minus sign, i.e. fac->conv = atan2(fac->der.y_l , fac->der.x_l). For non-conformal projections we now get angle between parallel and x-axis, instead of meridian convergence.
Minus sign currently used in formula comes from fact that fac->der.x_p and fac->der.y_l are calculated with opposite signs.
Corrected equations are:
File: pj_deriv.c
Line 14
instead of:
der->x_l = t.x; der->y_p = t.y; der->x_p = -t.x; der->y_l = -t.y;
should be:
der->x_l = t.x; der->y_p = t.y; der->x_p = t.x; der->y_l = t.y;
Line 19
instead of:
der->x_l += t.x; der->y_p -= t.y; der->x_p += t.x; der->y_l -= t.y;
should be:
der->x_l += t.x; der->y_p -= t.y; der->x_p -= t.x; der->y_l += t.y;
Line 23
instead of:
der->x_l -= t.x; der->y_p -= t.y; der->x_p += t.x; der->y_l += t.y;
should be:
der->x_l -= t.x; der->y_p -= t.y; der->x_p -= t.x; der->y_l -= t.y;
Line 27
instead of:
der->x_l -= t.x; der->y_p += t.y; der->x_p -= t.x; der->y_l += t.y;
should be:
der->x_l -= t.x; der->y_p += t.y; der->x_p += t.x; der->y_l -= t.y;
File: pj_factors.c
Line 72
instead of:
fac->conv = - atan2(fac->der.y_l, fac->der.x_l);
should be:
fac->conv = - atan2(fac->der.x_p, fac->der.y_p);
One can question the practical use of meridian convergence in non-conformal projections, but nevertheless, it would be nice to have it calculated correctly.
The text was updated successfully, but these errors were encountered: