To get bus_stop point locations from osm database

I am working on bus transport analytics for Bangalore city in India. I require bus_stop locations from openstreetMap database. I tried using QGIS plugin. But I got ~2500 bus stop location but in actual there are >8000 location. Please suggest a way to fetch all the stop locations from osm.

Could it be that only 2500 stops are mapped in OSM out of the 8000 you know to exist. Or are you saying 8000 are in OSM, but you can only load ~2500?

3 Likes

I am not sure if there is any limitation in fetching data.

With osm basemap as reference, I am assuming that there are expected >8000 stop locations. I am struggling to find an actual source to get all the stop locations.

As mentioned before QGIS plugin gavee ~2500. Also I tried to extract from .osm.pbf file in geofabrik and I got ~4500 stops.

Querying for highway=bus_stop in Bangalore gives me 2800+ results on overpass turbo (2830 mapped as node and 17 as way). These are the ones present in the OpenStreetMap database.

3 Likes

The base map from openstreetMap has all the bus stops. There should be a vector database to prepare that map. So I am looking for that and it could be great if someone could help with.

How did you arrive at this number? People may be able to help you better understand the difference between various estimates of the number of bus stops if you say more about where they come from.

There is only one OSM database so in principle the various methods of extracting the data should give the same results. But that depends on the methods being consistent, e.g. using the same tags and the same administrative boundary.

1 Like

Can you tell us what exactly you’d like to do? Because 2800 bus stops read from OSM don’t make a vector database (in my limited knowledge).

1 Like

I have bustop location info from the bangalore metropolitan transport corporation (BMTC). These might have been collected using GPS and error from GPS resulted in the stops falling on wrong side of the road. Since OSM has a vector database, I tried to fetch the data.
As i mentioned in email thread data fetched using QGIS plugin had ~2000 stop locations. Bustop count from the latest .osm.pbf file in geofabrik is ~4000.
Hence I am looking for a means to contact osm community lead to check the availability of data in case of absence of any other open resource to get all ~8000 stops given by BMTC

Can you give an example of a bus stop in the BMTC data that you are not finding in OSM data?

What was the exact query you used to find 4000 bus stops in the pbf file? For example, are you looking at public_transport=stop_position or highway=bus_stop or public_transport=platform? Which of the various boundaries with Bangalore in the name are you looking at - city, urban district, metropolitan regional development authority?

1 Like

In the figure, the brown points are the bus stop locations from BMTC. As the data from BMTC has shift of random distance, I am in need of bus stop locations from OSM vector database

I extracted from recent pbf file and noticed that some of the stops are missing. In below figure, the blue points indicate bus stop location extracted from the pbf file and the green circles indicate the bus stop locations in basemap but missing in the pbf file.

I am working on an exercise to compare bmtc stop with osm stops and mapping it to the correct osm stops. Since the data I have from pbf doesn’t have all the bus stop points, I am looking for other sources to get all the bus stops.

This is one of the circled objects. It is tagged as a bus station, as is the other circled object.

That´s why I asked earlier which exact tags you are looking for in the PBF. It’s unlikely these bus stations are missing from the PBF. Does your query match the tags on this object? If you are only looking for highway=bus_stop you won’t find objects tagged in this way.

1 Like

thank you for pointing that.
I extracted using highway=bus_stop
May I know if there are tags other than bus_stop and bus_station

There is also the combination public_transport=platform, bus=yes. Generally I would expect these to also have either highway=bus_stopor amenity=bus_station tags but there seem to be a few that don’t, including this example in the same area. It’s outside the bus station so I’m not sure if it is really a separate stop.

You might also want to look at larger bus stations like this one to see if you are picking up the stops you expect (depending on how you want to define individual stops within a bus station):

However, I would only expect these things to add a small number to your data, so I think you will still be well short of 8000 stops. I just don’t think OSM has anything close to that number stops - it is nothing to do with the PBF but with the underlying data. Unless the BMTC data has some kind of duplication it seems likely that many stops simply haven’t been mapped. It would probably be better to reach out to mappers in Bangalore (or at least India) to get a better idea of the completeness of bus data.

The screenshot shows every object tagged with operator=BMTC, including routes. Does the overall coverage match what you expect, especially in outlying areas? I note that some stops are very isolated e.g. Chikkaballapura in the northeast. That might be a sign that many intermediate stops are unmapped. But I don’t know the area, they may genuinely be served by express buses.

Use the “Query features” tool on osm.org (the bottom icon, with a pointer and a question mark) to find the tags used by any given feature on the map. You can then alter your query to take in those tags.

1 Like

@alan_gr Thank you for the detailed response. As you mentioned BMTC data has many duplicates and hence the count is ~8000
With all the tags you mentioned, I got around ~6000, which is close enough considering the duplication in BMTC stops.

@Richard Thank you for the response, it helped me to identify actual tags.

1 Like

It’s good that you are making progress. I’m a bit surprised that adding more tags got as high as 6000, as many objects with those tags would already have been picked up by the highway=bus_stop query. Hopefully you have checked that none of the 6000 objects are duplicates, and that all are bus stops and not other types of public transport.

I would add that if you had told us initially what query you are using to get data from the PBF, it would have been easier to help.

To get ~6000 stops I used all the below combination
highway=bus_stopor amenity=bus_station or public_transport=platform, bus=yes or operator=BMTC
Also I checked the stops randomly. I plotted the stops and noticed that though there were additional point locations which is not in osm basemap, it is available in BMTC data. In addition, I found that BMTC data has duplicate locations for the same stop and which could be reason for the shorfall of ~2000.

Apologies for not mentioning the filter query and yes as you mentioned it could have sorted earlier.

That “or” looks a bit odd, it might pick up public_transport=stop_position in addition to public_transport=platform which would give you duplicates (position beside the road and on the road for the same stop).

1 Like


Yes as you mentioned there are duplicate point data in the ~6000 count