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

I am using overpas turbo to extract nodes from highways(=motorway). Below is the code that I am using. However, this code gives me all the nodes in the bounding box and does not filter the highways.

[out:xml];
(
(way(39.90,32.83,39.96,32.89);)->.a;
((way.a["highway"="motorway"]);)->.b;
((way.a["highway"="motorway_link"]);)->.b;
);
(.b;>;);
out body qt;

asked 17 Mar '15, 05:04

Manish%20Bansal's gravatar image

Manish Bansal
16335
accept rate: 0%

edited 17 Mar '15, 05:12


You must specify the input set of the recuse down operator as well: .b >;, otherwise it will recuse down the current default input set, which here is set by the outermost union parentheses.

Also: when you set the same output data set twice to the same variable (here: ->.b), the former will be overridden by the latter. If you want to merge the results, you'd have to use an union: (…)->.b;. You can also combine a bbox and a tag query into one statement to get the query more concise: way(<bbox>)[<tag>];. In the end the query you are looking for could look like this: http://overpass-turbo.eu/s/8e0

permanent link

answered 17 Mar '15, 07:01

tyr_asd's gravatar image

tyr_asd
1.2k51927
accept rate: 64%

Thank you very much for your help.

(17 Mar '15, 07:44) Manish Bansal

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:

×483
×228
×163

question asked: 17 Mar '15, 05:04

question was seen: 3,535 times

last updated: 17 Mar '15, 07:44

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