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

Hi,
I want to restrict my search on Overpass Turbo to ways between 2 train stations. I have the UIC reference of the two stations, now I am only interested about the rails that connect the two stations.
So I first look for the relations between the two stations, but that already gives me all relations of both stations. So I first like to restrict to only the relations going through both of these 2 train stations.
Next I want only the ways along these relations between the two train stations.

Here is my code so far:

[out:json][timeout:25];      
{{geocodeArea:Zurich}}->.searchArea;      
(        
  node[uicref=8503011]["railway"="station"];    
  node[uicref=8503000]["railway"="station"];    
  rel(bn);       
  way(r)(area.searchArea);   
);     
out body;    
>;         
out skel qt;

asked 20 Aug '20, 11:28

Roger's gravatar image

Roger
11113
accept rate: 0%

edited 20 Aug '20, 16:57

1

Please double check your code. It's returning empty.

(20 Aug '20, 11:43) DaveF

Try this:

[out:json][timeout:25];   
{{geocodeArea:Zurich}}->.searchArea;    
(    
  node[uic_ref=8503011]["railway"="station"];  
  node[uic_ref=8503000]["railway"="station"];  
  rel(bn)(area.searchArea);  
  way(r)(area.searchArea);  
);      
out body;    
>;      
out skel qt;

PS: I am interested only in the ways from Bhf. Wiedikon to HB Zürich, respectively the ways from the two nodes referenced by uic_ref above:

Bhf. Wiedikon to HB Zürich

permanent link

answered 20 Aug '20, 16:48

Roger's gravatar image

Roger
11113
accept rate: 0%

edited 20 Aug '20, 16:57

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
×228
×205
×167
×1

question asked: 20 Aug '20, 11:28

question was seen: 2,242 times

last updated: 20 Aug '20, 16:57

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