NSW Bus Routes


This is a companion discussion topic for the original entry at https://opendata.transport.nsw.gov.au/dataset/nsw-bus-routes

How to get a list of bus stop Id / names that a particular bus number services ?

Hello,
Please find the steps below to find the stop id/names for a bus number. Please download the complete GTFS pack from Public Transport - Timetables - For Realtime - Dataset - TfNSW Open Data Hub and Developer Portal

Step 1:
Get the route number from routes.txt
Sample
route_id,agency_id,route_short_name,route_long_name,route_desc,route_type,route_color,route_text_color
“2459_303”,“2459”,“303”,“Sans Souci to Prince of Wales Hospital”,“Sydney Buses Network”,“700”,“00B5EF”,“FFFFFF”

Step 2:
Get the corresponding trips from Trips.txt

route_id service_id trip_id shape_id trip_headsign direction_id block_id wheelchair_accessible trip_note route_direction
2459_303 1 2283121 154280 Prince of Wales Hospital, Barker St 1 1 Sans Souci to Prince of Wales Hospital

Step 3:
Now you can get the stop_id and other details from stop_times.txt - Please fetch stop information in stops.txt (example “221922”,“Wellington St before Rocky Point Rd”,“-34.000798”,“151.126099”,“”,“”,“1”,“”)

Stop_times.txt
trip_id,arrival_time,departure_time,stop_id,stop_sequence,stop_headsign,pickup_type,drop_off_type,shape_dist_traveled,timepoint,stop_note
2283121",“16:04:00”,“16:04:00”,“221922”,“1”,“”,“0”,“0”,“0”,“1”,“”

Let me know if you need more information. More information on GTFS files available at Documentation | Transport Open Data

Regards
Balaji subramanium