ngageoint / mgrs-java

Military Grid Reference System Java Library
https://ngageoint.github.io/mgrs-java/
MIT License
18 stars 4 forks source link

Leading zero omitted from zone #4

Open MattBlissett opened 4 months ago

MattBlissett commented 4 months ago

This is a minor issue, thanks for providing this library.

I'm not sure if the NGA site (under Grids/Graticules → MGRS) is the specification for MGRS, but it says:

The first two characters represent the 6° wide UTM zone:

  • Leading zeros are included so that Zone 9 is "09".

This library does not include the leading zero, zone is an integer here:

https://github.com/ngageoint/mgrs-java/blob/5eb9daf231d18b4ae7200a89225bfb80995f1c65/src/main/java/mil/nga/mgrs/MGRS.java#L243-L250