Readit News logoReadit News
Posted by u/ellenhp 4 years ago
Show HN: Self-Hosted Maps Stackmaps.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://maps.ellenhp.me/

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.

devit · 4 years ago
What's the advantage compared to using https://www.openstreetmap.org/ and Organic Maps, or self-hosting them? (the website is https://github.com/openstreetmap/openstreetmap-website and the tile server is https://github.com/gravitystorm/openstreetmap-carto/)
ellenhp · 4 years ago
Mostly just that you can self-host this stack and keep your location information private (the way it should be). If you're fine sharing your current and future whereabouts with people then there's no need to self-host so you're free to pick whatever service is the nicest to use. For most people that's going to be Google or Apple maps, but there's definitely a niche for a project like this.

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.

zaik · 4 years ago
OrganicMaps and OsmAnd operate entirely on local map data and don't send your information to remote servers.
donalhunt · 4 years ago
Looks like it uses OpenStreetMap data. Please ensure attribution is displayed as per the license terms.

See https://www.openstreetmap.org/copyright

teh_klev · 4 years ago
They already do that.
Freak_NL · 4 years ago
It is hidden under the little ⓘ in the bottom right corner. That is a very meagre interpretation of the attribution guidelines. To help combat the idea that a map must be made by some megacorp to be viable, visibility of OpenStreetMap is important.

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.

donalhunt · 4 years ago
Seems to be hit and miss on mobile web (I can trigger the 'i' to show but don't see it in all views).

Currently travelling so will investigate further when somewhere appropriate (may be cached on my phone, something specific to mobile web, etc).

ellenhp · 4 years ago
I'd really love feedback and suggestions by the way! I have a fair amount of experience in maps but I've never just built an entire maps web app from scratch so I'm kind of stumbling through a lot of it, especially the web frontend stuff.
tuukkah · 4 years ago
For a full multimodal routing engine including realtime data for transit, you should have a look at OpenTripPlanner version 2 (if you haven't already): https://www.opentripplanner.org/

For a single solution to geocoding and autocompletion, there's Pelias: https://pelias.io/

ellenhp · 4 years ago
Pelias is pretty difficult to use with the kind of automated config I'm hoping to have for this project but I might give it another go.

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!!!

AlexTrask · 4 years ago
If you only want routes without multimodal you can use Graphhopper https://www.graphhopper.com/
cmroanirgo · 4 years ago
It'd be really great to be able to know what's in the docker black box. It'd be even better to be able to know what the moving parts are for those of us that do self hosting sysadmin style. My VMs are too small for docker... but i'm sure the underlying stack would run without issue.
miyuru · 4 years ago
maps.ellenhp.me has only a IPv4 address and it seems to be hosted on digitalocean, which supports IPv6.

would love to have IPv6 support. It should be on default by now, if there aren't any issues hindering support.

zylepe · 4 years ago
Nice! I was going to point out the project I’ve been working on [1] to reduce the cost but I see you’ve already found it :-) Feel free to reach out it you run into any issues!

[1] https://github.com/onthegomap/planetiler

hedora · 4 years ago
Am I missing something, or does it only cost about $2.27 per month to store all the tiles in Amazon S3? They're definitely not the cheapest game in town.

(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?

ellenhp · 4 years ago
Planetiler isn't for hosting tiles, but generating them. For a planet-scale tile generation job it's the difference between hundreds or thousands of dollars in VPS fees and being able to generate them locally on a modestly equipped desktop. Planetiler does drastically reduce cost in that respect.
ellenhp · 4 years ago
Planetiler is amazing! Thank you for your work.
avibryant · 4 years ago
This is great! If you're interested, I'd love to have you at a GIS/mapping-focused retreat I'm hosting at https://www.gradientretreat.com/ this summer. You can reach out privately at avi@avibryant.com.

Deleted Comment

frzen · 4 years ago
Is there any way to write commands where I could give my own time weighting to certain types of roads for route finding?

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

tmp538394722 · 4 years ago
Very nice!

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?

Doctor_Fegg · 4 years ago
You might want to look into https://cycle.travel/ (my site!), https://brouter.de/brouter-web, Komoot or RideWithGPS - all do OpenStreetMap-powered bike directions.

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.

tmp538394722 · 4 years ago
I just did a quick test of cycle.travel using the last couple trips I took, and it’s pretty good!

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?

ellenhp · 4 years ago
Headway uses Valhalla. Most of what I'm doing with this project is the config to bring up the entire stack easily.
jhgb · 4 years ago
> As a cyclist I’m almost always disappointed by google, apple, and Valhalla

Have you tried the OSRM bike config? (The one you find in https://github.com/Project-OSRM/osrm-backend/blob/master/pro...)

pmontra · 4 years ago
I self host OSM by using OSMAnd+ on my phone and downloading the maps of the areas I move to. I'm not particularly interested in directions so I don't know if they work well. It's missing all the satellite and street view layers and they are the main reason I often go to Google Maps.
franga2000 · 4 years ago
You can enable the "Microsoft Earth" layer for sattelite imagery in OsmAnd, which is (at least in my region) even better than Google's. I have it set as the "underlay map", which means it's drawn on top of OSM background elements, but below roads, buildings and markings. It also gives you a slider right on the map view to adjust the opacity of the OSM elements so you can see just sattelite imagery when you need it or even set it to somewhere in between.

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.

pmontra · 4 years ago
Thank you. I didn't know about those layers. Very useful!

I did know about Mapillary. I'll check if its coverage got better.

maxerickson · 4 years ago
OSMAnd/OSM data varies a good bit by region. In the US, missing addresses are often the only significant issue with directions (and for OSMAnd, no live traffic data).
aaaaaaaaata · 4 years ago
> I'm not particularly interested in directions

What's your use case?

pmontra · 4 years ago
I use it build new tracks for cycling and record them. I explore the map (the OSM road type layer and Google satellite view), place markers about 10 meters after the intersections on the road I must take, follow them. I use my old and smaller phone on a phone holder on the handlebar. The screen is almost always turned off. I turn it on when I know I'm about to need to know where to go. I usually remember the places the next time I cycle on the same road.

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.