MGRS squares touching the antimeridian read: the zone check compares longitudes unwrapped

This commit is contained in:
Sameh Khamis committed 2026-11-15 09:50:44 -08:00
1 parent 262de71fec
commit 6a4202242d
2 files changed
+8 -1

No files matched your search

+3
View File
@@ -257,6 +257,9 @@ test('MGRS squares across a zone edge, Norway and Svalbard', () => {
assert.ok(parseGridReference('33X VG 12345 67890'));
// A square that lands outside its zone's longitudes.
assert.equal(parseGridReference('18T SL 50000 50000'), null);
// Squares touching the antimeridian, from either side.
for (const text of ['1HBD1970044714', '60TYQ364873', '1QAC860142'])
assert.ok(parseGridReference(text), text);
});
test('a UTM N is the northern hemisphere where band N does not fit', () => {