Show HN: Self-Hosted Maps Stack (maps.ellenhp.me)
Over the past week I built a project to let people self-host an entire maps stack so they don't have to send data to the big G. Right now it includes a base map, geocoder and directions server. Currently only bicycle directions are supported, and I'm only hosting tiles for Seattle because I'm unemployed and can't afford to host data for the whole planet. Check it out!
https://github.com/ellenhp/headway
Ultimately I'd like to really focus on transit routing (not implemented) but I'll probably throw a driving mode in there too.
71 comments
[ 5.3 ms ] story [ 114 ms ] threadwould love to have IPv6 support. It should be on default by now, if there aren't any issues hindering support.
For a single solution to geocoding and autocompletion, there's Pelias: https://pelias.io/
OTP is actually really fantastic and it might be a better choice than valhalla's multimodal especially if it can handle GTFS realtime. Thank you for the reminder that it exists!!!
All the good open source tile servers have pivoted into commercial businesses, and I'd like to support the development of a project that stays open.
https://gist.github.com/raggi/d5c8cad1d3c7b25c6748d8322d3c14...
happy to share experiences, etc.
[1] https://github.com/Overv/openstreetmap-tile-server
- https://github.com/systemed/tilemaker (for generating tiles)
- https://github.com/systemed/mod_mbtiles (for serving them)
tilemaker is similar to planetiler which OP is using (it's more configurable but also more memory-hungry).
Most of the OSM data processing is done in the Makefile, but beware that it was very hastily written so it's not a perfect example:
https://github.com/ellenhp/headway/blob/main/Makefile
[1] https://github.com/onthegomap/planetiler
(Your build example says the tiles are 99GB, and their normal tier is $0.023/GB)
I guess the part of the cost that people actually care about is the bandwidth. How do you suggest dealing with that part of the problem?
There’s a python utility to convert mbtiles to pmtiles, but I’m also planning to add native pmtiles output to planetiler soon [2].
[1] https://github.com/protomaps/PMTiles
[2] https://github.com/onthegomap/planetiler/issues/98
Compared to self-hosting an existing project, it is much easier to bring up a new Headway instance:
`make Seattle.up` will bring up a new instance on 8080.
I love the idea of offline maps but I've never used an offline maps app with a decent search experience. I also aim to make Headway very transit focused which will allow it to serve real-time data about transit vehicle locations from GTFS realtime feeds.
edit: I just tried out organic maps and it is GOOD. Way better than OsmAnd. I still want to keep working on Headway but this will be useful in the meantime.
I would absolutely love if this supported an API to get directions. I've worked on a few projects with public transit directions and I'd love to use a common base instead.
(Some of us can't or won't use GH sponsors, paypal etc)
FWIW I'm super hyped about transit/walking/biking/driving directions as well.
[1] https://database.mobilitydata.org/
I'm looking for a way to generate topographical maps...
Or may be you can suggest any alternative project for that?
I have a degoogled Android phone, and location services are one of my bigger frustrations with it. The phone has more than enough room to store the entire planet's maps locally, which means some microg-style replacement for google's location services should be able to compute location name from GPS coordinates, and also pull up map tiles without hitting the network. Both those features are super flaky, especially if the network is down.
This is particularly frustrating because I have Organic Maps installed, and it has already downloaded the necessary databases!
[1] https://shademap.app
[1] https://protomaps.com/docs/pmtiles/
I haven’t looked into the code yet, but I’m especially interested in the routing bit.
As a cyclist I’m almost always disappointed by google, apple, and Valhalla. The cycling directions from these systems are usually better than nothing, but almost always have one or two dangerous or ridiculous segments.
I’ve never tried to solve it myself, only day dreamed.
Any insights?
Getting bike routing right is really challenging, partly because often there genuinely isn’t a good route, and partly because standards and infrastructure (and OSM mapping practice!) differ from country to country. I love the challenge and the feedback from users when it works well, but it’s a massive task.
It’s anecdotal, but definitely better than what I’m seeing with Val halla / google / apple.
Can you share any details about how your route finding works?
Have you tried the OSRM bike config? (The one you find in https://github.com/Project-OSRM/osrm-backend/blob/master/pro...)
See https://www.openstreetmap.org/copyright
ellenhp: Why not start with the attribution toggled open, or some alternative way to highlight the map data's provenance?
edit: Attribution is now shown toggled open at page load, resolving this issue.
Currently travelling so will investigate further when somewhere appropriate (may be cached on my phone, something specific to mobile web, etc).
What's your use case?
Navigation when driving my car: not every month, not many times per year. After all I know the roads, I don't need somebody to tell me where to turn. When I do, it's usually the last km, when the chances to miss an intersection are higher. On main roads or close to home, not so much.
As for Street View, while I haven't looked into getting it into OsmAnd, Mapillary has an official plugin and while its coverage isn't really comparable, it does often have newer images and often saves me an app switch if I just need to see anything in a general area.
I did know about Mapillary. I'll check if its coverage got better.
Google maps, organic maps, osmand+, I still have to double check what crazy suggestion it has made. Single track gravel roads over a perfectly safe alternative a lot of the time.
I have the avoid unpaved roads options ticked... it would be great to have some machine learning magic take a look at a street view picture and decide if there is grass growing up the middle of the road and add a weighted chance of needing to reverse 200 metres when there is other traffic