What XML format is the data available in?

Understanding Traffic Data Formats

13/04/2011

Rating: 4.68 (2877 votes)

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.

What is TransXChange XML?
It is used for: TransXChange is part of a family of coherent transport related XML standards that follow GovTalk guidelines. The TransXChange XML schemas provided are: The TransXChange schemas are modularised into functional packages and share a common set of base modules with National Public Transport Access Node system.
Table

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.

What data is released under Regulation 27 of the Road Vehicle Regulations 2002?
This data is released under the provision of Regulation 27 of the Road Vehicle (Registration and Licensing) Regulations 2002. In this context the agency is prepared to release data in bulk, to underpin vehicle check databases which the public and others may refer to, to improve road safety, to aid consumer protection and to deter vehicle theft.

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.

What XML file format do I need for a network and asset model?
The data is detailed in 3 separate XML files in DATEX II v2.0 format of the form: where yyyy-MM-dd is the date of publishing and vnn.n is the version of the file. See reference 2 for details of the Network and Asset Model. The Network and Asset Model export is available from both a website and a web service.

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 TypePrimary XML FormatDescription
Real-time and Historic Traffic Information (Incidents, Speeds, Flows, VMS, etc.)DATEX IIEuropean XML standard for comprehensive traffic data exchange.
Bus Schedules and Related DataTransXChangeUK nationwide standard for bus service data, used for registration and system exchange.
Network and Asset ModelDATEX II v2.0Specific 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.

What XML format is the data available in?
The data is available in DATEX II format which is a European XML standard for traffic information. This service uses industry-standard web services to push data to subscribers within one minute of collection from the roadside.

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.

Go up