Closed pjobson closed 5 years ago
Hi, @pjobson . A new maintainer here. Thank you for bringing this to our attention. mgrs takes input in [longitude, latitude]
arrays, so the inputs mentioned above in [lat, lon]
should be invalid. I created an issue to address this.
I believe the reason you are seeing Z
and H
are because mgrs
thinks that the coordinates are in the polar regions and is using Universal Polar Stereographic. Let me know if I missed anything :-)
Reference: https://en.wikipedia.org/wiki/Military_Grid_Reference_System#Polar_regions
Actually, my previous comment was partially wrong. This library doesn't support Universal Polar Stereographic and the Z
is being used as an error flag: https://github.com/proj4js/mgrs/blob/master/mgrs.js#L291
Apologies for the confusion.
No problem! Thanks for getting back to me. Prior to messing with your library I had pretty much zero knowledge of MGRS. I thought that was a bit odd until I read the article on Irish Transverse Mercator (ITM) on wikipedia.
Fixed by https://github.com/proj4js/mgrs/pull/36 which throws an error for points in polar regions
I will keep the issue open about adding support for polar regions: https://github.com/proj4js/mgrs/issues/33
Valid Latitude Zone values include:
CDEFGHJKLMNPQRSTUVWX