/ PROJ Public

# Equations for meridian convergence and partial derivatives reviewed (corrected)#526

Closed
opened this issue Jun 20, 2017 · 1 comment
Closed

# Equations for meridian convergence and partial derivatives reviewed (corrected) #526

opened this issue Jun 20, 2017 · 1 comment
Projects

### dtutic commented Jun 20, 2017 • edited

 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:
added a commit to kbevers/PROJ that referenced this issue Jun 21, 2017
``` Correct calculation of meridian convergence for non-conformal project… ```
``` 1e8e527 ```
`…ions. Fixes OSGeo#526.`
mentioned this issue Jun 21, 2017

### kbevers commented 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.

added this to the 4.9.4 milestone Jul 5, 2017
added this to Enhancements in 2017 release Jul 5, 2017
removed this from the 4.9.4 milestone Jul 5, 2017
moved this from Enhancements to Done in 2017 release Jul 6, 2017
mentioned this issue Jul 31, 2018