Prompted by one of those infernal* posts on a Google Maps group, have finally been inspired to cobble together a MGRS -> Lat/Long conversion. It seems trvial, the UTM->MGRS conversion is quite simple, but there are a few gotchas!, so after much puzzleing over some C code from GeoTrans (and Trial&Error for good measure!), I think** have something working.

also added today is a tickbox to open the result direct in Google Maps (rather than Google Earth).

I’ll tidy it up and post the code, which is based on the PHPcoord conversion class, incase others have a use. I’ll also add it to the API – and possibly even back port it into Perl for use on the on site coordinate covertor.

9 Responses to “MGRS coordinate entry”

Nice work on MGRS and I have followed up your musings on MGRS with interest. Would it be possible for you to assist in a similar project for India Zone 1 to draw the grid lines and know the GR in India Zone 1 format.

@Munir
Do you have an links with a simple overview of the India Zone 1 grid. I know nothing about it, and only find references to technical datum transformations. looking for a wikipedia style page to get a overview to see if it should be possible.

As an aside the MGRS layer now displays better in Google Maps, the labels use the Google Chart API to plot actual numbers rather than ugly blue pins. (but the numbers are still rather big due to limitations of Google Maps, vote here to get it changed.)

I was looking for the whole UTM -> MGRS -> UTM ++ thing, and here you’ve made it! I’m a bit into deep waters with theese type of algorithms, so it’s good to rely on someone who knows. Thanks for sharing your choord classes!

BTW: I think the error checking routine for the precision parameters is in lack of a few dollars?