Association Records: Difference between revisions
PeterHicks (talk | contribs) m Update CIF format link |
Update record field descriptions |
||
Line 38: | Line 38: | ||
|- | |- | ||
|assoc_start_date | |assoc_start_date | ||
|Start date of the association (in YYMMDD format) | |Start date of the association (in YYMMDD format). In JSON files, this is an ISO8601 format timestamp at UTC. | ||
|- | |- | ||
|assoc_end_date | |assoc_end_date | ||
|End date for the association (in YYMMDD format) | |End date for the association (in YYMMDD format). In JSON files, this is an ISO8601 format timestamp at UTC. | ||
|- | |- | ||
|assoc_days | |assoc_days | ||
Line 51: | Line 51: | ||
* '''VV''' - Divide | * '''VV''' - Divide | ||
* '''NP''' - Next | * '''NP''' - Next | ||
This may also be blank (two spaces) to override the permanent value in overlays and cancellations. | |||
|- | |- | ||
|date_indicator | |date_indicator | ||
Line 57: | Line 58: | ||
* '''N''' - Over next-midnight - the association occurs the next day | * '''N''' - Over next-midnight - the association occurs the next day | ||
* '''P''' - Over previous-midnight - the association occurs the previous day | * '''P''' - Over previous-midnight - the association occurs the previous day | ||
This may also be blank (two spaces) to override the permanent value in overlays and cancellations. | |||
|- | |- | ||
|location | |location | ||
Line 65: | Line 67: | ||
|- | |- | ||
|assoc_location_suffix | |assoc_location_suffix | ||
| | |Together with the [[TIPLOC]], identifies the event on the associated UID | ||
|- | |- | ||
|diagram_type | |diagram_type | ||
| | |Constant value, <code>"T"</code> | ||
|- | |- | ||
|CIF_stp_indicator | |CIF_stp_indicator |
Revision as of 13:13, 8 June 2024
Associations are relationships between two schedules (i.e. a main train and an associated train.) Association records are contained within the SCHEDULE data feed, and provide information about the possible associations between train schedules. These can list the service that forms a given schedule and / or the service that a given schedule goes on to form.
For further details, see the Common Interface Format file specification.
Record Layout
Association records are encoded as a JSON hash with a key of "JsonAssociationV1" and a value containing the association data, in the following layout:
JsonAssociationV1: transaction_type main_train_uid assoc_train_uid assoc_start_date assoc_end_date assoc_days category date_indicator location base_location_suffix assoc_location_suffix diagram_type CIF_stp_indicator
Association Record Fields
Field | Description |
---|---|
transaction_type | create or delete. A full snapshot file will only contain create records. Daily updates may contain either. |
main_train_uid | UID of one train in the association |
assoc_train_uid | UID of the other train in the association |
assoc_start_date | Start date of the association (in YYMMDD format). In JSON files, this is an ISO8601 format timestamp at UTC. |
assoc_end_date | End date for the association (in YYMMDD format). In JSON files, this is an ISO8601 format timestamp at UTC. |
assoc_days | A seven-character field; character 1 represents Monday, character 7 represents Sunday. A 1 in a character position means that the service runs on that day, while a 0 means that it does not. |
category | The type of association
This may also be blank (two spaces) to override the permanent value in overlays and cancellations. |
date_indicator | Date relationship of the association
This may also be blank (two spaces) to override the permanent value in overlays and cancellations. |
location | TIPLOC of the location where the association applies |
base_location_suffix | Together with the TIPLOC, identifies the event on the base UID |
assoc_location_suffix | Together with the TIPLOC, identifies the event on the associated UID |
diagram_type | Constant value, "T"
|
CIF_stp_indicator | STP (short-term planning) schedule indicator
|
Network Rail Open Data Feeds | |
---|---|
Data Feeds | About the Feeds • Account States • Durable Subscriptions • Example Code ( PHP / C# / Java / Ruby / Node.js) • Advanced Uses • FAQ • Release Notes |
RTPPM | RTPPM Feed |
Train Movements | Train Movements Feed • Train Activation • Train Cancellation • Train Movement • Train Reinstatement • Change of Origin • Change of Identity • Change of Location • TSPEED Field • Planned Cancellations • Cancellation Codes |
TD | TD Feed • C-Class Messages • S-Class Messages • Train Describers • TD Berths |
VSTP | VSTP Feed |
TSR | TSR Feed • Route Codes |
SCHEDULE | SCHEDULE Feed • TIPLOC Records • Schedule and Location Records • Association Records • CIF Codes • How Scheduling Works • Allowances |
Reference Data | Reference Data Feed • TOC Codes • CIF Codes • Delay Attribution Codes • Identifying Locations (STANOX, TIPLOC, NLC and 3-Alpha Codes) • STANOX Geographical Areas • Train Planning data (BPLAN) |