2

I would like to find gated communities in Argentina. Thus far, I have been able to filter the ones which are explicitly tagged as such, i.e. those with the tag residential=gated. This is the query I have used:

{{geocodeArea:Argentina}}->.searchArea;
(
  nwr["landuse"="residential"]["residential"="gated"](area.searchArea);
  nwr["landuse"="residential"]["barrier"="fence"](area.searchArea);
  nwr["gated_community"="yes"](area.searchArea);
);

However, there are several places which are not tagged in this way, but I know that are gated communities, like this place. In this particular case, and in many others, I see there are ways inside tagged as access=private (e.g. this way). Hence, my question is how can I search for areas which contain ways tagged like this?

1 Answer 1

1

For this can be used is_in. This outputs all elements that have the provided points respectively nodes inside. Ways are not supported with is_in, so the nodes of the ways must be extracted before using the > query statement. Furthermore, the resulting areas are to be processed using pivot.

This outputs all areas with paths that are private:

{{geocodeArea:Argentina}} -> .searchArea;
way["access"="private"](area.searchArea); >; 
is_in;
wr(pivot)["landuse"="residential"];
out geom;

@ Overpass

The amount of extracted areas can be further reduced, since the paths are already defined with gated and fence and are not needed again in the result:

{{geocodeArea:Argentina}} -> .searchArea;
way["access"="private"](area.searchArea); >; 
is_in;
wr(pivot)["landuse"="residential"]["residential"!="gated"]["barrier"!="fence"];
out geom;

@ Overpass

1
  • Thank you! This looks quite promising! Commented Jun 3, 2024 at 18:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.