5 ms·
There's (justifiably) a lot of love for Mapbox in this thread as an alternative, but as remarked, their pricing isn't particularly cheap (why should it be, they
by Doctor_Fegg 9y ago
There's (justifiably) a lot of love for Mapbox in this thread as an alternative, but as remarked, their pricing isn't particularly cheap (why should it be, they sell on the quality of the product).
So the other option is to self-host tools using OpenStreetMap data. Some pointers:
* Raster tiled maps: the canonical instructions are at switch2osm.org; put it on commodity hardware such as Hetzner/OVH.
* Vector maps: a lot of development in this area at the moment and you could happily lose yourself for days among all the emerging solutions, but probably the easiest out-of-the-box solution is openmaptiles.org.
* Geocoding: Photon (https://github.com/komoot/photon https://github.com/komoot/photon) is the easiest to set up because it comes with precompiled indexes - no need to generate your own. Based on ElasticSearch, needs SSD for reasonable performance.
* Routing: OSRM (Mapbox's routing engine) and Graphhopper are both self-hostable. OSRM is very RAM-hungry, but blazingly fast.
This is just a start - there are many more options available, not least the whole stack developed by Mapzen before they shut down. The raw OSM data is downloadable from planet.openstreetmap.org (full dump) or http://download.geofabrik.de/ http://download.geofabrik.de/ (regional extracts).
Worth noting as well that there are a few well-established and competitively priced indie providers based on OSM: Thunderforest (http://thunderforest.com/ http://thunderforest.com/), Geofabrik (http://geofabrik.de/ http://geofabrik.de/), Graphhopper (https://www.graphhopper.com/ https://www.graphhopper.com/).
- lukeqsee 9y agoWe also do map tiles (based on OSM), static maps, and routing. We’re a new startup this year, and one of our goals is transparent and reasonable pricing. https://stadiamaps.com https://stadiamaps.com
- zylepe 8y agoI recently did an evaluation of Valhalla, ORSM, and Graphhopper for routing based on openstreetmap data. Valhalla was nice in that it could preprocess and serve results with only a few GB of RAM, but it could only handle <1rps as the end was more than a few miles from the start since it doesn’t use contraction hierarchies. OSRM was super fast, especially for very short routes (>1k rps on a single core) but it requires 300+GB of RAM to preprocess the world and 64GB of RAM to serve direction requests which gets a bit too expensive for me. Graphhopper was nearly as fast as OSRM for short routes, but just as fast for longer routes. It can preprocess the world with only 64GB of RAM, and can serve direction requests happily on machine with only 16GB of RAM. I ended up going with Graphhopper, but still may need to shut down my site...
- Axtrix 8y agoI'm going to do a similar test to evaluate some routing alternatives. How did you perform your tests?
- zylepe 8y agoFor routing performance I ran them each locally with instructions from their github repos and the OSM extracts for a single state or city from https://download.geofabrik.de https://download.geofabrik.de then used https://github.com/codesenberg/bombardier https://github.com/codesenberg/bombardier to test latency/throughput with sample requests. For resources to preprocess the world I ran Valhalla on my laptop and it preprocessed the world overnight. For graphhopper I kept running it on bigger and bigger digitalocean droplets until it just barely finished on their $640/month 64gb cpu-optimized droplet in about 12h. I didn’t even try osrm after reading that it needed about 300gb of ram. Let me know if you have any better findings!