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

Overpass ‘around’. Could someone explain this routine please?

1

Hi I've run out of intelligence for Isolated Buildings Routine

way[building]({{bbox}})->.a;
foreach .a (
  way.a(around:1000);
  way._(if:count(ways) == 1);
  out center;
);
  • How does it know we want to find objects further away than 1000m? All other examples I read find objects within the specified distance.

  • Underscores are the default variable name for the default set. As it explicitly creates set 'a', what is in the default set? Is it a copy of set 'a'?

Thanks

asked 05 Jun '18, 22:59

DaveF's gravatar image

DaveF
3.3k8498133
accept rate: 16%

I'm not sure about the set question. As for your other question, it looks like it's counting how many buildings are within 1000m of each building. If there's only one (the building in question), then it's included as part of the results because there aren't any other buildings within 1000m.

(06 Jun '18, 00:09) alester

Ah, yes, of course. Thanks. Clearer now. I tried swapping '_' with 'a' & got different results so It appears it isn't a copy of 'a'

(06 Jun '18, 12:20) DaveF

Source code available on GitHub .