Google Transit recently updated their open feed specification for exchanging transit data, and since I helped with a few of the revisions, I thought I’d summarize what’s new:

Headway-based schedule support

The new frequencies.txt file allows you to specify that a bus or train trip happens every 10 minutes, rather than listing out exact times for each trip.

Multiple agencies in the same feed

Previously, you had to have a separate feed for each agency you were providing data for. Now you can have more than one agency in the agency.txt file. There’s also a new agency_id column in both agencies.txt and routes.txt that lets you specify which route is operated by which agency.

Per-route and per-stop URLs

Some agencies have web pages for individual routes and stops. In those cases, the new route_url and stop_url fields allow you to specify those in the feed.

Better printed schedule support

When generating static or printed schedules for a route, it’s helpful to be able to classify the trips into two opposing directions. The direction_id column allows you to assign each trip to one of two directions. The directions (0 and 1) don’t have pre-defined meanings—consumers of the feed are expected to use the trip_headsign fields to determine names for the directions.

Mid-trip headsign changes

Some transit vehicles change the information on their headsign depending on where they are in their route. For instance, a crosstown bus may display “To Downtown” for the first half of its route, and “To Suburbs” as it goes through the downtown area. To represent this, you can put the new value in the stop_headsign column for the stop at which the sign changes.

Route colors

In some cities, specific colors are associated with certain transit routes (like the MAX Red Line in Portland). The new spec has optional route_color and route_text_color fields for those cases.

Removed the ability to specify stops using street addresses

The previous version of the spec allowed you to give the location of a transit stop using a street address in the stop_street, stop_city, stop_region, stop_postcode, and stop_country columns. Now stop locations must be given using stop_lat for latitude and stop_lon for longitude, which are more useful for most applications.

Cable car vehicle type

If your city happens to have vehicles that are pulled by cables, you can now specify that in the route_type field.

Better sample data

The old sample data gave the same trip_id for two different trips, oops!