I’m building a public transport app (KRAIL) using the static GTFS data provided on the Transport for NSW Open Data portal. I’ve encountered an issue related to ferry wharves and their corresponding stop IDs in the dataset.
For example, in the case of Barangaroo, the GTFS stops.txt file contains the following entries:
Similarly, Manly Wharf and Circular Quay Wharf also have multiple entries:
Manly, Wharf 1 (20951)
Manly, Wharf 2 (209525)
Manly, Wharf 3 (209593)
Each of these wharf numbers is represented by its own stop_id, but there is no parent_station field grouping them together. While I have grouped these stops manually on the UI side to show a single label like “Manly Wharf” (similar to the Opal app), I’m unsure which stop_id to use when making trip planning API calls, as the trip planning endpoints only accept a single stop_id.
In other words:
When a user selects “Manly Wharf” in my app, I don’t know which of the three stop IDs (20951, 209525, 209593) I should pass to your trip planning API.
The same applies to destinations like “Barangaroo Wharf”, which has 2000441 and 2000442.
Could you please advise:
Thanks so much for your time and for making this valuable dataset publicly available.
For Manly Wharf, please use 209573 as the parent stop ID.
When making trip planning API calls, you should select the parent stop ID based on the route ID. This ensures the correct platform is used depending on the service.
Thank you, really appreciate your response, and also thanks for the kind words about the UI. I built KRAIL App to improve the user experience, so glad that it’s helpful.
I have a few follow up questions to improve my understanding:
Just to clarify, I don’t see stop ID 209573 in the GTFS static stops.txt file. Should I expect this stop ID to appear in another dataset, or is it only used internally for trip planning API purposes?
Are there similar parent stop IDs available for Barangaroo Wharf and Circular Quay Wharf as well, that group their respective platforms (e.g. Wharf 1, Wharf 2, etc.)?
Regarding your advice to use a “parent stop ID based on the route ID”. I’m not sure I fully understand it.
Just to share a bit of context:
In my current approach, I allow users to search and select stops based on the stops.txt data. Once a user selects an origin and destination, I send a request to the trip planning API using those selected stop_ids. At this stage, I don’t have any route ID information ahead of time, I only retrieve possible routes after the trip planning API responds.
1. You can find the required information in the complete GTFS bundle.
2. There are no alternate parent IDs for the wharfs you mentioned.
3. Please do not use route IDs to select which stop ID to use. Sorry, I have mentioned that earlier.
Instead, refer to the Trip ID from stop_times.txt. This file has stop sequence number and stop IDs corresponding to each Trip ID