Comment

Comment by maxerickson

The mentioned Overpass API uses sets as a sort of fundamental concept, so the code

    way[building][!name];foreach{(._;>;);out;}
can be replaced with

    way[building][!name];(._;>;);out;
The "(._;>;);" stanza is sort of dense and seems opaque without knowing what it's doing, but it's straightforward, returning the union "();" of the previous result "._;" and the children of the previous result ">;".

The change I propose above adjusts the ">;" to operate on all of the "way[building][!name];" results together, rather than each element one at the time.

parent maxerickson 2 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton