Missing data and a KMZ file

Jun 16, 2014 | ArcGIS Desktop, GDAL, Google, GPS, QGIS

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.

Example:

</ExtendedData>
</gx:Track>
<gx:Track>
<when>2014-05-26T17:30:27.580Z</when>
<gx:coord>-74.451391 40.508723 -46.29999923706055</gx:coord>
<when>2014-05-26T17:31:19.236Z</when>

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 read Atana’s post and he talks about one more way to get the data converted from TPStigers.

So what did I learn?

  • Ascii makes the world go round
  • Nothing is standard
  • I need to ride my bike more.

You may also like

The Trail Map – Part 1

The Trail Map – Part 1

A few posts ago I babbled about cartography. I've never had the patience for Cartography mainly because two things usually happen...well three things: the map can't be bigger than 8x11 the map must have everything on it Make the map however you want except we will...

My So called Life as a Map Maker

My So called Life as a Map Maker

I can sum it up: It's not much of one. Way back in my younger days I was infatuated with ArcPlot (which was the plotting portion of ArcINFO). From there I moved to Arcview, ArcMap, and eventually here to QGIS. All of my work typically revolves around Data. I usually...

Tricks with an ESRI File Geodatabase

Tricks with an ESRI File Geodatabase

A few years back I jumped in way over my head with QGIS/Postgis. I had moved a process out of one software and into my favorite two (QGIS/PostGIS) and little did I know the final output had to be a ESRI File Geodatabase. So what did I do? I shamed them into using a...