I get regions with landuse=industrial with this query
[out:json];
area["name"="my_area"]->.searchArea;
(
way["landuse"="industrial"](area.searchArea);
relation["landuse"="industrial"](area.searchArea);
);
out body;
>;
out skel qt;
now i am trying to get the building in that area. (all buildings no matter the tags)
[out:json];
area["name"="my_area"]->.searchArea;
(
way["landuse"="industrial"](area.searchArea)["building"];
relation["landuse"="industrial"](area.searchArea)["building"];
);
out body;
>;
out skel qt;
but this does only return buildings that have the tag "landuse"="industrial"?
I want all buildings with the general area has "landuse"="industrial".
(buildings can have any tags)
Best Answer
The correct solution is a bit more involved, because you need to convert relations explicitly into an internal representation called area (this happens implicitly for ways).
Note: the query uses the shorter version "wr" for ways & relations, as well as "nwr" for nodes, ways & relations to avoid some extra typing.
Check out this overpass turbo link for an example: https://overpass-turbo.eu/s/1tzE
Sample screenshot highlighting buildings both inside landuse=industrial ways and relations: