A bus finishes its run on Route 3, and the same vehicle pulls out again a few minutes later as Route 7. The driver never changes. Nine riders in the back never move. They know from experience they can stay seated straight through. The trip planner does not know that. It tells them to step off at the last stop of Route 3 and wait for a different bus that is, in fact, the one they are already sitting on.
That mismatch is a GTFS interlining problem, and it is one of the clearest places a cheap General Transit Feed Specification (GTFS) tool falls short. Modeling it wrong makes riders think they must transfer when they can stay onboard, which erodes trust in the trip planner and, by extension, in the agency. This piece explains blocks, the block_id field, how interlining differs from an ordinary transfer, and why the fix is block_id paired with transfers.txt, not either one alone.
What Is GTFS Interlining?
GTFS interlining is when one vehicle serves two or more trips under different route numbers in sequence, and riders can stay onboard across the change. It is modeled with a shared block_id in trips.txt, paired with an in-seat transfer rule in transfers.txt. Trip planners then show riders they need not get off. Both parts matter.
What Is a Block, and What Does block_id Represent?
A block is the full day of work a single vehicle performs. It can be one trip, or many trips run back to back by the same bus before it returns to the yard. The block_id field in trips.txt is the identifier that ties those trips together. Every trip that shares a block_id on the same service day is understood to be the same physical vehicle continuing its work.
That single field carries a lot of operational meaning. It tells a consumer that the vehicle arriving as Route 3 at 9:02 is the vehicle departing as Route 7 at 9:10. Both trips carry the same block_id, and their times do not overlap. Without it, the two trips look like unrelated services that happen to touch the same stop, and any connection between them is invisible.
How Interlining Differs From a Rider Transfer
A rider transfer is two vehicles. Someone gets off one bus and boards another, usually at a shared stop or station, and the two buses are genuinely separate. Interlining is one vehicle. The rider stays in the same seat while the route number on the head sign changes around them.
The distinction is not academic. A transfer between two vehicles carries real friction: a walk, a wait, a risk of missing the connection if the first bus runs late. An in-seat continuation carries none of that. When a trip planner presents an interlined continuation as a two-vehicle transfer, it invents a wait and a walk that do not exist. It may even route the rider the long way around because the “transfer” looks costly. The model is the difference between an itinerary that reads “stay on board” and one that reads “get off and wait 8 minutes for a bus that is already here.”
Why block_id Alone Is Ambiguous
Here is the part cheaper tools miss. A shared block_id tells a consumer the same vehicle runs both trips. It does not, on its own, tell the consumer whether a rider is allowed to stay on board across the two. Some vehicle continuations are deadhead or layover moves where the bus is out of service, or where riders are asked to alight and reboard for fare or capacity reasons. The block_id alone cannot distinguish “stay seated” from “same bus, but everybody off.”
That gap is why current best practice pairs block_id with an explicit in-seat transfer record. The transfers.txt file added transfer_type values for exactly this case. 4 marks an in-seat transfer, where riders can stay onboard the same vehicle to continue onto the next trip. 5 marks the opposite, where an in-seat transfer between two sequential trips is not allowed. A from_trip_id and to_trip_id on that record name the two specific trips the rule applies to.
With both in place, the feed says two things clearly: the same vehicle runs both trips (block_id), and riders may stay on it (transfer_type=4). One field describes the operation. The other describes what riders are permitted to do. A trip planner needs both to render the continuation correctly.
The Rules for a Valid Block
Blocks are forgiving to model and unforgiving when broken. A few rules keep them valid:
-
No overlapping times. Trips that share a
block_iddescribe one vehicle, and one vehicle cannot be in two places at once. Theirstop_times.txtwindows must not overlap. Overlapping times inside a block are a common validator finding and a sign that two vehicles were accidentally merged into one block. -
One vehicle, one mode. A block is a single physical vehicle. The trips in it are operated by the same kind of vehicle and therefore share a
route_typein practice. A block that mixes a bus trip and a rail trip is almost always a modeling error rather than a real operation. -
Cross-midnight is normal. A block that starts before midnight and ends after it is expressed with
stop_timespast 24:00:00. For example,25:15:00means 1:15 a.m. the next morning, tied to the service day the block started on. This keeps a late-night interlined run in one coherent block rather than splitting it across two calendar days. -
Blocks are per service day. A block is the trips sharing a
block_idon the same service day; oneblock_idcan carry trips with different service days, which form separate blocks. A holiday that cancels one trip in a block without addressing the rest leaves a broken continuation.
For agencies that run reduced or exception-day service, the way those service days are defined interacts directly with blocks. See holiday schedules in GTFS calendar_dates.txt for how exception days are added and removed. Seasonal and multi-period service covers how a block behaves across a summer-to-winter changeover.
How Do Trip Planners Render an In-Seat Transfer?
When the model is complete, the consumer ecosystem cooperates. Trip planners such as Google Maps and popular transit apps can read block_id and the in-seat transfer_type to decide how to present a continuation. Correctly modeled, the itinerary tells riders to stay on the vehicle through the route change instead of inventing a transfer.
Get it wrong and the failure modes are specific. Omit the in-seat transfer record, and many planners treat the block boundary as a place riders must change vehicles, adding a phantom wait. Omit the block_id, and the two trips look unrelated, so the planner may not connect them at all. The feeds that appear in trip planners beyond Google each apply their own interpretation, which is why publishing both signals is safer than betting on one consumer’s fallback.
None of this is visible in a raw validator pass. A feed can be perfectly valid and still model an interlined run as a transfer, because “valid” and “matches how the vehicle actually operates” are different tests. That is the same lesson behind a careful GTFS schedule change workflow: the check that matters is the itinerary a rider actually sees.
Building It Into Production, Not by Hand
Interlining is tedious to maintain by hand precisely because it lives in three files at once. The trips carry the block_id, the stop times define the non-overlapping windows, and transfers.txt carries the in-seat rule. Change a single trip and all three have to stay consistent. This is where automating GTFS from scheduling software earns its place, because the scheduling system already knows which vehicle runs which trips. The block assignments exist in the runcut long before they ever reach a feed. The producer’s job is to carry that operational truth into GTFS without losing it.
Where TransitFare Fits
TransitFare is a transit technology company founded in 2012 that builds GTFS publishing tools for small and mid-sized transit agencies, from fleets of 10 vehicles to fleets of 50 vehicles. Interlining is the kind of operational complexity that simpler tools flatten into a wrong answer. TransitFare Cloud publishes GTFS with block_id carried from its trip data. It does not generate in-seat transfers.txt records today, so an agency that needs the “stay on board” rule adds it separately. The platform has more than 13 years in production and 60 million+ fare validations processed.
To see how blocks interact with the rest of the schedule, start with what GTFS is, then read the schedule change workflow that keeps a block-heavy feed intact through a service change.
FAQ
What Is GTFS Interlining?
GTFS interlining is one vehicle running two or more trips under different route numbers in sequence, with riders able to stay onboard across the route change. It is expressed with a shared block_id in trips.txt and an in-seat transfer record in transfers.txt.
What Does block_id Do in GTFS?
block_id in trips.txt groups the trips a single vehicle runs back to back on the same service day. Trips sharing a block_id are understood to be the same physical vehicle continuing, and their stop times must not overlap.
Why Isn’t block_id Enough to Model Interlining?
block_id says the same vehicle runs both trips, but not whether riders may stay on it. A continuation can be a deadhead or a reboard. Pairing block_id with a transfer_type=4 record in transfers.txt states explicitly that riders can stay seated.
What Is transfer_type 4 in transfers.txt?
transfer_type=4 marks an in-seat transfer: riders can remain onboard the same vehicle to continue onto the next trip. Its counterpart, transfer_type=5, marks that an in-seat transfer between two sequential trips is not allowed.
Can a Block Cross Midnight?
Yes. A block that runs past midnight uses stop times greater than 24:00:00, such as 25:15:00 for 1:15 a.m., tied to the service day the block began on. This keeps a late-night interlined run in one coherent block instead of splitting it in two.