diff --git a/docs/en/documentation/realtime/change-history/revision-history.md b/docs/en/documentation/realtime/change-history/revision-history.md
index fa714fb7..73801f67 100644
--- a/docs/en/documentation/realtime/change-history/revision-history.md
+++ b/docs/en/documentation/realtime/change-history/revision-history.md
@@ -2,6 +2,10 @@
### Revision History
+#### October 2024
+
+* Clarification and small changes for Trip Modifications. See [discussion](https://github.com/google/transit/pull/497).
+
#### March 2024
* Adopted Trip-Modifications. See [discussion](https://github.com/google/transit/pull/403).
diff --git a/docs/en/documentation/realtime/feed-entities/trip-modifications.md b/docs/en/documentation/realtime/feed-entities/trip-modifications.md
index dc981f79..cc17e908 100644
--- a/docs/en/documentation/realtime/feed-entities/trip-modifications.md
+++ b/docs/en/documentation/realtime/feed-entities/trip-modifications.md
@@ -23,7 +23,7 @@ The scheduled stop times of each replacement trip are created from those of the
* A TripUpdate SHOULD be provided using a `ModifiedTripSelector` inside the TripUpdate's `TripDescriptor`.
* When the TripUpdate refers to the replacement trip, the consumer should behave as if the static GTFS would have been modified with the TripModifications (e.g. `arrival_time`, `departure_time`, `stop_sequence`, `stop_id` on replacement stops).
- * When providing a `ModifiedTripSelector`, the other fields of the `TripDescriptor` MUST be left empty, to avoid confusion by consumers that aren't looking for the `ModifiedTripSelector` value.
+ * When providing a `ModifiedTripSelector`, the `trip_id`, `route_id`, `direction_id`, `start_time`, `start_date` fields of the `TripDescriptor` MUST be left empty, to avoid confusion by consumers that aren't looking for the `ModifiedTripSelector` value.
* TripUpdate feeds providing updates with `ModifiedTripSelector` SHOULD also include a TripUpdate targeting clients that don't support TripModifications. In other words, there should be two TripUpdates: one for clients with modified trips (with `TripModifications`) and one for clients with the originial unmodified GTFS (without `TripModifications`).
* Providing a TripUpdate with a `ModifiedTripSelector` is the only way to create predictions at replacement stops.
* If no such TripUpdate is found, TripUpdates for the original `trip_id` will apply to the modified trip.
diff --git a/docs/en/documentation/realtime/gtfs-realtime.proto b/docs/en/documentation/realtime/gtfs-realtime.proto
index d3cfe529..501c15d8 100644
--- a/docs/en/documentation/realtime/gtfs-realtime.proto
+++ b/docs/en/documentation/realtime/gtfs-realtime.proto
@@ -220,7 +220,7 @@ message TripUpdate {
// In order to provide departure_occupancy_status without either arrival or
// departure StopTimeEvents, ScheduleRelationship should be set to NO_DATA.
optional VehiclePosition.OccupancyStatus departure_occupancy_status = 7;
-
+
// The relation between the StopTimeEvents and the static schedule.
enum ScheduleRelationship {
// The vehicle is proceeding in accordance with its static schedule of
@@ -252,7 +252,7 @@ message TripUpdate {
UNSCHEDULED = 3;
}
optional ScheduleRelationship schedule_relationship = 5
- [default = SCHEDULED];
+ [default = SCHEDULED];
// Provides the updated values for the stop time.
// NOTE: This message is still experimental, and subject to change. It may be formally adopted in the future.
@@ -641,10 +641,10 @@ message Alert {
// Severity of this alert.
enum SeverityLevel {
- UNKNOWN_SEVERITY = 1;
- INFO = 2;
- WARNING = 3;
- SEVERE = 4;
+ UNKNOWN_SEVERITY = 1;
+ INFO = 2;
+ WARNING = 3;
+ SEVERE = 4;
}
optional SeverityLevel severity_level = 14 [default = UNKNOWN_SEVERITY];
@@ -652,18 +652,18 @@ message Alert {
// TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image must enhance the understanding of the alert. Any essential information communicated within the image must also be contained in the alert text.
// The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information.
// NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
- optional TranslatedImage image = 15;
+ optional TranslatedImage image = 15;
// Text describing the appearance of the linked image in the `image` field (e.g., in case the image can't be displayed
// or the user can't see the image for accessibility reasons). See the HTML spec for alt image text - https://html.spec.whatwg.org/#alt.
// NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
optional TranslatedString image_alternative_text = 16;
-
-
+
+
// Description of the cause of the alert that allows for agency-specific language; more specific than the Cause. If cause_detail is included, then Cause must also be included.
// NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
optional TranslatedString cause_detail = 17;
-
+
// Description of the effect of the alert that allows for agency-specific language; more specific than the Effect. If effect_detail is included, then Effect must also be included.
// NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
optional TranslatedString effect_detail = 18;
@@ -810,7 +810,7 @@ message TripDescriptor {
CANCELED = 3;
// Should not be used - for backwards-compatibility only.
- REPLACEMENT = 5 [deprecated=true];
+ REPLACEMENT = 5 [deprecated = true];
// An extra trip that was added in addition to a running schedule, for example, to replace a broken vehicle or to
// respond to sudden passenger load. Used with TripUpdate.TripProperties.trip_id, TripUpdate.TripProperties.start_date,
@@ -848,7 +848,24 @@ message TripDescriptor {
// The trip_id from the GTFS feed that is modified by the modifications_id
optional string affected_trip_id = 2;
+
+ // The initially scheduled start time of this trip instance, applied to the frequency based modified trip. Same definition as start_time in TripDescriptor.
+ optional string start_time = 3;
+
+ // The start date of this trip instance in YYYYMMDD format, applied to the modified trip. Same definition as start_date in TripDescriptor.
+ optional string start_date = 4;
+
+ // 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;
}
+
+ // Linkage to any modifications done to this trip (shape changes, removal or addition of stops).
+ // If this field is provided, the `trip_id`, `route_id`, `direction_id`, `start_time`, `start_date` fields of the `TripDescriptor` MUST be left empty, to avoid confusion by consumers that aren't looking for the `ModifiedTripSelector` value.
optional ModifiedTripSelector modified_trip = 7;
// The extensions namespace allows 3rd-party developers to extend the
@@ -1028,7 +1045,7 @@ message Shape {
// See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
// NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
optional string shape_id = 1;
-
+
// Encoded polyline representation of the shape. This polyline must contain at least two points.
// For more information about encoded polylines, see https://developers.google.com/maps/documentation/utilities/polylinealgorithm
// This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
@@ -1052,7 +1069,7 @@ message Stop {
UNKNOWN = 0;
AVAILABLE = 1;
NOT_AVAILABLE = 2;
- }
+ }
optional string stop_id = 1;
optional TranslatedString stop_code = 2;
@@ -1130,9 +1147,9 @@ message TripModifications {
// The following extension IDs are reserved for private use by any organization.
extensions 9000 to 9999;
-}
+ }
- // A list of selected trips affected by this TripModifications.
+ // A list of selected trips affected by this TripModifications.
repeated SelectedTrips selected_trips = 1;
// A list of start times in the real-time trip descriptor for the trip_id defined in trip_ids.
@@ -1144,7 +1161,7 @@ message TripModifications {
repeated string service_dates = 3;
// A list of modifications to apply to the affected trips.
- repeated Modification modifications = 4;
+ repeated Modification modifications = 4;
// The extensions namespace allows 3rd-party developers to extend the
// GTFS Realtime Specification in order to add and evaluate new features and
@@ -1157,7 +1174,7 @@ message TripModifications {
// 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 {
+message StopSelector {
// Must be the same as in stop_times.txt in the corresponding GTFS feed.
optional uint32 stop_sequence = 1;
// Must be the same as in stops.txt in the corresponding GTFS feed.
diff --git a/docs/en/documentation/realtime/proto.md b/docs/en/documentation/realtime/proto.md
index a546b306..d33bd51f 100644
--- a/docs/en/documentation/realtime/proto.md
+++ b/docs/en/documentation/realtime/proto.md
@@ -224,7 +224,7 @@ message TripUpdate {
// In order to provide departure_occupancy_status without either arrival or
// departure StopTimeEvents, ScheduleRelationship should be set to NO_DATA.
optional VehiclePosition.OccupancyStatus departure_occupancy_status = 7;
-
+
// The relation between the StopTimeEvents and the static schedule.
enum ScheduleRelationship {
// The vehicle is proceeding in accordance with its static schedule of
@@ -256,7 +256,7 @@ message TripUpdate {
UNSCHEDULED = 3;
}
optional ScheduleRelationship schedule_relationship = 5
- [default = SCHEDULED];
+ [default = SCHEDULED];
// Provides the updated values for the stop time.
// NOTE: This message is still experimental, and subject to change. It may be formally adopted in the future.
@@ -645,10 +645,10 @@ message Alert {
// Severity of this alert.
enum SeverityLevel {
- UNKNOWN_SEVERITY = 1;
- INFO = 2;
- WARNING = 3;
- SEVERE = 4;
+ UNKNOWN_SEVERITY = 1;
+ INFO = 2;
+ WARNING = 3;
+ SEVERE = 4;
}
optional SeverityLevel severity_level = 14 [default = UNKNOWN_SEVERITY];
@@ -656,18 +656,18 @@ message Alert {
// TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image must enhance the understanding of the alert. Any essential information communicated within the image must also be contained in the alert text.
// The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information.
// NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
- optional TranslatedImage image = 15;
+ optional TranslatedImage image = 15;
// Text describing the appearance of the linked image in the `image` field (e.g., in case the image can't be displayed
// or the user can't see the image for accessibility reasons). See the HTML spec for alt image text - https://html.spec.whatwg.org/#alt.
// NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
optional TranslatedString image_alternative_text = 16;
-
-
+
+
// Description of the cause of the alert that allows for agency-specific language; more specific than the Cause. If cause_detail is included, then Cause must also be included.
// NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
optional TranslatedString cause_detail = 17;
-
+
// Description of the effect of the alert that allows for agency-specific language; more specific than the Effect. If effect_detail is included, then Effect must also be included.
// NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
optional TranslatedString effect_detail = 18;
@@ -814,7 +814,7 @@ message TripDescriptor {
CANCELED = 3;
// Should not be used - for backwards-compatibility only.
- REPLACEMENT = 5 [deprecated=true];
+ REPLACEMENT = 5 [deprecated = true];
// An extra trip that was added in addition to a running schedule, for example, to replace a broken vehicle or to
// respond to sudden passenger load. Used with TripUpdate.TripProperties.trip_id, TripUpdate.TripProperties.start_date,
@@ -852,7 +852,24 @@ message TripDescriptor {
// The trip_id from the GTFS feed that is modified by the modifications_id
optional string affected_trip_id = 2;
+
+ // The initially scheduled start time of this trip instance, applied to the frequency based modified trip. Same definition as start_time in TripDescriptor.
+ optional string start_time = 3;
+
+ // The start date of this trip instance in YYYYMMDD format, applied to the modified trip. Same definition as start_date in TripDescriptor.
+ optional string start_date = 4;
+
+ // 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;
}
+
+ // Linkage to any modifications done to this trip (shape changes, removal or addition of stops).
+ // If this field is provided, the `trip_id`, `route_id`, `direction_id`, `start_time`, `start_date` fields of the `TripDescriptor` MUST be left empty, to avoid confusion by consumers that aren't looking for the `ModifiedTripSelector` value.
optional ModifiedTripSelector modified_trip = 7;
// The extensions namespace allows 3rd-party developers to extend the
@@ -1032,7 +1049,7 @@ message Shape {
// See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
// NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
optional string shape_id = 1;
-
+
// Encoded polyline representation of the shape. This polyline must contain at least two points.
// For more information about encoded polylines, see https://developers.google.com/maps/documentation/utilities/polylinealgorithm
// This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
@@ -1056,7 +1073,7 @@ message Stop {
UNKNOWN = 0;
AVAILABLE = 1;
NOT_AVAILABLE = 2;
- }
+ }
optional string stop_id = 1;
optional TranslatedString stop_code = 2;
@@ -1134,9 +1151,9 @@ message TripModifications {
// The following extension IDs are reserved for private use by any organization.
extensions 9000 to 9999;
-}
+ }
- // A list of selected trips affected by this TripModifications.
+ // A list of selected trips affected by this TripModifications.
repeated SelectedTrips selected_trips = 1;
// A list of start times in the real-time trip descriptor for the trip_id defined in trip_ids.
@@ -1148,7 +1165,7 @@ message TripModifications {
repeated string service_dates = 3;
// A list of modifications to apply to the affected trips.
- repeated Modification modifications = 4;
+ repeated Modification modifications = 4;
// The extensions namespace allows 3rd-party developers to extend the
// GTFS Realtime Specification in order to add and evaluate new features and
@@ -1161,7 +1178,7 @@ message TripModifications {
// 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 {
+message StopSelector {
// Must be the same as in stop_times.txt in the corresponding GTFS feed.
optional uint32 stop_sequence = 1;
// Must be the same as in stops.txt in the corresponding GTFS feed.
diff --git a/docs/en/documentation/realtime/reference.md b/docs/en/documentation/realtime/reference.md
index 0a653828..92f19fb0 100644
--- a/docs/en/documentation/realtime/reference.md
+++ b/docs/en/documentation/realtime/reference.md
@@ -57,6 +57,7 @@ Fields labeled as **experimental** are subject to change and not yet formally ad
* [VehiclePosition](#message-vehicleposition)
* [TripDescriptor](#message-tripdescriptor)
* [ScheduleRelationship](#enum-schedulerelationship_1)
+ * [ModifiedTripSelector](#message-modifiedtripselector)
* [VehicleDescriptor](#message-vehicledescriptor)
* [WheelchairAccessible](#enum-wheelchairaccessible)
* [Position](#message-position)
@@ -123,7 +124,7 @@ Determines whether the current fetch is incremental.
### _message_ FeedEntity
-A definition (or update) of an entity in the transit feed. If the entity is not being deleted, exactly one of 'trip_update', 'vehicle', 'alert' and 'shape' fields should be populated.
+A definition (or update) of an entity in the transit feed. If the entity is not being deleted, exactly one of 'trip_update', 'vehicle', 'alert', 'shape', 'stop' or 'trip_modification' fields should be populated.
**Fields**
@@ -135,6 +136,8 @@ A definition (or update) of an entity in the transit feed. If the entity is not
| **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. |
+| **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. |
### _message_ TripUpdate
@@ -463,6 +466,7 @@ TripDescriptor.route_id cannot be used within an Alert EntitySelector to specify
| **start_time** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Conditionally required | One | The initially scheduled start time of this trip instance. When the trip_id corresponds to a non-frequency-based trip, this field should either be omitted or be equal to the value in the GTFS feed. When the trip_id correponds to a frequency-based trip defined in GTFS frequencies.txt, start_time is required and must be specified for trip updates and vehicle positions. If the trip corresponds to exact_times=1 GTFS record, then start_time must be some multiple (including zero) of headway_secs later than frequencies.txt start_time for the corresponding time period. If the trip corresponds to exact_times=0, then its start_time may be arbitrary, and is initially expected to be the first departure of the trip. Once established, the start_time of this frequency-based exact_times=0 trip should be considered immutable, even if the first departure time changes -- that time change may instead be reflected in a StopTimeUpdate. If trip_id is omitted, start_time must be provided. Format and semantics of the field is same as that of GTFS/frequencies.txt/start_time, e.g., 11:15:35 or 25:15:35. |
| **start_date** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Conditionally required | One | The start date of this trip instance in YYYYMMDD format. For scheduled trips (trips not defined in GTFS frequencies.txt), this field must be provided to disambiguate trips that are so late as to collide with a scheduled trip on a next day. For example, for a train that departs 8:00 and 20:00 every day, and is 12 hours late, there would be two distinct trips on the same time. This field can be provided but is not mandatory for schedules in which such collisions are impossible - for example, a service running on hourly schedule where a vehicle that is one hour late is not considered to be related to schedule anymore. This field is required for frequency-based trips defined in GTFS frequencies.txt. If trip_id is omitted, start_date must be provided. |
| **schedule_relationship** | [ScheduleRelationship](#enum-schedulerelationship_1) | Optional | One | The relation between this trip and the static schedule. If TripDescriptor is provided in an Alert `EntitySelector`, the `schedule_relationship` field is ignored by consumers when identifying the matching trip instance.
+| **modified_trip** | [ModifiedTripSelector](#message-modifiedtripselector) | Optional | One | Linkage to any modifications done to this trip (shape changes, removal or addition of stops). If this field is provided, the `trip_id`, `route_id`, `direction_id`, `start_time`, `start_date` fields of the `TripDescriptor` MUST be left empty, to avoid confusion by consumers that aren't looking for the `ModifiedTripSelector` value.
### _enum_ ScheduleRelationship
@@ -479,6 +483,19 @@ The relation between this trip and the static schedule. If a trip is done in acc
| **DUPLICATED** | A new trip that is the same as an existing scheduled trip except for service start date and time. Used with `TripUpdate.TripProperties.trip_id`, `TripUpdate.TripProperties.start_date`, and `TripUpdate.TripProperties.start_time` to copy an existing trip from static GTFS but start at a different service date and/or time. Duplicating a trip is allowed if the service related to the original trip in (CSV) GTFS (in `calendar.txt` or `calendar_dates.txt`) is operating within the next 30 days. The trip to be duplicated is identified via `TripUpdate.TripDescriptor.trip_id`.
This enumeration does not modify the existing trip referenced by `TripUpdate.TripDescriptor.trip_id` - if a producer wants to cancel the original trip, it must publish a separate `TripUpdate` with the value of CANCELED. Trips defined in GTFS `frequencies.txt` with `exact_times` that is empty or equal to `0` cannot be duplicated. The `VehiclePosition.TripDescriptor.trip_id` for the new trip must contain the matching value from `TripUpdate.TripProperties.trip_id` and `VehiclePosition.TripDescriptor.ScheduleRelationship` must also be set to `DUPLICATED`.
*Existing producers and consumers that were using the ADDED enumeration to represent duplicated trips must follow the [migration guide](../../realtime/examples//migration-duplicated) to transition to the DUPLICATED enumeration.* |
| **DELETED** | A trip that existed in the schedule but was removed that must not be shown to users.
DELETED should be used instead of CANCELED to indicate that a transit provider would like to entirely remove information about the corresponding trip from consuming applications, so the trip is not shown as cancelled to riders, e.g. a trip that is entirely being replaced by another trip. This designation becomes particularly important if several trips are cancelled and replaced with substitute service. If consumers were to show explicit information about the cancellations it would distract from the more important real-time predictions.
**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. |
+## _message_ ModifiedTripSelector
+
+When a service is affected by a trip modification, `ModifiedTripSelector` is used to select some trip. More detail in the [Trip Modification](https://github.com/google/transit/blob/master/gtfs-realtime/spec/en/trip-modifications.md#linkage-to-tripupdates) specification.
+
+**Values**
+
+| _**Field Name**_ | _**Type**_ | _**Required**_ | _**Cardinality**_ | _**Description**_ |
+|------------------|------------|----------------|-------------------|-------------------|
+| **modifications_id** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Required | One | The `id` of the `FeedEntity` in which the contained `TripModifications` object affects this trip.|
+| **affected_trip_id** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Required | One | The `trip_id` from the GTFS feed that is modified by the `modifications_id`|
+| **start_time** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Optional | One | The initially scheduled start time of this trip instance, applied to the frequency based modified trip. Same definition as **start_time** in [TripDescriptor](#message-tripdescriptor).|
+| **start_date** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Optional | One | The start date of this trip instance in YYYYMMDD format, applied to the modified trip. Same definition as **start_date** in [TripDescriptor](#message-tripdescriptor).|
+
### _message_ VehicleDescriptor
Identification information for the vehicle performing the trip.
diff --git a/docs/en/documentation/schedule/reference.md b/docs/en/documentation/schedule/reference.md
index 38d8b302..900491ce 100644
--- a/docs/en/documentation/schedule/reference.md
+++ b/docs/en/documentation/schedule/reference.md
@@ -1,6 +1,6 @@
## General Transit Feed Specification Reference
-**Revised Aug 16, 2024. See [Revision History](../change_history/revision_history) for more details.**
+**Revised Oct 16, 2024. See [Revision History](../change_history/revision_history) for more details.**
This document defines the format and structure of the files that comprise a GTFS dataset.
@@ -209,7 +209,7 @@ Primary key (`stop_id`)
| `stop_lon` | Longitude | **Conditionally Required** | Longitude of the location.
For stops/platforms (`location_type=0`) and boarding area (`location_type=4`), the coordinates must be the ones of the bus pole — if exists — and otherwise of where the travelers are boarding the vehicle (on the sidewalk or the platform, and not on the roadway or the track where the vehicle stops).
Conditionally Required:
- **Required** for locations which are stops (`location_type=0`), stations (`location_type=1`) or entrances/exits (`location_type=2`).
- Optional for locations which are generic nodes (`location_type=3`) or boarding areas (`location_type=4`). |
| `zone_id` | ID | Optional | Identifies the fare zone for a stop. If this record represents a station or station entrance, the `zone_id` is ignored.|
| `stop_url` | URL | Optional | URL of a web page about the location. This should be different from the `agency.agency_url` and the `routes.route_url` field values. |
-| `location_type` | Enum | Optional | Location type. Valid options are:
`0` (or blank) - **Stop** (or **Platform**). A location where passengers board or disembark from a transit vehicle. Is called a platform when defined within a `parent_station`.
`1` - **Station**. A physical structure or area that contains one or more platform.
`2` - **Entrance/Exit**. A location where passengers can enter or exit a station from the street. If an entrance/exit belongs to multiple stations, it may be linked by pathways to both, but the data provider must pick one of them as parent.
`3` - **Generic Node**. A location within a station, not matching any other `location_type`, that may be used to link together pathways define in [pathways.txt](#pathwaystxt).
`4` - **Boarding Area**. A specific location on a platform, where passengers can board and/or alight vehicles.|
+| `location_type` | Enum | Optional | Location type. Valid options are:
`0` (or empty) - **Stop** (or **Platform**). A location where passengers board or disembark from a transit vehicle. Is called a platform when defined within a `parent_station`.
`1` - **Station**. A physical structure or area that contains one or more platform.
`2` - **Entrance/Exit**. A location where passengers can enter or exit a station from the street. If an entrance/exit belongs to multiple stations, it may be linked by pathways to both, but the data provider must pick one of them as parent.
`3` - **Generic Node**. A location within a station, not matching any other `location_type`, that may be used to link together pathways define in [pathways.txt](#pathwaystxt).
`4` - **Boarding Area**. A specific location on a platform, where passengers can board and/or alight vehicles.|
| `parent_station` | Foreign ID referencing `stops.stop_id` | **Conditionally Required** | Defines hierarchy between the different locations defined in [stops.txt](#stopstxt). It contains the ID of the parent location, as followed:
- **Stop/platform** (`location_type=0`): the `parent_station` field contains the ID of a station.
- **Station** (`location_type=1`): this field must be empty.
- **Entrance/exit** (`location_type=2`) or **generic node** (`location_type=3`): the `parent_station` field contains the ID of a station (`location_type=1`)
- **Boarding Area** (`location_type=4`): the `parent_station` field contains ID of a platform.
Conditionally Required:
- **Required** for locations which are entrances (`location_type=2`), generic nodes (`location_type=3`) or boarding areas (`location_type=4`).
- Optional for stops/platforms (`location_type=0`).
- Forbidden for stations (`location_type=1`).|
| `stop_timezone` | Timezone | Optional | Timezone of the location. If the location has a parent station, it inherits the parent station’s timezone instead of applying its own. Stations and parentless stops with empty `stop_timezone` inherit the timezone specified by `agency.agency_timezone`. The times provided in [stop_times.txt](#stop_timestxt) are in the timezone specified by `agency.agency_timezone`, not `stop_timezone`. This ensures that the time values in a trip always increase over the course of a trip, regardless of which timezones the trip crosses. |
| `wheelchair_boarding` | Enum | Optional | Indicates whether wheelchair boardings are possible from the location. Valid options are:
For parentless stops:
`0` or empty - No accessibility information for the stop.
`1` - Some vehicles at this stop can be boarded by a rider in a wheelchair.
`2` - Wheelchair boarding is not possible at this stop.
For child stops:
`0` or empty - Stop will inherit its `wheelchair_boarding` behavior from the parent station, if specified in the parent.
`1` - There exists some accessible path from outside the station to the specific stop/platform.
`2` - There exists no accessible path from outside the station to the specific stop/platform.
For station entrances/exits:
`0` or empty - Station entrance will inherit its `wheelchair_boarding` behavior from the parent station, if specified for the parent.
`1` - Station entrance is wheelchair accessible.
`2` - No accessible path from station entrance to stops/platforms. |
diff --git a/docs/es/documentation/realtime/change-history/revision-history.md b/docs/es/documentation/realtime/change-history/revision-history.md
index f62271dc..379d0971 100644
--- a/docs/es/documentation/realtime/change-history/revision-history.md
+++ b/docs/es/documentation/realtime/change-history/revision-history.md
@@ -2,6 +2,10 @@
## Historial de revisiones
+#### Octubre de 2024
+
+ * Aclaraciones y pequeños cambios para las modificaciones de viaje (Trip Modifications). Consulte la [discusión](https://github.com/google/transit/pull/497).
+
#### Marzo 2024
* Modificaciones de viaje adoptadas. Consulte la [discusión](https://github.com/google/transit/pull/403).
diff --git a/docs/es/documentation/realtime/feed-entities/trip-modifications.md b/docs/es/documentation/realtime/feed-entities/trip-modifications.md
index 85eae094..28d5b799 100644
--- a/docs/es/documentation/realtime/feed-entities/trip-modifications.md
+++ b/docs/es/documentation/realtime/feed-entities/trip-modifications.md
@@ -23,7 +23,7 @@
* DEBERÍA proporcionar un TripUpdate utilizando un `ModifiedTripSelector` dentro del `TripDescriptor` de TripUpdate.
* Cuando TripUpdate se refiere al viaje de reemplazo, el consumidor debe comportarse como si el GTFS estático hubiera sido modificado con las TripModifications (por ejemplo, `arrival_time`, `departure_time`, `stop_sequence`, `stop_id` en paradas de reemplazo).
- * Al proporcionar un `ModifiedTripSelector`, los demás campos del `TripDescriptor` DEBE dejarse vacíos, para evitar confusión por parte de los consumidores que no buscan el valor de `ModifiedTripSelector`.
+ * Al proporcionar un `ModifiedTripSelector`, los campos `trip_id`, `route_id`, `direction_id`, `start_time`, `start_date` del `TripDescriptor` DEBEN dejarse vacíos, para evitar confusiones por parte de los consumidores que no están buscando el valor de `ModifiedTripSelector`.
* Los feeds de TripUpdate que proporcionan actualizaciones con `ModifiedTripSelector` DEBERÍA incluir también un TripUpdate dirigido a clientes que no admiten TripModifications. En otras palabras, debería haber dos TripUpdates: una para clientes con viajes modificados (con `TripModifications`) y otra para clientes con el GTFS original sin modificar (sin `TripModifications`).
* Proporcionar un TripUpdate con un `ModifiedTripSelector` es la única forma de crear predicciones en paradas de reemplazo.
* Si no se encuentra ninguna TripUpdate, las TripUpdates para el `trip_id` original se aplicarán al viaje modificado.
diff --git a/docs/es/documentation/realtime/gtfs-realtime.proto b/docs/es/documentation/realtime/gtfs-realtime.proto
index d3cfe529..501c15d8 100644
--- a/docs/es/documentation/realtime/gtfs-realtime.proto
+++ b/docs/es/documentation/realtime/gtfs-realtime.proto
@@ -220,7 +220,7 @@ message TripUpdate {
// In order to provide departure_occupancy_status without either arrival or
// departure StopTimeEvents, ScheduleRelationship should be set to NO_DATA.
optional VehiclePosition.OccupancyStatus departure_occupancy_status = 7;
-
+
// The relation between the StopTimeEvents and the static schedule.
enum ScheduleRelationship {
// The vehicle is proceeding in accordance with its static schedule of
@@ -252,7 +252,7 @@ message TripUpdate {
UNSCHEDULED = 3;
}
optional ScheduleRelationship schedule_relationship = 5
- [default = SCHEDULED];
+ [default = SCHEDULED];
// Provides the updated values for the stop time.
// NOTE: This message is still experimental, and subject to change. It may be formally adopted in the future.
@@ -641,10 +641,10 @@ message Alert {
// Severity of this alert.
enum SeverityLevel {
- UNKNOWN_SEVERITY = 1;
- INFO = 2;
- WARNING = 3;
- SEVERE = 4;
+ UNKNOWN_SEVERITY = 1;
+ INFO = 2;
+ WARNING = 3;
+ SEVERE = 4;
}
optional SeverityLevel severity_level = 14 [default = UNKNOWN_SEVERITY];
@@ -652,18 +652,18 @@ message Alert {
// TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image must enhance the understanding of the alert. Any essential information communicated within the image must also be contained in the alert text.
// The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information.
// NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
- optional TranslatedImage image = 15;
+ optional TranslatedImage image = 15;
// Text describing the appearance of the linked image in the `image` field (e.g., in case the image can't be displayed
// or the user can't see the image for accessibility reasons). See the HTML spec for alt image text - https://html.spec.whatwg.org/#alt.
// NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
optional TranslatedString image_alternative_text = 16;
-
-
+
+
// Description of the cause of the alert that allows for agency-specific language; more specific than the Cause. If cause_detail is included, then Cause must also be included.
// NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
optional TranslatedString cause_detail = 17;
-
+
// Description of the effect of the alert that allows for agency-specific language; more specific than the Effect. If effect_detail is included, then Effect must also be included.
// NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
optional TranslatedString effect_detail = 18;
@@ -810,7 +810,7 @@ message TripDescriptor {
CANCELED = 3;
// Should not be used - for backwards-compatibility only.
- REPLACEMENT = 5 [deprecated=true];
+ REPLACEMENT = 5 [deprecated = true];
// An extra trip that was added in addition to a running schedule, for example, to replace a broken vehicle or to
// respond to sudden passenger load. Used with TripUpdate.TripProperties.trip_id, TripUpdate.TripProperties.start_date,
@@ -848,7 +848,24 @@ message TripDescriptor {
// The trip_id from the GTFS feed that is modified by the modifications_id
optional string affected_trip_id = 2;
+
+ // The initially scheduled start time of this trip instance, applied to the frequency based modified trip. Same definition as start_time in TripDescriptor.
+ optional string start_time = 3;
+
+ // The start date of this trip instance in YYYYMMDD format, applied to the modified trip. Same definition as start_date in TripDescriptor.
+ optional string start_date = 4;
+
+ // 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;
}
+
+ // Linkage to any modifications done to this trip (shape changes, removal or addition of stops).
+ // If this field is provided, the `trip_id`, `route_id`, `direction_id`, `start_time`, `start_date` fields of the `TripDescriptor` MUST be left empty, to avoid confusion by consumers that aren't looking for the `ModifiedTripSelector` value.
optional ModifiedTripSelector modified_trip = 7;
// The extensions namespace allows 3rd-party developers to extend the
@@ -1028,7 +1045,7 @@ message Shape {
// See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
// NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
optional string shape_id = 1;
-
+
// Encoded polyline representation of the shape. This polyline must contain at least two points.
// For more information about encoded polylines, see https://developers.google.com/maps/documentation/utilities/polylinealgorithm
// This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
@@ -1052,7 +1069,7 @@ message Stop {
UNKNOWN = 0;
AVAILABLE = 1;
NOT_AVAILABLE = 2;
- }
+ }
optional string stop_id = 1;
optional TranslatedString stop_code = 2;
@@ -1130,9 +1147,9 @@ message TripModifications {
// The following extension IDs are reserved for private use by any organization.
extensions 9000 to 9999;
-}
+ }
- // A list of selected trips affected by this TripModifications.
+ // A list of selected trips affected by this TripModifications.
repeated SelectedTrips selected_trips = 1;
// A list of start times in the real-time trip descriptor for the trip_id defined in trip_ids.
@@ -1144,7 +1161,7 @@ message TripModifications {
repeated string service_dates = 3;
// A list of modifications to apply to the affected trips.
- repeated Modification modifications = 4;
+ repeated Modification modifications = 4;
// The extensions namespace allows 3rd-party developers to extend the
// GTFS Realtime Specification in order to add and evaluate new features and
@@ -1157,7 +1174,7 @@ message TripModifications {
// 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 {
+message StopSelector {
// Must be the same as in stop_times.txt in the corresponding GTFS feed.
optional uint32 stop_sequence = 1;
// Must be the same as in stops.txt in the corresponding GTFS feed.
diff --git a/docs/es/documentation/realtime/proto.md b/docs/es/documentation/realtime/proto.md
index 18f897df..a29f7af6 100644
--- a/docs/es/documentation/realtime/proto.md
+++ b/docs/es/documentation/realtime/proto.md
@@ -224,7 +224,7 @@ message TripUpdate {
// In order to provide departure_occupancy_status without either arrival or
// departure StopTimeEvents, ScheduleRelationship should be set to NO_DATA.
optional VehiclePosition.OccupancyStatus departure_occupancy_status = 7;
-
+
// The relation between the StopTimeEvents and the static schedule.
enum ScheduleRelationship {
// The vehicle is proceeding in accordance with its static schedule of
@@ -256,7 +256,7 @@ message TripUpdate {
UNSCHEDULED = 3;
}
optional ScheduleRelationship schedule_relationship = 5
- [default = SCHEDULED];
+ [default = SCHEDULED];
// Provides the updated values for the stop time.
// NOTE: This message is still experimental, and subject to change. It may be formally adopted in the future.
@@ -645,10 +645,10 @@ message Alert {
// Severity of this alert.
enum SeverityLevel {
- UNKNOWN_SEVERITY = 1;
- INFO = 2;
- WARNING = 3;
- SEVERE = 4;
+ UNKNOWN_SEVERITY = 1;
+ INFO = 2;
+ WARNING = 3;
+ SEVERE = 4;
}
optional SeverityLevel severity_level = 14 [default = UNKNOWN_SEVERITY];
@@ -656,18 +656,18 @@ message Alert {
// TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image must enhance the understanding of the alert. Any essential information communicated within the image must also be contained in the alert text.
// The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information.
// NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
- optional TranslatedImage image = 15;
+ optional TranslatedImage image = 15;
// Text describing the appearance of the linked image in the `image` field (e.g., in case the image can't be displayed
// or the user can't see the image for accessibility reasons). See the HTML spec for alt image text - https://html.spec.whatwg.org/#alt.
// NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
optional TranslatedString image_alternative_text = 16;
-
-
+
+
// Description of the cause of the alert that allows for agency-specific language; more specific than the Cause. If cause_detail is included, then Cause must also be included.
// NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
optional TranslatedString cause_detail = 17;
-
+
// Description of the effect of the alert that allows for agency-specific language; more specific than the Effect. If effect_detail is included, then Effect must also be included.
// NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
optional TranslatedString effect_detail = 18;
@@ -814,7 +814,7 @@ message TripDescriptor {
CANCELED = 3;
// Should not be used - for backwards-compatibility only.
- REPLACEMENT = 5 [deprecated=true];
+ REPLACEMENT = 5 [deprecated = true];
// An extra trip that was added in addition to a running schedule, for example, to replace a broken vehicle or to
// respond to sudden passenger load. Used with TripUpdate.TripProperties.trip_id, TripUpdate.TripProperties.start_date,
@@ -852,7 +852,24 @@ message TripDescriptor {
// The trip_id from the GTFS feed that is modified by the modifications_id
optional string affected_trip_id = 2;
+
+ // The initially scheduled start time of this trip instance, applied to the frequency based modified trip. Same definition as start_time in TripDescriptor.
+ optional string start_time = 3;
+
+ // The start date of this trip instance in YYYYMMDD format, applied to the modified trip. Same definition as start_date in TripDescriptor.
+ optional string start_date = 4;
+
+ // 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;
}
+
+ // Linkage to any modifications done to this trip (shape changes, removal or addition of stops).
+ // If this field is provided, the `trip_id`, `route_id`, `direction_id`, `start_time`, `start_date` fields of the `TripDescriptor` MUST be left empty, to avoid confusion by consumers that aren't looking for the `ModifiedTripSelector` value.
optional ModifiedTripSelector modified_trip = 7;
// The extensions namespace allows 3rd-party developers to extend the
@@ -1032,7 +1049,7 @@ message Shape {
// See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
// NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
optional string shape_id = 1;
-
+
// Encoded polyline representation of the shape. This polyline must contain at least two points.
// For more information about encoded polylines, see https://developers.google.com/maps/documentation/utilities/polylinealgorithm
// This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
@@ -1056,7 +1073,7 @@ message Stop {
UNKNOWN = 0;
AVAILABLE = 1;
NOT_AVAILABLE = 2;
- }
+ }
optional string stop_id = 1;
optional TranslatedString stop_code = 2;
@@ -1134,9 +1151,9 @@ message TripModifications {
// The following extension IDs are reserved for private use by any organization.
extensions 9000 to 9999;
-}
+ }
- // A list of selected trips affected by this TripModifications.
+ // A list of selected trips affected by this TripModifications.
repeated SelectedTrips selected_trips = 1;
// A list of start times in the real-time trip descriptor for the trip_id defined in trip_ids.
@@ -1148,7 +1165,7 @@ message TripModifications {
repeated string service_dates = 3;
// A list of modifications to apply to the affected trips.
- repeated Modification modifications = 4;
+ repeated Modification modifications = 4;
// The extensions namespace allows 3rd-party developers to extend the
// GTFS Realtime Specification in order to add and evaluate new features and
@@ -1161,7 +1178,7 @@ message TripModifications {
// 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 {
+message StopSelector {
// Must be the same as in stop_times.txt in the corresponding GTFS feed.
optional uint32 stop_sequence = 1;
// Must be the same as in stops.txt in the corresponding GTFS feed.
diff --git a/docs/es/documentation/realtime/reference.md b/docs/es/documentation/realtime/reference.md
index 453aade1..b57cf149 100644
--- a/docs/es/documentation/realtime/reference.md
+++ b/docs/es/documentation/realtime/reference.md
@@ -57,6 +57,7 @@
* [VehiclePosition](#message-vehicleposition)
* [TripDescriptor](#message-tripdescriptor)
* [ScheduleRelationship](#enum-schedulerelationship_1)
+ * [ModifiedTripSelector](#message-modifiedtripselector)
* [VehicleDescriptor](#message-vehicledescriptor)
* [WheelchairAccessible](#enum-wheelchairaccessible)
* [Position](#message-position)
@@ -123,7 +124,7 @@
### _message_ FeedEntity
- Una definición (o actualización) de una entidad en el feed de tránsito. Si la entidad no se elimina, se debe completar exactamente uno de los campos ’trip_update’, ’vehicle’, ’alert’ y ’shape’.
+ Una definición (o actualización) de una entidad en el feed de tránsito. Si no se está eliminando la entidad, se debe completar exactamente uno de los campos ’trip_update’, ’vehicle’, ’alert’, ’shape’, ’stop’ o ’trip_modification’.
**Campos**
@@ -135,6 +136,8 @@
| **vehicle** | [VehiclePosition](#message-vehicleposition) | Requerido condicionalmente | Uno | Datos sobre la posición en tiempo real de un vehículo. Se debe proporcionar al menos uno de los campos trip_update, vehículo, alerta o forma; todos estos campos no pueden estar vacíos. |
| **alert** | [Alert](#message-alert) | Requerido condicionalmente | Uno | Datos sobre la alerta en tiempo real. Se debe proporcionar al menos uno de los campos trip_update, vehículo, alerta o forma; todos estos campos no pueden estar vacíos. |
| **shape** | [Shape](#message-shape) | Requerido condicionalmente | Uno | Datos sobre las formas agregadas en tiempo real, como por ejemplo un desvío. Se debe proporcionar al menos uno de los campos trip_update, vehículo, alerta o forma; todos estos campos no pueden estar vacíos.
**Precaución:**este campo aún es **experimental** y está sujeto a cambios. Es posible que se adopte formalmente en el futuro. |
+ |**stop**| [Stop](#message-stop) | Condicionalmente requerido | Uno | Una nueva parada agregada al feed dinámicamente.
**Precaución:**este campo aún es**experimental**y está sujeto a cambios. Es posible que se adopte formalmente en el futuro. |
+ |**trip_modifications**| [TripModifications](#message-tripmodifications) | Obligatorio condicionalmente | Uno | Lista de viajes afectados por una modificación en particular, como un desvío.
**Precaución:**este campo aún es**experimental**y está sujeto a cambios. Puede adoptarse formalmente en el futuro. |
### _message_ TripUpdate
@@ -463,6 +466,8 @@
| **start_time** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Requerido condicionalmente | Uno | La hora de inicio inicialmente programada de esta instancia de viaje. Cuando trip_id corresponde a un viaje no basado en frecuencia, este campo debe omitirse o ser igual al valor en el feed GTFS. Cuando trip_id corresponde a un viaje basado en frecuencia definido en GTFS frequencies.txt, start_time es obligatorio y debe especificarse para las actualizaciones de viaje y las posiciones de los vehículos. Si el viaje corresponde a exactitud_times=1 registro GTFS, entonces start_time debe ser un múltiplo (incluido cero) de headway_secs posterior a frequencies.txt start_time para el período de tiempo correspondiente. Si el viaje corresponde a horas_exactas=0, entonces su hora_inicio puede ser arbitraria y se espera inicialmente que sea la primera salida del viaje. Una vez establecida, la hora de inicio de este viaje exacto_times=0 basado en frecuencia debe considerarse inmutable, incluso si cambia la primera hora de salida; ese cambio de hora puede reflejarse en un StopTimeUpdate. Si se omite trip_id, se debe proporcionar start_time. El formato y la semántica del campo son los mismos que los de GTFS/frequencies.txt/hora_inicio, por ejemplo, 11:15:35 o 25:15:35. |
| **start_date** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Requerido condicionalmente | Uno | La date de inicio de esta instancia de viaje en formato AAAAMMDD. Para viajes programados (viajes no definidos en frequencies.txt GTFS.txt), se debe proporcionar este campo para eliminar la ambigüedad de los viajes que llegan tan tarde como para coincidir con un viaje programado para el día siguiente. Por ejemplo, para un tren que sale a las 8:00 y a las 20:00 todos los días y tiene un retraso de 12 horas, habría dos viajes distintos al mismo tiempo. Este campo se puede proporcionar, pero no es obligatorio, para horarios en los que tales colisiones son imposibles; por ejemplo, un servicio que se ejecuta según un horario horario donde un vehículo que llega una hora tarde ya no se considera relacionado con el horario. Este campo es obligatorio para viajes basados en frecuencia definidos en frequencies.txt GTFS.txt. Si se omite trip_id, se debe proporcionar start_date. |
| **schedule_relationship** | [ScheduleRelationship](#enum-schedulerelationship_1) | Opcional | Uno | La relación entre este viaje y el horario estático. Si TripDescriptor se proporciona en una alerta `EntitySelector`, los consumidores ignoran el campo `schedule_relationship` al identificar la instancia de viaje coincidente.
+ |**modified_trip**| [ModifiedTripSelector](#message-modifiedtripselector) | Opcional | Uno | Enlace a cualquier modificación realizada a este viaje (cambios de forma, eliminación o adición de paradas). Si se proporciona este campo, los campos `trip_id`, `route_id`, `direction_id`, `start_time`, `start_date` del `TripDescriptor` DEBE dejarse vacíos, para evitar confusiones por parte de los consumidores que no están buscando el valor `ModifiedTripSelector`.
+
### _enum_ ScheduleRelationship
@@ -479,6 +484,19 @@
| **DUPLICATED** | Un nuevo viaje que es igual a un viaje programado existente excepto por la date y hora de inicio del servicio. Se utiliza con `TripUpdate.TripProperties.trip_id`, `TripUpdate.TripProperties.start_date` y `TripUpdate.TripProperties.start_time` para copiar un viaje existente desde GTFS estático pero comenzar en una date y/u hora de servicio diferente. Se permite duplicar un viaje si el servicio relacionado con el viaje original en (CSV) GTFS (en `calendar.txt` o `calendar_dates.txt`) está operando dentro de los próximos 30 días. El viaje a duplicar se identifica mediante `TripUpdate.TripDescriptor.trip_id`.
Esta enumeración no modifica el viaje existente al que hace referencia `TripUpdate.TripDescriptor.trip_id` ; si un productor desea cancelar el viaje original, debe publicar un `TripUpdate` separado con el valor CANCELADO. Los Viajes definidos en GTFS `frequencies.txt` con `exact_times` que esté vacío o igual a `0` no se pueden duplicar. El `VehiclePosition.TripDescriptor.trip_id` para el nuevo viaje debe contener el valor coincidente de `TripUpdate.TripProperties.trip_id` y `VehiclePosition.TripDescriptor.ScheduleRelationship` también debe estar configurado en `DUPLICATED`.
*Los productores y consumidores existentes que utilizaban la enumeración AGREGADA para representar viajes duplicados deben seguir la [guía de migración](../../realtime/examples/migration-duplicated) para realizar la transición a la enumeración DUPLICADA.* |
| **DELETED** | Un viaje que existía en el cronograma pero que fue eliminado y que no debe mostrarse a los usuarios.
ELIMINADO debe usarse en lugar de CANCELADO para indicar que un proveedor de transporte desea eliminar por completo la información sobre el viaje correspondiente de las aplicaciones consumidoras, de modo que el viaje no se muestre como cancelado a los pasajeros, por ejemplo, un viaje que está siendo reemplazado por completo por otro viaje. Esta designación adquiere particular importancia si se cancelan varios viajes y se reemplazan con un servicio sustituto. Si los consumidores mostraran información explícita sobre las cancelaciones, esto distraería la atención de las predicciones más importantes en tiempo real.
**Precaución:**este campo aún es **experimental** y está sujeto a cambios. Es posible que se adopte formalmente en el futuro. |
+## _message_ ModifiedTripSelector
+
+Cuando un servicio se ve afectado por una modificación de viaje, se utiliza `ModifiedTripSelector` para seleccionar algún viaje. Más detalles en la especificación [Trip Modification](https://github.com/google/transit/blob/master/gtfs-realtime/spec/en/trip-modifications.md#linkage-to-tripupdates).
+
+**Valores**
+
+| _**Nombre de campo**_ | _**Tipo**_ | _**Obligatorio**_ | _**Cardenalidad**_ | _**Descripción**_ |
+|------------------|------------|----------------|-------------------|-------------------|
+|**modifications_id**| [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Obligatorio | Uno | El `id` de la `FeedEntity` en la que el objeto `TripModifications` contenido afecta a este viaje.|
+|**affected_trip_id**| [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Obligatorio | Uno | El `trip_id` del feed GTFS que es modificado por el `modifications_id`|
+|**start_time**| [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Opcional | Uno | La hora de inicio programada inicialmente de esta instancia de viaje, aplicada al viaje modificado basado en frecuencia. La misma definición que **start_time** en [TripDescriptor](#message-tripdescriptor).|
+|**start_date**| [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Opcional | Uno | La date de inicio de esta instancia de viaje en formato AAAAMMDD, aplicada al viaje modificado. La misma definición que **start_date** en [TripDescriptor](#message-tripdescriptor).|
+
### _message_ VehicleDescriptor
Información de identificación del vehículo que realiza el viaje.
diff --git a/docs/es/documentation/schedule/reference.md b/docs/es/documentation/schedule/reference.md
index f0fe3094..402c86fd 100644
--- a/docs/es/documentation/schedule/reference.md
+++ b/docs/es/documentation/schedule/reference.md
@@ -1,6 +1,6 @@
## Referencia de General Transit Feed Specification
- **Revisado el 16 de agosto de 2024. Consulte [Historial de revisiones](../change-history/revision_history) para obtener más detalles.**
+ **Revisado el 16 de octubre de 2024. Consulte [Historial de revisiones](../change-history/revision_history) para obtener más detalles.**
Este documento define el formato y la estructura de los archivos que componen un conjunto de datos GTFS.
@@ -209,7 +209,7 @@ La **clave principal** de un conjunto de datos es el campo o combinación de cam
| `stop_lon` | Longitud | **Condicionalmente Obligatorio** | Longitud del lugar.
Para paradas/andenes (`location_type=0`) y zona de embarque (`location_type=4`), las coordenadas deben ser las del poste de autobús —si existe— y en caso contrario del lugar donde los viajeros abordan el vehículo (en la acera). o el andén, y no en la calzada o vía donde se detiene el vehículo).
Condicionalmente Obligatorio:
- **Obligatorio** para ubicaciones que son paradas (`location_type=0`), estaciones (`location_type=1`) o entradas/salidas (`location_type=2`).
- Opcional para ubicaciones que son nodos genéricos (`location_type=3`) o áreas de embarque (`location_type=4`). |
| `zone_id` | ID | Opcional | Identifica la zona tarifaria para una parada. Si este registro representa una estación o entrada de estación, se ignora `zone_id` .|
| `stop_url` | URL | Opcional | URL de una página web sobre la ubicación. Esto debe ser diferente de los valores de los campos `agency.agency_url` y `routes.route_url`. |
- | `location_type` | Enumeración | Opcional | Tipo de ubicacion. Las opciones válidas son:
`0` (o en blanco) - **Detener** (o **Plataforma**). Un lugar donde los pasajeros abordan o desembarcan de un vehículo de tránsito. Se llama plataforma cuando se define dentro de una `parent_station`.
`1` - **Estación**. Una estructura física o área que contiene una o más plataformas.
`2` - **Entrada/Salida**. Un lugar donde los pasajeros pueden entrar o salir de una estación desde la calle. Si una entrada/salida pertenece a varias estaciones, puede estar vinculada mediante rutas a ambas, pero el proveedor de datos debe elegir una de ellas como principal.
`3` - **Nodo genérico**. Una ubicación dentro de una estación, que no coincide con ningún otro `location_type`, que puede usarse para vincular rutas definidas en [pathways.txt](#pathwaystxt).
`4` - **Zona de embarque**. Un lugar específico en una plataforma, donde los pasajeros pueden subir y/o bajar de vehículos.|
+ | `location_type` | Enumeración | Opcional | Tipo de ubicacion. Las opciones válidas son:
`0` (o vacío) - **Detener** (o **Plataforma**). Un lugar donde los pasajeros abordan o desembarcan de un vehículo de tránsito. Se llama plataforma cuando se define dentro de una `parent_station`.
`1` - **Estación**. Una estructura física o área que contiene una o más plataformas.
`2` - **Entrada/Salida**. Un lugar donde los pasajeros pueden entrar o salir de una estación desde la calle. Si una entrada/salida pertenece a varias estaciones, puede estar vinculada mediante rutas a ambas, pero el proveedor de datos debe elegir una de ellas como principal.
`3` - **Nodo genérico**. Una ubicación dentro de una estación, que no coincide con ningún otro `location_type`, que puede usarse para vincular rutas definidas en [pathways.txt](#pathwaystxt).
`4` - **Zona de embarque**. Un lugar específico en una plataforma, donde los pasajeros pueden subir y/o bajar de vehículos.|
| `parent_station` | ID extranjera que hace referencia a `stops.stop_id` | **Condicionalmente Obligatorio** | Define la jerarquía entre las diferentes ubicaciones definidas en [stops.txt](#stopstxt). Contiene el ID de la ubicación principal, como se muestra a continuación:
- **Parada/plataforma** (`location_type=0`): el campo `parent_station` contiene el ID de una estación.
- **Estación** (`location_type=1`): este campo debe estar vacío.
- **Entrada/salida** (`location_type=2`) o **nodo genérico** (`location_type=3`): el campo `parent_station` contiene el ID de una estación (`location_type=1`)
- **Área de embarque** (`location_type=4`): el campo `parent_station` contiene el ID de una plataforma.
Condicionalmente Obligatorio:
- **Obligatorio** para ubicaciones que son entradas (`location_type=2`), nodos genéricos (`location_type=3`) o áreas de embarque (`location_type=4`).
- Opcional para paradas/andenes (`location_type=0`).
- Prohibido para estaciones (`location_type=1`).|
| `stop_timezone` | Zona horaria | Opcional | Zona horaria de la ubicación. Si la ubicación tiene una estación principal, hereda la zona horaria de la estación principal en lugar de aplicar la suya propia. Las estaciones y paradas sin padres con `stop_timezone` vacío heredan la zona horaria especificada por `agency.agency_timezone`. Las horas proporcionadas en [stop_times.txt](#stop_timestxt) están en la zona horaria especificada por `agency.agency_timezone`, no en `stop_timezone`. Esto garantiza que los valores de tiempo en un viaje siempre aumenten durante el transcurso de un viaje, independientemente de qué zonas horarias cruza el viaje. |
| `wheelchair_boarding` | Enumeración | Opcional | Indica si es posible el embarque de sillas de ruedas desde el lugar. Las opciones válidas son:
Para paradas sin padres:
`0` o vacío: no hay información de accesibilidad para la parada.
`1` - Algunos vehículos en esta parada pueden ser abordados por un pasajero en silla de ruedas.
`2` - No es posible el embarque para sillas de ruedas en esta parada.
Para paradas infantiles:
`0` o vacío: Stop heredará su comportamiento `wheelchair_boarding` de la estación principal, si se especifica en la estación principal.
`1` : existe algún camino accesible desde fuera de la estación hasta la parada/andén específico.
`2` - No existe un camino accesible desde fuera de la estación hasta la parada/andén específico.
Para entradas/salidas de estaciones:
`0` o vacío: la entrada de la estación heredará su comportamiento `wheelchair_boarding` de la estación principal, si se especifica para la estación principal.
`1` - La entrada a la estación es accesible para sillas de ruedas.
`2` - No hay camino accesible desde la entrada de la estación hasta las paradas/andenes. |
diff --git a/docs/fr/documentation/realtime/change-history/revision-history.md b/docs/fr/documentation/realtime/change-history/revision-history.md
index 4969cea7..7e29ac30 100644
--- a/docs/fr/documentation/realtime/change-history/revision-history.md
+++ b/docs/fr/documentation/realtime/change-history/revision-history.md
@@ -2,6 +2,10 @@
### Historique des révisions
+#### Octobre 2024
+
+ * Clarification et petits changements pour les modifications de voyage (Trip Modifications). Voir [discussion](https://github.com/google/transit/pull/497).
+
#### Mars 2024
* Modifications de voyage adoptées. Voir [discussion](https://github.com/google/transit/pull/403).
diff --git a/docs/fr/documentation/realtime/feed-entities/trip-modifications.md b/docs/fr/documentation/realtime/feed-entities/trip-modifications.md
index 624f9e36..e55213cc 100644
--- a/docs/fr/documentation/realtime/feed-entities/trip-modifications.md
+++ b/docs/fr/documentation/realtime/feed-entities/trip-modifications.md
@@ -22,8 +22,8 @@
## Lien vers TripUpdates
* Une TripUpdate DEVRAIT être fournie en utilisant un `ModifiedTripSelector` à l’intérieur du `TripDescriptor` de TripUpdate.
- * Lorsque TripUpdate fait référence au voyage de remplacement, le application réutilisatrice doit se comporter comme si le GTFS statique aurait été modifié avec les TripModifications (par exemple `arrival_time`, `departure_time`, `stop_sequence`, `stop_id` sur les arrêts de remplacement).
- * Lorsque vous fournissez un `ModifiedTripSelector`, les autres champs du `TripDescriptor` DOIT être laissés vides, pour éviter toute confusion chez les consommateurs qui ne recherchent pas la valeur `ModifiedTripSelector`.
+ * Lorsque TripUpdate fait référence au voyage de remplacement, l’application réutilisatrice doit se comporter comme si le GTFS statique aurait été modifié avec les TripModifications (par exemple `arrival_time`, `departure_time`, `stop_sequence`, `stop_id` sur les arrêts de remplacement).
+ * En fournissant d’un `ModifiedTripSelector`, les champs `trip_id`, `route_id`, `direction_id`, `start_time`, `start_date` du `TripDescriptor` DOIVENT être laissés vides, pour éviter toute confusion chez les consommateurs qui ne cherchent pas la valeur `ModifiedTripSelector`.
* Les flux TripUpdate fournissant des mises à jour avec `ModifiedTripSelector` DEVRAIT également inclure un TripUpdate ciblant les clients qui ne prennent pas en charge TripModifications. En d’autres termes, il devrait y avoir deux TripUpdates : une pour les clients avec des voyages modifiés (avec `TripModifications`) et une pour les clients avec le GTFS d’origine non modifié (sans `TripModifications`).
* Fournir un TripUpdate avec un `ModifiedTripSelector` est le seul moyen de créer des prédictions aux arrêts de remplacement.
* Si aucun TripUpdate de ce type n’est trouvé, les TripUpdates pour le `trip_id` d’origine s’appliqueront au voyage modifié.
diff --git a/docs/fr/documentation/realtime/gtfs-realtime.proto b/docs/fr/documentation/realtime/gtfs-realtime.proto
index d3cfe529..501c15d8 100644
--- a/docs/fr/documentation/realtime/gtfs-realtime.proto
+++ b/docs/fr/documentation/realtime/gtfs-realtime.proto
@@ -220,7 +220,7 @@ message TripUpdate {
// In order to provide departure_occupancy_status without either arrival or
// departure StopTimeEvents, ScheduleRelationship should be set to NO_DATA.
optional VehiclePosition.OccupancyStatus departure_occupancy_status = 7;
-
+
// The relation between the StopTimeEvents and the static schedule.
enum ScheduleRelationship {
// The vehicle is proceeding in accordance with its static schedule of
@@ -252,7 +252,7 @@ message TripUpdate {
UNSCHEDULED = 3;
}
optional ScheduleRelationship schedule_relationship = 5
- [default = SCHEDULED];
+ [default = SCHEDULED];
// Provides the updated values for the stop time.
// NOTE: This message is still experimental, and subject to change. It may be formally adopted in the future.
@@ -641,10 +641,10 @@ message Alert {
// Severity of this alert.
enum SeverityLevel {
- UNKNOWN_SEVERITY = 1;
- INFO = 2;
- WARNING = 3;
- SEVERE = 4;
+ UNKNOWN_SEVERITY = 1;
+ INFO = 2;
+ WARNING = 3;
+ SEVERE = 4;
}
optional SeverityLevel severity_level = 14 [default = UNKNOWN_SEVERITY];
@@ -652,18 +652,18 @@ message Alert {
// TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image must enhance the understanding of the alert. Any essential information communicated within the image must also be contained in the alert text.
// The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information.
// NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
- optional TranslatedImage image = 15;
+ optional TranslatedImage image = 15;
// Text describing the appearance of the linked image in the `image` field (e.g., in case the image can't be displayed
// or the user can't see the image for accessibility reasons). See the HTML spec for alt image text - https://html.spec.whatwg.org/#alt.
// NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
optional TranslatedString image_alternative_text = 16;
-
-
+
+
// Description of the cause of the alert that allows for agency-specific language; more specific than the Cause. If cause_detail is included, then Cause must also be included.
// NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
optional TranslatedString cause_detail = 17;
-
+
// Description of the effect of the alert that allows for agency-specific language; more specific than the Effect. If effect_detail is included, then Effect must also be included.
// NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
optional TranslatedString effect_detail = 18;
@@ -810,7 +810,7 @@ message TripDescriptor {
CANCELED = 3;
// Should not be used - for backwards-compatibility only.
- REPLACEMENT = 5 [deprecated=true];
+ REPLACEMENT = 5 [deprecated = true];
// An extra trip that was added in addition to a running schedule, for example, to replace a broken vehicle or to
// respond to sudden passenger load. Used with TripUpdate.TripProperties.trip_id, TripUpdate.TripProperties.start_date,
@@ -848,7 +848,24 @@ message TripDescriptor {
// The trip_id from the GTFS feed that is modified by the modifications_id
optional string affected_trip_id = 2;
+
+ // The initially scheduled start time of this trip instance, applied to the frequency based modified trip. Same definition as start_time in TripDescriptor.
+ optional string start_time = 3;
+
+ // The start date of this trip instance in YYYYMMDD format, applied to the modified trip. Same definition as start_date in TripDescriptor.
+ optional string start_date = 4;
+
+ // 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;
}
+
+ // Linkage to any modifications done to this trip (shape changes, removal or addition of stops).
+ // If this field is provided, the `trip_id`, `route_id`, `direction_id`, `start_time`, `start_date` fields of the `TripDescriptor` MUST be left empty, to avoid confusion by consumers that aren't looking for the `ModifiedTripSelector` value.
optional ModifiedTripSelector modified_trip = 7;
// The extensions namespace allows 3rd-party developers to extend the
@@ -1028,7 +1045,7 @@ message Shape {
// See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
// NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
optional string shape_id = 1;
-
+
// Encoded polyline representation of the shape. This polyline must contain at least two points.
// For more information about encoded polylines, see https://developers.google.com/maps/documentation/utilities/polylinealgorithm
// This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
@@ -1052,7 +1069,7 @@ message Stop {
UNKNOWN = 0;
AVAILABLE = 1;
NOT_AVAILABLE = 2;
- }
+ }
optional string stop_id = 1;
optional TranslatedString stop_code = 2;
@@ -1130,9 +1147,9 @@ message TripModifications {
// The following extension IDs are reserved for private use by any organization.
extensions 9000 to 9999;
-}
+ }
- // A list of selected trips affected by this TripModifications.
+ // A list of selected trips affected by this TripModifications.
repeated SelectedTrips selected_trips = 1;
// A list of start times in the real-time trip descriptor for the trip_id defined in trip_ids.
@@ -1144,7 +1161,7 @@ message TripModifications {
repeated string service_dates = 3;
// A list of modifications to apply to the affected trips.
- repeated Modification modifications = 4;
+ repeated Modification modifications = 4;
// The extensions namespace allows 3rd-party developers to extend the
// GTFS Realtime Specification in order to add and evaluate new features and
@@ -1157,7 +1174,7 @@ message TripModifications {
// 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 {
+message StopSelector {
// Must be the same as in stop_times.txt in the corresponding GTFS feed.
optional uint32 stop_sequence = 1;
// Must be the same as in stops.txt in the corresponding GTFS feed.
diff --git a/docs/fr/documentation/realtime/proto.md b/docs/fr/documentation/realtime/proto.md
index 8a9cab5f..333ab27f 100644
--- a/docs/fr/documentation/realtime/proto.md
+++ b/docs/fr/documentation/realtime/proto.md
@@ -224,7 +224,7 @@ message TripUpdate {
// In order to provide departure_occupancy_status without either arrival or
// departure StopTimeEvents, ScheduleRelationship should be set to NO_DATA.
optional VehiclePosition.OccupancyStatus departure_occupancy_status = 7;
-
+
// The relation between the StopTimeEvents and the static schedule.
enum ScheduleRelationship {
// The vehicle is proceeding in accordance with its static schedule of
@@ -256,7 +256,7 @@ message TripUpdate {
UNSCHEDULED = 3;
}
optional ScheduleRelationship schedule_relationship = 5
- [default = SCHEDULED];
+ [default = SCHEDULED];
// Provides the updated values for the stop time.
// NOTE: This message is still experimental, and subject to change. It may be formally adopted in the future.
@@ -645,10 +645,10 @@ message Alert {
// Severity of this alert.
enum SeverityLevel {
- UNKNOWN_SEVERITY = 1;
- INFO = 2;
- WARNING = 3;
- SEVERE = 4;
+ UNKNOWN_SEVERITY = 1;
+ INFO = 2;
+ WARNING = 3;
+ SEVERE = 4;
}
optional SeverityLevel severity_level = 14 [default = UNKNOWN_SEVERITY];
@@ -656,18 +656,18 @@ message Alert {
// TranslatedImage to be displayed along the alert text. Used to explain visually the alert effect of a detour, station closure, etc. The image must enhance the understanding of the alert. Any essential information communicated within the image must also be contained in the alert text.
// The following types of images are discouraged : image containing mainly text, marketing or branded images that add no additional information.
// NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
- optional TranslatedImage image = 15;
+ optional TranslatedImage image = 15;
// Text describing the appearance of the linked image in the `image` field (e.g., in case the image can't be displayed
// or the user can't see the image for accessibility reasons). See the HTML spec for alt image text - https://html.spec.whatwg.org/#alt.
// NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
optional TranslatedString image_alternative_text = 16;
-
-
+
+
// Description of the cause of the alert that allows for agency-specific language; more specific than the Cause. If cause_detail is included, then Cause must also be included.
// NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
optional TranslatedString cause_detail = 17;
-
+
// Description of the effect of the alert that allows for agency-specific language; more specific than the Effect. If effect_detail is included, then Effect must also be included.
// NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
optional TranslatedString effect_detail = 18;
@@ -814,7 +814,7 @@ message TripDescriptor {
CANCELED = 3;
// Should not be used - for backwards-compatibility only.
- REPLACEMENT = 5 [deprecated=true];
+ REPLACEMENT = 5 [deprecated = true];
// An extra trip that was added in addition to a running schedule, for example, to replace a broken vehicle or to
// respond to sudden passenger load. Used with TripUpdate.TripProperties.trip_id, TripUpdate.TripProperties.start_date,
@@ -852,7 +852,24 @@ message TripDescriptor {
// The trip_id from the GTFS feed that is modified by the modifications_id
optional string affected_trip_id = 2;
+
+ // The initially scheduled start time of this trip instance, applied to the frequency based modified trip. Same definition as start_time in TripDescriptor.
+ optional string start_time = 3;
+
+ // The start date of this trip instance in YYYYMMDD format, applied to the modified trip. Same definition as start_date in TripDescriptor.
+ optional string start_date = 4;
+
+ // 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;
}
+
+ // Linkage to any modifications done to this trip (shape changes, removal or addition of stops).
+ // If this field is provided, the `trip_id`, `route_id`, `direction_id`, `start_time`, `start_date` fields of the `TripDescriptor` MUST be left empty, to avoid confusion by consumers that aren't looking for the `ModifiedTripSelector` value.
optional ModifiedTripSelector modified_trip = 7;
// The extensions namespace allows 3rd-party developers to extend the
@@ -1032,7 +1049,7 @@ message Shape {
// See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
// NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
optional string shape_id = 1;
-
+
// Encoded polyline representation of the shape. This polyline must contain at least two points.
// For more information about encoded polylines, see https://developers.google.com/maps/documentation/utilities/polylinealgorithm
// This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
@@ -1056,7 +1073,7 @@ message Stop {
UNKNOWN = 0;
AVAILABLE = 1;
NOT_AVAILABLE = 2;
- }
+ }
optional string stop_id = 1;
optional TranslatedString stop_code = 2;
@@ -1134,9 +1151,9 @@ message TripModifications {
// The following extension IDs are reserved for private use by any organization.
extensions 9000 to 9999;
-}
+ }
- // A list of selected trips affected by this TripModifications.
+ // A list of selected trips affected by this TripModifications.
repeated SelectedTrips selected_trips = 1;
// A list of start times in the real-time trip descriptor for the trip_id defined in trip_ids.
@@ -1148,7 +1165,7 @@ message TripModifications {
repeated string service_dates = 3;
// A list of modifications to apply to the affected trips.
- repeated Modification modifications = 4;
+ repeated Modification modifications = 4;
// The extensions namespace allows 3rd-party developers to extend the
// GTFS Realtime Specification in order to add and evaluate new features and
@@ -1161,7 +1178,7 @@ message TripModifications {
// 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 {
+message StopSelector {
// Must be the same as in stop_times.txt in the corresponding GTFS feed.
optional uint32 stop_sequence = 1;
// Must be the same as in stops.txt in the corresponding GTFS feed.
diff --git a/docs/fr/documentation/realtime/reference.md b/docs/fr/documentation/realtime/reference.md
index c3694465..59496bab 100644
--- a/docs/fr/documentation/realtime/reference.md
+++ b/docs/fr/documentation/realtime/reference.md
@@ -57,6 +57,7 @@
* [VehiclePosition](#message-vehicleposition)
* [TripDescriptor](#message-tripdescriptor)
* [ScheduleRelationship](#enum-schedulerelationship_1)
+ * [ModifiedTripSelector](#message-modifiedtripselector)
* [VehicleDescriptor](#message-vehicledescriptor)
* [WheelchairAccessible](#enum-wheelchairaccessible)
* [Position](#message-position)
@@ -123,7 +124,7 @@
### _message_ FeedEntity
- Une définition (ou mise à jour) d’une entité dans le flux de transit. Si l’entité n’est pas supprimée, exactement l’un des champs « trip_update », « véhicule », « alerte » et « forme » doit être renseigné.
+ Une définition (ou une mise à jour) d’une entité dans le flux de transit. Si l’entité n’est pas supprimée, exactement l’un des champs ’trip_update’, ’vehicle’, ’alert’, ’shape’, ’stop’ ou ’trip_modification’ doit être renseigné.
**Champs**
@@ -135,7 +136,8 @@
| **vehicle** | [VehiclePosition](#message-vehicleposition) | Requis sous condition | Un | Données sur la position en temps réel d’un véhicule. Au moins un des champs trip_update, véhicule, alerte ou forme doit être fourni- tous ces champs ne peuvent pas être vides. |
| **alert** | [Alerte](#message-alert) | Requis sous condition | Un | Données sur l’alerte en temps réel. Au moins un des champs trip_update, véhicule, alerte ou forme doit être fourni- tous ces champs ne peuvent pas être vides. |
| **shape** | [Forme](#message-shape) | Requis sous condition | Un | Données sur les formes ajoutées en temps réel, par exemple pour un détour. Au moins un des champs trip_update, véhicule, alerte ou forme doit être fourni- tous ces champs ne peuvent pas être vides.
**Attention :**ce champ est encore **expérimental** et est susceptible de changer. Il pourrait être formellement adopté à l’avenir. |
-
+ |**stop**| [Stop](#message-stop) | Conditionnellement requis | Un | Un nouvel arrêt ajouté au flux de manière dynamique.
**Attention :**ce champ est encore**expérimental**et sujet à changement. Il pourra être formellement adopté à l’avenir. |
+ |**trip_modifications**| [TripModifications](#message-tripmodifications) | Conditionnellement requis | Un | Liste des trajets affectés par des modifications particulières, comme un détour.
**Attention :** ce champ est encore **expérimental** et sujet à changement. Il peut être formellement adopté dans le futur. |
### _message_ TripUpdate
@@ -463,7 +465,8 @@
| **start_time** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Requis sous condition | Un | Heure de début initialement prévue de cette instance de voyage. Lorsque le trip_id correspond à un voyage non basé sur la fréquence, ce champ doit être omis ou être égal à la valeur du flux GTFS. Lorsque le trip_id correspond à un trajet basé sur la fréquence défini dans GTFS frequencies.txt, start_time est requis et doit être spécifié pour les mises à jour du trajet et les positions des véhicules. Si le trajet correspond à l’enregistrement GTFS exact_times=1, alors start_time doit être un multiple (y compris zéro) de headway_secs après frequencies.txt start_time pour la période correspondante. Si le trajet correspond à exact_times=0, alors son heure de début peut être arbitraire et devrait initialement être le premier départ du voyage. Une fois établi, le start_time de ce trajet exact_times=0 basé sur la fréquence doit être considéré comme immuable, même si la première heure de départ change- ce changement d’heure peut plutôt être reflété dans un StopTimeUpdate. Si trip_id est omis, start_time doit être fourni. Le format et la sémantique du champ sont les mêmes que ceux de GTFS/frequencies.txt/start_time, par exemple 11:15:35 ou 25:15:35. |
| **start_date** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Requis sous condition | Un | La date de début de cette instance de voyage au format AAAAMMJJ. Pour les trajets programmés (trajets non définis dans GTFS frequencies.txt), ce champ doit être fourni pour lever l’ambiguïté des trajets qui sont si tardifs qu’ils entrent en collision avec un trajet programmé le jour suivant. Par exemple, pour un train qui part à 8h00 et à 20h00 tous les jours et qui a 12 heures de retard, il y aurait deux trajets distincts à la même heure. Ce champ peut être fourni mais n’est pas obligatoire pour les horaires dans lesquels de telles collisions sont impossibles- par exemple, un service fonctionnant selon un horaire horaire où un véhicule en retard d’une heure n’est plus considéré comme étant lié à l’horaire. Ce champ est obligatoire pour les trajets basés sur la fréquence définis dans GTFS frequencies.txt. Si trip_id est omis, start_date doit être fourni. |
| **schedule_relationship** | [ScheduleRelationship](#enum-schedulerelationship_1) | Optionnel | Un | La relation entre ce déplacement et l’horaire statique. Si TripDescriptor est fourni dans une alerte `EntitySelector`, le champ `schedule_relationship` est ignoré par les consommateurs lors de l’identification de l’instance de voyage correspondante.
-
+ |**modified_trip**| [ModifiedTripSelector](#message-modifiedtripselector) | Optionnel | Un | Lien vers toutes les modifications apportées à ce voyage (changements de forme, suppression ou ajout d’arrêts). Si ce champ est fourni, les champs `trip_id`, `route_id`, `direction_id`, `start_time`, `start_date` de `TripDescriptor` DOIVENT être laissés vides, pour éviter toute confusion chez les consommateurs qui ne recherchent pas la valeur `ModifiedTripSelector`.
+
### _enum_ ScheduleRelationship
La relation entre ce trajet et l’horaire statique. Si un voyage est effectué conformément à un horaire temporaire, non reflété dans GTFS, il ne doit pas être marqué comme PLANIFIÉ, mais comme AJOUTÉ.
@@ -479,6 +482,19 @@
| **DUPLICATED** | Un nouveau trajet identique à un trajet programmé existant, à l’exception de la date et de l’heure de début du service. Utilisé avec `TripUpdate.TripProperties.trip_id`, `TripUpdate.TripProperties.start_date` et `TripUpdate.TripProperties.start_time` pour copier un voyage existant à partir de GTFS statique mais commencer à une date et/ou une heure de service différente. La duplication d’un voyage est autorisée si le service lié au voyage d’origine au format (CSV) GTFS (dans `calendar.txt` ou `calendar_dates.txt`) fonctionne dans les 30 prochains jours. Le voyage à dupliquer est identifié via `TripUpdate.TripDescriptor.trip_id`.
Cette énumération ne modifie pas le voyage existant référencé par `TripUpdate.TripDescriptor.trip_id` - si un producteur souhaite annuler le voyage d’origine, il doit publier un `TripUpdate` séparé avec la valeur CANCELED. Les trajets définis dans GTFS `frequencies.txt` avec `exact_times` vide ou égal à `0` ne peuvent pas être dupliqués. Le `VehiclePosition.TripDescriptor.trip_id` pour le nouveau voyage doit contenir la valeur correspondante de `TripUpdate.TripProperties.trip_id` et `VehiclePosition.TripDescriptor.ScheduleRelationship` doit également être défini sur `DUPLICATED`.
*Les producteurs et consommateurs existants qui utilisaient l’énumération ADDED pour représenter les voyages en double doivent suivre le [guide de migration](../../realtime/examples//migration-duplicated) pour passer à l’énumération DUPLICATED.* |
| **DELETED** | Un trajet qui existait dans le planning mais qui a été supprimé et qui ne doit pas être montré aux utilisateurs.
DELETED doit être utilisé au lieu de CANCELED pour indiquer qu’un fournisseur de transport souhaite supprimer entièrement les informations sur le trajet correspondant des applications consommatrices, afin que le trajet ne soit pas affiché comme annulé aux usagers, par exemple un trajet qui est entièrement remplacé par un autre trajet. Cette désignation devient particulièrement importante si plusieurs voyages sont annulés et remplacés par un service de substitution. Si les consommateurs devaient afficher des informations explicites sur les annulations, cela les détournerait des prévisions en temps réel les plus importantes.
**Attention :** ce champ est encore **expérimental** et est susceptible de changer. Il pourrait être formellement adopté à l’avenir. |
+## _message_ ModifiedTripSelector
+
+Lorsqu’un service est affecté par une modification de trajet, `ModifiedTripSelector` est utilisé pour sélectionner un trajet. Plus de détails dans la spécification [Trip Modification](https://github.com/google/transit/blob/master/gtfs-realtime/spec/en/trip-modifications.md#linkage-to-tripupdates).
+
+**Valeurs**
+
+| _**Nom de champ**_ | _**Type**_ | _**Requis**_ | _**Cardinalité**_ | _**Description**_ |
+|------------------|------------|----------------|-------------------|-------------------|
+|**modifications_id**| [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Requis | Un | L’ `id` de l’ `FeedEntity` dans laquelle l’objet `TripModifications` contenu affecte ce voyage.|
+|**affected_trip_id**| [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Requis | Un | Le `trip_id` du flux GTFS modifié par le `modifications_id`|
+|**start_time**| [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Optionnel | Un | L’heure de début initialement prévue de cette instance de voyage, appliquée au voyage modifié qui est basé sur la fréquence. Même définition que **start_time** dans [TripDescriptor](#message-tripdescriptor).|
+|**start_date**| [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Optionnel | Un | Date de début de cette instance de voyage au format AAAAMMJJ, appliquée au voyage modifié. Même définition que **start_date** dans [TripDescriptor](#message-tripdescriptor).|
+
### _message_ VehicleDescriptor
Informations d’identification du véhicule effectuant le trajet.
diff --git a/docs/fr/documentation/schedule/reference.md b/docs/fr/documentation/schedule/reference.md
index e1c2106c..ae98806c 100644
--- a/docs/fr/documentation/schedule/reference.md
+++ b/docs/fr/documentation/schedule/reference.md
@@ -1,6 +1,6 @@
## Référence de General Transit Feed Specification
- **Révisé le 16 août 2024. Voir [Historique des révisions](../change_history/revision_history) pour plus de détails.**
+ **Révisé le 16 octobre 2024. Voir [Historique des révisions](../change_history/revision_history) pour plus de détails.**
Ce document définit le format et la structure de les fichiers qui composent un jeu de données GTFS.