We have a application where we need routing information(Transport distance) between two points so I am trying to setup my own routing server. I used OSRM backend API to calculate routing waypoints but they have usage limit. Alternatives to that are Mapbox(Paid APIs), Openlayers(Free APIs). Geofabrik provides data extracts in .osm.pbf format But how can I use the data to to get routing information(distance between two LatLong). I explored leaflet library also, but they seems to be using same OSRM backend API. Should I create my own library to access this data or using Openlayers is good option? Any suggestions, ideas or if I am mising out anything, Please guide me. asked 03 Mar '23, 14:05 Vikas Singla |
You can set up either GraphHopper or OSRM on your own infrastructure, then load a PBF file from Geofabrik into that software, and then use the API on your own server. Both Leaflet and OpenLayers can be used but the routing software's API could also be used directly by the application that requires the distance, no need to use a Javascript library. answered 03 Mar '23, 15:50 Frederik Ramm ♦ Hey thanks, I was able set up my own OSRM and load pbf file from Geofabrik. However, if I load for smaller region like berlin. It works. But if I try it for entire US. It does not. I am trying to figure out.
(06 Mar '23, 04:49)
Vikas Singla
1
OSRM has hefty hardware requirements and you may need a bigger server to run the whole US.
(06 Mar '23, 11:35)
Richard ♦
|