0

Hi,

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

kami
1111
accept rate: 0%


3 Answers:
1

You might find your answer in this previous question :

http://help.openstreetmap.org/questions/2130/gpx-file-no-time-tag

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

Pieren
9.7k2075157
accept rate: 15%

edited 13 Sep '11, 15:55

0

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 ♦
33.0k65343778
accept rate: 16%

0

Hi,

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

kami
1111
accept rate: 0%

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:

×228
×29
×8
×6

question asked: 13 Sep '11, 13:42

question was seen: 9,181 times

last updated: 19 Sep '11, 13:16

powered by OSQA