Hi, I'm doing a program on nodejs where I need to know how close I am to a point. I have two points represented by coordinates and I need the minutes it would take to get from one point to another. The request or query would be to the global OSM, I cannot have an instance of this. Would this be possible? Thank you very much. asked 16 May '18, 11:08 Wolfindel |
Hello, I suggest you have a look at : Both are routing API based on OpenStreetMap data. You can test both here : https://www.openstreetmap.org/directions answered 16 May '18, 15:59 jbelien Thank you so much for the answer. "https://www.graphhopper.com/" is paid but "http://project-osrm.org/" is free and works well. However, with this one you can only make a few requests and I need to make several in a row, so I don't think that with that limitation it will work for me. He complains about the following when making several inquiries"{ message: 'Too Many Requests' }". Can I get the html from the code of a route request on OSM? For example, from this query "https://www.openstreetmap.org/directions?engine=graphhopper_car&route=38.0088%2C-1.1588%3B37.9859%2C-1.1306#map=14/37.9992/-1.1453" keep the minutes of arrival. Thank you very much.
(24 May '18, 11:51)
Wolfindel
The route request on OSM uses GraphHopper or OSRM. That's why I suggested to use those :) If you need a free and open-source solution without any request limitation, have a look at Itinero Routing API (developed by Ben Abelshausen) : https://github.com/itinero/routing-api I published a tutorial on how to install (and use) it : https://gist.github.com/jbelien/84273bf8dcf9038b0a2cd7ef2cb80142
(24 May '18, 12:07)
jbelien
Installing Graphhopper locally is relatively simple. Or try pgrouting on PostGIS (osm2po is a simple to use tool to populate the DB)
(24 May '18, 12:37)
SK53 ♦
|