Why not ask your question on the new OpenStreetMap Community Forum?

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

What do I need to add? Sincerely, Gustav

asked 11 Apr '19, 10:32

Gustav's gravatar image

accept rate: 0%

edited 11 Apr '19, 12:31

scai's gravatar image

scai ♦

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 '19, 06:21

escada's gravatar image

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



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:


question asked: 11 Apr '19, 10:32

question was seen: 1,766 times

last updated: 12 Apr '19, 06:21

powered by OSQA