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

Conda and QGIS Part 2

Conda and QGIS Part 2

Coming back from Yellowstone has left me slightly adrift. I missed a meeting yesterday as I keep forgetting to add things to my calendar. So the last time I mentioned Conda was like 2018 and the whole point to the Article was "I can now have two versions of QGIS...

Calculating NDVI in QGIS

Calculating NDVI in QGIS

Titling these articles is getting more difficult. I almost called this my "Getting my Junior Forestry Badge" because that's what I told one client the other day as I confidently misidentified another tree on a walk. A forestry person I am not - but I've gotten pretty...

MAGIP and TNGIC in 2024

MAGIP and TNGIC in 2024

I just came off two conferences with one being in Montana and one being in Tennessee. Both Geo related. It was my first time attending the MAGIP conference. Not that you need a long overly drawn out review of both - here are some of the highlights: TNGIC was fun. It...