From a4aa723fb56647dd8b408cd0a62ef85d00a5c35f Mon Sep 17 00:00:00 2001 From: cleveramarquet Date: Thu, 9 Apr 2026 07:54:00 -0700 Subject: [PATCH 01/13] Update gtfs-realtime.proto Add NewRoutes to proto --- gtfs-realtime/proto/gtfs-realtime.proto | 71 ++++++++++++++++++++++++- 1 file changed, 70 insertions(+), 1 deletion(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index e050fc19f..7a8d0a39a 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -113,6 +113,7 @@ message FeedEntity { optional Shape shape = 6; optional Stop stop = 7; optional TripModifications trip_modifications = 8; + optional Route route = 9; // The extensions namespace allows 3rd-party developers to extend the // GTFS Realtime Specification in order to add and evaluate new features and @@ -424,6 +425,10 @@ message TripUpdate { // NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future. optional string trip_short_name = 6; + // Specify the route associated with the trip, if the route has been added dynamically. The associated `Route` message should be included in the same feed. + // Optional if schedule_relationship is NEW, forbidden otherwise. + optional string route_id = 7; + // The extensions namespace allows 3rd-party developers to extend the // GTFS Realtime Specification in order to add and evaluate new features // and modifications to the spec. @@ -796,6 +801,8 @@ message TripDescriptor { optional string trip_id = 1; // The route_id from the GTFS that this selector refers to. + // This field is used to identify a trip inside an existing GTFS, not to dynamically create or insert new routes + // To assign routes dynamically, use the `trip_properties.route_id` field. optional string route_id = 5; // The direction_id from the GTFS feed trips.txt file, indicating the @@ -1222,6 +1229,68 @@ message TripModifications { extensions 9000 to 9999; } +// NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future. +message Route { + // Identifier of the route. Must be different than any route_id defined in the (CSV) GTFS. + // Required + optional string route_id = 1; + + // See definition of routes.agency_id in (CSV) GTFS. + // Conditionally Required, see reference + optional string agency_id = 2; + + // See definition of routes.route_short_name in (CSV) GTFS. + // Conditionally Required, see reference + optional TranslatedString route_short_name = 3; + + // See definition of routes.route_long_name in (CSV) GTFS. + // Conditionally Required, see reference + optional TranslatedString route_long_name = 4; + + // See definition of routes.route_desc in (CSV) GTFS. + optional TranslatedString route_desc = 5; + + // See definition of routes.route_type in (CSV) GTFS. + // Required + optional RouteType route_type = 6; + + // See definition of routes.route_url in (CSV) GTFS. + optional TranslatedString route_url = 7; + + // See definition of routes.route_color in (CSV) GTFS. + optional string route_color = 8; + + // See definition of routes.route_text_color in (CSV) GTFS. + optional string route_text_color = 9; + + // See definition of routes.route_sort_order in (CSV) GTFS. + optional uint32 route_sort_order = 10; + + // The extensions namespace allows 3rd-party developers to extend the + // GTFS Realtime Specification in order to add and evaluate new features and + // modifications to the spec. + extensions 1000 to 1999; + + // The following extension IDs are reserved for private use by any organization. + extensions 9000 to 9999; +} + +// NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future. +enum RouteType { + // route type as defined in the (CSV) GTFS + + LIGHT_RAIL = 0; + SUBWAY = 1; + RAIL = 2; + BUS = 3; + FERRY = 4; + CABLE_CAR = 5; + GONDOLA = 6; + FUNICULAR = 7; + TROLLEY_BUS = 11; + MONORAIL = 12; +} + // NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future. // Select a stop by stop sequence or by stop_id. At least one of the two values must be provided. message StopSelector { @@ -1256,4 +1325,4 @@ message ReplacementStop { // The following extension IDs are reserved for private use by any organization. extensions 9000 to 9999; -} \ No newline at end of file +} From 315d4bcc9a4d1f8be57d880562a78005b49fb2d3 Mon Sep 17 00:00:00 2001 From: cleveramarquet Date: Thu, 9 Apr 2026 12:48:00 -0700 Subject: [PATCH 02/13] Update gtfs-realtime.proto Change route_type to int32 to support extended route types per PR feedback --- gtfs-realtime/proto/gtfs-realtime.proto | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 7a8d0a39a..560832572 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -1252,7 +1252,7 @@ message Route { // See definition of routes.route_type in (CSV) GTFS. // Required - optional RouteType route_type = 6; + optional int32 route_type = 6; // See definition of routes.route_url in (CSV) GTFS. optional TranslatedString route_url = 7; @@ -1275,22 +1275,6 @@ message Route { extensions 9000 to 9999; } -// NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future. -enum RouteType { - // route type as defined in the (CSV) GTFS - - LIGHT_RAIL = 0; - SUBWAY = 1; - RAIL = 2; - BUS = 3; - FERRY = 4; - CABLE_CAR = 5; - GONDOLA = 6; - FUNICULAR = 7; - TROLLEY_BUS = 11; - MONORAIL = 12; -} - // NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future. // Select a stop by stop sequence or by stop_id. At least one of the two values must be provided. message StopSelector { From 6cf9c5b7171320913a2b042e9161a53cb9436f79 Mon Sep 17 00:00:00 2001 From: cleveramarquet Date: Fri, 10 Apr 2026 11:02:03 -0700 Subject: [PATCH 03/13] add Route message and fields for sort order and dates Adding documentation for the Route message including route metadata, sort order, and activation dates to align with the NewRoutes proposal --- gtfs-realtime/spec/en/reference.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/gtfs-realtime/spec/en/reference.md b/gtfs-realtime/spec/en/reference.md index 544207b13..07ec98ed9 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -138,7 +138,7 @@ A definition (or update) of an entity in the transit feed. If the entity is not | **shape** | [Shape](#message-shape) | Conditionally required | One | Data about the realtime added shapes, such as for a detour. At least one of the fields trip_update, vehicle, alert, or shape must be provided - all these fields cannot be empty.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | | **stop** | [Stop](#message-stop) | Conditionally required | One | A new stop added to the feed dynamically.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | | **trip_modifications** | [TripModifications)(#message-tripmodifications) | Conditionally required | One | List of trips affected by a particular modifications, such as a detour.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | - +| **route** | [Route](#message-route) | Conditionally required | One | Data about a new route added to the feed dynamically, such as a bus bridge.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | ## _message_ TripUpdate @@ -735,3 +735,21 @@ _If a modification affects the first stop of the trip, that stop also serves as |------------------|------------|----------------|-------------------|-------------------| | **stop_id** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Required | One | The replacement stop ID which will now be visited by the trip. May refer to a new stop added using a GTFS-RT `Stop` message in the same GTFS-RT feed, or to an existing stop defined in the (CSV) GTFS feed’s `stops.txt`. If it refers to a `Shape` entity in the real-time feed, the value of this field should be the one of the `stop_id` inside the entity, and _not_ the `id` of `FeedEntity`. The stop MUST have `location_type=0` (routable stops). | | **travel_time_to_stop** | [int32](https://protobuf.dev/programming-guides/proto2/#scalar) | Optional | One | The difference in seconds between the arrival time at this stop and the arrival time at the reference stop. The reference stop is the stop prior to `start_stop_selector`. If the modification begins at the first stop of the trip, then the first stop of the trip is the reference stop.

This value MUST be monotonically increasing and may only be a negative number if the first stop of the original trip is the reference stop.

If the value is not supplied, consumers MAY interpolate or infer the `travel_time_to_stop` based on other data. | + +## _message_ Route +Real-time information about a transit route. This message is used to dynamically define a route that does not exist in the static GTFS. + +| _**Field Name**_ | _**Type**_ | _**Required**_ | _**Cardinality**_ | _**Description**_ | +| :--- | :--- | :--- | :--- | :--- | +| **route_id** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Required | One | Identifier of the route. Must be different than any route_id defined in the static GTFS. | +| **agency_id** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Optional | One | Agency which operates the route. See [routes.agency_id](https://gtfs.org/schedule/reference/#routestxt). | +| **route_short_name** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Optional | One | Short name of the route. See [routes.route_short_name](https://gtfs.org/schedule/reference/#routestxt). | +| **route_long_name** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Optional | One | Long name of the route. See [routes.route_long_name](https://gtfs.org/schedule/reference/#routestxt). | +| **route_desc** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Optional | One | Description of the route. See [routes.route_desc](https://gtfs.org/schedule/reference/#routestxt). | +| **route_type** | [int32](https://protobuf.dev/programming-guides/proto2/#scalar) | Required | One | Describes the type of transportation used on a route. See [routes.route_type](https://gtfs.org/schedule/reference/#routestxt). | +| **route_url** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Optional | One | URL of a web page about the route. See [routes.route_url](https://gtfs.org/schedule/reference/#routestxt). | +| **route_color** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Optional | One | Route color in RGB hex format. See [routes.route_color](https://gtfs.org/schedule/reference/#routestxt). | +| **route_text_color** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Optional | One | Route text color in RGB hex format. See [routes.route_text_color](https://gtfs.org/schedule/reference/#routestxt). | +| **route_sort_order** | [uint32](https://protobuf.dev/programming-guides/proto2/#scalar) | Optional | One | A non-negative integer used to specify the order in which the routes should be displayed. | +| **start_date** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Optional | One | The first day that the new route is active, in YYYYMMDD format. | +| **end_date** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Optional | One | The last day that the new route is active, in YYYYMMDD format. | From f03724fe22165466aaa2cdf8b831d351f206a75a Mon Sep 17 00:00:00 2001 From: cleveramarquet Date: Fri, 10 Apr 2026 11:11:32 -0700 Subject: [PATCH 04/13] add route_sort_order and activation dates to Route message Updated gtfs-realtime.proto to include: route_sort_order (uint32) for display sequencing. start_date and end_date (string) for route activation periods. Added comments referencing the corresponding (CSV) GTFS definitions to maintain specification consistency. --- gtfs-realtime/proto/gtfs-realtime.proto | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 560832572..f748b2249 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -1266,6 +1266,14 @@ message Route { // See definition of routes.route_sort_order in (CSV) GTFS. optional uint32 route_sort_order = 10; + // See definition of calendar.start_date in (CSV) GTFS. + // The first day that the new route is active, in YYYYMMDD format. + optional string start_date = 11; + + // See definition of calendar.end_date in (CSV) GTFS. + // The last day that the new route is active, in YYYYMMDD format. + optional string end_date = 12; + // The extensions namespace allows 3rd-party developers to extend the // GTFS Realtime Specification in order to add and evaluate new features and // modifications to the spec. From 1d169ab45035d2a698163720009f46d85542a0dd Mon Sep 17 00:00:00 2001 From: cleveramarquet Date: Wed, 29 Apr 2026 09:45:15 -0700 Subject: [PATCH 05/13] Marked agency and route names as Conditionally Required Updated agency_id, route_short_name, and route_long_name to match the requirements in the GTFS-NewRoutes proposal document. --- gtfs-realtime/spec/en/reference.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gtfs-realtime/spec/en/reference.md b/gtfs-realtime/spec/en/reference.md index 07ec98ed9..ae736e91d 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -742,9 +742,9 @@ Real-time information about a transit route. This message is used to dynamically | _**Field Name**_ | _**Type**_ | _**Required**_ | _**Cardinality**_ | _**Description**_ | | :--- | :--- | :--- | :--- | :--- | | **route_id** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Required | One | Identifier of the route. Must be different than any route_id defined in the static GTFS. | -| **agency_id** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Optional | One | Agency which operates the route. See [routes.agency_id](https://gtfs.org/schedule/reference/#routestxt). | -| **route_short_name** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Optional | One | Short name of the route. See [routes.route_short_name](https://gtfs.org/schedule/reference/#routestxt). | -| **route_long_name** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Optional | One | Long name of the route. See [routes.route_long_name](https://gtfs.org/schedule/reference/#routestxt). | +| **agency_id** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Conditionally Required | One | Agency which operates the route. See [routes.agency_id](https://gtfs.org/schedule/reference/#routestxt). | +| **route_short_name** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Conditionally Required | One | Short name of the route. See [routes.route_short_name](https://gtfs.org/schedule/reference/#routestxt). | +| **route_long_name** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Conditionally Required | One | Long name of the route. See [routes.route_long_name](https://gtfs.org/schedule/reference/#routestxt). | | **route_desc** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Optional | One | Description of the route. See [routes.route_desc](https://gtfs.org/schedule/reference/#routestxt). | | **route_type** | [int32](https://protobuf.dev/programming-guides/proto2/#scalar) | Required | One | Describes the type of transportation used on a route. See [routes.route_type](https://gtfs.org/schedule/reference/#routestxt). | | **route_url** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Optional | One | URL of a web page about the route. See [routes.route_url](https://gtfs.org/schedule/reference/#routestxt). | From 8f6d060102755fbb5a7ba962f00cfbe2bd8645ba Mon Sep 17 00:00:00 2001 From: cleveramarquet Date: Fri, 23 Oct 2026 12:13:30 -0700 Subject: [PATCH 06/13] Add route_id to TripProperties From 907e9cf6679509143e807b79119059453ac560fc Mon Sep 17 00:00:00 2001 From: cleveramarquet Date: Fri, 23 Oct 2026 12:28:44 -0700 Subject: [PATCH 07/13] Clarify static vs dynamic route_id in reference.md --- gtfs-realtime/proto/gtfs-realtime.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 5a13d24e4..4bd52c2af 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -811,7 +811,7 @@ message TripDescriptor { optional string trip_id = 1; // The route_id from the GTFS that this selector refers to. - // This field is used to identify a trip inside an existing GTFS, not to dynamically create or insert new routes + // This field is used to identify a trip inside an existing static GTFS, not to dynamically create or insert new routes // To assign routes dynamically, use the `trip_properties.route_id` field. optional string route_id = 5; From df7a18d1b5b523d57f62f070a6c29ba958bf18aa Mon Sep 17 00:00:00 2001 From: cleveramarquet Date: Wed, 28 Oct 2026 09:28:57 -0700 Subject: [PATCH 08/13] Add route_id description to TripProperties table --- gtfs-realtime/spec/en/reference.md | 1 + 1 file changed, 1 insertion(+) diff --git a/gtfs-realtime/spec/en/reference.md b/gtfs-realtime/spec/en/reference.md index c6af888e5..01b62dcae 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -264,6 +264,7 @@ Defines updated properties of the trip. | **shape_id** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Optional | One | Specifies the identifier of the shape of the vehicle travel path when the trip shape differs from the shape specified in (CSV) GTFS or to specify it in real-time when it's not provided by (CSV) GTFS, such as a vehicle that takes differing paths based on rider demand. See definition of `trips.shape_id` in (CSV) GTFS.
If a shape is neither defined in (CSV) GTFS nor in real-time, the shape is considered unknown. This field can refer to a shape defined in the (CSV) GTFS in shapes.txt or a `Shape` in the same (protobuf) real-time feed. The order of stops (stop sequences) for this trip must remain the same as (CSV) GTFS. If it refers to a `Shape` entity in the same real-time feed, the value of this field should be the one of the `shape_id` inside the entity, and _not_ the `id` of `FeedEntity`.
Stops that are a part of the original trip but will no longer be made, such as when a detour occurs, should be marked as schedule_relationship=SKIPPED or more details can be provided via a `TripModifications` message.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | | **trip_headsign** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Optional | One | Specifies the headsign for this trip when it differs from the original.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | | **trip_short_name** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Optional | One | Specifies the name for this trip when it differs from the original.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | +| **route_id** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Optional | One | Specifies the route associated with the trip, if the route has been added dynamically. The associated `Route` message should be included in the same feed. | ## _message_ VehiclePosition From 321aca226a5e9bee29e613fc91df7eb08069944c Mon Sep 17 00:00:00 2001 From: cleveramarquet Date: Mon, 2 Nov 2026 12:09:59 -0800 Subject: [PATCH 09/13] Update gtfs-realtime/spec/en/reference.md Co-authored-by: Skander Chouchene --- gtfs-realtime/spec/en/reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtfs-realtime/spec/en/reference.md b/gtfs-realtime/spec/en/reference.md index 01b62dcae..417be93b9 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -264,7 +264,7 @@ Defines updated properties of the trip. | **shape_id** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Optional | One | Specifies the identifier of the shape of the vehicle travel path when the trip shape differs from the shape specified in (CSV) GTFS or to specify it in real-time when it's not provided by (CSV) GTFS, such as a vehicle that takes differing paths based on rider demand. See definition of `trips.shape_id` in (CSV) GTFS.
If a shape is neither defined in (CSV) GTFS nor in real-time, the shape is considered unknown. This field can refer to a shape defined in the (CSV) GTFS in shapes.txt or a `Shape` in the same (protobuf) real-time feed. The order of stops (stop sequences) for this trip must remain the same as (CSV) GTFS. If it refers to a `Shape` entity in the same real-time feed, the value of this field should be the one of the `shape_id` inside the entity, and _not_ the `id` of `FeedEntity`.
Stops that are a part of the original trip but will no longer be made, such as when a detour occurs, should be marked as schedule_relationship=SKIPPED or more details can be provided via a `TripModifications` message.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | | **trip_headsign** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Optional | One | Specifies the headsign for this trip when it differs from the original.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | | **trip_short_name** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Optional | One | Specifies the name for this trip when it differs from the original.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | -| **route_id** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Optional | One | Specifies the route associated with the trip, if the route has been added dynamically. The associated `Route` message should be included in the same feed. | +| **route_id** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Optional | One | Specifies the route associated with the trip, if the route has been added dynamically. The associated `Route` message should be included in the same feed.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future.| ## _message_ VehiclePosition From 83e5b697df21d3a2bf1e61e1d22f75b920891889 Mon Sep 17 00:00:00 2001 From: cleveramarquet Date: Tue, 10 Nov 2026 13:05:37 -0800 Subject: [PATCH 10/13] Update gtfs-realtime/spec/en/reference.md Co-authored-by: phil-swiftly --- gtfs-realtime/spec/en/reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtfs-realtime/spec/en/reference.md b/gtfs-realtime/spec/en/reference.md index 417be93b9..f5540b829 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -134,7 +134,7 @@ A definition (or update) of an entity in the transit feed. If the entity is not | **alert** | [Alert](#message-alert) | Conditionally required | One | Data about the realtime alert. At least one of the fields trip_update, vehicle, alert, or shape must be provided - all these fields cannot be empty. | | **shape** | [Shape](#message-shape) | Conditionally required | One | Data about the realtime added shapes, such as for a detour. At least one of the fields trip_update, vehicle, alert, or shape must be provided - all these fields cannot be empty.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | | **stop** | [Stop](#message-stop) | Conditionally required | One | A new stop added to the feed dynamically.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | -| **trip_modifications** | [TripModifications)(#message-tripmodifications) | Conditionally required | One | List of trips affected by a particular modifications, such as a detour.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | +| **trip_modifications** | [TripModifications](#message-tripmodifications) | Conditionally required | One | List of trips affected by a particular modifications, such as a detour.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | | **route** | [Route](#message-route) | Conditionally required | One | Data about a new route added to the feed dynamically, such as a bus bridge.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | ## _message_ TripUpdate From 9b11f48d176c7e78a0c4fd2080c6b1e8a84b1fd9 Mon Sep 17 00:00:00 2001 From: cleveramarquet Date: Tue, 10 Nov 2026 13:44:13 -0800 Subject: [PATCH 11/13] Update reference.md Clarified the shape entity to also document route as a choice --- gtfs-realtime/spec/en/reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtfs-realtime/spec/en/reference.md b/gtfs-realtime/spec/en/reference.md index f5540b829..bd0b10c5f 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -132,7 +132,7 @@ A definition (or update) of an entity in the transit feed. If the entity is not | **trip_update** | [TripUpdate](#message-tripupdate) | Conditionally required | One | Data about the realtime departure delays of a trip. At least one of the fields trip_update, vehicle, alert, or shape must be provided - all these fields cannot be empty. | | **vehicle** | [VehiclePosition](#message-vehicleposition) | Conditionally required | One | Data about the realtime position of a vehicle. At least one of the fields trip_update, vehicle, alert, or shape must be provided - all these fields cannot be empty. | | **alert** | [Alert](#message-alert) | Conditionally required | One | Data about the realtime alert. At least one of the fields trip_update, vehicle, alert, or shape must be provided - all these fields cannot be empty. | -| **shape** | [Shape](#message-shape) | Conditionally required | One | Data about the realtime added shapes, such as for a detour. At least one of the fields trip_update, vehicle, alert, or shape must be provided - all these fields cannot be empty.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | +| **shape** | [Shape](#message-shape) | Conditionally required | One | Data about the realtime added shapes, such as for a detour. At least one of the fields trip_update, vehicle, alert, shape or route must be provided - all these fields cannot be empty.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | | **stop** | [Stop](#message-stop) | Conditionally required | One | A new stop added to the feed dynamically.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | | **trip_modifications** | [TripModifications](#message-tripmodifications) | Conditionally required | One | List of trips affected by a particular modifications, such as a detour.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | | **route** | [Route](#message-route) | Conditionally required | One | Data about a new route added to the feed dynamically, such as a bus bridge.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | From a7b870c21cf713aaaeb348e04400fc0dccd83798 Mon Sep 17 00:00:00 2001 From: cleveramarquet Date: Tue, 10 Nov 2026 13:51:11 -0800 Subject: [PATCH 12/13] Update reference.md Addressed review feedback from @phil-swiftly: - Included `route` in the `FeedEntity` description list of conditionally required entity types. - Noted that `route_id` in `TripProperties` is forbidden when `schedule_relationship` is not `NEW`. - Added a cautionary note that `route_id` should not be reused for different disruptions or car pools on the same service day. --- gtfs-realtime/spec/en/reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtfs-realtime/spec/en/reference.md b/gtfs-realtime/spec/en/reference.md index bd0b10c5f..195d82ddf 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -264,7 +264,7 @@ Defines updated properties of the trip. | **shape_id** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Optional | One | Specifies the identifier of the shape of the vehicle travel path when the trip shape differs from the shape specified in (CSV) GTFS or to specify it in real-time when it's not provided by (CSV) GTFS, such as a vehicle that takes differing paths based on rider demand. See definition of `trips.shape_id` in (CSV) GTFS.
If a shape is neither defined in (CSV) GTFS nor in real-time, the shape is considered unknown. This field can refer to a shape defined in the (CSV) GTFS in shapes.txt or a `Shape` in the same (protobuf) real-time feed. The order of stops (stop sequences) for this trip must remain the same as (CSV) GTFS. If it refers to a `Shape` entity in the same real-time feed, the value of this field should be the one of the `shape_id` inside the entity, and _not_ the `id` of `FeedEntity`.
Stops that are a part of the original trip but will no longer be made, such as when a detour occurs, should be marked as schedule_relationship=SKIPPED or more details can be provided via a `TripModifications` message.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | | **trip_headsign** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Optional | One | Specifies the headsign for this trip when it differs from the original.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | | **trip_short_name** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Optional | One | Specifies the name for this trip when it differs from the original.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. | -| **route_id** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Optional | One | Specifies the route associated with the trip, if the route has been added dynamically. The associated `Route` message should be included in the same feed.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future.| +| **route_id** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Optional | One | Specifies the route associated with the trip, if the route has been added dynamically. The associated `Route` message should be included in the same feed. Optional if `schedule_relationship` is `NEW`, and forbidden otherwise.

**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future.| ## _message_ VehiclePosition From 1adb147017e488440785320125dcbebf78a9aa25 Mon Sep 17 00:00:00 2001 From: cleveramarquet Date: Tue, 10 Nov 2026 13:53:49 -0800 Subject: [PATCH 13/13] Update reference.md Added a cautionary note that `route_id` should not be reused for different disruptions or car pools on the same service day. --- gtfs-realtime/spec/en/reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtfs-realtime/spec/en/reference.md b/gtfs-realtime/spec/en/reference.md index 195d82ddf..7c80c731b 100644 --- a/gtfs-realtime/spec/en/reference.md +++ b/gtfs-realtime/spec/en/reference.md @@ -741,7 +741,7 @@ Real-time information about a transit route. This message is used to dynamically | _**Field Name**_ | _**Type**_ | _**Required**_ | _**Cardinality**_ | _**Description**_ | | :--- | :--- | :--- | :--- | :--- | -| **route_id** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Required | One | Identifier of the route. Must be different than any route_id defined in the static GTFS. | +| **route_id** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Required | One | Identifier of the route. Must be different than any route_id defined in the static GTFS. Note: route_id should not be reused for different disruptions or car pools on the same service day.| | **agency_id** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Conditionally Required | One | Agency which operates the route. See [routes.agency_id](https://gtfs.org/schedule/reference/#routestxt). | | **route_short_name** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Conditionally Required | One | Short name of the route. See [routes.route_short_name](https://gtfs.org/schedule/reference/#routestxt). | | **route_long_name** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Conditionally Required | One | Long name of the route. See [routes.route_long_name](https://gtfs.org/schedule/reference/#routestxt). |