Sunday, November 21, 1999

ASCII to DGN Transforms

In 1999 I started working for a company which back then was called Fugro GeoSoft Solutions (in Singapore) - I think it's changed its name a couple of times now though. One of the projects I worked on was a GUI for an engine that they had developed called ATRANS. I don't think ATRANS exists anymore but when I joined it was used by a number of Oil and Gas companies to convert ASCII data to Microstation DGN format (Microstation 95 running on Sun Solaris UNIX workstations).

ATRANS was a C program built using MDL (the Microstation Development Language). It was like an early spatial ETL (Extract Transform and Load) tool - somewhat similar in concept to Safe Software's FME (Feature Manipulation Engine) product. You would specify using a FDF (feature definition format) file how the ASCII data should be read and transformed into a DGN file. It was a very powerfull and flexible tool for its time - we often used it to convert UKOOA P1/90 files to shot point plots in CAD.

As we were moving away from UNIX and more towards Windows NT my boss asked me if it would be possible to build a GUI for the FDF file creation (which was previously done in UNIX using VI)... it would mean that users did not need to be so familiar with the FDF file format which was a bit cumbersome. The result is shown in the screen capture above - the application parsed and generated FDF files into an object model and could also execute the FDF file against the ATRANS MDL by using a simple Shell command. It also used RTF to nicely colour code the FDF file elements - just like a proper IDE (Integrated Development Environment).

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.