How can I get the get the nodes for a bus route using OSMNX

Viewed 29

I want to get all the nodes representing bus stops along a specific bus route in Open Street Map using OSMNX.

I tried getting the bus stops for a place;

routes = osmnx.geometries_from_place('London, United Kingdom', tags= {'highway':'bus_stop'})

then using the route_ref attribute, however most of these values are NaN. Instead I thought it would be better to identify relations for specific bus routes so I could get each node, however I don't understand what tags I should be using. I know the relations exist, when viewing OSM, but tags like {'type':'route', 'route':'bus','line':'bus'} return an empty dataframe.

Can anyone please clarify how I can fix this, and help with misunderstands that I may have about using the right tags.

An example of what I would like to find: enter image description here

0 Answers
Related