I downloaded a KML track from Google Latitude. The service allows to download the tracked route from the user's profile providing a link such as:
I would like to convert the .kml file into a Shapefile. I am running Ubuntu. I am a bit familiar with QGIS and ogr2ogr. Therefore, I tried the following command as usual:
$ ogr2ogr -f "ESRI Shapefile" example.shp example.kml ERROR 4: No layers in KML file: example.kml. FAILURE: Unable to open datasource `example.kml' with the following drivers. [...]
QGIS states "invalid data source" when I open the .kml file as a vector layer.
I also tried Kml2Shp Online without success. It is not able to read any information either:
Entities found: # Points: 0 # Paths: 0 # Inner Polygons: 0 # Outer Polygons: 0
Google Earth / GPSBabel
$ gpsbabel -i kml -f ~/Desktop/example.kml -o gpx -F ~/Desktop/example.gpx
However, in my case it outputs a GPX file without location data.
As a first success I found the website GPS Visualizer. Uploading and converting the file their actually produces a valid GPX file.
Still my question remains to be open:
Is there a command line tool that is capable of converting the file? I do not want to upload the tracking data to yet another website for the conversion.