Contents
Documentation
Journeys and Itineraries
Other concept pages describe data Transitland stores: stops, routes, trips and schedules. This page describes the results of transit routing on the Interline Routing Platform.
Journey, itinerary, leg
A journey is a request to travel from an origin to a destination, departing at or arriving by a given time.
An itinerary is one result for a journey. A journey usually returns several itineraries, which differ in departure time, walking distance, and number of transfers.
A leg is one continuous movement within an itinerary, by one mode. There are two kinds:
- A transit leg is a ride on one trip, from a boarding stop to an alighting stop. It includes the route and its agency, the trip and its headsign, the boarding and alighting stops, and the feed version the schedule came from. Use a leg's
routeOnestopIdorstopOnestopIdto query the REST or GraphQL APIs for that route or stop. - A walking leg connects the origin to the first stop, two stops at a transfer, or the last stop to the destination. It includes a geometry and its endpoints, and no route or trip.
A transfer is the change between two transit legs, usually a walking leg plus the wait for the next departure. Transfers are counted on the itinerary and are not separate legs.
Timings
An itinerary reports a start time, end time, and total duration. The duration is split into:
- Walk time: time on foot.
- Transit time: time aboard a vehicle.
- Waiting time: time at a stop waiting for a departure.
The itinerary also reports its number of transfers. Each leg has its own start and end time.
Tracing a leg to its source data
Each transit leg includes identifiers that resolve through other Transitland APIs:
| Field on a transit leg | Resolves to |
|---|---|
routeOnestopId | The route, through the REST or GraphQL APIs |
stopOnestopId, on the leg's from and to | The stop, the same way |
feedId | The source feed in the Transitland Atlas |
feedVersionSha1 | The feed version the schedule came from |
To get the GTFS a leg was planned from, pass its feedVersionSha1 to the feed versions endpoint. It returns when the feed version was fetched, the date range it covers, and a download of the file.
See also
- Transit routing endpoint: request and response reference.
- Routing graph and costing models: how the routing graphs are built.
- Trips & Schedules: the scheduled service itineraries are built from.