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.
3 Answers 3
-
1I'm not looking for a utility to perform the conversion. I wanted to know if there was a PHP class out there.Nathan– Nathan2010年12月18日 17:42:03 +00:00Commented Dec 18, 2010 at 17:42
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.
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
Explore related questions
See similar questions with these tags.