This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

how to only get nodes on real roads way via overpass api

0

as the title shows, I want to get the OSM nodes data, which are on roads.
For roads, we can define it as the Way feature as highway tag. (I found this tip from a previous post).
How to do that?

EDIT; find the solution by myself:
way[highway](50.7460,7.170,50.7461,7.171);node(w);

the above query will output the all the nodes on the ways tagged as highway and within the bounding box. The key part is node(w). For more information, you can go to this osm wiki:
https://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL

asked 19 Nov '18, 10:16

Chris%20Bao's gravatar image

Chris Bao
11334
accept rate: 0%

edited 20 Nov '18, 02:55

1

If you figured it out yourself then write it as an answer :)

(20 Nov '18, 07:01) scai ♦

Source code available on GitHub .