13/04/2011
In the realm of traffic management and information dissemination, the format in which data is exchanged is crucial for seamless integration and effective application development. For those looking to leverage the wealth of information provided by services like the National Traffic Information Service (NTIS), understanding the available data formats is paramount. This article delves into the primary XML formats used for traffic data, focusing on DATEX II and TransXChange, and explores how developers can access and utilise this valuable information.

DATEX II: The European Standard for Traffic Information
The National Traffic Information Service (NTIS) offers robust data services, catering to both real-time and historical traffic information. For developers seeking to build sophisticated applications, the DATEX II format is the cornerstone of this data provision. DATEX II is a European XML standard specifically designed for the exchange of traffic information, ensuring a common language across different systems and countries.
Real-time DATEX II Services
NTIS provides a comprehensive suite of real-time data types in DATEX II format, including:
- Incidents: Information on accidents, roadworks, and other disruptions.
- Journey Times: Estimated travel times for specific routes.
- Speeds: Real-time average speeds on road segments.
- Flows: Traffic volume data.
- Variable Message Sign (VMS) Settings: Data displayed on roadside signs.
- Matrix Signal Settings: Information related to traffic signal control.
This data is pushed to subscribers via industry-standard web services, typically within a minute of collection from the roadside. The frequency of data updates can vary, with some data points updated every minute, others every five minutes, and some triggered by status changes.
Enhancements to DATEX II Data
NTIS continuously enhances its data offerings. Recent improvements to the DATEX II data include:
- VMS Settings and Events: New fields have been added to associate VMS settings with specific events, providing subscribers with a clearer understanding of the impact and geographic reach of disseminated messages. This also allows for filtering VMS messages based on the type of plan, such as campaign messages or travel time messages.
- Event Association: Improvements in how events are associated aim to provide better explanations for causes and effects within the traffic network.
- Network Model Improvements: The network model is being refined to specify details such as Regional Control Centre areas, counties, Highways England Area Teams, and junction-to-junction road stretches for each link in the Strategic Road Network (SRN).
Accessing DATEX II Data
Developers can access detailed documentation, including the DATEX II External Interface Design Document, to understand the data types and attributes. For those requiring a modified DATEX II schema for specific NTIS data types, this is also available. A DATEX II User Guide provides additional helpful information on the data and its collection methods.
Sample code in Java and ASP .Net, along with instructions for interfacing with NTIS services, can be found on GitHub. Furthermore, a Toolkit is available that receives data in DATEX II format and allows queries to be returned in JSON format, also accessible via GitHub.

Historic DATEX II Data
Beyond real-time information, NTIS also offers Historic Data, referred to as Daily Aggregated Traffic Data. This data, also available in DATEX II format, can be downloaded manually from the Subscriber Portal or programmatically via a web service. It includes all data types published in real-time on the previous day, plus any data received later but before the generation of the historic files.
Network and Asset Model in DATEX II
The NTIS Network and Asset Model is also detailed in three separate XML files using the DATEX II v2.0 format. This model, describing the road network and its assets, is available through both a website and a web service. Detailed rules for generating this model can be found in the "NTIS Model Data Sources and Business Rules" document.
TransXChange: The UK Standard for Bus Schedules
While DATEX II is prevalent for general traffic information, TransXChange XML is the UK's nationwide standard specifically for exchanging bus schedules and related data. It plays a vital role in:
- The electronic registration of bus routes.
- The Traffic Area Network.
- The exchange of bus route data with other systems, such as journey planners and real-time vehicle tracking systems.
TransXChange is part of a family of transport-related XML standards that adhere to GovTalk guidelines, ensuring consistency and interoperability within the public transport sector.
TransXChange Schemas and Capabilities
The TransXChange schemas are modular and designed for specific purposes:
- Registration Schema: Used for registering bus timetables with the Vehicle and Operator Services Agency (VOSA), including mandatory elements for statutory registration.
- General Schema: Facilitates the exchange of bus timetable and ancillary data between various systems.
These schemas share common base modules with the National Public Transport Access Node (NPTAN) system. TransXChange can be used to exchange a wide array of information, including:
- Bus schedules (stops, routes, departure times, frequencies, operational notes, maps).
- Service days, including public holidays and school term times.
- Details of statutory registrations.
- Bus operator information.
- Fare stages, garages, layovers, and on-board ticketing systems.
- Information on the accessibility of stops and services.
Becoming a Subscriber and Data Access
To become a subscriber to NTIS data services, registration is required via the provided links. Upon approval, credentials will be issued to configure subscriptions and specify areas of interest using the Services Request form. Subscriptions are handled on an individual basis, and all access to NTIS data is authorised and recorded.

For those who prefer not to register, a limited subset of NTIS data is available through www.data.gov.uk. However, it's important to note that Highways England cannot provide proactive support, such as notifications of service enhancements or outages, for data accessed through this platform. Access via data.gov.uk is governed by the Open Government Licence.
Key Data Formats Summary
To summarise, the primary XML formats you'll encounter when dealing with UK traffic and transport data are:
| Data Type | Primary XML Format | Description |
|---|---|---|
| Real-time and Historic Traffic Information (Incidents, Speeds, Flows, VMS, etc.) | DATEX II | European XML standard for comprehensive traffic data exchange. |
| Bus Schedules and Related Data | TransXChange | UK nationwide standard for bus service data, used for registration and system exchange. |
| Network and Asset Model | DATEX II v2.0 | Specific DATEX II version for detailed road network and asset information. |
Frequently Asked Questions
What is the main XML format for general traffic data from NTIS?
The main XML format for general real-time and historic traffic data provided by the National Traffic Information Service (NTIS) is DATEX II.
What is TransXChange used for?
TransXChange is the UK standard for exchanging bus schedules and related data, facilitating electronic registration of bus routes and data exchange with journey planners and tracking systems.
Where can I find sample code for interfacing with NTIS services?
Sample code and interface instructions for NTIS services are available on GitHub, often in languages like Java and ASP .Net.

Can I get traffic data in JSON format?
Yes, a Toolkit is available from GitHub that can receive data in DATEX II format and return queries in JSON format.
What if I don't want to become a full subscriber?
A limited subset of NTIS data is available through www.data.gov.uk under the Open Government Licence, though without proactive support from Highways England.
By understanding these data formats and access methods, developers can effectively harness the power of traffic information to create innovative and informative applications, contributing to a smoother and safer transportation network.
If you want to read more articles similar to Understanding Traffic Data Formats, you can visit the Automotive category.
