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 |
You might find your answer in this previous question : http://help.openstreetmap.org/questions/2130/gpx-file-no-time-tag especially the answer with 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). answered 13 Sep '11, 15:17 Pieren |
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". answered 13 Sep '11, 15:47 SomeoneElse ♦ |
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 answered 19 Sep '11, 13:16 kami |