{{ message }}
Repository navigation
Commit e79dbaf
Fix Oblique Mercator natural-origin offset to use the central-line azimuth (#130)
The natural-origin (uc) offset was computed from the rectified bearing
(Gamma) via cosrot, but Snyder's Hotine Oblique Mercator defines it with
the central-line azimuth (alpha):
u_c = (A / B) * atan(sqrt(D^2 - 1) / cos(alpha_c))
When Gamma equals alpha the two agree, which is why this went unnoticed.
For definitions where the rectified bearing differs from the azimuth --
notably the ESRI "Local" / mine-grid convention of an explicit +gamma=0
with a non-zero azimuth -- the projection centre was displaced along the
central line (e.g. ~2.5 km), so the false easting/northing no longer
landed on the centre.
Use cos(alpha) for the offset. This is a no-op when Gamma == alpha and
matches PROJ output when Gamma != alpha.
Adds a regression test (Proj4VariousTest#testObliqueMercatorExplicitGamma)
covering +gamma=0 with a non-zero azimuth, with reference coordinates
computed by PROJ.
Signed-off-by: Sergei Malyshko <sergei.malyshko@navvis.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 463bad3 commit e79dbaf
3 files changed
Lines changed: 21 additions & 1 deletion
File tree
- core/src
- main/java/org/locationtech/proj4j/proj
- test/java/org/locationtech/proj4j
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
161 | 165 | | |
162 | | - | |
| 166 | + | |
163 | 167 | | |
164 | 168 | | |
165 | 169 | | |
| |||

0 commit comments