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

Hi,

I’ve built a few free-to-use GTFS tools, one being a GTFS timetable viewer that allows you to view timetables with stop names for each route, route variant and trip.

You can check it out here - Busable | Bus Management Software for Schools & Transport Operators | Australia

3 Likes

Hey herolychour,

Maybe you and I should have a chat.

Cheers.