Skip to content

Fix/utm zone 60 boundary - #176

Open
timothyanderson096-ocdealcheck wants to merge 2 commits into
GeoscienceAustralia:masterfrom
timothyanderson096-ocdealcheck:fix/utm-zone-60-boundary
Open

timothyanderson096-ocdealcheck wants to merge 2 commits into
GeoscienceAustralia:masterfrom
timothyanderson096-ocdealcheck:fix/utm-zone-60-boundary

Conversation

@timothyanderson096-ocdealcheck

Copy link
Copy Markdown

Problem
geo2grid() can select UTM zone 61 at +180 degrees longitude and immediately below it due to floating-point rounding. UTM has only zones 1–60. grid2geo() rejects the resulting invalid zone.
Scoped correction
Clamp only the automatically computed zone to 60 at the upper boundary. Preserve the conventional -180 -> zone 1 and +180 -> zone 60 assignments, explicit zone selection, longitude validation, and ISG behaviour. No change to the separate vincdir() fix in #174 or decimal-year support in #175.
Tests and evidence

  • Original code: 16 regression cases failed; 29 passed.
  • Corrected code: 119/119 passed (74 existing + 45 regression cases).
  • Verified GitHub Actions: https://github.com/timothyanderson096-ocdealcheck/GeodePy/actions/runs/39535947460
  • Independent PROJ comparison: 36 latitude/longitude cases across both boundary representations agreed within 0.000152 metres.
  • 2,000 additional ordinary-location zone-consistency checks passed locally.
    Numerical tests do not prove physical positioning accuracy. Boundary representation is offered for maintainer review.

Prepared by Tim Anderson / OC Labs with AI-assisted testing.

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