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 |
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
(13 May '20, 09:37)
Dimitar155
1
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:json][timeout:300]; ( relation(relation_id); <; ); out geom;
(13 May '20, 10:40)
Dimitar155
|