Show HN: Bike route planner that follows almost only official bike trails (trailimap.com)
For each request you're shown what bike tracks/trails your route uses and can further explore them by showing them on map or going to the official trail route.
The main idea for the app is to have a friendly and easy to use planner that would make heavy use of official bike trails data (mainly from OpenStreetMap) and make it easy to plan a longer trip using the best possible bike routes out there.
Currently the app only works for the Euro region but I'm planning to add North America very soon and then rest of the world.
Technical overview: Route finding - Graphhopper sitting in a docker container on a Hetzner server somewhere in Germany. It has 38 GB of graph data(Europe) loaded into RAM for a fast graph traversal.
Web App - Next.js 14 with Typescript, backend on the newest version of .NET
Map tiles - right now I'm using MapTiler their free tier but planning to switch to my own home server soon and host the maps on it.
155 comments
[ 2.6 ms ] story [ 56.2 ms ] threadhttps://brouter.de/essbee/
I added a similar feature to cycle.travel (my site) a few months back. 5% of the work was writing the code to route only on waymarked routes, 95% was writing code to "heal" the accidental breaks in OSM bike route data...
Doing OSM editing from Mapillary imagery in various US states, I find that the roads that have roadside signage as “official bike routes”, predate modern safe(r) bike infrastructure. These are often highways that frankly look like death traps: no shoulder, high speed limits. Especially when so many North American long-haul cyclists now are riding “bikepacking” setups, it may be preferable for a router to prioritize quiet agricultural tracks and other unpaved terrain over the supposedly official bike route.
cycle.travel treats routes in the States differently to those in Europe for precisely this reason, and there are some routes which get absolutely zero uplift because many of them are so bad (looking at you, East Coast Greenway).
Edit: I see now that the cycle.travel developer is here in the thread :)
Ideally, I'd also like to highlight roads with diverters, circles, chicanes, bumps, tables, etc.
I have not found any navigation app that preferentially chooses streets with traffic_calming features, such as speed humps. I recently suggested that in OSMAnd and got no traction [0].
[0] https://github.com/osmandapp/OsmAnd/issues/21320
While purpose-built traffic calming infra is super nice to have, I'm somewhat more interested in the much more prevalent (at least, outside Europe and Asia) and also muc less expensive roadways which are traffic-calm by default, owing to natural chicanes, unimproved areas, one-lane bridges, etc.
Bogota, for example, has a fairly elegant network of unimproved roads connecting the parks. If you take a ride with a local, you see the bike infra much more acutely than what is expressed on gmaps, or even theoretically by looking at `traffic_calming==true`. A much more granular data type is required.
It's a mostly a style for OSM with hillshading applied. The Friedrich-Alexander-Universität Erlangen-Nürnberg is hosting a web-based "preview" of it at https://opentopomap.org. https://brouter.de/brouter-web and https://bikerouter.de also have it as a selectable map layer, and it can also be added to OsmAnd.
May be useful to you or others in this thread. We lean pretty heavily into the "cycling power user" market segment, the feature set isn't always the most discoverable but it's quite comprehensive if you put in the up-front time to learn the tooling (similar to a lot of other specialty mapping apps out there - caltopo, fatmap (rip) etc)
I'd spend up to a $100 once on a killer tool that meets all my needs in this space.
This subscription first crap is way out of hand.
* excellent, almost entirely bug-free routing on mobile
* heatmap data, because maps aren't entirely up-to-date
* multiple map styles, so you can pick what works best for your workflow and the country you're in
* easy GPX file export, I use it all the time with the bike computer (every day on tours)
* collection management, especially useful when I make per-day routes for a tour
* a healthy trial period so you can actually test it out and learn it
Basically it's just an excellent app (and site) that works reliably across every supported platform, that isn't full of spammy upselling garbage, that is clearly made by a competent team of developers who care deeply about the product they make.
Every tech product should be made like this. A lot of tech products used to be like this before enshittification really took off in the last 5-10 years.
I'm more than happy to support a great product like this, as a bicycle tourist and frequent router over unfrequented trails and dirt roads in the mountains around me. For road riders in cities, it's probably a whole lot less useful. But there are a lot of bicycle riding use cases outside of 'road riders in cities' :-)
This is me as well. Thanks much for your perspective, it was helpful in me making the decision to jump in.
I do like the idea of supporting products and services that are staving off enshitificaiton.
Why should it be a subscription instead of a pay-once app? Maps have to update as the real world updates, and probably they have other features that can't be on-device.
I'm paying for $1 and $5 subscriptions (ko-fi) for things I like and use. But $10 is getting too high for a thing even though I use it every day. Within five months I'm already past the value of my bike. I need that money to change parts to be able to continue biking.
What I ususally do is a one-month subscription to support. Then I turn it off for the rest of the year.
omg... what?
For me to sign up with a 3rd party service to pay a subscription: yes, $10/month is probably the smallest fee I'd bother with.
To add a subscription through my Apple devices, where I can manage my apps in a single pane of glass and start/stop subscriptions at will, I'm fine with paying $10/year, $2/month, whatever.
We have 14 machines in a rack at a datacenter in PDX, and have focused on low hosting costs since we have historically been bootstrapped and margin sensitive. Redundant switches, 2 firewall/load balancers, 4 compute machines, 3 database machines, 5 storage servers. Single upstream network provider, about to be two sometime next year. Rack space + power + redundant network is about $3500 a month. Machines have an average service life of about 5 years.
Database machines cost about $45k for a set of three.
Storing user data is non-trivial - GPS track files add up when you get close to a billion of them, photos are also very large. We use a self-hosted ceph object storage cluster of 5 machines, about $100k of hardware. it's cheaper than 20k a month in S3 bills.
Our rack all-in is probably about $250k of equipment. 5 year service life, probably $5k a month amortized out. So, doing things as cheap as possible (I buy nvme SSDs for storage cluster off ebay, and am about to buy a couple arista 100gbe switches from ebay as well) we are somewhere around $8500 a month on hosting.
We use both google maps as well as self-hosted OSM based map and routing services. About half our map usage goes to google, by user preference, and we pay them about $20,000 per month for that. Our self-hosted OSM map stuff require 1tb of ram, fast disks, a ton of CPU cores. We host 10 different planet scale routing profiles via graphhopper, which take 3 days to build every week with updated data. They also host a vector maps stack which is much more efficient, taking about 3 hours a week to build.
My last estimate of an AWS bill for all the above was $30k a month, assuming some discounts. We have grown since then and I'd napkin us to be > $40k a month at this point.
We strive to minimize any costs for third party platforms. We do use amplitude for analytics, that's > $30k a year at this point. We do use an external email service for easy marketing emails, but the majority of our millions of emails a month are sent from our own mail servers, using an in-house system we made a decade ago that still works well. We try to minimize vendor lockin and costs, where it makes sense.
Most expensive part of the entire company of course is salaries, with of course an eye to developer and related salaries. We run pretty bare bones where possible, with a flat management structure with minimal overhead. Our total staff size is 32, of which 6 are full-time end user support.
A bit of a ramble, sorry, but there's a large amount of overhead to run a system like ours. We don't just make a one-time use desktop application, we have to continually provide storage and compute for all users. If we stopped that, the entire service would fall apart. So yes, a subscription makes sense in a case like ours. You can't do what we do with a desktop app. Plus, the entire world has switched to mobile for this sort of consumer application, which is an entire rat race of it's own. You can't just release a single purchase app and expect it to be maintained, it's a massive effort to keep up with mobile development just to maintain features, much less build anything new.
One comment: I hope you don't start emphasizing the "social media" aspects, like Strava has done, to their detriment, in my opinion. That's what prompted me to finally delete my Strava account (after uploading my thousands of activities to ridewithgps.)
Congratulations to your team on keeping costs low and running a successful business out of a single rack.
I have been enjoying this on-prem renaissance that we've seen over the last couple of years, makes my stubbornness around self-hosting feel smart in hindsight ;)
This post, combined with the fact that your planner actually allows me to force a path has won me as a customer. I'll also note that setting your yearly at 75% of the monthly is wise considering very low winter time usage.
For me, churn or not is going to come down to whether I can read critical details on your mobile app without having to put reading glasses on. (which is a factor that not even a $2t company like Apple can address properly)
Serious cyclists tend to be on the older side…
I have also worked with gps data and run my own map server (for a small country) so I know it costs money, time and effort. And thanks for the breakdown!
of course; this is primarily a US audience (maybe parts of Europe)
One little feature that's great is the quick link to view Google Streetview images, and the only thing I'd change is to have it let me do that anywhere on the map (not just on the route) so that I can look at alternatives without dragging the route there first.
UI is not as good but, there is very useful tools like camping, train station, the ability to split your trip in steps ect.
[0] - https://cyclers.app/
[1] - https://www.cyclestreets.net/
This looks interesting and the mobile app seems well made, I like that it suggests multiple routes. Currently I just use Google Maps and it sucks here as well.
So far, every planner I have tried from this thread has just been frustrating in one way or another. It seems very hard for most to understand things like road+MTB in one ride or that the map shows that the road doesn't go through, but I can simply walk through a gate that a car can't.
Cool idea, i'd love to try it but honestly i'd love it on my phone for the aforementioned reasons!
---
Edit: Some follow up remarks (From Chrome on a Mac)
1. I found it a bit confusing when creating a route. I assumed it would let me do address completion. The UI seems to just be naming my route instead, i think if you're going to borrow visually from Google maps you should follow their patterns.
2. I was able to add my first point (my home), but adding a second point never worked.
3. The click mechanic is a bit odd. I expect clicking elsewhere when the menu is open (add point/close) that the menu would go away - rather than re-appear in my new click location.
4. The map centred me over Europe, i'm in Canada however. Some GeoIP lookup here could give a better experience.
5. Re:point 2, this seems to work when i selected random locations in Europe. I assume this is a data issue? So the real issue here (apart from the routing not working) is there's no feedback on the UI when the routing fails.
6. Refreshing my screen loses my route. Any chance you could save it to local storage or something? Would be amazing if i could create this route on my desktop and then send a link to my phone (once mobile is supported?)
I couldn't imagine trying to build a complex route on a tiny screen with a crappy phone UI. I am starting to feel like an old man yelling at clouds here. Why in the hell wouldn't you prefer to use a nice monitor with a mouse for a complex task like this?
I nearly always plan routes on my phone. After all, it's the device I use for navigation attached to the stem of my bike.
> Why in the hell wouldn't you prefer to use a nice monitor with a mouse for a complex task like this?
The task isn't very complex with a decent UI. See for example the open-source app OSMAnd (Android & iPhone). Also, I am rarely at my desk, but I always have my phone on me. There can also be the issue of "Neat, I made a route on a big screen; now, how do I get it on my phone for real-time navigation?" depending on the app you are using.
Thia isn't to say you're wrong. I much prefer my monitor and mouse for anything of reasonable complexity. But I increasingly find myself in the minority in that regard among people I know. Hell, I even find myself in the minority for using a laptop for tasks sometimes.
Regarding state: it's only a matter of changing the blacklist array in redux persist config. Right now I have all global state blacklisted because I noticed a small bug with rendering the map layers when the state is persisted and I didn't have time to fix it but in the next version it will be persisted in localstorage.
There are simply some things where a phone screen is just too small to use efficiently, and the fingers sometimes aren't just a good, precise enough input device.
Though I am a bit irritated by the brightness of the route on your site, it lacks contrast with respect to the surrounding map.
BTW, how is that routing done? Like which is the used routing engine and is it done server-side or in the browser?
---
It does seem to have a bug, where, when deleting a waypoint, the mouse still is in "create waypoint mode", and any mouse-down on the map, including for panning, results in adding a waypoint.
https://rc.nau.edu/cranc/?profile=ibc&layer=OpenStreetMap
Boulder, Colorado for reference.
`Error fetching route from Graphhopper Error: Network response was not ok`
I tried a couple times and got this in the U.S. In Europe I picked a couple random points and it worked fine.
Unlikely. Even with turn costs enabled 256GB (or less) are sufficient. You could also try to disable CH as for bike often no long routes are required (you could disable them). Here we have written down a few more details: https://www.graphhopper.com/blog/2022/06/27/host-your-own-wo...
I thought I would be able to compute the graph with 64GB of ram but it kept crushing before CH and LM stage. After switching to a 128GB instance, it finally worked, hitting around 90GB at peak memory usage. For context, I was using 3 profiles - one with CH and two with LM, plus elevation data and used all of the tips from deploy.md
Yes, definitely.
> I thought I would be able to compute the graph with 64GB of ram but it kept crushing before CH and LM stage.
For normal GraphHopper and just the EU the 64GB should be more than sufficient.
Maybe you already considered, but there are a number of collection libraries out there that are optimized for holding Java primitives and/or for very large sets of data, which could help you save significant memory. Eclipse Collections [0] and Fastutil [1] come to mind first, but there are many out there [2]
[0] https://github.com/eclipse-collections/eclipse-collections [1] https://fastutil.di.unimi.it/ [2] https://github.com/carrotsearch/hppc/blob/master/ALTERNATIVE...
Another trick for planet size data structure could be to use a List instead of the Map and the OSM ID as index. Because the memory overhead of a Map compared to a List is huge (and you could use DataAccess) and the OSM IDs for planet are nearly adjacent or at least have not that many gaps (as those gaps are refilled I think).
All these tricks (there are more!) are rather tricky&low level but necessary for memory efficiency. A simpler way for your use case could be to just use a database for that, like MapDB or sqlite. But this might be (a lot) slower compared to in-memory stuff.
I've been bikepaking for two years now and I wish I had this tool
I've used komoot in the past but I was never satisfied with the paths it suggested and had to rely on local guides
I've checked with some of the past trips I id and it guesses correctly all of the best paths
Sometimes it's actually better to take the road, or you end up on a windy route that's near impossible to follow, debris everywhere, no right of way, etc.
I would like to try this with a "prefer offroad" option.
I have personally had good luck with my Garmin watch. If I start out near a major trail, it tends to suggest routes along that trail. I’m able to input a desired length such as 10 miles and then it suggests multiple routes that are close to that length and use major trails. My biggest complaint with the Garmin is that it tends to suggest the same routes every day.
BTW Typo: 'Acitvity type' in the UI should be 'Activity type'.