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.

2

alt text

http://freegeographytools.com/2007/mgrsutmlatitude-longitude-converter

  • I'm not looking for a utility to perform the conversion. I wanted to know if there was a PHP class out there. – Nathan Dec 18 '10 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.

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

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.