drolbr/Overpass-API

way_cnt and closed ways

Closed this issue · 1 comments

According to the wiki page: The way_cnt criterion selects those nodes that are members of a given number of ways. E.g. the criterion (way_cnt:2) selects all crossings between ways and all nodes where two ways join.

I tested this using closed ways (building), and results look a bit unexpected.

This is what the query returns:

image

I would expect the following result according to the Wiki description:

Note that the result doesn't contain closed ways where the front and back node belong to the same way.

image

Query:

[bbox:51.3424588108006,6.277366876602173,51.345114369370336,6.2813955545425415];
way[building];
node(way_cnt:2);
out;

I believe every node belonging to the same way may only be counted once, i.e. we need to calculate the list of distinct node ids for each way: mmd-osm@fd23189

drolbr commented

Thank you for reporting the issue. Fixed in b40422f