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

Query Ways with Nodes

0

I managed to select ways or nodes, but not both at the same time. I am wondering if it was not intended by Overpass QL?

What I got so far:

[out:csv(::id,::type, ::lat, ::lon,"name", "addr:street")]; 
area[name="Prenzlauer Berg"][boundary=administrative]->.prenzlauer_berg;
(
  way(area.prenzlauer_berg)[~"highway"~"."][name] ;     
  node(w);
)->.result_set;
out geom;

I would like something like this as a result:

way_id, way_name, node_id, position, ...
way1, some_name, node1, 0, ...
way1, some_name, node2, 1, ...
way2, some_name_ node3, 0, ..

asked 30 Jan '19, 14:44

np00's gravatar image

np00
51448
accept rate: 0%


2 Answers:

0

Without looking at it real closely I imagine the simplest thing is to ask Overpass-API for JSON and then transform that into the row format you want. I don't think there is a way to get it to emit a way line for each member node.

answered 30 Jan '19, 17:14

maxerickson's gravatar image

maxerickson
12.7k1083176
accept rate: 32%

0

answered 31 Jan '19, 10:29

EdLoach's gravatar image

EdLoach ♦
19.5k16156280
accept rate: 22%

Source code available on GitHub .