Convert form

to pretty XML to pretty MapQL to compact MapQL to OpenLayers overlay

MapQL

Please input a sequence of queries or actions. Queries extract data into a set, actions produce some output based on their input set.

A simple example is

node[name="Gielgen"]
{ out meta; }

The action is { out meta; }. The general form of an action is .<input variable>{ out <modifiers>; }. The input variable can be ommited; then it defaults to _. Allowed modifiers are

The default options are body and asc.

The query consists of a type selector node and a clause [name="Gielgen"] to select all elements that have a key "name" with value "Gielgen". In general, a query consists of one of the type specifiers node, way or relation (abbreviated rel), an input variable if applicable, one or more clauses and always an output variable. If the output variable is omitted, it defaults to _. The result sets of the clauses are intersected to produce a result. If an input variable is present, the input set is addtionally intersected with the result.

The input variable is inserted before the first clause, the output variable is appended with an arrow: <type>.<input variable><clauses>->.<output variable>.

The following clauses are possible: