I was hoping to sense check what I'm seeing as I don't understand!

What I'm trying to do

My ultimate objective is to create shapefiles to represent the Military Grid Reference System (MGRS) to a precision of 100m. With these shapefiles, I can then use them in chloropleths and other types of analyses.

NASA World Winds

I'm using this very helpful package which is based on the NASA World Winds SDK: https://github.com/Berico-Technologies/Geo-Coordinate-Conversion-Java

So, what's up?

I decided to draw an arbitrary bounding box near Haneda airport in Tokyo. The SW corner of that box should have the grid refernece 54SUE8059730440. This is a 1m precision and is returning a lat/lon of 35.510370, 139.683313. I have no concerns with this, looks valid.

To change the precision to 100m, my working assumption is that I need to trunc this grid refernece down to [54SUE] + 6 digits. That would cut the last two digits and create a refernece of 54SUE80597304.

When using the Java package above to convert 54SUE80597304 to a lat/long, it returns 35.89436034148521, 139.67690044404682. This location is more than 40km away!

  • 54SUE8059730440 = 1m precision? = (35.510370, 139.683313) = Kawasaki, Tokoyo
  • 54SUE80597304 = 100m precision? = (35.89436034148521, 139.67690044404682) = Saitama

What did you expect?

My assumption is that the converstion from military grids to lat/lon typically returns the South-West coordinate of the grid. Given this, I further assume that relaxing the precision as I have done should result in the same SW corner coordinate with the NW and SE corners moving out by c. 100 meters.

What am I missing?

Bonus points -- Is there any online tool out there where I can input a 100m grid reference and see a visualization of the grid lines?

double[] gridOneStart = Coordinates.latLonFromMgrs("54SUE8059730440");
System.out.println(String.format("%s, %s", gridOneStart[0], gridOneStart[1]));

35.51036511480732, 139.683307831635

double[] gridOneStart = Coordinates.latLonFromMgrs("54SUE80597304");
System.out.println(String.format("%s, %s", gridOneStart[0], gridOneStart[1]));

35.89436034148521, 139.67690044404682

  • Your "bonus points" section is a separate enquiry, completely unrelated to your original question. Please keep in mind the 'one question per question' policy of GIS SE. However, feel free to make a new post focusing on this issue.
    – Matt
    Apr 18 at 16:02

1 Answer 1


I knew it was a misunderstanding of the system.

To truncate 54SUE8059730440, the way to do it is to first divide into constituent parts:

  • [54SUE] 80597 30440

Now, you can trunc to get to 100m from both sections:

  • [54SUE] 805 304

What's interesting is that the package I am using has the coordinates travel further SW as the precision decreases from 1m to 10m to 100m, suggesting that it doesn't keep the SW coordinate locked.

Anyway, I figured out the gist of my issue!

  • Your first idea would work too. This sounds like an issue with your conversion program being picky or rounding rather than truncating (which is correct). You can also truncate by zero padding, e.g. 80590 30400. But you need eastings and northings to have the same length in most software.
    – danak
    Apr 18 at 15:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.