Data is quite fascinating. Mainly because there is so much of it….and it never seems to do what you want.
The email came from Atanas Entchev. He had recorded some bike routes and exported out a kmz file from a phone app. The app recorded tracks and points. By the time he had exported the data out all that appeared were two points – the beginning and the end of his route. No tracks. Except when loaded into Google maps there were tracks.
So in all of my grouchiness and being old – I like data. I remember when I first started out in GIS all I was familiar with were coverages. Then shapefiles appeared. I remember at one point getting a CSV file of coordinates….then as my career kept diverting there were cad files and dwg, dgn, and a handful of image formats. I remember when KML files appeared I couldn’t stand them because all you could do with ArcGIS was to convert them to shapefile or some other format. They were very limited. It may have been all you could is convert data to KML. I honestly can’t remember. I do remember opening up my first one in a text editor and discovering XML. I still don’t entirely understand XMLÂ – except for the fact it’s just another file that contains data. If my software won’t convert it I always have a text editor.
One thing we always have for better or worse are standards. KML is an OGC standard….well…mostly. In my searching I found other people complaining about getting KMZ (please note I didn’t say KML) and not finding all the data that was supposed to be there. A KMZ is a zipped up KML. So if you want – change the name of your KMZ to zip – or if you have a bike.kmz file change it to bike.zip. Then unzip it. There is your KML.
Where was I – oh yeah standards. So KML is an OGC standard.Â Except the OGC also allowed for it to be extendable. In that extendability I would argue the standard has been broken. In Atana’s KML there was a tag called gx:Track that nothing recognized except for Google.
<gx:coord>-74.451391 40.508723 -46.29999923706055</gx:coord>
For those who have dealt with GPX files the above should look familiar. KML now has a gps component (which makes complete sense considering I mentioned this data was collected with a phone app). The gx:Track tag describes a line (hence track).
What to do? In my case I pulled out the section defined by gx:Track and converted it into a CSV file. From there I built a polyline using QGIS. Granted this wasn’t a button click solution but I did pull the data out and make it useful. For the record I ended up using QGIS, ArcGIS, and GDAL in my investigations. I kept hoping that the actual problem was the software I was using couldn’t read it and something eventually would. Well – VIM to the rescue.
So what did I learn?
- Ascii makes the world go round
- Nothing is standard
- I need to ride my bike more.