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

How to know if the street is oneway or not

0

Hi! I am using overpass turbo to extract data from OpenStreetMap. I export the data in Json format and in the data I can find information about the speed at the road for an example. But I also want to know if the road is a oneway road or not. How can I write the code to tell me if it is a oneway or not? This is my code for residential roads now.

  <query type="way" into="data">
    <bbox-query {{bbox}}/>
    <has-kv k="highway" v="residential"/>
  </query>

What do I need to add? Sincerely, Gustav

asked 11 Apr '19, 10:32

Gustav's gravatar image

Gustav
21223
accept rate: 0%

edited 11 Apr '19, 12:31

scai's gravatar image

scai ♦
33.3k21309459


One Answer:

3

You do not have to adapt your query if you want all residential roads. The reply will also contain oneway streets. Those streets will have the extra tag oneway=yes or oneway=-1. The latter means that the oneway is in the opposite direction of the drawing of the way.

If you only want oneway streets, you have to add

<has-kv k="oneway" regv="yes|-1"/>

answered 12 Apr '19, 06:21

escada's gravatar image

escada
19.0k16166302
accept rate: 21%