Thursday, August 25, 2011

Data: Introducing GTFS-realtime to exchange realtime transit updates

Introducing GTFS-realtime to exchange realtime transit updates

By Vladimir Rychev, Software Engineer

Cross-posted with the Google LatLong Blog

In June, we launched Live Transit Updates, a feature that adds realtime public transport information to Google Maps and Google Maps for mobile. This feature is powered by the GTFS-realtime feed format. Today we’re making the specification of this format public on Google Code. GTFS-realtime allows public transport agencies to provide realtime updates about their fleets. If you’re developing a trip planner or similar application, you can process these feeds and keep your users up-to-date with realtime information.

GTFS-realtime is an extension to GTFS, the General Transit Feed Specification, published by Google in 2006. Nowadays, GTFS is a very commonly used feed format that public transport agencies use to (publicly) provide their transport information. As opposed to GTFS feeds, GTFS-realtime feeds contain very dynamic information. This means that they have to be updated frequently and applications that use them have to fetch them frequently as well. This requires a significant infrastructure from the transport agency’s side, but it results in a continuously updated description of the current situation.

The specification currently includes three types of realtime updates: Trip Updates, Service Alerts and Vehicle Position updates. Each type of update has to be provided in a separate feed, and can be used independently.

Trip Updates are a way to present changes in the timetable. When a trip is delayed, canceled, added, or re-routed, a Trip Update can be used to provide this information in real time. Service Alerts can be used to notify passengers about special circumstances in the public transport network. In a Vehicle Position update, an agency provides the current location of an individual vehicle.

To encode realtime updates, Protocol Buffers are used. Protocol Buffer data structures can be processed very efficiently, resulting in low processing times compared to o...

Sent from my iPhone