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, 10:32

Gustav's gravatar image

Gustav
213
accept rate: 0%

edited 11 Apr, 12:31

scai's gravatar image

scai ♦
30.9k18278431


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"/>

permanent link

answered 12 Apr, 06:21

escada's gravatar image

escada
17.1k16141271
accept rate: 21%

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:

×127
×118
×44

question asked: 11 Apr, 10:32

question was seen: 170 times

last updated: 12 Apr, 06:21

powered by OSQA