Skip to content
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

Include computation of scale factor (k) and convergence angle (γ) #90

Open
yongjun21 opened this issue Aug 18, 2022 · 1 comment
Open

Comments

@yongjun21
Copy link

yongjun21 commented Aug 18, 2022

I used this library not for lat/lon to UTM x/y conversion but for deriving the transformation from UTM x/y offset to Web Mercator x/y offset from a ref point.

Current process involves

  1. converting 3 nearby points in UTM to lat/lon then
  2. calculating the Web Mercator meter offsets of the 3 transformed points then
  3. solving the linear equations to get the transformation that maps UTM offsets (from a ref point) to Web Mercator offsets
  4. the result is only an approximation since it relies on solving the transformation from the empirical values of 3 transformed points

After digging into the theory behind UTM, I realize this can be done more simply and accurately but computing the convergence angle and scale factor for the ref point: https://en.wikipedia.org/wiki/Transverse_Mercator_projection#convergence.

Like most other UTM libs, this does not include functions to compute k and γ but is probably not hard to extend since most of the logic for computing preliminary and intermediate values are already inside.

If maintainer is not able to commit time, I might be able to create a PR for this

@bartvanandel
Copy link
Collaborator

For completeness, Wikipedia links for both formulas:

If you're still interested, a PR would be nice!

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

No branches or pull requests

2 participants