Skip to content

Commit

Permalink
Merge branch 'final/trip_modification' into gtfsrt/trip_modifications
Browse files Browse the repository at this point in the history
  • Loading branch information
gcamp committed Feb 28, 2024
2 parents be4a9c6 + 51980b8 commit 5afb5de
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
20 changes: 12 additions & 8 deletions gtfs-realtime/proto/gtfs-realtime.proto
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ message FeedEntity {
optional TripUpdate trip_update = 3;
optional VehiclePosition vehicle = 4;
optional Alert alert = 5;

// NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
optional Shape shape = 6;
optional Stop stop = 7;
optional TripModifications trip_modifications = 8;
Expand Down Expand Up @@ -1019,17 +1021,19 @@ message TranslatedImage {
// Tracing the points in order provides the path of the vehicle. Shapes do not need to intercept
// the location of Stops exactly, but all Stops on a trip should lie within a small distance of
// the shape for that trip, i.e. close to straight line segments connecting the shape points
// NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
// NOTE: This message is still experimental, and subject to change. It may be formally adopted in the future.
message Shape {
// Identifier of the shape. Must be different than any shape_id defined in the (CSV) GTFS.
// This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
// 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"
// 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 encoded_polyline = 2;

// The extensions namespace allows 3rd-party developers to extend the
Expand All @@ -1042,7 +1046,7 @@ message Shape {
}

// Describes a stop which is served by trips. All fields are as described in the GTFS-Static specification.
// NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
// NOTE: This message is still experimental, and subject to change. It may be formally adopted in the future.
message Stop {
enum WheelchairBoarding {
UNKNOWN = 0;
Expand Down Expand Up @@ -1102,13 +1106,13 @@ message TripModifications {
// In POSIX time (i.e., number of seconds since January 1st 1970 00:00:00 UTC).
optional uint64 last_modified_time = 6;

// 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 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;
// The following extension IDs are reserved for private use by any organization.
extensions 9000 to 9999;
}

message SelectedTrips {
Expand Down
6 changes: 3 additions & 3 deletions gtfs-realtime/spec/en/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -563,14 +563,14 @@ A localized image URL mapped to a language.

Describes the physical path that a vehicle takes when the shape is not part of the (CSV) GTFS, such as for an ad-hoc detour. Shapes belong to Trips and consist of an encoded polyline for more efficient transmission. Shapes do not need to intercept the location of Stops exactly, but all Stops on a trip should lie within a small distance of the shape for that trip, i.e. close to straight line segments connecting the shape points.

<br><br>**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future.
<br><br>**Caution:** this message is still **experimental**, and subject to change. It may be formally adopted in the future.

**Fields**

| _**Field Name**_ | _**Type**_ | _**Required**_ | _**Cardinality**_ | _**Description**_ |
|------------------|------------|----------------|-------------------|-------------------|
| **shape_id** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Required | One | Identifier of the shape. Must be different than any `shape_id` defined in the (CSV) GTFS. |
| **encoded_polyline** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Required | One | 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|
| **shape_id** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Required | One | Identifier of the shape. Must be different than any `shape_id` defined in the (CSV) GTFS. <br><br>**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. |
| **encoded_polyline** | [string](https://protobuf.dev/programming-guides/proto2/#scalar) | Required | One | 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 <br><br>**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. |

## _message_ Stop

Expand Down

0 comments on commit 5afb5de

Please sign in to comment.