NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

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%


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 '19, 17:14

maxerickson's gravatar image

maxerickson
12.7k1083176
accept rate: 32%

permanent link

answered 31 Jan '19, 10:29

EdLoach's gravatar image

EdLoach ♦
19.5k16156280
accept rate: 22%

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:

×483
×65

question asked: 30 Jan '19, 14:44

question was seen: 1,821 times

last updated: 31 Jan '19, 10:29

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum