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, 14:44

np00's gravatar image

np00
51448
accept rate: 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.

permanent link

answered 30 Jan, 17:14

maxerickson's gravatar image

maxerickson
11.0k1075155
accept rate: 30%

permanent link

answered 31 Jan, 10:29

EdLoach's gravatar image

EdLoach ♦
18.1k14148263
accept rate: 23%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×355
×49

question asked: 30 Jan, 14:44

question was seen: 389 times

last updated: 31 Jan, 10:29

powered by OSQA