Corridor Tracker

During some work on a new project for a client we needed to be able to define boundaries for physical map areas (e.g. rail corridors).  Given that the project was for rail vehicles, there was only certain areas on the map where the vehicle could enter and exit these boundaries.

We used Google Earth to define these boundaries using polygons that covered the boundary positions for both entry and exit (separate ones for each).  The polygons were structured in Google Earth to provide a simple hierarchy that would provide extra information where needed (e.g. corridor name, owner, operator etc…).  The polygons were then exported to the usual KML file.  Given that the KML file is a standard and the format is in XML we then simply imported the file into our project to generate data type classes that could read in the file.  Understanding of course that a change to the KML specification and therefore a potential change to the format would break the import!!!  This particular case would be handled externally to these generated classes.

With all of this in place we were able to easily provide the client with a configurable definition of their rail corridors that could be read in and subsequently viewed in the applications Google Maps window and processed according to the vehicles current position.