Public Transport - Realtime Trip Update v2


This is a companion discussion topic for the original entry at https://opendata.transport.nsw.gov.au/dataset/public-transport-realtime-trip-update-v2

While using the data from this API, I noticed that the field ‘stop_id‘ gives a seemingly random number (see below). When compared with the Trip Planner API’s /trip and /stop_finder endpoints, the numbers do not match. I can search the numbers up on the Trip Planner website to see which stop they refer to, but can find no other way to know. Is there a better approach other than searching up every ID and saving it in a lookup table? Finally, below are the Stop IDs the various API’s give for Central Station:

Realtime Trip Update

...
          {
            "arrival": {
              "delay": 53
            },
            "departure": {
              "delay": 0
            },
            "stop_id": "2000328", <----
            "schedule_relationship": "SCHEDULED"
          },
...

Trip Planner /stop_finder

...    
{
  "coord": [
    -33.884024,
    151.206203
  ],
  "disassembledName": "Central Station",
  "id": "200060", <----
  "isBest": "True",
  "isGlobalId": "True",
  "matchQuality": 1000,
  "modes": [1, 2, 4, 5, 7, 11],
  "name": "Central Station, Sydney",
  "parent": {
    "id": "placeID:95301001:1",
    "name": "Sydney",
    "type": "locality"
  },
  "properties": {
    "mainLocality": "Sydney",
    "stopId": "10101100" <----
  },
  "type": "stop"
}
...

Trip Planner /trip

"duration": 318,
          "origin": {
            "isGlobalId": true,
            "id": "2000337", <----
            "name": "Central Station, Platform 17, Sydney",
            "disassembledName": "Central Station, Platform 17",
            "type": "platform",
            "coord": [
              -33.884001,
              151.206893
            ],
            "niveau": 1,
            "parent": {
              "isGlobalId": true,
              "id": "200060", <----
              "name": "Central Station, Platform 17, Sydney",
              "disassembledName": "Central Station, Platform 17",
              "type": "stop",
              "parent": {
                "id": "placeID:95301001:1",
                "name": "Sydney",
                "type": "locality"
              },
              "properties": {
                "stopId": "10101100" <----
              },
              "coord": [
                -33.884024,
                151.206203
              ],
              "niveau": 0
            },

As you can hopefully see, no other ID matches the ID of the Realtime Update API. Any help would be greatly appreciated, thanks.

Hi @Atharva ,

Each station has a parentstop ID, and each platform at that station has its own unique stop ID.

Please download the full GTFS bundle from Timetables Complete GTFS - Dataset - TfNSW Open Data Hub and Developer Portal, unzip the file, and open the stops.txt file. This file contains details about all the stops.
To know more about GTFS bundle, visit Documentation | Transport Open Data.

Regards,

Suraj

Thanks @Suraj, I will look into it.

We’d like to inform you that the real-time endpoints for Inner West Light Rail have been upgraded to V2 from V1.

  • The upgrade involves an improved and more reliable feed

  • V1 real-time feeds will run concurrently with V2 for 2 weeks, and we will decommission V1 feed on 30th oct

  • We encourage you to switch to V2 at your earliest convenience

End points :

https://api.transport.nsw.gov.au/v2/gtfs/realtime/lightrail/innerwest

https://api.transport.nsw.gov.au/v2/gtfs/vehiclepos/lightrail/innerwest

1 Like

:police_car_light: A reminder that there is 1 week left to transition over to Inner West LR v2 realtime feeds.

On the 30th of October we will be deprecating the v1 Trip Update and Vehicle Position endpoints.

This is a reminder that IWLR V1 end points will be decommissioned tomorrow.
Please transition to the IWLR V2 feeds as soon as possible.