Why not ask your question on the new OpenStreetMap Community Forum?


i am just trying to change the timestamp for a gpx-file. I import an nmea-file without an date value. So i added the date value with this command:

gpsbabel -i nmea,date="'.$final_date.'" -f "'.$imgfile_tmp.'" -x track,pack,split=4m,title="Track-%d%m%Y-%H%M%S" -o gpx -F "'.$imgfile_tmp.'.p"

After this procedure i split the *.p file into 2 or more gpx files.

But now after this i would like to change only the Date of the track. The Timestamps are okay but the date value is wrong. How can i do this?

Thanks a lot for the help.

Cu kami

asked 13 Sep '11, 13:42

kami's gravatar image

accept rate: 0%

You might find your answer in this previous question :


especially the answer with xmlstarlet

Note that OSM doesn't require a correct date value in GPX files. Any date is accepted (in fact, it could work without timestamp but that's another story).

permanent link

answered 13 Sep '11, 15:17

Pieren's gravatar image

accept rate: 15%

edited 13 Sep '11, 15:55

In your case if you just want to change the same date value everywhere that it occurs in the file, a global search-and-replace with a text editor should do the trick. Just open the .gpx file with your editor of choice (even Windows notepad) and "replace all".

permanent link

answered 13 Sep '11, 15:47

SomeoneElse's gravatar image

SomeoneElse ♦
accept rate: 16%


thanks a lot for the answer. I used sed to change all entry in the gpx-file. works fine.

find /tmp -name "'.$imgfile.'.o" -exec sed -i 's/'1996-01-'.$timsstmp.''/''.$final_date.''/g' {} ;

Thanks a lot.

Cu kami

permanent link

answered 19 Sep '11, 13:16

kami's gravatar image

accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 13 Sep '11, 13:42

question was seen: 12,110 times

last updated: 19 Sep '11, 13:16

powered by OSQA