You can make changes to a service in realtime.
Suspend a tripGTFS Trip Updates
In TripUpdate, if you do not want the user to find an existing trip that was canceled, use trip.schedule_relationship=CANCELED
. Otherwise use the GTFS Service Alerts option as described in Step 2. There is no way to cancel a trip with the GTFS Vehicle Position feed.
Related articles:
GTFS Service Alerts
Add Alert information that targets the affected trips with effect=NO_SERVICE
or severity_level=SEVERE
. These corresponding trips are included in the directions results but show up in the disrupted section of the Google Maps app.
Related articles:
Manual Alerts
Add a manual alert similar to the GTFS Service Alert.
Related articles:
GTFS Trip Updates
You can use skip a stop at the trip level. To remove service at each stop, in TripUpdates, provide scheduleRelationship = SKIPPED
. Since TripUpdate is only for a specific trip, you must replicate this method for all trips. If the stop is a start or stop point, it impacts the routing results and the corresponding trip won’t show up.
This option is best for short-term, current disruption, as it can target current individual trips, but not future trips.
Related articles:
- Select a trip with TripDescriptor
- Provide realtime information with TripUpdates
- How data gaps affect realtime feeds
GTFS Service Alerts
Alert information with effect=NO_SERVICE
targets affected trips that use TripDescriptor. This method can be used to suspend a stop for a particular trip. The affected trips show up in the suspended services section in the Google Maps app.
This option is best for planned disruptions that will happen some time in the future.
Related articles:
Manual Alerts
Add a manual alert similar to the GTFS Service Alert.
Related articles:
GTFS Trip Updates & Vehicle Positions
The method to add a trip with either TripUpdates or Vehicle Positions is the same. In a new TripUpdates or VehiclePositions message, duplicate the trip with the same trip_id
and trip.schedule_relationship=ADDED
, instead of trip.schedule_relationship=SCHEDULED
.
Don’t drop the entity from the realtime bundle for the entire duration of the trip.
Related article:
GTFS Trip Updates
In TripUpdates, you can assign the “Stop/platform,” which is a stop entity with location_type=0
, for a trip to a new stop/platform. To do this, the new stop/platform must be part of the same station, or a stop entity with location_type=1
, as the original stop/platform.
Example
The GTFS schedule can't provide a correct platform. The platform can be different each day and isn’t known until the train either starts in or approaches the station. In this case, to assign the platform as soon as it’s known, GTFS uses either the main station or the most likely platform under the parent station.
Related articles: