Create your data feed
A trip is a sequence of two or more stops that occurs at specific time. You define trips in the trips.txt file, which has the following structure:
The following example shows a simple trips.txt file:
trip_headsign field should contain the text that appears on the vehicle or on signage that identifies a specific line variant to riders. It shouldn’t duplicate the values in the
In most cases a headsign contains information about a trip destination. However, you can also use a direction like inbound/outbound if that matches the signage your passengers see.
Although it’s not mandatory, we recommend that you provide a
trip_headsign. Otherwise, we'll use the name of the last stop of the corresponding trip as the
trip_headsign in routing results. However, this may change and you shouldn't rely on it as a long-term solution.
A circular trip, also known as a loop trip, is a trip that follows a circular path. The above guidelines for headsigns also apply for circular trips. For example, provide headsign information that shows riders the direction in which the vehicle is going.
To indicate the changing direction of travel, provide
stop_headsigns in the stop_times.txt file. The
stop_headsign describes the direction for trips departing from the stop for which it's defined. Adding
stop_headsigns to each stop of a trip allows you to change the headsign information along a trip.
Don’t define one single circular trip in the stop_times.txt file for a route that operates between two endpoints (such as when the same bus goes back and forth). Instead, split the trip into two separate trip directions.
Examples of circular trip modeling
1. Circular trip with changing headsign for each stop
2. Circular trip with two headsigns