Saturday, July 17, 1999

UGRS/MGRS Conversion

Back when I was at university I wrote a code library / application that converted Military or Universal Grid References (MGRS/UGRS) to any other coordinate system.

The software was developed as a uni project but the clients were AUSLIG (the Australian Land Information Group) and FESA (Fire and Emergency Services Authority) of Western Australia.

Looking back at it now I would have done things a bit differently - but you learn.

At the time Australia was moving away from the ANS (Australian National Spheroid) and associated AGD (Australian Geodetic Datum) and going towards a geocentric datum GDA 96/2000 (Geodetic Datum of Australia). The fire and emergency services authority in particular had lots of data referenced in a rather odd location reference system called UGRS (Universal Grid Reference System) which is based on UTM (Universal Transverse Mercator) but on ANS. UGRS is somewhat like the Maidenhead locator system used by radio amateurs, it uses a single string of characters and numbers to reference an approximate location.

56JMP973523 - For example is the UTM coordinate 497300 E, 6852300 N in UTM Zone 56

The clients wanted a way to convert the UGRS locations to UTM but on the new GDA datum and in turn output the new coordinates back to UGRS (on the new datum). They also had a desire to have the coordinate translation work inside ArcGIS 8 (which was about to be released - and was the talk of the GIS community at the time).

My solution was to implement a geodetic and map projection engine which could handle UGRS as a COM library (so that ArcGIS could make use of it) and also throw my own user interface on top of it. The result can be seen in the screen capture above.

It was a valuable learning experience for me - because not only did I finally get a chance to use COM properly and build a flashy GUI with my own vector display components - but it also made absolutely sure I understood the mathematics behind coordinate systems and datum transforms.