Skip to content

Leading zero omitted from zone #4

@MattBlissett

Description

@MattBlissett

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:

public String coordinate(GridType type) {
StringBuilder mgrs = new StringBuilder();
if (type != null) {
mgrs.append(zone);
mgrs.append(band);

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions