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


Hey guys,

Another Overpass QL question. I'm using Overpass Turbo and trying to realise the following query:


I'm trying to get nodes with a certain tag if there are member of a certain way.


I want all nodes that have the tag barrier=lift_gate and are on ways that are highway=living_street or highway=residential.

Here's a first try on Overpass Turbo. I got all nodes and used recurse up to get the corresponding ways. But how do i filter them?


out body;
out skel qt;

Thanks in advance!

asked 03 Jan '15, 22:18

kerosin's gravatar image

accept rate: 0%

I will use a slightly different approach here: as a first step, we search for all relevant ways in a bbox, then determine all nodes belonging to those ways and eventually filter nodes we're interested in:

out meta;

See documentation for details.

permanent link

answered 04 Jan '15, 09:01

mmd's gravatar image

accept rate: 37%

edited 04 Jan '15, 09:28


Okay, thank you very much! I thought the approach of getting all ways first might be too inefficient. Another question, trying to extend your code: I got all nodes (barrier=lift_gate) that are a part of a set of highways (residential+living_street). Is it possible to ask if they are not connected to another type of street (track,service etc)? Mostly the type of highway changes on a barrier node (e.g. way with highway=residential|node with barrier=lift_gate|way with highway=service). I only want to get nodes that are connected on both ends with the same set of highways.

(04 Jan '15, 11:23) kerosin

meta: @kerosin: I am not sure, but I think this might be suitable for a new question (e.g. "how to remove nodes from a set which are connected to two differently tagged ways"). This would help others having the same question more.

(04 Jan '15, 11:42) aseerel4c26 ♦

@kerosin: sure that's possible: Compare vs . Will you create a new question?

(04 Jan '15, 11:52) mmd

Okay, thanks for suggestions and the overpass query :) Of course I will post a new question for others!

(04 Jan '15, 13:35) kerosin

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]( "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: 03 Jan '15, 22:18

question was seen: 10,060 times

last updated: 04 Jan '15, 13:35

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