How to tell if bus services are replacing trains during trackwork

When trackwork is occurring and bus services replace trains, is there an enumeration which is used to indicate this from the departure_mon API ?

seeing this JSON for example of stations with buses replacing trains:

    {
      "location": {
        "id": "2533193",
        "isGlobalId": true,
        "name": "Minnamurra, Minnamurra Station, Railway Ave",
        "type": "platform",
        "coord": [
          -34.62633,
          150.85306
        ],
        "parent": {
          "id": "10101384",
          "name": "Minnamurra, Minnamurra Station, Railway Ave",
          "disassembledName": "Minnamurra Station, Railway Ave",
          "type": "stop",
          "parent": {
            "id": "95353012|1",
            "name": "Minnamurra",
            "type": "locality"
          }
        }
      },
      "departureTimePlanned": "2018-12-23T01:27:00Z",
      "transportation": {
        "id": "nsw:015SC: :R:sj2",
        "name": "Temporary buses 5SC",
        "disassembledName": "5SC",
        "number": "5SC",
        "iconId": 14,
        "description": "Kiama, then all stations to Oak Flats",
        "product": {
          "class": 5,
          "name": "Temporary buses",
          "iconId": 5
        },
        "operator": {
          "id": "700",
          "name": "train replacement bus operators"
        },
        "destination": {
          "name": "Oak Flats",
          "type": "stop"
        },
        "properties": {
          "tripCode": 32,
          "mtSubcode": "0"
        },
        "origin": {
          "name": "Kiama Station",
          "type": "stop"
        }
      },
      "infos": [
        {
          "timestamps": {
            "creation": "2018-12-05T00:53:00Z",
            "lastModification": "2018-12-11T00:08:00Z"
          },
          "priority": "normal",
          "id": "6027803",
          "version": "1",
          "urlText": "Buses replace trains between Bomaderry and Wollongong",
          "url": "http://localhost:8085/ics/XSLT_CM_SHOWADDINFO_REQUEST?infoID=6027803&seqID=1",
          "content": "<strong>Saturday 22 and Sunday 23 December</strong>\n<ul>\n<li>Buses replace trains between Bomaderry and Wollongong.</li>\n<li>Trains run to the normal timetable between Port Kembla, Wollongong and the City.</li>\n<li><a href=\"https://transportnsw.info/trip\">Plan your trip</a> before you travel for up-to-date information.</li>\n</ul>\n&nbsp;",
          "subtitle": "Buses replace trains between Bomaderry and Wollongong"
        }
      ],
      "properties": {
        "WheelchairAccess": "false"
      }
    }

There are a few places here where buses replacing trains is being shown, but which is the real one? (want to avoid filtering .name attributes for “Temporary buses”. Which is the correct enumeration ? is it transportation.product.class = 5 ? is it part of the transportation.id? should i use infos ?

Thanks for your time

Hi @envent

you should use transportation.iconID = 14

You should not use transportation.product.class = 5 as it is the same enumeration for regular buses

Hope that helps

Vic

1 Like

thanks @vic

However we are also seeing iconID=16

as in:

"transportation": {
"id": "nsw:01SC0:1:R:sj2",
"name": "Illawarra Buses Network SC01",
"disassembledName": "SC01",
"number": "SC01",
"iconId": 16,
"description": "Bomaderry to Kiama",
"product": {
"class": 5,
"name": "Illawarra Buses Network",
"iconId": 5
},
"operator": {
"id": "701",
"name": "train replacement bus operators"
},

We are seeing operator.id being 700 and 701… could that be it also?

If you perform a trip request which utilises that service:

You will see that transportnsw.info trip planner does not consider this bus to be a temporary bus. I can’t remember why it was set up like this, but you should not add iconId=16 into your enumeration as that will capture all of the Illawarra buses.

The SCO1 appears to have been set up as a regular bus service in terms of its metadata. the “train replacement bus operators” is just the name of the operator, for whatever reason.

1 Like

Ok thanks @vic so in this case, how do we tell if this is a replacement bus or not? (this one is replacing trains due to trackwork)

I have to confirm with a team member, but I think this is not a temporary service like the trackwork buses. It appears to me that this is a permanent service which replaces rail during certain (regular) off peak hours. ie it’s not a trackwork bus.

ok so in that last example, the operator data is incorrect then ?

It does happen that we only see operator.id as 700 and 701 could those values also be used?

I wouldn’t use this except in the context of showing the operator. The operator is the company which runs the bus service, e.g. Hills bus, Premier Illawarra, etc. Many of these operators will be contracted to run both regular services and also temporary services such as trackwork buses.

1 Like

OK thanks @vic

We’ll go with transportation.iconID = 14 and ignore transportation.iconID = 16

best regards

Also, I just want to add that I have confirmed my theory about the SC01 - it is not listed as a temporary service because it’s not temporary. It runs every day and is used because it is not cost effective to run an whole train for a handful of people who use it at those times.