Author Topic: Editing a gpx file?  (Read 4316 times)

Editing a gpx file?
« on: 25 November, 2016, 08:34:33 am »
On my date faulty 'back-up' Vista HCx, I need to replace the the date in the whole gpx file track log.  I can do this easily in notepad, but can't resave as a gpx.  How can I do a "find and replace all" date data in every line at once, and convert/save as a useable gpx file?
Cycle and recycle.   SS Wilson

PaulF

  • "World's Scariest Barman"
  • It's only impossible if you stop to think about it
Re: Editing a gpx file?
« Reply #1 on: 25 November, 2016, 08:39:24 am »
Thought that Notepad will let you save with any extension?


But if you can't just edit in notepad, save as a .txt file, close the file and change the suffix in Explorer.

Re: Editing a gpx file?
« Reply #2 on: 25 November, 2016, 09:00:42 am »
Thanks Paul - yes tried that last night, simply changing .txt to .gpx, but ridewithgps rejected it.  Perhaps there was some other issue with the file.
Cycle and recycle.   SS Wilson

frankly frankie

  • I kid you not
    • Fuchsiaphile
Re: Editing a gpx file?
« Reply #3 on: 25 November, 2016, 09:12:34 am »
Aside from obvious things (like wrongly formatted dates) the file may have acquired some white space or a c/r at the end, which can cause problems.  Delete right back to the end of the closing tag.  Or you can 'clean' the file by running it through GPS Visualizer or some such - though that will stamp it with a different origin so it no longer looks like an Etrex-produced file.  (Possibly GPS Vis can also do the re-dating - it can certainly do time offsets, under the 'advanced' options.)

In any case, Notepad is notoriously inadequate software.  You owe it to your PC to install a replacement such as Editpad
https://www.editpadlite.com/
which is free and about 100x better than Notepad.   (Some others are even better - I use Textpad - but may not be free.)
when you're dead you're done, so let the good times roll

fuaran

  • rothair gasta
Re: Editing a gpx file?
« Reply #4 on: 25 November, 2016, 11:57:52 am »
You could use GPSBabel, with the 'move' filter, to shift all of the dates by the same amount.

Dibdib

  • Fat'n'slow
Re: Editing a gpx file?
« Reply #5 on: 25 November, 2016, 01:41:14 pm »
In Notepad's Save As dialog I think you need to type in
Code: [Select]
"mytrackname.gpx" rather than
Code: [Select]
mytrackname.gpx otherwise it'll think you mean
Code: [Select]
mytrackname.gpx.txt
 :facepalm:

Re: Editing a gpx file?
« Reply #6 on: 25 November, 2016, 02:57:26 pm »
Ok thanks all, I've managed to find & replace date, save and upload.   :)  Will give editpadlite a look...
Cycle and recycle.   SS Wilson

Phil W

Re: Editing a gpx file?
« Reply #7 on: 26 November, 2016, 08:52:59 pm »
There's also Notepad ++ and Nodepad XML which are worth a look. I have both installed.

Re: Editing a gpx file?
« Reply #8 on: 27 November, 2016, 02:03:58 am »
Wordpad has features which Notepad didn't seem to used to have; search and replace, etc. 

Haven't used NP for quite a while, so maybe it is more up-to-date than I recall, and my comment can be cheerfully ignored

Dave_C

  • Trying to get rid of my belly... and failing!
Re: Editing a gpx file?
« Reply #9 on: 27 November, 2016, 11:14:14 am »
I just rename in File Manager to *.gpx and all is good.

Sent from my A0001 using Tapatalk

@DaveCrampton < wot a twit.
http://veloviewer.com/athlete/421683/

Re: Editing a gpx file?
« Reply #10 on: 27 November, 2016, 04:03:47 pm »

I have found GPS Track Editor to be very useful.

It will sort out timestamps for you as well as a lot more.

http://www.gpstrackeditor.com/


Re: Editing a gpx file?
« Reply #11 on: 02 December, 2016, 09:21:18 am »
Kind of a related question.

I now and again have a gpx file which won't work, usually because I have done some tinkering and mucked up its " grammar" (sorry can't remember the computer term - syntax?). Though not uber techy i usually manage to find the problem, maybe a space or improperly closed "bracket". Are there any progs, possibly named above, which you can just run a gpx file through to find and highlight issues?

Phil W

Re: Editing a gpx file?
« Reply #12 on: 03 December, 2016, 10:27:12 am »
Kind of a related question.

I now and again have a gpx file which won't work, usually because I have done some tinkering and mucked up its " grammar" (sorry can't remember the computer term - syntax?). Though not uber techy i usually manage to find the problem, maybe a space or improperly closed "bracket". Are there any progs, possibly named above, which you can just run a gpx file through to find and highlight issues?

Try an XML validator

http://www.w3schools.com/xml/xml_validator.asp

Re: Editing a gpx file?
« Reply #13 on: 04 December, 2016, 09:21:11 pm »
Many thanks for that Phil