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, 11:08

Wolfindel's gravatar image

Wolfindel
112
accept rate: 0%


Hello,

I suggest you have a look at :
- https://www.graphhopper.com/
- http://project-osrm.org/

Both are routing API based on OpenStreetMap data. You can test both here : https://www.openstreetmap.org/directions

permanent link

answered 16 May, 15:59

jbelien's gravatar image

jbelien
766
accept rate: 0%

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.

(yesterday) 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

(yesterday) jbelien

Installing Graphhopper locally is relatively simple. Or try pgrouting on PostGIS (osm2po is a simple to use tool to populate the DB)

(yesterday) SK53 ♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×462
×22

question asked: 16 May, 11:08

question was seen: 122 times

last updated: yesterday

powered by OSQA