Posts Tagged ‘mgrs’

MGRS coordinate entry

Friday, December 12th, 2008

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.

Anyway try it out here: 

Coordinate Flyto for Google Earth/Maps

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. 

Finally possibly of interest is the realisation that the MGRS Google Earth Gridlines layer, will actully load directly in Google Maps, so:

MGRS Gridlines in Google Maps

the lines should update a few seconds after dragging/zooming. Ideally will suppress the big blue pins (which are show as numbers in GE) , but not tonight…



* in the nicest possible sence!

** I tested it by converting utm->mgrs->utm globally on a worldwide 1 degree grid – all check out with absolute precision.