Overpass Tutorial
- 00 - The Beginning
- 01 - Finding nodes with a bounding box
- 02 - Outputting data about nodes
- 03 - Filtering nodes that have a tag
- 04 - Find nodes by matching tags and their values
- 05 - Find nodes by applying multiple filters
- 06 - Extracting multiple sets of nodes
- 07 - Calculating differences between results
- 08 - Generating JSON output
- 09 - Generating CSV output
- 10 - The default set
- 11 - Querying a set
- 12 - Searching within a radius using around
- 13 - Using around to filter against a set of results
- 14 - Searching by polygon
- 15 - Finding ways
- 16 - Ways and their nodes
- 17 - Ways and their tags
- 18 - Combining node and way queries
- 19 - Finding ways from their nodes
- 20 - Finding relations
- 21 - Type agnostic queries (nwr)
- 22 - Areas
- 23 - Finding the areas enclosing a feature
- 24 - Find the area derived from a feature
- 25 - Areas via Nominatim search
- 26 - Timeouts and endpoints
02 - Outputting data about nodes
This query shows how to create different levels of detail in the output from your query.
The out
statement can be controlled by adding some parameters to it. These
are appended to the statement.
The parameters can be used to control things like:
- how much information is extracted about each node (or way, or relation)
- how geographic information is output
- sorting and limiting results
In this query we are just looking at the first of these: how to control the level of data provided for each node.
The different parameters are:
ids
- outputs only the id of nodestags
- outputs only the id and tags attached to a nodeskel
- outputs only the id and geometrybody
- output id, geometry and tagsmeta
- output id, geometry, tags plus change history
Because they don't output any coordinates, the first two options will cause the IDE to only show you some XML output. It can't generate a map from a list of ids and tags.
Run the query, trying different parameters. You can click around on the map to see the different levels of detail provided for the nodes that are returned.
If you look closely when using the body
and meta
options, you'll see that
the majority of nodes returned don't have any tags.
This is typically because these nodes are being used as members of a way or relation. For example, to describe the location of a road or footpath. They aren't points of interest in their own right.
Links | |
Source File | 02-node-output.osm |
Authors |
|