This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

best way to retrieve speed limit of road

0

Hi,

I'm currently working on an application which returns the speed limit of the road a user is travelling on based on their longitude and latitude. I am currently doing this through two calls.

The first is to nominatim using the reverse geocoding feature to get the osm id.

The second call is then to overpassapi to get the max speed of the road.

Is there a way I can limit it this to one call using either of these services or maybe another service I am unaware of?

Any help on the matter would be appreciated.

Sample calls:

http://nominatim.openstreetmap.org/reverse?format=json&lat=53.95090&lon=-6.37792

http://overpass-api.de/api/interpreter?data=[out:json];way(144887813);out;

J

asked 03 Mar '17, 18:17

tj15's gravatar image

tj15
16112
accept rate: 0%


One Answer:

1

Perhaps you could retrieve all roads around your current location with Overpass' around function, so you do not need the Nominatim call ?

answered 04 Mar '17, 11:23

escada's gravatar image

escada
19.0k16166302
accept rate: 21%

1

Yes I have been looking into this function and it does seem to be more suitable, rather than making the two calls. Thanks for your help!

(04 Mar '17, 23:22) tj15

Source code available on GitHub .