Skip to content

Reject zone zero when converting UTM grid coordinates - #183

Open
timothyanderson096-ocdealcheck wants to merge 1 commit into
GeoscienceAustralia:masterfrom
timothyanderson096-ocdealcheck:fix/reject-zero-inverse-utm-zone
Open

timothyanderson096-ocdealcheck wants to merge 1 commit into
GeoscienceAustralia:masterfrom
timothyanderson096-ocdealcheck:fix/reject-zero-inverse-utm-zone

Conversation

@timothyanderson096-ocdealcheck

Copy link
Copy Markdown

Fixes #178, reported by @BatchelorJ. On master, grid2geo(0, 500000, 0, "North") returned longitude −183°. The inverse UTM calculation requires a zone between 1 and 60. Reject zero using the existing invalid-zone error. Forward automatic zone selection and the ISG zone rules keep their current behaviour.

The new inverse regression failed on master and passed after the change. Five existing invalid-coordinate checks now use a valid zone so they still exercise the intended checks. All 74 project tests passed with the CI coverage command on Python 3.12. Independent checks covered 120 inverse UTM central-meridian conversions, 120 forward automatic-zone conversions, ten invalid inverse-zone cases, and eleven ISG controls.

Prepared and tested with OpenAI Codex.

Timothy Anderson · Spotted Ridge Engineering / OC Labs · GDN (Global Decision Network)
timothyanderson096@gmail.com · Engineering evidence

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.

Function grid2geo accepts Zone 0 as valid

1 participant