10 - The default set

Overpass queries consist of statements that query the OSM database to build up a set of results which can be serialised into different output formats.

That set of results has a name. It's called _(underscore).

All of the queries we've written so far have implicitly worked with this result set.

Our node queries have added results to the _ set and the out statements have used the default set to produce our output.

The query below makes this use of the default set more obvious by explicitly using it in the individual statements.

The results of a statement can be written to a named set using the -> operator.

As we'll see in the following examples it is possible to create, manipulate and produce output from multiple named sets of results.

Source File10-the-default-set.osm
  • Leigh Dodds