Skip to content

ortho: fix ellipsoidal inverse initial guess when alpha or k is set - #4916

Open
birkskyum wants to merge 1 commit into
OSGeo:masterfrom
birkskyum:ortho-inverse-alpha
Open

birkskyum wants to merge 1 commit into
OSGeo:masterfrom
birkskyum:ortho-inverse-alpha

Conversation

@birkskyum

Copy link
Copy Markdown

+proj=ortho with +alpha (Local Orthographic, like EPSG:10622) doesn't round-trip far from the centre. With the EPSG:10622 parameters, 60°W 30°S comes back as 58.82°W 31.02°S, ~160 km away on the hidden side of the globe. The oblique ellipsoidal inverse removes alpha and k, then seeds its Newton iteration with ortho_s_inverse, which removes them a second time. Near the centre Newton still finds the right point, but far from it the iteration can land on the wrong one or not converge. This has been there since alpha and k were added in 9.5.0.

This PR moves the spherical inverse math into a helper that takes the corrected coordinates, used by both ortho_s_inverse and the initial guess. The spherical inverse itself is unchanged.

  • AI (Copilot or something similar) supported my development of this PR. See our policy about AI tool use. Use of AI tools must be indicated. (Claude Opus 5.5)
  • Tests added
  • Added clear title that can be used to generate release notes

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant