Author Topic: Stitching GPX tracks together  (Read 2520 times)

Stitching GPX tracks together
« on: 13 July, 2017, 06:32:43 pm »
I have finally worked out how to join / stitch together GPX tracks  :o. (https://www.youtube.com/watch?v=jMOsDVEF2Zw)

So far, I’ve successfully joined up some 200k and 300k routes with elements recorded on Garmin 810 and Garmin 910 and I have successfully uploaded the results to Garmin Connect and Strava. However, I have failed to join up a 400k or 600k route as the resulting files are too big (e.g. the 600k file is 45Mb). As a matter of course I record HR, speed, altitude cadence and automatically, I think, temperature and all bar cadence have come across when I have successfully joined the elements.

The 910 is very reliable but does result in huge files.

My Garmin 810 isn’t very stable so I tend to use my 910 as a backup, especially on DIY routes. I like to look at the data graphs after the event for general amusement but also when considering timings and effort required as part of planning new rides so I’d rather not reduce recordings to just routing.


Two questions:
1.   Is there an easy way to reduce/compress the file sizes in notepad (e.g. by removing HR or speed say) to meet Garmin Connect and Star? If so, this would deal with historic large files.
2.   Even if I only record the route, is there a way to easily reduce/compress file sizes in notepad? If so, this would allow me deal with 910 recordings of long routes.

Any ideas?

Thanks.


frankly frankie

  • I kid you not
    • Fuchsiaphile
Re: Stitching GPX tracks together
« Reply #1 on: 14 July, 2017, 09:21:42 am »
GPX files are remarkably inefficient, in terms of the file sizes they produce.  You can see this for yourself by zipping a GPX file, and comparing the size of the zipped file - it generally compresses to about 1/8th of the size, or even smaller.
But the huge file sizes you quote are a consequence of recording a lot of anciliary data (HR etc) and - I'm guessing - recording at a high frequency, possibly one point per second.  I question the need for 1 point per second but I've been told it goes with the territory if you want to record HR and cadence etc.  Otherwise, one point per 5 seconds would be more than adequate I'd think, and your file sizes would shrink to 1/5th as a result.

Various online utilities can clean tracks but I think they would mostly baulk at being hit with a 45Mb file.
An advanced text editor with sophisticated wild-card search abilities might be able to remove selected anciliary data, if you have good regex skills (better than mine) by searching for <tag>***</tag>

Regarding stiching tracks together - I do a lot of this, though at the planning stage rather than after the event - nipping fragments of tracklog here and there, drawing joins, adding a section from a planner, etc.  One thing to be careful of, is never to have a backward step in time.  In other words, the timestamp (if present) must always be later than any preceding timestamp in the list.  Seems obvious, but if you do a lot of stitching together it's easy to break this rule.  It can result in data error messages (if you're lucky) or software/GPS crashes.   If I manufacture a heavily-stitched track, I always play safe and strip the timestamps out (using Phil's utility, which also strips the elevations unfortunately) and then usually add the elevations back in (using GPS Visualizer).
when you're dead you're done, so let the good times roll

Re: Stitching GPX tracks together
« Reply #2 on: 14 July, 2017, 11:21:55 am »
FF,
thanks for your helpful guidance.

I'll begin the experiment of dropping various bits of data and tweaking the recording frequency to see how I get on. I might even have a play with a text editor but that doesn't really fit my skillsets.

I do the opposite to you at the planning stage. I always plot from scratch as it helps me think about the route beforehand - it takes a bit of time but I find it useful when the Garmin gets an on-route gremlin attack.

More work to do.

fuaran

  • rothair gasta
Re: Stitching GPX tracks together
« Reply #3 on: 14 July, 2017, 11:47:16 am »
If you don't want to play with text editors, there's plenty of easier ways to join GPS tracks.

eg try Garmin Basecamp. It will show the tracks on a map, which makes it a lot easier to spot the right place to split and join etc, and means you can check its not going backwards as frankly frankie says.
Also in Basecamp, you can filter the track, ie reduce the frequency of points. So you can play with the settings for this to reduce the file size.

Re: Stitching GPX tracks together
« Reply #4 on: 17 July, 2017, 12:41:07 pm »
eg try Garmin Basecamp.

Will do, thanks fuaran.

I rode a 200k route yesterday and compared gpx file sizes as a test. The all-singing all-dancing data capture on the 810 was 10.8MB while the route only data-capture on the 800 was only 3.5MB. 

frankly frankie

  • I kid you not
    • Fuchsiaphile
Re: Stitching GPX tracks together
« Reply #5 on: 18 July, 2017, 09:31:17 am »
Well that still seems like a big file to me.  I have tracklogs from 200kms that are around 500Kb, including all timestamps and elevations.  Recorded on an Etrex.
when you're dead you're done, so let the good times roll

αdαmsκι

  • Instagram @ucfaaay Strava @ucfaaay
  • Look haggard. It sells.
Re: Stitching GPX tracks together
« Reply #6 on: 18 July, 2017, 10:06:18 pm »
I rode a 200k route yesterday ..... the route only data-capture on the 800 was only 3.5MB.

My Etrex generated tracklog for PBP is only 2.7 MB.
What on earth am I doing here on this beautiful day?! This is the only life I've got!!

https://tyredandhungry.wordpress.com/

Re: Stitching GPX tracks together
« Reply #7 on: 26 July, 2017, 04:59:45 pm »
I rode a 200k route yesterday ..... the route only data-capture on the 800 was only 3.5MB.

My Etrex generated tracklog for PBP is only 2.7 MB.

Blimey! Deffo more work for me to do!