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

This is what I have until now:

(way({{bbox}}); - way({{bbox}})[~"."~"."];)->.w1;
rel(bw.w1);way(r)->.w2;
(.w1; - .w2;);
(._; >;);
out meta;

But this only selects ways that have no tags and are not part of a relation, so this query gives me untagged areas (closed ways) as well. How can I solve that issue? I know how to do it with other tools, but I need to know if it can be done with Overpass-turbo.

Thanks in advance!

asked 05 Aug '16, 09:09

manuela_butuc's gravatar image

manuela_butuc
156259
accept rate: 100%

edited 05 Aug '16, 13:32


For those googling it's now possible to check for a closed polygon & if there are tags on a way:

way(if:is_closed()==0)(if:count_tags() == 0);
permanent link

answered 20 Oct '21, 18:08

DaveF's gravatar image

DaveF
3.3k8498133
accept rate: 16%

The feature request #197 implies that filtering closed or non-closed ways is currently not possible with Overpass API.

I'd suggest to take a look at JOSM filters instead to do some post processing, more specifically the closed filter. See this blog for details: https://www.mapbox.com/blog/2012-08-15-using-filters-josm/

permanent link

answered 05 Aug '16, 12:17

mmd's gravatar image

mmd
5.7k15388
accept rate: 37%

1

Basically, that was my question, if it can be done in overpass-turbo or not. Thanks for your answer, it was really helpful!

(05 Aug '16, 13:31) manuela_butuc

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:

×236
×228
×191
×167
×6

question asked: 05 Aug '16, 09:09

question was seen: 4,195 times

last updated: 20 Oct '21, 18:08

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