drolbr / Overpass-API

A database engine to query the OpenStreetMap data.
http://overpass-api.de
GNU Affero General Public License v3.0
692 stars 90 forks source link

node(r) recursion problem? #646

Closed DaveF63 closed 2 years ago

DaveF63 commented 2 years ago

Is there a reason this returns 'intentionally blank' instead of nodes. I've received the same for a few, different relations

rel(7149329);
node(r);
out center;

This returns the expected nodes:

rel(7149329);
way(r);
node(w);
out center;

https://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL#Recurse_.28n.2C_w.2C_r.2C_bn.2C_bw.2C_br.29

mmd-osm commented 2 years ago

According to the documentation you've cited: node(r); would "select node members of relations in the input set"

Now, because relation 7149329 only has 2 way members and no node members, the first query won't return anything.

Important point here is that nodes, which are part of the way, are not members of the relation itself. They are only indirectly included via their ways, but that's not what node(r); does.

DaveF63 commented 2 years ago

Understand. Thanks.