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

Is it possible to have maxspeed for a node ?

0

Hi All,

My idea is to calculate the max speed by using the open street apis giving latitude and longitude as inputs I am able to do it when the osm type is "way" . But for some of the latitude and longitude the osm type returned is "node" instead of "way" (It may be relation also) for which i am not able to calculate the max speed . Is there a possibility that a particular node can have a max speed associated ?

Any thoughts ?

asked 10 Jul '15, 08:19

Gauravk's gravatar image

Gauravk
16557
accept rate: 0%


One Answer:

1

Which API are you using exactly? You shouldn't use the main API for such queries, instead use Overpass API which is both faster and more flexible.

With Overpass API you can specify the types of elements to query for. This means you can query just for ways if you like, see an example on overpass turbo.

For answering your original question: A maxspeed tag on a node doesn't really make sense because it lacks one important information: where does it start and where does it end? So this is no typical tagging scheme and can be completely ignored. The only useful meaning is combining it with a traffic_sign tag. But in this case it mainly refers to a traffic sign which is mostly useful for other mappers and less useful for routers.

answered 10 Jul '15, 11:09

scai's gravatar image

scai ♦
33.3k21309459
accept rate: 23%

Thanks for your response.

I use http://nominatim.openstreetmap.org/reverse to get the osm_id by giving the latitude and longitude

Then using http://overpass-api.de/api/interpreter?data=way(osm_id);out; i get the maxspeed or highway type only if the first url gives a "way" type .

(10 Jul '15, 14:43) Gauravk

Source code available on GitHub .