Trailforks Routing Along Roads

May 19, 2016
by Trevor May  
trailforks trail routing along roads

Last year Trailforks added its trail routing feature which was limited to routing along trails in our database. Many routes include connections along city roads between trail networks or along logging roads. Now the Trailforks routing will work along a large number of OpenStreetMap roads along with the Trailforks trails.

We have filtered our raw OSM database that is over 1 terabyte down to a routable road database of 56 GB. Because there are A LOT of roads on the entire planet, I only allow routing along roads nearby riding area trails. The image below illustrates the road network around North Vancouver and the trails in green. Adding roads to the routing greatly increases the complexity of the routing network, going from 338 trails to 338 trails plus 38,934 road segments.

Vancouver area road network amp trails

The next image shows the dynamic 'routing areas' around trail networks where OSM road data is loaded. You can route anywhere within a yellow box, but not between them. Typically mountain bike routes do not go large distances, so there is no reason to calculate routes between Vancouver and New York for example, that would never happen on a mountain bike.

Routing area boxes

When these routing areas are generated the trails are snapped to the roads to make connections and duplicate roads that match existing trails are discarded. This image shows the purple roads connecting to the trails. Each region has a special routing admin page to visually check the connections. (Example: https://www.trailforks.com/region/mount-fromme/routingadmin/)

road network links on trail map

routing along roads
Many race routes or even your weekend ride plan might include sections along city roads, this is now possible.

snap trails to road
When editing trail points, you can now snap to nearby roads.

When a new trail is added or existing trail edited in a region, the routing network for this region is queued to be updated automatically. Your change will not happen instantly for routing, depending on the complexity of the area and number of roads, it can take anywhere from a few seconds to an hour to update.

Server backend re-generating the routing network for an area

Admin log for routing area network generation
Here is our admin log of routing networks being updated on the background server.

This new functionality has only been live on the website for a couple weeks, so many areas might require some manual tweaking of the trail data. To make sure the trails are properly snapping to the roads. But this is easier than ever with the routing admin page and the ability to snap trail points to the roads when editing.

www.trailforks.com/ridelog/planner/


MENTIONS: @trailforks



Author Info:
canadaka avatar

Member since Jun 8, 2010
29 articles

25 Comments
  • 57 1
 Trail forks is such an amazing and dynamic product that is genuinely one of the coolest things to happen to the sport. Thank you guys so much for the continued work on this!
  • 16 0
 The amount of (and the quality of!) effort that's going in to TrailForks is top-notch. It's not just a cool product "for a mountain biking site" - it's becoming one of the best online mapping resources around. Outstanding work.
  • 10 0
 ah shit man, now the roadies are gonna use this damn app. jk jk i'm riding my teenie weenie bicicleta home via a paved road in about fideen' minutes...
  • 13 0
 It'll be funny when they take a wrong turn and end up on a double black diamond track.
  • 7 0
 Trailforks is revolutionising mountain biking just as much, if not more, than all those shiny new components out there... Best of all, its free. Smile
  • 1 0
 Over the last 2 years I have been using trail forks and other apps to navigate. Was never happy with trial fork as it just seemed to not work well on my iPhone 4s. Then I realized that I was on the desktop version on my phone. After sorting that out. It has been super easy to use and so far very accurate. Thanks for the hard work on the app.
  • 2 0
 Though I like the lay-out of trailforks, it has some missing trails in my area that MTBp broadcast.
  • 1 0
 you can help by adding the missing trails www.trailforks.com/contribute
We make it easy, you can import and crop your Strava ride, or even draw in the trail using our ridelog data.
www.trailforks.com/help/view/40
  • 2 0
 Funny, I just left Braemar about an hour and a half ago.
  • 2 0
 Very cool, thanks!
  • 2 0
 Saweeeeeet!
  • 2 0
 Love trailforks !!!
  • 2 0
 Neat
  • 1 0
 Trailforks is getting radder by the day! Thanks PB!
  • 1 1
 good stuff guys, would be awesome to be a part of this effort. awesome product
  • 2 1
 I see some GIS algorithms going on here. Can I get a job?
  • 2 0
 I know right? I'm currently working as a gis developer for a national real estate company and yet I envy the trailforks development team.. Itd be nice to code for something you're interested in.
  • 1 0
 @MetalMessiah: surprisingly these guys aren't GIS geeks, they are programmers who understand spatial development. Which means that despite my loads of GIS experience, I'd have no chance of working with them, but you might! GISgasm level stuff here.
  • 1 0
 @PHeller: Since I'm not the top level programmer type GIS geek, I think they need me. I happen to be a mountain biker who understands spatial development. They have done some awesome stuff in GIS, and I would really like to get my hands on some the raw data, and play play play. Okay, maybe I do sound a little geeky.
  • 2 3
 T forks back at it again with awesome new features ! Now if only strava and T forks could merge into one all Time ass kicking bike app !
  • 1 0
 Thanks for keeping Trailforks awesome
  • 2 2
 Secret trails are better. the ones a million people dont know how to get to.
  • 1 0
 Simply awesome
  • 1 1
 Still use MTB project wayyyyyy more.
  • 5 8
 Whats trailforks?







Copyright © 2000 - 2024. Pinkbike.com. All rights reserved.
dv65 0.320095
Mobile Version of Website