11. Stop Transfers (transfers.txt)
This file is optional in a GTFS feed.
To define how passengers can transfer between routes at specific stops
feed providers can include
transfers.txt. This does not mean
passengers cannot transfer elsewhere, but it does indicate if a transfer
is not possible between certain stops, or a minimum time required if
transfer is possible.
|Required||The ID of stop as it appears in |
|Required||The ID of the stop as it appears in |
|Optional||If the |
It is also possible that records in this file are specified for ticketing reasons. For instance, some train stations are set up so that passengers can transfer between routes without needing to validate their ticket again or buy a transfer. Other stations that are shared between those same routes might not have this open transfer area, thereby requiring you to exit one route fully before buying another ticket to access the second.
The following table shows some sample transfer rules from TriMet in Portland's GTFS feed (https://openmobilitydata.org/p/trimet).
These rules indicate that if you are transferring from a route that
7807 to any route that visits the other stops (
7640), then this is the ideal place to do it.
In other words, if there are other locations along the first route where you could transfer to the second route, then those stops should not be used. These rules say this is the best place to transfer.
Consider the transfer rule in the following table, taken from the New York City Subway GTFS feed (https://openmobilitydata.org/p/mta/79).
In this data, the MTA specifies how long it takes to transfer to
different platforms within the same station. The stop with ID 121 refers
to the 86th St station (as specified in
stops.txt). It has a
1 and two stops within it (
121S). The above transfer rule says that if you need to transfer
121S (or vice-versa) then a minimum time of 3
minutes (180 seconds) must be allocated.
If you were to calculate the time taken to transfer using the coordinates of each of these platforms, it would only take a few seconds as they are physically close to each other. In reality though, you must exit one platform then walk around and enter the other platform (often having to use stairs).