Skip to content

Commit f64ad81

Browse files
author
scott christian mccallum
authored
Merge branch 'master' into bidirectional-fare-gates
2 parents 7168b05 + 99fdfba commit f64ad81

6 files changed

Lines changed: 118 additions & 47 deletions

File tree

.github/stale.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Configuration for probot-stale - https://github.com/probot/stale
2+
daysUntilStale: 23
3+
daysUntilClose: 7
4+
staleLabel: stale
5+
markComment: >
6+
This pull request has been automatically marked as stale because it has not had
7+
recent activity. It will be closed if no further activity occurs. Thank you
8+
for your contributions.
9+
closeComment: >
10+
This pull request has been closed due to inactivity. Pull requests can always be reopened after they have been closed. See the Specification Amendment Process.
11+
only: pulls

gtfs-realtime/CHANGES.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ When a producer or consumer is interested in adding a new field to the GTFS Real
3939
- Votes against shall be motivated, and ideally provide actionable feedback.
4040
- If the vote has failed, then the advocate may choose to continue work on the proposal, or to abandon the proposal.
4141
Either decision of the advocate must be announced in the mailing list.
42-
- If the advocate continues the work on proposal then a new vote can be called for at any point in time but no later than 30 calendar days after the end of the previous vote.
43-
- If a vote was not called within 30 calendar days from the original proposal or 30 calendar days since end of the previous vote, then the proposal is abandoned.
44-
1. If the proposal is abandoned, the corresponding pull request is closed. Note that the advocate may choose to implement the feature as an [custom extension](#extensions) instead of part of the official spec.
42+
- If the advocate continues the work on proposal then a new vote can be called for at any point in time.
43+
1. Any pull request remaining inactive for 30 calendar days will be closed. When a pull request is closed, the corresponding proposal is considered abandoned. The advocate may reopen the pull request at any time if they wish to continue or maintain the conversation.
44+
- Note that the advocate may choose to implement the feature as an [custom extension](#extensions) instead of part of the official spec.
4545
1. If the proposal is accepted:
4646
- Google is committed to merging the voted upon version of the pull request (provided that the contributors have signed the [CLA](../CONTRIBUTING.md)), and performing the pull request within 5 business days.
4747
- Google is committed to timely updating https://github.com/google/gtfs-realtime-bindings repository. Commits to gtfs-realtime-bindigs that are a result of a proposal, should reference the pull request of the proposal.

gtfs-realtime/proto/gtfs-realtime.proto

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ message FeedEntity {
104104
optional VehiclePosition vehicle = 4;
105105
optional Alert alert = 5;
106106

107+
// NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
108+
optional Shape shape = 6;
109+
107110
// The extensions namespace allows 3rd-party developers to extend the
108111
// GTFS Realtime Specification in order to add and evaluate new features and
109112
// modifications to the spec.
@@ -336,7 +339,8 @@ message TripUpdate {
336339
// formally adopted in the future.
337340
optional int32 delay = 5;
338341

339-
// Defines updated properties of the trip
342+
// Defines updated properties of the trip, such as a new shape_id when there is a detour. Or defines the
343+
// trip_id, start_date, and start_time of a DUPLICATED trip.
340344
// NOTE: This message is still experimental, and subject to change. It may be formally adopted in the future.
341345
message TripProperties {
342346
// Defines the identifier of a new trip that is a duplicate of an existing trip defined in (CSV) GTFS trips.txt
@@ -363,6 +367,15 @@ message TripUpdate {
363367
// populated and will be ignored by consumers.
364368
// NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
365369
optional string start_time = 3;
370+
// Specifies the shape of the vehicle travel path when the trip shape differs from the shape specified in
371+
// (CSV) GTFS or to specify it in real-time when it's not provided by (CSV) GTFS, such as a vehicle that takes differing
372+
// paths based on rider demand. See definition of trips.shape_id in (CSV) GTFS. If a shape is neither defined in (CSV) GTFS
373+
// nor in real-time, the shape is considered unknown. This field can refer to a shape defined in the (CSV) GTFS in shapes.txt
374+
// or a Shape in the (protobuf) real-time feed. The order of stops (stop sequences) for this trip must remain the same as
375+
// (CSV) GTFS. Stops that are a part of the original trip but will no longer be made, such as when a detour occurs, should
376+
// be marked as schedule_relationship=SKIPPED.
377+
// NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
378+
optional string shape_id = 4;
366379

367380
// The extensions namespace allows 3rd-party developers to extend the
368381
// GTFS Realtime Specification in order to add and evaluate new features
@@ -892,3 +905,33 @@ message TranslatedString {
892905
// The following extension IDs are reserved for private use by any organization.
893906
extensions 9000 to 9999;
894907
}
908+
909+
910+
// Describes the physical path that a vehicle takes when it's not part of the (CSV) GTFS,
911+
// such as for a detour. Shapes belong to Trips, and consist of a sequence of shape points.
912+
// Tracing the points in order provides the path of the vehicle. Shapes do not need to intercept
913+
// the location of Stops exactly, but all Stops on a trip should lie within a small distance of
914+
// the shape for that trip, i.e. close to straight line segments connecting the shape points
915+
// NOTE: This message is still experimental, and subject to change. It may be formally adopted in the future.
916+
message Shape {
917+
// Identifier of the shape. Must be different than any shape_id defined in the (CSV) GTFS.
918+
// This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
919+
// See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
920+
// NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
921+
optional string shape_id = 1;
922+
923+
// Encoded polyline representation of the shape. This polyline must contain at least two points.
924+
// For more information about encoded polylines, see https://developers.google.com/maps/documentation/utilities/polylinealgorithm
925+
// This field is required as per reference.md, but needs to be specified here optional because "Required is Forever"
926+
// See https://developers.google.com/protocol-buffers/docs/proto#specifying_field_rules
927+
// NOTE: This field is still experimental, and subject to change. It may be formally adopted in the future.
928+
optional string encoded_polyline = 2;
929+
930+
// The extensions namespace allows 3rd-party developers to extend the
931+
// GTFS Realtime Specification in order to add and evaluate new features and
932+
// modifications to the spec.
933+
extensions 1000 to 1999;
934+
935+
// The following extension IDs are reserved for private use by any organization.
936+
extensions 9000 to 9999;
937+
}

gtfs-realtime/spec/en/reference.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,17 +112,19 @@ Determines whether the current fetch is incremental.
112112

113113
## _message_ FeedEntity
114114

115-
A definition (or update) of an entity in the transit feed. If the entity is not being deleted, exactly one of 'trip_update', 'vehicle' and 'alert' fields should be populated.
115+
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.
116116

117117
#### Fields
118118

119119
| _**Field Name**_ | _**Type**_ | _**Required**_ | _**Cardinality**_ | _**Description**_ |
120120
|------------------|------------|----------------|-------------------|-------------------|
121121
| **id** | [string](https://developers.google.com/protocol-buffers/docs/proto#scalar) | Required | One | Feed-unique identifier for this entity. The ids are used only to provide incrementality support. The actual entities referenced by the feed must be specified by explicit selectors (see EntitySelector below for more info). |
122122
| **is_deleted** | [bool](https://developers.google.com/protocol-buffers/docs/proto#scalar) | Optional | One | Whether this entity is to be deleted. Should be provided only for feeds with Incrementality of DIFFERENTIAL - this field should NOT be provided for feeds with Incrementality of FULL_DATASET. |
123-
| **trip_update** | [TripUpdate](#message-tripupdate) | Conditionally required | One | Data about the realtime departure delays of a trip. At least one of the fields trip_update, vehicle, or alert must be provided - all these fields cannot be empty. |
124-
| **vehicle** | [VehiclePosition](#message-vehicleposition) | Conditionally required | One | Data about the realtime position of a vehicle. At least one of the fields trip_update, vehicle, or alert must be provided - all these fields cannot be empty. |
125-
| **alert** | [Alert](#message-alert) | Conditionally required | One | Data about the realtime alert. At least one of the fields trip_update, vehicle, or alert must be provided - all these fields cannot be empty. |
123+
| **trip_update** | [TripUpdate](#message-tripupdate) | Conditionally required | One | Data about the realtime departure delays of a trip. At least one of the fields trip_update, vehicle, alert, or shape must be provided - all these fields cannot be empty. |
124+
| **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. |
125+
| **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. |
126+
| **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. <br><br>**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. |
127+
126128

127129
## _message_ TripUpdate
128130

@@ -228,6 +230,7 @@ Defines updated properties of the trip
228230
| **trip_id** | [string](https://developers.google.com/protocol-buffers/docs/proto#scalar) | Conditionally required | One | Defines the identifier of a new trip that is a duplicate of an existing trip defined in (CSV) GTFS trips.txt but will start at a different service date and/or time (defined using `TripProperties.start_date` and `TripProperties.start_time`). See definition of `trips.trip_id` in (CSV) GTFS. Its value must be different than the ones used in the (CSV) GTFS. This field is required if `schedule_relationship` is `DUPLICATED`, otherwise this field must not be populated and will be ignored by consumers. <br><br>**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. |
229231
| **start_date** | [string](https://developers.google.com/protocol-buffers/docs/proto#scalar) | Conditionally required | One | Service date on which the duplicated trip will be run. Must be provided in YYYYMMDD format. This field is required if `schedule_relationship` is `DUPLICATED`, otherwise this field must not be populated and will be ignored by consumers. <br><br>**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. |
230232
| **start_time** | [string](https://developers.google.com/protocol-buffers/docs/proto#scalar) | Conditionally required | One | Defines the departure start time of the trip when it’s duplicated. See definition of `stop_times.departure_time` in (CSV) GTFS. Scheduled arrival and departure times for the duplicated trip are calculated based on the offset between the original trip `departure_time` and this field. For example, if a GTFS trip has stop A with a `departure_time` of `10:00:00` and stop B with `departure_time` of `10:01:00`, and this field is populated with the value of `10:30:00`, stop B on the duplicated trip will have a scheduled `departure_time` of `10:31:00`. Real-time prediction `delay` values are applied to this calculated schedule time to determine the predicted time. For example, if a departure `delay` of `30` is provided for stop B, then the predicted departure time is `10:31:30`. Real-time prediction `time` values do not have any offset applied to them and indicate the predicted time as provided. For example, if a departure `time` representing 10:31:30 is provided for stop B, then the predicted departure time is `10:31:30`.This field is required if `schedule_relationship` is `DUPLICATED`, otherwise this field must not be populated and will be ignored by consumers. <br><br>**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. |
233+
| **shape_id** | [string](https://developers.google.com/protocol-buffers/docs/proto#scalar) | Optional | One | Specifies the shape of the vehicle travel path for this trip when it differs from the original. Refers to a shape defined in the (CSV) GTFS or a new shape entity in a real-time feed. See definition of `trips.shape_id` in (CSV) GTFS. <br><br>**Caution:** this field is still **experimental**, and subject to change. It may be formally adopted in the future. |
231234

232235
## _message_ VehiclePosition
233236

@@ -505,3 +508,16 @@ A localized string mapped to a language.
505508
|------------------|------------|----------------|-------------------|-------------------|
506509
| **text** | [string](https://developers.google.com/protocol-buffers/docs/proto#scalar) | Required | One | A UTF-8 string containing the message. |
507510
| **language** | [string](https://developers.google.com/protocol-buffers/docs/proto#scalar) | Conditionally required | One | BCP-47 language code. Can be omitted if the language is unknown or if no internationalization is done at all for the feed. At most one translation is allowed to have an unspecified language tag - if there is more than one translation, the language must be provided. |
511+
512+
## _message_ Shape
513+
514+
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
515+
516+
**Caution:** this message is still **experimental**, and subject to change. It may be formally adopted in the future.<br>.
517+
518+
#### Fields
519+
520+
| _**Field Name**_ | _**Type**_ | _**Required**_ | _**Cardinality**_ | _**Description**_ |
521+
|------------------|------------|----------------|-------------------|-------------------|
522+
| **shape_id** | [string](https://developers.google.com/protocol-buffers/docs/proto#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. |
523+
| **encoded_polyline** | [string](https://developers.google.com/protocol-buffers/docs/proto#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. |

gtfs/CHANGES.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@ The official specification, reference and documentation are written in English.
2424
- Votes against shall be motivated, and ideally provide actionable feedback.
2525
- If the vote has failed, then the advocate may choose to continue work on the proposal, or to abandon the proposal.
2626
Either decision of the advocate must be announced in the mailing list.
27-
- If the advocate continues the work on proposal then a new vote can be called for at any point in time but no later than 30 calendar days after the end of the previous vote.
28-
- If a vote was not called within 30 calendar days from the original proposal or 30 calendar days since end of the previous vote, then the proposal is abandoned.
29-
1. If the proposal is abandoned, the corresponding pull request is closed.
27+
- If the advocate continues the work on proposal then a new vote can be called for at any point in time.
28+
1. Any pull request remaining inactive for 30 calendar days will be closed. When a pull request is closed, the corresponding proposal is considered abandoned. The advocate may reopen the pull request at any time if they wish to continue or maintain the conversation.
3029
1. If the proposal is accepted:
3130
- Google is committed to merging the voted upon version of the pull request (provided that the contributors have signed the [CLA](../CONTRIBUTING.md)), and performing the pull request within 5 business days.
3231
- Translations must not be included into the original pull request.

0 commit comments

Comments
 (0)