Hi! I am new to OSM and I am trying to get tram stops and lines using overpass turbo but with no luck. What I did was writing this code:

<osm-script> <query type="node"> <has-kv k="railway" v="tram_stop"/> <bbox-query {{bbox}}=""/> </query> <print limit="" mode="body" order="id"/> </osm-script>

But what it does is only showing all tram stops. What I need is:

  1. Getting all tram lines with their stops and only in one way.
  2. Getting all lines tram stops in one way together but without doubling tram stops that are mutual/common for some tram lines.

Of course those should be independent queries.

May someone help me or guide me? I did some other queries using overpass turbo wiki but to no avail.

This question is marked "community wiki".

asked 09 Oct '14, 15:59

yamet's gravatar image

yamet
1112
accept rate: 0%

edited 10 Oct '14, 16:34

What do you mean by 'only in one way'? Can you give some concrete example with actual relations?
Btw: there are plenty of overpass api threads around here. Did you already take a look at some of them involving 'rel' and '>>'?

(10 Oct '14, 06:17) mmd

When you have tram line from point A to B, there are almost always two lines for trams going one way and backwards. So almost everywhere where trains stops there are two tram stops, one for trams going forth and one for trams going backwards. I would like to stick to overpass turbo to visualise the result so I was not checking other overpass API's.

(10 Oct '14, 15:33) yamet

permanent link

answered 09 Oct '14, 16:57

escada's gravatar image

escada
17.8k16153283
accept rate: 21%

This solution doesn't download routes, only stops and platforms.

(09 Oct '14, 17:29) scai ♦

Escada thanks for help! Unfortunately this is not answer to my question. My query already displays tram stops. Do you know maybe what should I add to additionally display tram route?

(10 Oct '14, 16:08) yamet
-1

Try this one http://overpass-turbo.eu/s/5pa, it's based upon an example for part of a hiking route. That same page also has an example for the complete route, but then you have to specify the name or ref of the route

permanent link

answered 10 Oct '14, 19:14

escada's gravatar image

escada
17.8k16153283
accept rate: 21%

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:

×21
×9
×6
×2

question asked: 09 Oct '14, 15:59

question was seen: 4,015 times

last updated: 10 Oct '14, 19:14

powered by OSQA