Search code examples
openstreetmapoverpass-api

OSM : More nodes in a way than defined nodes


Using OverPass I am requesting all the ways and nodes in a specific area.

The documentation says : "The nodes defining the geometry of the way are enumerated in the correct order, and indicated only by reference using their unique identifier. These nodes must have been already defined separately with their coordinates."

But in the result I get, the definitions of some nodes are missing, as I get some nodes ID child of a way that I can't find in the nodes definition.

Here is my OverPass QL query :

[bbox:{{bbox}}];
(
node;
<;
);
out;

I am missing something ?

Thank you.


Solution

  • Your query doesn't request all "ways and nodes". Instead it just requests nodes and performs a "recurse up" to get ways these nodes are part of. However for these ways you will only obtain the nodes from your initial query. You will need an additional "recurse down" to query for all other nodes these ways consist of:

    [bbox:{{bbox}}];
    (
    node;
    <;
    );
    out body;
    >;
    out;
    

    Example: https://overpass-turbo.eu/s/FGj