0

I want to keep a track from a walk the other day. When I stopped walking and got into a taxi, I forgot to turn the GPS off immediately, and now I want to prune away all of the taxi track.

I've done something similar manually before, by deleting individual data points from the text file, but now it's a bit too hard.

I have tried GpsPrune and JGPSTrackEdit without any success. Here are some images:

Original kmz in Google Earth: http://imgur.com/M1itMwC

Original kml in Google Earth: http://imgur.com/hLCGhPT

Original kmz in GpsPrune (only start and end points show): http://imgur.com/CkGSYXL

Original kml in GpsPrune (only start and end points show): http://imgur.com/pLh9jX3

Original kmz opened in JGPSTrackEdit (nothing appeared): http://imgur.com/SaQwiWH

Original kml opened in JGPSTrackEdit (nothing appeared): http://imgur.com/OcJDRJo

0

The kmz are KML files Zipped (compressed).

Make a copy of the file, and rename the extension.

cp myfile.kmz myfile.zip

Unzip it.

unzip myfile.zip or with an 'archive' application.

Locate the file doc.kml and open it with your favourite text editor, or install an xml editor such as XML Copy Editor because doc.kml is an xml file.

Locate the data you no longer want. Typically it will be between the tags <coordinates> and </coordinates>

Delete it.

There may be additional artefacts that you may, or will, want to delete. Such as

<LineString id="g7"> <altitudeMode>clampedToGround</altitudeMode> <coordinates>-115.478882259744,32.8305154499076,1 -115.47919506463,32.8301376995818,1 </coordinates> </LineString>

As long are there are no dangling or unmatched tags, and the final file contains enough of the requisite information you will have a usable kml file.

It's your decision if you should compress it again into a kmz.

  • Thanks for your reply @Nodak. Yes that is the method that I've used before (when I said "I've done something similar manually before"). I tried it again this time, but it's a bit too hard, because: (a) I haven't been able to identify the data that you refer to as "the data you no longer want", which is the times and coordinates that are not relevant; and (b) "There may be additional artefacts that you may, or will, want to delete" and "As long..." - I don't really want to spend the time on trial-and-error if I know that it might not end happily (ie. successfully). – el_gallo_azul Jan 3 '16 at 23:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.