Association Records

From Open Rail Data Wiki
Revision as of 20:18, 3 September 2019 by PeterHicks (talk | contribs) (Update CIF format link)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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)
assoc_end_date End date for the association (in YYMMDD format)
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
  • JJ - Join
  • VV - Divide
  • NP - Next
date_indicator Date relationship of the association
  • S - Standard - the association occurs on the same day
  • N - Over next-midnight - the association occurs the next day
  • P - Over previous-midnight - the association occurs the previous day
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 Toegther with the TIPLOC, identifies the event on the associated UID
diagram_type Not used
CIF_stp_indicator STP (short-term planning) schedule indicator
  • C - STP cancellation of permanent association
  • N - New STP association (not an overlay)
  • O - STP overlay of permanent association
  • P - Permanent association


Network Rail Open Data Feeds
Data Feeds About the Feeds Account States Durable Subscriptions Example Code ( PHP / C# / Java / Ruby / Node.js) • Advanced UsesFAQ 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 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