5

Currently, the formula I'm using to convert MGRS to Lat/Long and vice versa is giving me slightly different results than most other conversion utilities. It's usually between 10 to 30 feet off. This isn't a very big difference, but it matters for the particular application of data. I'm wondering if anyone knows of a simple library that does conversions between MGRS and Lat/Long or UTM.

RyanKDalton
23.3k19 gold badges114 silver badges180 bronze badges
asked Dec 16, 2010 at 12:00

3 Answers 3

2
answered Dec 16, 2010 at 15:10
1
  • 1
    I'm not looking for a utility to perform the conversion. I wanted to know if there was a PHP class out there. Commented Dec 18, 2010 at 17:42
1

http://www.ngs.noaa.gov/TOOLS/usng.shtml

which is also downloadable (including the FORTRAN source). USNG is a simplified version of MGRS. Datum is usually NAD83 and you don't have to handle the different letter schema based on the datum/ellipsoid. In MGRS, NAD27 data would have a different letter schema than NAD83.

Geotrans 3.0

http://earth-info.nga.mil/GandG/geotrans/index.html

which is in C or Java also has source code available.

answered Dec 16, 2010 at 17:47
0

I would recommnend you to use USNG library to convert

LL to USNG (function LLtoUSNG(lat, lon, precision))

LL to MRGS (function LLtoMGRS(lat, lon, precision))

LL to UTM (Note: UTM calculations are an intermediate step in LLtoUSNG conversions but can be used as seperate function if required)

and more, plus reverse

answered Sep 30, 2013 at 6:25

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.