This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Overpass query: how to select unclosed ways that have no tags?

1

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


2 Answers:

4

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/

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

1

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);

answered 20 Oct '21, 18:08

DaveF's gravatar image

DaveF
3.3k8498133
accept rate: 16%

Source code available on GitHub .