Fares v2 is a GTFS extension project that aims to address the limitations of Fares v1. This extension project is being adopted in iterations, and the examples below show what can be modeled using the portion of Fares v2 that has been adopted in the official specification. See more information about the Fares v2 extension project in the Extensions section.
In the interim, producers may implement Fares v2 alongside implementation of Fares v1 in the same dataset as there exists no technical conflict between the two. Consumers will have the choice on which implementation to consume independently from the other. With adoption and sufficient endorsement of Fares v2, Fares v1 may be deprecated in the future.
Define a transit fare¶
There are several ways to pay fares to use the TTC transit system in Toronto. The TTC provides two options of fare prices depending on the payment method. An adult fare is $3.20 CAD to travel if using a PRESTO card, while the same fare is $3.25 CAD to travel if paying by cash.
Transit tickets or fares can be described using the fare_products.txt file. Each entry corresponds to a specific fare.
fare_product_id,fare_product_name,amount,currency presto_fare,PRESTO Card Fare,3.2,CAD cash_fare,Cash Fare,3.25,CAD
Describe service locations in the same fare zone¶
Some transit agencies operate a zone-based fare structure. Fare zones are divided geographic areas associated with different fare prices. Whether they’re traveling within a single zone or from one zone to another, transit riders will need to know the right fare. In Toronto’s TTC system, there is only one fare zone. Transit riders simply need to pay the same single ticket fare for any trip distance within the boundaries of the City of Toronto, no matter which form of transit is used.
First, identify the area (fare zone).
area_id,area_name ttc_service_area,TTC Fare Zone
stop_id from the stops.txt file, group stops together to its respective identified area (fare zone).
area_id,stop_id ttc_service_area,262 ttc_service_area,263 ttc_service_area,264 ttc_service_area,265 ttc_service_area,266 …
Create rules for single leg journeys¶
In GTFS, a fare leg corresponds to a trip that a rider makes without transferring between different modes, routes, networks, or agencies. A single fare allows riders to travel within any pair of bus stops, subway stations, and streetcar stops within the TTC’s network.
Leg groups define trips within a network from an origin to a destination (or a set of origins to a set of destinations if the area IDs correspond to grouped stops). The file below describes two rules to travel anywhere within the TTC’s network. The first rule corresponds to traveling using a PRESTO fare and the second corresponds to traveling using a cash fare.
leg_group_id,network_id,from_area_id,to_area_id,fare_product_id ttc_trip_presto,ttc_network,ttc_service_area,ttc_service_area,presto_fare ttc_trip_cash,ttc_network,ttc_service_area,ttc_service_area,cash_fare
Create rules for transfers¶
Riders who use their PRESTO card to ride the TTC have a 2 hour unrestricted transfer window. This means that they can transfer an unlimited number of times between the agency’s buses, subways, and streetcars within the 2 hour timeframe.
The file above represents this in GTFS with the following fields:
- A transfer is possible to and from legs that are paid for by a PRESTO card (
transfer_countis set to
-1since there is no limit on the number of transfers permitted
duration_limitis set to
7200seconds, which is equivalent to 2 hours
duration_limit_typeis set to
3, since riders have to tap their PRESTO card as soon as they enter the fare-paid zone or as soon as they board a bus or streetcar. This corresponds to the arrival fare validation of the current leg and the arrival fare validation of the next leg.
fare_transfer_typeis set to
0since riders only pay for the first fare only. There is no transfer fee or a second fare for transferring within the 2 hour window. Hence, the cost can be modeled as the sum of the first fare and the sums of the transfer fees.
- The transfer fee is set to zero as they are free within the TTC system. This is indicated by the