-
Notifications
You must be signed in to change notification settings - Fork 749
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
proj_factors(): accept P to be a projected CRS (fixes #2854) #2868
Conversation
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 have no objections to this - as I have stated in the discussion in #2854 I believe the code "as is" is not broken; I do, however recognize the use cases presented by the participants in the discussion, and laid out especially clearly by @snowman2, so I think this patch holds merit and am happy to endorse it, and hope it fulfills the needs of the intended audience, although it is not entirely clear to me whether this will be the case: The fixed lp.lam/lp.phi interpretation of the input may be a problem - I cannot comment on that: To me at least, this looks good!
yeah I was unsure about the best approach for that. I'm afraid there's no clear winner. I also considered the option to use the axis unit and order of the base geographic CRS of the projected CRS, as expected with proj_trans(). |
Yes - over in https://github.com/busstoptaktik/geodesy I try a different approach, by simply calling the coordinates "first, second, third and fourth", i.e. the v[4] solution, and proclaiming that internally all operators work in "gis" order with radians for angular units, then having " I think it's fine to merge this, but perhaps @snowman2 or @ojwb would have an opinion on this? |
Thanks for working on this. How the coordinates are specified here probably makes it simpler for my existing code, but I can certainly see the point that it's not entirely consistent with the modern PROJ approach. It's clearly and explicitly documented here at least. I'll aim to find time to try it out over the weekend and see if I have any feedback in the light of actually trying to use it. |
Updated doc: Starting with PROJ 8.2, the P object can be a projected CRS, for example instantiated from a EPSG CRS code. The factors computed will be those of the map projection implied by the transformation from the base geographic CRS of the projected CRS to the projected CRS. The input geodetic coordinate lp should be such that lp.lam is the longitude in radian, and lp.phi the latitude in radian (thus independently of the definition of the base CRS, if P is a projected CRS).
14c52df
to
47b9629
Compare
I've now tested and this branch does indeed solve my problem with getting convergence values from PROJ, so thanks for that. I don't think I really have any further useful insights about the coordinate order and units. They seems OK from my code, though that was written already. |
Updated doc:
CC @busstoptaktik