NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the 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"/>
  </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


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

escada
19.0k16166302
accept rate: 21%

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:

×228
×163
×49

question asked: 11 Apr '19, 10:32

question was seen: 1,862 times

last updated: 12 Apr '19, 06:21

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum