I am trying to get the node (for the GPS) of all driveable junctions in a city.
Here is what I have tried out :

import overpy

api = overpy.Overpass()

osmid_f = 62422 + 3600000000

result = api.query(

f"""

[timeout:1000][out:json];

area({osmid_f})->.a;
(
  node(area.a)

  ['junction' = 'circular']

  ['junction' = 'roundabout']

  ['junction' = 'jughandle']

  ['junction' = 'filter']

  ['traffic_calming' = 'island']

  ['highway' = 'mini_roundabout']

  ['highway' = 'turning_circle']

  ['highway' = 'turning_loop']

  ['highway' = 'motorway_junction']

  ['highway' = 'passing_place'];

  node(w)(area.a);

);

out;

""")

But I get an empty result. Is there something I am missing ?
I would appreciate any hints.
Thank you

asked 18 Dec '20, 09:17

Dykay's gravatar image

Dykay
36337
accept rate: 0%

edited 18 Dec '20, 10:15

scai's gravatar image

scai ♦
32.6k20298452


Your query is searching for nodes with all of those tags together. Make a separate query for each tag:

(
  node(area.a)[junction];
  node(area.a)[highway=mini_roundabout];
  ...
);

and so on. Some junctions might be modeled as ways, tagged as roundabouts (rather than mini_roundabouts).

permanent link

answered 18 Dec '20, 16:31

maxerickson's gravatar image

maxerickson
12.6k1082176
accept rate: 31%

Thank you @maxerickson

(19 Dec '20, 12:48) Dykay
Your answer
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:

×188
×139

question asked: 18 Dec '20, 09:17

question was seen: 494 times

last updated: 19 Dec '20, 12:48

powered by OSQA