I want to get the polyline's coordinates without any extra info from a relation like this one: [[40.54,40.65],[40.55,40.64]...] 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 edited 13 May '20, 09:22 |
One Answer:
Overpass Turbo also lets you export GeoJSON which comes very close to what you are looking for. answered 13 May '20, 09:30 Frederik Ramm ♦ |
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
I tried an Overpass query like relation(19763); out geom; and loaded that in geojson.io and it looks all right...
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:json][timeout:300];
(
relation(relation_id);
<;
);
out geom;