If you use overpass turbo, you can click on a node that is a part of your query and it will take you to a new window for that node. There, you can see if the node is "part of" a way. Is there any way to get this information from a standard overpass api query? asked 06 Nov '19, 19:45 John Anthony... |
3 Answers:
Yes, please use A simple example. We have queried for all the barriers in Watford near London:
The query finds 84 or so. Now we replace the output in line 3 by a couple of extra lines:
In detail: Thus we see only those nodes that are member of a way. Further conditions on the interesting way can be injected in line 3:
Now the ways that our nodes of interest must be members of are restricted to those with the tag It gets more tricky for the related question: What are the nodes of a way that are also connected to other ways? As an example, the query for the street named
... becomes:
We divert this time already the ways of initial interest through a named set answered 07 Nov '19, 12:33 Roland Olbricht |
Take a look at the recurse filters. There's also an operator, answered 07 Nov '19, 11:36 maxerickson edited 07 Nov '19, 11:37 |
The recurse filter: Simple example: https://overpass-turbo.eu/s/NRJ answered 07 Nov '19, 11:48 DaveF |
So lets say this is my query:
[out:json]; node({}); way(bn)->.wy; node._(w.wy); out;
** {} is where a bounding box would go
Say one of the nodes that is returned is the node with id=4271787600. I can see from overpass turbo that that node is part of the way the Metropolitan Apartments. However, this query does not return me a way with name "The Metropolitan Apartments". How can I adjust the query so that I can get that information.
For context, I am looking to be able to query a bounding box and get names of all the buildings and streets that are found in that bounding box (all names that openstreetmap has at least).
way({{bbox}})
gives you all ways in the bounding box. The queryreturns all names of buildings and highways in the bounding box.