# Consolodate many gps tracks into one 'smoother' track



## nickfury (Sep 30, 2008)

I've searched around, but I didn't find much, but I'm sure one of you guys has done it before  

I have a local spot where I ride with lots of singletrack that goes off in all directions. Over the past few years I've been mapping it out as much as I can with my GPS, I've got quite a lot of data. When I load all these tracks into Google Earth, it looks like a jumbled mess when I zoom into the more travel areas because the tracks that i travel alot are overlapping. 

Is there any program out there will take multiple gps track in the same area and 'consolidate' them into one smoother track?


----------



## red-haze.com (Jan 16, 2004)

Thats easy.
http://www.topofusion.com
And so many more features you won't believe it. 
bike ON
bob


----------



## ramshackle (May 6, 2004)

Topofusion has the make network feature but some trial and error with the settings is needed to get a reasonable result.

Another option that I prefer is to use a GIS program, display all data over orthophoto (aerial photo) and draw track segments and adjust based on your field knowledge and the ortho. QGIS is a free GIS program that will read and write .gpx that has become the most common and easily used gps output file. You can do this with topofusion, but it's not quite as easy.


----------



## Harold (Dec 23, 2003)

ramshackle said:


> Topofusion has the make network feature but some trial and error with the settings is needed to get a reasonable result.
> 
> Another option that I prefer is to use a GIS program, display all data over orthophoto (aerial photo) and draw track segments and adjust based on your field knowledge and the ortho. QGIS is a free GIS program that will read and write .gpx that has become the most common and easily used gps output file. You can do this with topofusion, but it's not quite as easy.


I agree. Topofusion has problems with extremely tight trail networks. I've spoken with the developer about the limitations in that regard.

I do really prefer using GIS for this and manually drawing the smoother line to "average" all the tracks.

QGIS is a little rough around the edges, IMO. It's good at some things, but on other functions it is not so good.

MapWindow GIS is another open source GIS package I recently installed. It seems a bit more usable so far.

But, I also own a licensed copy of Manifold GIS, which is pretty affordable for a paid GIS package (when you look at pricing for ESRI's ArcGIS).

All of them, however, will let you load a satellite image, overlay some GPS tracks, and sketch a new trail over them.


----------



## nickfury (Sep 30, 2008)

Topofusion did an 'ok' job at making the network. I think its going to require much more trial and error though. 

I probably going to have to 'trace' more than I want. But I also think I came up with a way to combine multiple gpx files into one as well - this might come in handy for topofusion. 

We will see


----------



## crossup (May 13, 2009)

TCX Converter can also do this- it has a multi GPX button and Join Track
it definitely works but so far I've not had a lot of luck setting it to eliminate all duplicate tracks. But the output files work so I probably just need to work with it more


----------



## DesertDog (Apr 14, 2006)

nickfury said:


> Topofusion did an 'ok' job at making the network. I think its going to require much more trial and error though.
> 
> I probably going to have to 'trace' more than I want. But I also think I came up with a way to combine multiple gpx files into one as well - this might come in handy for topofusion.
> 
> We will see


Actually, EasyGPS is possibly the best way to do this. Just open the program and then do a File, Merge Files... until you get everything you want loaded into EasyGPS (you can use the Ctrl key to select multiple files). Then, save the file and you will have a track file with an ungodly amount of individual tracks. Then you can go into whatever editing program you use and manipulate the individual tracks (split, join, remove points or segments). Just remember, beyond 20 tracks, or 500 points on any track, and you'll lose data when you transfer to most (Garmin) units.

You can edit properties(name, track number, title, etc...) of the individual tracks quickly and easily in EasyGPS too.

I've got a link to EasyGPS on my site: 
http://sites.google.com/site/dirtypursuits/trailtools

Now, as for making a trail network, there is nothing that reallly does the trick. TopoFusion is a great program, but it doesn't do that magic everyone is looking for. And I don't think that will happen until there is a change in the structure and definition of the basic .GPX file format. And, that will also take recoding of every units firmware and every software program to accomodate those changes. The one way you can do something like this is by using a DeLorme unit and creating overlay maps or actually adding tracks to the road and trails database that the Topo program uses. (Though I don't know how to do it and I can't remember who the person around here is that does the pretty serious mapping work with the DeLorme units!) Or, you can try to fool with the new user-defined map overlay feature with the new Garmin units. And the Garmin solution is just a map, not a track.


----------



## Harold (Dec 23, 2003)

DesertDog said:


> Now, as for making a trail network, there is nothing that reallly does the trick. TopoFusion is a great program, but it doesn't do that magic everyone is looking for. And I don't think that will happen until there is a change in the structure and definition of the basic .GPX file format. And, that will also take recoding of every units firmware and every software program to accomodate those changes. The one way you can do something like this is by using a DeLorme unit and creating overlay maps or actually adding tracks to the road and trails database that the Topo program uses. (Though I don't know how to do it and I can't remember who the person around here is that does the pretty serious mapping work with the DeLorme units!) Or, you can try to fool with the new user-defined map overlay feature with the new Garmin units. And the Garmin solution is just a map, not a track.


Topofusion comes closer to achieving this goal than anything else. If you seriously think about what's going on here - taking a track that might have out and back or multiple loops on it - and simplifying it into a network with a single line between nodes - there really isn't anything else that will do the process automagically.

That's not to say the process is perfect - far from it. But the ONLY other way to do it is to hand-draw the file. GIS software has done this since GIS software came out. The .gpx file format needn't change. There are other formats that are capable of handling this type of functionality just fine. It would take modification of the software that runs on the GPS receivers themselves in order to support one or more of those file formats. Shapefiles are an old standby, but are impractical due to the fact that they're actually several files that work together to display the data. I would posit that .kml files are well-suited to this sort of use. The newer Garmins support .kmz files now - I would imagine that .kml support will not be many years down the line.

Delorme may have a good thing going with its ability to handle this sort of thing right now, but their format isn't going to stick industry-wide unless they open it up to others.

I've been using Garmin's tiled .kmz option for a few months now. There are things I like and things I don't. It's a nice option to have, though.


----------



## DesertDog (Apr 14, 2006)

NateHawk said:


> That's not to say the process is perfect - far from it. But the ONLY other way to do it is to hand-draw the file.


It can be done with any mapping software like TopoFusion or MapSource, but you just have to manually edit everything (split, join, delete, copy/paste) and create the track yourself. It's a pretty time-consuming process though!

I've never tried the process in TopoFusion with a small set of tracks, but with the datafiles I try using, the program just locks up on me! Gets to maybe 30%, and it's still there an hour later.



NateHawk said:


> Delorme may have a good thing going with its ability to handle this sort of thing right now, but their format isn't going to stick industry-wide unless they open it up to others.


It's kind of like the old Mac vs. PC thing. Pretty much on your own if that's what you use(d).


----------



## Harold (Dec 23, 2003)

DesertDog said:


> It can be done with any mapping software like TopoFusion or MapSource, but you just have to manually edit everything (split, join, delete, copy/paste) and create the track yourself. It's a pretty time-consuming process though!
> 
> I've never tried the process in TopoFusion with a small set of tracks, but with the datafiles I try using, the program just locks up on me! Gets to maybe 30%, and it's still there an hour later.


I've used Topofusion with piles of tracks for a small network of trails near me. It runs through the processing quickly enough, but no matter how I adjust the settings, it does not settle on anything that remotely looks like the trail network because the network is very dense.

If I adjust one way, it is too sensitive and makes parallel lines where there should be just one. If I adjust it a hair the other way, it starts cutting off switchbacks, eliminating small loops at the end of out-and-back sections, and is generally not sensitive enough.

trying to use the split, join, and other tools on raw track data is ludicrous. IF (and that's a big if) you have a series of tracks that never use the same segment twice, it would work okay. But I find that is not a wise way to generate maps because depending on the day or even the time of day that you travel a trail, the GPS will show you in a different location. When I'm mapping a trail, I always travel it at least three times if on a bike and twice if walking. That way, I can get a decent average. Trying to use the split, join, and other tools on tracks like that is going to take entirely too much work, which is why I said that manual hand-drawing of the track is really the best way to do it. Much, much quicker.


----------



## jkmacman (Mar 5, 2009)

i'd try and truncate the trackpoints. i tested with excel a gps file as you can specify the format of your number. it's probably quicker with a regex function


----------



## ragetty (Jul 9, 2006)

trailrunner for mac will do this ... 

e.g. import all tracks into tr, then define specific waypoints (start, trailheads, intersections, whatever) to 'capture' all tracks within a certain radius. you can then merge multiple, 'identical' track sections that describe the same (partial) route, even weight them individually to set preferred bias (e.g. based on gps accuracy at recording time). you can also set any track section as 'exact' and it won't change on future merges.

ragetty


----------



## nickfury (Sep 30, 2008)

thanks regetty -- i have a mac too, but I havent used trailrunner for it yet.

I'm going to give that a shot.

Keep the suggestions coming guys, theres some good stuff in here so far!


----------



## Harold (Dec 23, 2003)

ragetty said:


> trailrunner for mac will do this ...
> 
> e.g. import all tracks into tr, then define specific waypoints (start, trailheads, intersections, whatever) to 'capture' all tracks within a certain radius. you can then merge multiple, 'identical' track sections that describe the same (partial) route, even weight them individually to set preferred bias (e.g. based on gps accuracy at recording time). you can also set any track section as 'exact' and it won't change on future merges.
> 
> ragetty


that sounds like a nice option. I'd like to see it work.



> i'd try and truncate the trackpoints. i tested with excel a gps file as you can specify the format of your number. it's probably quicker with a regex function


yet more nonsense from you. why do you even try?


----------



## SWriverstone (Sep 3, 2009)

Great thread, because I've been wanting to do this too. I have TopoFusion and have tried combining a few tracks into a single network...and like others have said, the result is far from ideal.

I'm clueless about the math and coding that goes into this stuff...but I don't see what the big deal is? Seems like it should be possible to simply set a parameter that says "if any two tracks are within XX feet apart, consider them a single track, and delete whatever points necessary to result in the best average track."

TopoFusion has some sort of setting that's kinda like this (can't remember what it's called)...but it doesn't seem to "get it."

I don't really care whether the final "average" track is perfectly accurate (as long as it's in the ballpark)...so extreme accuracy shouldn't be a concern.

I know you can draw a new, single track but geez—what a pain!

Scott


----------



## Wherewolf (Jan 17, 2004)

*Perhaps this?*

I've played with the demo version of gpx2img  and it appears you could do so with it. You can load several tracks and then make a transparent image of them, which is overlayed on your maps.


----------



## Harold (Dec 23, 2003)

SWriverstone said:


> Great thread, because I've been wanting to do this too. I have TopoFusion and have tried combining a few tracks into a single network...and like others have said, the result is far from ideal.
> 
> I'm clueless about the math and coding that goes into this stuff...but I don't see what the big deal is? Seems like it should be possible to simply set a parameter that says "if any two tracks are within XX feet apart, consider them a single track, and delete whatever points necessary to result in the best average track."
> 
> ...


I've played with TF's "Network" algorithm a good bit. There are a couple of slider adjustments to tweak the settings you mention. Basically, they let you adjust the "how far apart" threshold.

What happens with the network I was trying to apply it to is that if I set the threshold broad enough to merge the tracks that are parallel, it starts to do funny things to other sections of trail. If I adjust it again to get those sections of trail correct, then the threshold is too tight to merge all sections of the tracks that are the same, and I wind up with tons of extra trail segments and intersections I have to delete manually.

It would work great on a network that is not so dense as the one I was trying to map, but for that trail, it wasn't good enough.

I've been wanting to try gpx2img. I'm curious if I can get my Oregon to overlay it on top of everything (including raster imagery).


----------



## SWriverstone (Sep 3, 2009)

One issue I have with drawing tracks in various programs is that most limit you to 2 options:

• drawing with a "pencil" tool (or something similar)...which means you're dropping a bazillion track points as you draw, leaving a bloated track...

• drawing by clicking a point, moving the mouse, clicking again, etc...which means your track isn't smooth and organic enough...but angular and straight-edged.

What would be nice is if you could draw a track with a pencil tool (in one motion)...and then have the program simplify the resulting track—so it's a nice, smooth, organic track with as few track points as possible.

I'll have to check out gpx2img as well...

Scott


----------



## Harold (Dec 23, 2003)

SWriverstone said:


> One issue I have with drawing tracks in various programs is that most limit you to 2 options:
> 
> • drawing with a "pencil" tool (or something similar)...which means you're dropping a bazillion track points as you draw, leaving a bloated track...
> 
> ...


true...I guess I'm spoiled because the GIS software I work with often will do "smoothing" easily enough. But it's not unusual in other software.






Consider this map. I drew it entirely by hand after collecting dozens of tracks. I drew the tracks in Topofusion and colored them in Google Earth so the symbology would carry over to the web. I also added waypoints in Google Earth (for the icons). I'd say the lines look plenty smooth and organic where they need to be, and the look angular also where they need to.


----------

