I want to get the polyline's coordinates without any extra info from a relation like this one:


Here are some relations for which I need this data: 29322, 19782, 19763

How can I do it? I tried to use overpass turbo but it gives me ways and nodes which is not what I want.

asked 13 May '20, 09:21

Dimitar155's gravatar image

accept rate: 0%

edited 13 May '20, 09:22

Overpass Turbo also lets you export GeoJSON which comes very close to what you are looking for.

permanent link

answered 13 May '20, 09:30

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
accept rate: 23%

Overpas turbo gives me multiple arrays and the polyline is broken for some reason. https://i.imgur.com/2VNyWBe.png The red line should be following the black markers. Also here the line is fine but only for the one direction. On the other it gets wiggly. https://i.imgur.com/d1fznCF.png

(13 May '20, 09:37) Dimitar155

I tried an Overpass query like relation(19763); out geom; and loaded that in geojson.io and it looks all right...

(13 May '20, 09:48) Frederik Ramm ♦

It looks like something went wrong when I saved the data to the database which caused the problem.

edit: It doesn't work for relation 19777. Overpass Turbo returns multilinestring instead of linestring which breaks something. How can I convert multilinestring to linestring?

edit 2: This query fixed everything:






out geom;

(13 May '20, 10:40) Dimitar155
Your answer
toggle preview

Follow this question

By Email:

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



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:


question asked: 13 May '20, 09:21

question was seen: 1,798 times

last updated: 13 May '20, 10:59

powered by OSQA