How I can to take a bus stops with coordinates using line of bus? Like this link http://www.overpass-api.de/api/sketch-line?ref=409&network=ATAC&style=wuppertal

I tried using this query but the ref (number of bus) is different by number of bus of company http://overpass-api.de/api/xapi?*[highway=bus_stop][operator=ATAC]

asked 20 May '14, 14:28

Alessandro%20Borelli's gravatar image

Alessandro B...
accept rate: 0%

This depends on how your bus route has been mapped into OSM. Some contributors use the old tagging "highway=bus_stop" for the bus stops but others use the new "public transport" scheme with "public_transport=platform" (where transit users are waiting) and/or "public_transport=stop_position" (where the bus itselfs stops on the highway). But in both cases, the "ref" is not always provided on hte stop position or is concatenated (like "1;2;5") which is not very useful. The best is to take the "ref" from the bus route (relation) itself. And of course, a bus stop may belong to several bus routes/relations.

So you should retrieve the expected bus relation first with the "operator" and "ref" and then walk through the relation members to find the elements representing the bus stops (either with "highway=bus_stop" or "public_transport=*"), then get the coordinates (be careful, some of theses elements are nodes which is easy but some others can be theoritically polygons (closed ways) then the coordinates should be calculated (centroid)).
If the relation doesn't exist for your bus route, then create it (it's fast when all bus stops are already mapped).

permanent link

answered 21 May '14, 09:49

Pieren's gravatar image

accept rate: 15%


Hi, thank you for your answer. I took the node of bus with this call http://overpass-api.de/api/interpreter?data=[out:json];rel[ref=409][network=ATAC];out;

Now I have a node of any bus stops with coordinates. :)

(21 May '14, 11:07) Alessandro B...

ref should be used for the identifier of the stop. route_ref can contain a semicolon separated list of lines which serve this bus stop.

Since public_transport=platform/bus=yes is still not rendered after 3 years, it's safe to assume all bus stops are still marked highway=bus_stop.

Apparently it's indeed allowed nowadays to use ways, or multipolygon relations nowadays for the platforms. Where I map in Belgium, you will only find nodes for public_transport=platform/bus=yes/highway=bus_stop. If there is an actual platform, then there will be a way or an area with public_transport=platform/highway=platform (to get it rendered) in addition to that node. It's the public_transport=platform/bus=yes/highway=bus_stop node which contains all the juicy details. No need to duplicate those to all bus stop related objects.

permanent link

answered 19 Dec '14, 23:09

Polyglot's gravatar image

accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



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:


question asked: 20 May '14, 14:28

question was seen: 2,390 times

last updated: 19 Dec '14, 23:09

powered by OSQA