Bus routes and station positions

Hey. I’m trying to get bus routes and station positions on those routes in my iOS application. I’m not going to display the route as a line, just the stations, but anyway I need to know which station belongs to which route. I’m using Xapi with URL like


. It’s an approximate bounding box for Copenhagen, but I’m only getting a couple of Ways with each containing a couple of nodes. My questions are:

  1. I’m not sure my query is good. Can anyone comment on it? It obviously returns data, so the syntax is correct. By good I mean, the query that will return bus lines in the desired bounding box.
  2. Is there an easier way to tag a city area? I’m not sure if my bounding box coordinates.
  3. When I receive the data about routes, I’m not actually sure if my query is wrong or if there is so little data about routes on the server. Is there a way to check for all data except pulling the whole database? :slight_smile:

Thanks in advance,


Have an intensive look at the so called http://wiki.openstreetmap.org/wiki/Overpass_API

It has more features than normal OSM Xapi.

You can even visualize the query results via http://wiki.openstreetmap.org/wiki/Overpass_turbo … a quite nice web app IMHO.

There are several example sub pages in the wiki for both mentioned services, try to find a fitting frame first.

In a second step we can try to find all neccesary key/value combinations you need to get your aim.

Tell us if you get stuck somewhere in detail.

I guess there isn’t much data about bus routes in Copenhagen. I’ve tagged it on the map using overpass turbo and tried different queries, but I got so few results. I’ve tried different tags query params for both nodes and ways like public_transport, busway with regv=“.”, Type(route), highway(bus_stop) , but it gives only two or so ways with 10ish nodes each.

Please have a look at http://overpass-turbo.eu/s/Cn
This collects the bus routes inside the town of Copenhagen.

As this looks like to few results, we could also inspect all public transport stops: http://overpass-turbo.eu/s/Co
and find everything that links to these bus stops: http://overpass-turbo.eu/s/Cp

So after all, really only these few bus lines habe been mapped yet. Hence this is a great opportunity to improve the map.

Thanks. Just need to figure out how to construct a query via http, from my app. I must notice that the documentation is rather confusing on that point.

Hey. I’m trying to get bus routes and station positions on those routes by using Overpass turbo. I’m going to display the route as a sequence of bus stops (represented by their coordination.)
Could you please guide me how to solve this query.
Thanks in advance,


Also cross-posted here https://help.openstreetmap.org/questions/52481/how-to-extract-the-bus-routes-based-on-the-bus-stops-coordinations

There is no bus route with bus stops information in order in Copenhagen.

You can add a filter [“public_transport:version”=“2”] to the rel(area)[“route”=“bus”] part of the query to filter out any none ordered bus route relations.

Here is a example for Oslo.

The above example returns all bus routes and coordinates for all bus stops.


part of the query find the area on the side of the way where passenger wait for the bus.
If you rather want to retrieve the position on the way where busses stops, you can replace these part of the query with:

.stations out center ensures that you always got point coordinates out.

I used the aforementioned query, for retrieving the bus routes. Each bus route is retrieved as a sequence of ways and bus stops. But when I plotted the resulted routes it seems that the sequence of ways is not matching. BTW my other question is that some ways are represented as having forward or Backward roles, where some other have no “role”. What is the difference between roles. Thank you

I have used the aforementioned query to retrieve the bus routes based on the sequence of bus stops and ways. Each route is presented as a sequence of ways. Each way may have one of these three roles" Forward" ,“Backward” or without any role. My question is that what is the difference between these roles. BTW, If there is any way, I retrieved the bus routes, only based on street intersections? I need to model the movements of bus routes in a sample road network graph as a sequence of road network intersections