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

hi

i wanna take parent ways of some way three times, its possible with this method

https://www.openstreetmap.org/api/0.6/way/id.json

https://www.openstreetmap.org/api/0.6/node/ways.json

but i must send request 6 time to get my desire result

can i make it one request with overpass api ?

btw , if would be awesome if add nearest highway to result :D

[out:json];
way(325887398);
way(around:200)[highway~"residential|secondary"];
out;

thx for helping

asked 08 Jul '20, 09:05

ryzexsp's gravatar image

ryzexsp
11113
accept rate: 0%

edited 08 Jul '20, 09:51

2

Could you expand/clarity. Post the overpass routines. What's in id.json & ways.json? What does "three times" mean?

(08 Jul '20, 09:36) DaveF

https://www.openstreetmap.org/api/0.6/way/325887398.json

its an way id , through this way i take first parent node

https://www.openstreetmap.org/api/0.6/node/3325093995/ways.json

through this i take first parent way

i do this three times to get parent ways

"three times" i want take parent of way1 which is for example way2, and take parent of way2 which is way3 , and take parent of way3 which is way4

and nearest secondary way and end

(08 Jul '20, 09:58) ryzexsp
2

There are neither parent ways not parent nodes in the OSM data model.

Ways -do- have member nodes (which carry the geometry), and a specific node can be a member of multiple ways, typically, but not always, are junctions and connections between ways (where the the end node of a way will be an end node of another way).

(08 Jul '20, 13:49) SimonPoole ♦
Be the first one to answer this question!
toggle preview

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:

×483
×205
×167

question asked: 08 Jul '20, 09:05

question was seen: 976 times

last updated: 08 Jul '20, 13:49

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