Lurker News

Comments (128) 41 threads

samcrawford10 replies#
Author here. Trail Router is a running route planner that prefers greenery and nature in the routes it generates, and biases against busy roads. It can generate round-trip routes that meet a specified distance, as well as point-to-point routes.

I've written a detailed blog post about how Trail Router works here: https://trailrouter.com/blog/how-trail-router-works/
I developed this because I am (or was...) a frequent traveller for work, and I like to run wherever I visit. But I don't enjoy running on busy main roads, and I found that without careful and time consuming route planning that is often what would end up happening if I didn't know the area. Trail Router is my solution to this problem.
After a previous discussion (https://news.ycombinator.com/item?id=23177351) received quite a lot of attention, dang reached out to suggest I post a Show HN to reach a wider audience. I've addressed some of the original feedback too - for example, you can now prefer hills in your routes, as well as avoid them.

pj_mukh5 replies#
We sorely need this for cycling. Komoot is the closest thing but it doesn’t do mileage requests like your app here.

This is awesome!
EDIT: In addition to optimizing for green routes, optimizing for low speed car zones would be a killer feature.

samcrawford3 replies#
Thanks! Cycling is on the to-do list. But I'm conscious it probably wouldn't just be a single category - there would need to be separation for road cycling and mountain biking.

The routing algorithm does already prefer roads with low speed limits, but there is definitely more that could be done in this space (e.g. a slider to set a preference to avoid higher speed roads). It also depends on the availability of speed limit data (I use the OpenStreetMap database).

076ae80a-3c97-44 replies#
The state of apps/web apps for planning road cycling routes is abysmal. If you can implement this you'll immediately be the best.

Continue this thread — 4 replies

nickswan#
You could almost do with a ‘how safe you felt’ rating for each road. Would obviously take a while to build up the data.
pistoriusp#
I frequently do 50km - 60km cycling routes from my home and I've manually figured out the greenest and least busiest routes.

I tested it with your app and the route is near identical to what I've figured (over the course of several thousand km's of trial an error).
I'm amazed!
Edit: I'm usually on a mountain bike.

donjoe1 reply#
cycle.travel does have a feature for mileage requests. It is not very much optimized for dirt routes though...
Doctor_Fegg9 replies#
Thanks for the recommendation - cycle.travel’s my site!

I’d like to do a dirt/gravel profile. Main reason I haven’t so far is that it’s very hardware-intensive (as in tipping over into renting another Hetzner box).

Continue this thread — 9 replies

rorykoehler#
Komoot does mileage requests. I use it nearly every ride.
stugrey2 replies#
Maybe check out Huli who are working on exactly this amongst other things https://huli.life/
notatoad#
this actually looks pretty cool, but if i'm being honest i just want to use it because they had the guts to call their company hooli.
efrecon#
huli looks promising, but they just have cycling right now. It's a no go for long(ish) runners.
mvkel#
This already exists! It’s an app called EasyRoute
lfuller#
This is actually a wonderful product - thanks for making it! I've looked for a website that did this for a long time, and this works surprisingly well. It actually produced a route that is very similar to one I found myself.
karussell1 reply#
The blog post provides a lot of insights. Good read. Some questions.

Do you plan to support area routing?
And you write: "However, the good news ended there: Openrouteservice does not publish the code for calculating this green index". Is your code publicly available and allows "the news to end good" ;) and maybe even integrated elsewhere?

samcrawford#
Area routing is definitely a topic of interest. It looks like it's still a topic of discussion too: https://github.com/graphhopper/graphhopper/issues/82. Maybe it's something I can help with in the future.

Good point RE the green index calculation. The very least I could do would be to upstream a reference implementation and documentation back to Openrouteservice. I will take care of that.

runnr_az#
Super cool... this is definitely a thing I’ll use
Schweigi1 reply#
Wow, great project. I was working on exactly this in 2015 using Grasshopper but never finished it. I like how much time you invested to solve all the tiny details around the edge cases. Like prefering certain streets, no-hills and trying not to run the same street twice. It wasn’t clear to me from the blog article, does prefer “green” also prefer water areas?
samcrawford1 reply#
Thanks! Yes, the "greenery" preference also prefers water.
fouc1 reply#
It would be nice if the water preference could be adjusted in preferences perhaps.

Continue this thread — 1 reply

cullenking3 replies#
Hey Sam, I run ridewithgps.com and have been reaching into the guts of graphhopper to do interesting routing stuff as well. We just silently rolled out popularity based routing, where we used our database of 50mm rides to build a popularity graph which is used to add a popularity weight in routing decisions. Got a long pipeline of other projects coming out in the same space. Drop me a line if you ever want to yack about these things! cullen@ridewithgps.com
TrueGeek1 reply#
Are you guys considering adding in more social features to compete with Strava? It’s seems an excellent opportunity right now with so many people upset with them. A simple UI update showing a feed, add a kudos system... you’re halfway there.
cullenking#
That's actually one of our main focuses over the next two months, along with mapping and routing improvements. We've seen a decent uptick in people migrating, and they are asking for more social stuff. We've always been shy about becoming a social network, so our focus is on making it much easier to connect with people you know, see what they are doing, while making it optional and not pushing it too hard to our existing users.
cullenking#
Reply to my own reply to say, I forgot to mention this is really cool, and a fun use of OSM data I hadn't thought of before. Nice work!
samcrawford#
I certainly will, thanks! And congratulations on all your success with Ride with GPS. I'm not really a cyclist, so I only used it for the first time last night, but it looked and worked great for me.

Continue this thread — 4 more replies

chrisdalke2 replies#
Nice job, the algorithm is really effective! I tried this in multiple cities where it ended up recommending very similar routes to some of my established running routes, and even some new combinations :)

Love that your algorithm tries to exclude out-and-backs, I think that goes a long way to make the routes feel organic and appeal to runners. This is really polished and I wish you the best!
One feature suggestion: I wonder if you could have a flag to generate routes starting in parking lots/park entrances in a radius around the starting location. This could go a long way to recommend some common long-run routes where you need to travel a brief distance via car or public transportation but then can get 10-20 miles entirely in the woods.

samcrawford1 reply#
Thanks! The avoidance of out-and-backs was a must-have for me. It can definitely be improved though. For example, right now the algorithm tries to avoid traversing the same path twice, but it will happily use a path that is only a few metres away! So adding some buffer around that (to penalise paths that are close to one already taken, if not the same) is a future bit of work.

Your suggestion is a nice one. Here in the UK, where it's common to have trains connecting most towns and larger areas, I have thought about adding the ability to say "I want to run 20 miles, and finish at a train station that can get me home in under an hour". Assuming the user is using a car makes it more easily achievable though. Consider it on the todo list!

mtnGoat1 reply#
wait, it avoids out-and-backs? could have fooled me, all the routes it showed for my house were out and backs, some had multiple points of out and back(like a letter Y or E)... i guess thats why i hate running near home, everything is an out and back and even the computer cant find an alternative. :)
samcrawford#
It tries to! But if there's no good way to avoid them, then it will end up taking them anyway.

More specifically, when 'avoid repetition' is enabled (it is by default), then the routing algorithm has a very significant penalty weight applied to any existing path already taken.

knownhoot#
+1 for the concept of starting in parking lots or trailheads
codingdave1 reply#
I live in a small town that is getting grown over by suburbia. The routes ignore all the nice open farm fields to the east of me, and runs me down the busiest streets through some of the most dangerous intersections in my entire state, just to skim by the edge of a park in the city.

In that same 6 mile distance, in addition to running past the farms, it could have run me up to the base of the mountains, down the nice bike trail that goes through groves of trees and open field, then back home.
This is one reason I love testing apps like this - my town almost always messes them up.

samcrawford1 reply#
Would you mind sharing the name of your town? Feel free to email me directly if you wish, contact details are in my profile. It could be that OpenStreetMap data (which I use extensively in the algorithm) isn't very detailed for your area, but I'm keen to investigate further.
codingdave1 reply#
I don't mind sharing the town - Spanish Fork, UT 84660

Especially check out the east side of town, it seems like it wants to go into town for anything short of a 15 mile loop, whereas going east is far more natural.

samcrawford#
It's not finding any green 'features' in the vicinity (I know, the mountain range off to the east would beg to differ...), so it's falling back to guessing a direction in which to head. I can see that the Uinta-Wasatch-Cache National Forest is tagged properly in OpenStreetMap though (https://www.openstreetmap.org/relation/3502235), so this should be something I'm able to improve on. Thanks again for your feedback!

Load more comments