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

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 ♦
33.3k21309459


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.7k1083176
accept rate: 32%

Thank you @maxerickson

(19 Dec '20, 12:48) Dykay

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
×213
×205
×147

question asked: 18 Dec '20, 09:17

question was seen: 1,565 times

last updated: 19 Dec '20, 12:48

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