Author Topic: Splicing GPX files  (Read 602 times)

quixoticgeek

  • Mostly Harmless
Splicing GPX files
« on: November 11, 2019, 05:51:34 pm »

I have a GPX for a 200k ride, I want to splice in 2 detours to the route, I tried loading into komoot, but it tries to be clever, and routes it onto different roads, because the komoot map isn't upto date. I tried importing it into ridewithgps, but any attempt to touch the route an d it just detours all over the place.

Does anyone know of a simple to use tool where I can easily work out which <trkpts> I need to remove, and put the correct <trkpts> in their place. I'm on linux so need either web based tools, or linux based ones.

J
--
Beer, bikes, and backpacking
http://b.42q.eu/

Salvatore

  • Джон Спунър
    • Pics
Re: Splicing GPX files
« Reply #1 on: November 11, 2019, 06:00:49 pm »
I've done that sort of thing using Viking (on ubuntu).
Quote
et avec John, excellent lecteur de road-book, on s'en est sortis sans erreur

Feanor

  • It's mostly downhill from here.
Re: Splicing GPX files
« Reply #2 on: November 11, 2019, 06:01:33 pm »
I do this in Mapsource, where I can load multiple tracks, and then use the track cut and join tools.
Very quick and easy.

I'm on linux so need either web based tools, or linux based ones.

Ahh. Run mapsource under Wine?

Re: Splicing GPX files
« Reply #3 on: November 11, 2019, 06:11:51 pm »
I tried importing it into ridewithgps, but any attempt to touch the route an d it just detours all over the place.

Change the mode to "Add/Remove Control Points", add a control point either side of the section you need to edit, then drag around the section between them.

quixoticgeek

  • Mostly Harmless
Re: Splicing GPX files
« Reply #4 on: November 11, 2019, 06:19:52 pm »
I've done that sort of thing using Viking (on ubuntu).

Viking + vi did the trick.

Thanks

J
--
Beer, bikes, and backpacking
http://b.42q.eu/

Kim

  • Timelord
Re: Splicing GPX files
« Reply #5 on: November 11, 2019, 07:59:02 pm »
I do this in Mapsource, where I can load multiple tracks, and then use the track cut and join tools.
Very quick and easy.

I'm on linux so need either web based tools, or linux based ones.

Ahh. Run mapsource under Wine?

I don't think it plays well with Wine.  I have Windows in VMWare for the odd occasion that this sort of thing is necessary (fortunately, a lot less often than it used to be).

I discovered Viking relatively recently, and find it invaluable as something that'll render a GPX on a map when double-clicked.
 It seems to be a reasonable substitute for Mapsource in many respects, though I haven't made much use of it beyond splitting Tracks (it allows you to automagically split based on distance or time thresholds, which is handy).
Careful, Kim. Your sarcasm's showing...

fuaran

  • rothair gasta
Re: Splicing GPX files
« Reply #6 on: November 11, 2019, 08:41:49 pm »
QMapShack is another alternative to Mapsource. Works on Linux or Windows etc. Can load maps in Garmin format. Seems it has quite a lot of features for editing tracks, though maybe a more complicated interface.

Pingu

  • Put away those fiery biscuits!
  • Mrs Pingu's domestique
    • the Igloo
Re: Splicing GPX files
« Reply #7 on: November 11, 2019, 09:04:21 pm »
QMapShack is another alternative to Mapsource. Works on Linux or Windows etc. Can load maps in Garmin format. Seems it has quite a lot of features for editing tracks, though maybe a more complicated interface.

Yeah, I had a quick look at that in Ubuntu. Bit of a learning curve!

Re: Splicing GPX files
« Reply #8 on: November 11, 2019, 09:13:24 pm »
QMapShack is another alternative to Mapsource. Works on Linux or Windows etc. Can load maps in Garmin format. Seems it has quite a lot of features for editing tracks, though maybe a more complicated interface.

Yeah, I had a quick look at that in Ubuntu. Bit of a learning curve!

Surely that goes for any Linux software?

The OP found her solution with vi; I never possessed enough fingers or neurons for all the cognitive key combinations for vi or vim. Glad a solution was found though.

frankly frankie

  • I kid you not
    • Fuchsiaphile
Re: Splicing GPX files
« Reply #9 on: December 07, 2019, 04:02:59 pm »
If you do a lot of Track editing and especially if you assemble a Track from fragments drawn from various sources - you'll eventually find ways of making a Track that looks perfectly good in the software but fails to function in the GPS (certainly in a Garmin).

The most common problem is a backwards jump in the timestamp - this really should be avoided if possible.  For example if you take two bits of ridden tracklog, from the same trip but different years maybe, then join them with some track drawn in software (so no timestamps at all - which itself is OK) then maybe add another fragment but reversing it (because all track fragments have a direction - a start and an end, and you can't join a start to a start or an end to an end) and so on and so on - it's too easy to get backwards timestamps or just a single backwards step at some point.  And the GPS may not spit it out until you are mid-journey.
Safest if its a complex construction job to finish by wiping all the timestamps (some Planners can do this) and then maybe re-stripe it with continuous stamping representing a cycling speed, say 20kph - some Planners can do this too.
It's not dark yet but it's getting there.