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

Hi guys,

I've been writing a little Overpass QL script that grabs the way data base on a route of nodes. I'm doing this by comparing the ways a node is part of with those of the previous node. This means it's vital that my foreach loop iterates over the nodes in the way that I'm providing them. At the moment it's automatically reordering all nodes by if before starting the loop. Any way you guys can see around this? Any help would be greatly appreciated!

/ run to see input nodes node(id:360043069,2864527555,360043065); out; /

node(id:2864527555,360043065) -> .nodes; node(id:360043069); wayhighway -> .lastnodeways;

foreach .nodes -> .thisnode ( wayhighway -> .thisnodeways; ( way.thisnodeways.lastnodeways; .confirmedways; ) -> .confirmedways; .thisnodeways -> .lastnodeways; );

.confirmedways out geom;

This question is marked "community wiki".

asked 22 Aug '18, 18:05

gillesgerlo's gravatar image

gillesgerlo
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:

×305
×1
×1

question asked: 22 Aug '18, 18:05

question was seen: 660 times

last updated: 22 Aug '18, 18:05

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