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

Hi there, 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

asked 12 Oct '18, 09:00

Ramingo92's gravatar image

Ramingo92
11112
accept rate: 0%

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:

×228
×205
×167
×95
×23

question asked: 12 Oct '18, 09:00

question was seen: 991 times

last updated: 12 Oct '18, 09:00

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