blankblank blank

Removing Time Data Out Of A GPX Or KML File To Make It Work Right In Google Earth

In the process of writing yesterday’s post on Garmin Basecamp, I found an annoying flaw on how Google Earth handles GPX files. In a recent GPS talk I gave, I surprised some people when I told them that Google Earth can open some GPS-related formats like GPX, LOC and others directly; you just need to select the type of files you want to open with the drop-down in the lower-right corner:


But if the waypoints in GPX files come time-stamped, either with the time you created them in the field or in a program, Google Earth assumes that you want to use this time-related data, and brings up a time slider in the upper-left-hand corner:


The first time you open the file, the time slider will run from start to finish, with waypoints popping up and disappearing as the time indicator hits their creation time. You only see all the waypoints when the time slider has run all the way through to the end. Very annoying.

But it gets worse. If you uncheck the GPS data box in the Places pane to hide the data, then check it again, you’ll see nothing at all except the time slider:


Hitting the play button on the time slider will make the waypoints appear and disappear quickly, and at the end the only waypoint visible will be the last one created; the time slider will look like this:


To see all the waypoints, you’ll need to move the “start-time-extent” slider all the way to the left:


Same behavior if you save the data permanently to “My Places”. This is pretty retarded behavior; I hope Google adds the option to turn off time-related data display when it’s not wanted. Until then, I banged together a simple Windows-only program called GPXTimeStripper that will remove all time-related data from a GPX file (KML files, too, although this may not work in every case).  Download the file at this link; it’s a zipped stand-alone executable. Run the program (won’t win any interface awards):

Click on the main button, choose the GPX or KML file you want to process, and the program will remove the time data from the file, and save it with “_TS” appended to the filename. You’ll get a pop-up box with the name and location of the new file, which should always be the same location as the input file.  If the pop-up becomes annoying (which it will), check the box in the lower-left-hand corner to turn it off. Help button takes you to this page; Exit does what you’d expect.

No real checks for overwriting older files, and may not work on every file correctly (report bugs). Use at your own risk. BTW,  Google, would it kill you to have KML files created in Google Earth terminate in CR-LF instead of just LF?  It would simplify the job of reading them in correctly.

Looking for something else? Enter some keywords below, then click "Search".    

4 Responses to “Removing Time Data Out Of A GPX Or KML File To Make It Work Right In Google Earth”

  1. 1 Me

    I’ve been caught by this numerous times. Not obvious why all of sudden you’re not seeing your data.

    They need to hire some Apple people to teach them about interface basics. I mention Apple because the Mac app is not very Mac like. And it’s missing obvious features such as saved sets of what you want showing. If it crashes, which it does all too frequently, recent changes aren’t saved. Saving mostly happens if you quit. Surprising that some obvious deficiencies aren’t addressed while at the same time they keep adding features.

    GE just added enhancements that use the time data, so think twice about deleting it all. Elevation and speed profiles were just added.

  2. 2 heng


  3. 3 Nicolas Mertens

    Can you make this work for KMZ files? Or is there a way of converting KMZ files into KML or GPX?
    Thanks in advance for responding.

  4. 4 Leszek Pawlowicz

    You can open the KMZ file in Google Earth, then right-click on it and choose “Save As” to save it as a KML. You can also change the file extension on a KMZ file to “zip”, then open the zip file and extract out the original KML file.

Comments are currently closed; feel free to contact me with questions/issues.