-
Notifications
You must be signed in to change notification settings - Fork 786
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correct calculation of meridian convergence for non-conformal projections #527
Conversation
…ld coding style and mixed whitespace.
src/pj_factors.c
Outdated
@@ -72,7 +72,7 @@ int pj_factors(LP lp, PJ *P, double h, struct FACTORS *fac) { | |||
|
|||
/* convergence */ | |||
if (!(fac->code & IS_ANAL_CONV)) { | |||
fac->conv = - atan2(fac->der.y_l, fac->der.x_l); | |||
fac->conv = - atan2(fac->der.x_p, fac->der.y_p); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why I'm looking at that as I've absolutely no background on this :-) , but this change looks surprising since atan2 arguments are documented to be in y,x order.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My knowledge on this is also limited, just wanted to test it out. @dtutic can you elaborate a bit on this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please find attached the discussion and equations for meridian convergence.
Meridian convergence in map projections.pdf
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I think I get it now. I guess this implies a change in convention? Are the old an new calculations equivalent for conformal projections? In that case I think it is safe to merge. If not, we should consider adding this as a seperate derivative measure of coordinates.
Did you write this your self? Can we include it in the documentation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I write it myself with a help of colleague who is a mathematician. You can include it in documentation, but it can be shortened or expanded depending on the purpose of documentation. The definition of meridian convergence is taken from [https://www.ngs.noaa.gov/CORS/Articles/SolerFuryASCE.pdf] , which is again taken from Geodetic Glossary by National Geodetic Survey (U.S.). The derivation of equations is an application of mathematical analysis, and it can be written in even simpler form.
The convention is the same (positive when meridian is west of grid north) , and calculations are same for conformal projections because the partial derivatives are also corrected to all have same sign convention which was not the case before, and was a reason for extra minus in previous formula.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Both for taking time to explain and for letting us use your text in the docs.
I am now convinced that this is a good idea to merge. I would like a second opinion though, just to be on the safe side. @busstoptaktik, @cffk ? |
My preferred "definition" of meridian convergence is that it is the |
Equation for meridian convergence in LCC projection seems to give correct sign only when standard parallels are on south hemisphere. I guess that the reason is that Q->n is always positive between 0 and 1 (ratio of angle between meridians in projection and on sphere/ellipsoid). It is now calculated in PJ_lcc.c with: It should change sign depending on standard parallels, easy to see when changing standard parallel on this animation (http://www.kartografija.hr/tl_files/konusne_final_en.xml). I will try to figure it out. There is already and issue reporting this problem https://github.com/OSGeo/proj.4/issues/16 |
@dtutic have you had a chance to look at the meridian convergence problem in LCC? |
Not yet. Hope to do it by end of the next week.
…________________________________
From: Kristian Evers <notifications@github.com>
Sent: Wednesday, July 5, 2017 11:24
To: OSGeo/proj.4
Cc: Dražen Tutić; Mention
Subject: Re: [OSGeo/proj.4] Correct calculation of meridian convergence for non-conformal projections (#527)
@dtutic<https://github.com/dtutic> have you had a chance to look at the meridian convergence problem in LCC?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#527 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AP5MuPW5tF5gXYwaJTD44tr0MUD-wUMOks5sK1ZcgaJpZM4OAqt2>.
|
Okay, then I'll merge this one now. You are welcome to add your findings to the existing ticket (#16) when you've had a closer look. Thanks for your help. |
Resolves #526