Hithere, i have got a list of incident in Italian motorway and the kilometer where they happened. I should find lat and long of the event. I extracted all nodes from the motorway using this script:
. [out:json][timeout:25];
//fetch area “Italy” to search in {{geocodeArea:Italy}}->.searchArea;
//gather results (
// query part for: “highway=motorway and ref=A14” node["highway"="motorway"]["ref"="A14"](area.searchArea); way["highway"="motorway"]["ref"="A14"](area.searchArea); relation["highway"="motorway"]["ref"="A14"](area.searchArea); out body; >; out skel qt;
The problem is that while nodes are ordered (so i can calculate relative distance in km of a way), ways aren't. This means i can't create a path of way from the start of the street till the end.
Is there any way to order ways and calculate absolute distance in km?
Thanks for help