From 76cfb4ec8792282a9ef32f26c3f2a58745bc259e Mon Sep 17 00:00:00 2001 From: Lionel N Date: Thu, 30 Jan 2020 15:39:59 -0500 Subject: [PATCH 01/28] Adds TripProperties message --- gtfs-realtime/proto/gtfs-realtime.proto | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index a65f5397f..e0d863219 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -26,6 +26,20 @@ syntax = "proto2"; option java_package = "com.google.transit.realtime"; package transit_realtime; + +message TripProperties { + // Metadata about this feed and feed message. + required string id = 1; + required string start_date = 2; + required string start_time = 3; + optional string route_id = 4; + optional TranslatedString trip_headsign = 5; + optional TranslatedString trip_short_name = 6; + optional string block_id = 7; + optional string shape_id = 8; +} + + // The contents of a feed message. // A feed is a continuous stream of feed messages. Each message in the stream is // obtained as a response to an appropriate HTTP GET request. From 2dcc08f6442276eee90ac0da4222601ecd8e6ca6 Mon Sep 17 00:00:00 2001 From: Lionel N Date: Thu, 30 Jan 2020 16:21:10 -0500 Subject: [PATCH 02/28] Extends TripUpdate Adds StopTimeProperties Adds VehicleProperties Adds WheelchairAccessibleStatus Adds BikesAllowedStatus Extends StopTimeUpdate Extends StopTimeEvent Adds PickupType Adds DropOffType --- gtfs-realtime/proto/gtfs-realtime.proto | 77 +++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index e0d863219..64dbdb60e 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -26,6 +26,74 @@ syntax = "proto2"; option java_package = "com.google.transit.realtime"; package transit_realtime; +message StopTimeProperties{ + optional string platform_id = 1; + optional TranslatedString stop_headsign = 2; + optional PickupType pickup_type = 3; + optional DropOffType drop_off_type = 4; + optional float shape_dist_traveled = 5; + + enum PickupType{ + REGULAR_PICKUP = 0; + NO_PICKUP = 1; + MUST_PHONE_AGENCY = 2; + MUST_ASK_DRIVER = 3; + } + + enum DropOffType{ + REGULAR_DROP_OFF = 0; + NO_DROP_OFF = 1; + MUST_PHONE_AGENCY = 2; + MUST_ASK_DRIVER = 3; + } +} + +message VehicleProperties{ + optional WheelchairAccessibleStatus wheelchair_accessible = 1; + optional BikesAllowedSatus biked_allowed = 2; + + enum WheelchairAccessibleStatus{ + UNKNOWN_WHEELCHAIR_ACCESSIBILITY = 0; + WHEELCHAIR_ACCESSIBLE = 1; + NOT_WHEELCHAIR_ACCESSIBLE = 2; + } + + enum BikesAllowedSatus{ + UNKNOWN_BIKES_ALLOWANCE = 0; + BIKES_ALLOWED = 1; + BIKES_NOT_ALLOWED = 2; + } +} + + +message Trip { + + required string trip_id = 1; + optional string route_id = 2; + required TranslatedString trip_headsign = 3 ; + required string trip_short_name = 4; + optional int64 direction_id = 5; + optional string block_id = 6; + optional string shape_id = 7; + optional WheelchairAccessibleStatus wheelchair_accessible = 8; + optional BikesAllowedSatus biked_allowed = 9; + optional string replaces_trip_id = 10; + + enum WheelchairAccessibleStatus{ + UNKNOWN_WHEELCHAIR_ACCESSIBILITY = 0; + WHEELCHAIR_ACCESSIBLE = 1; + NOT_WHEELCHAIR_ACCESSIBLE = 2; + } + + enum BikesAllowedSatus{ + UNKNOWN_BIKES_ALLOWANCE = 0; + BIKES_ALLOWED = 1; + BIKES_NOT_ALLOWED = 2; + } + + + +} message TripProperties { // Metadata about this feed and feed message. @@ -117,6 +185,7 @@ message FeedEntity { optional TripUpdate trip_update = 3; optional VehiclePosition vehicle = 4; optional Alert alert = 5; + optional Trip trip = 6; // The extensions namespace allows 3rd-party developers to extend the // GTFS Realtime Specification in order to add and evaluate new features and @@ -199,6 +268,8 @@ message TripUpdate { // To specify a completely certain prediction, set its uncertainty to 0. optional int32 uncertainty = 3; + optional int64 scheduled_time = 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. @@ -256,6 +327,8 @@ message TripUpdate { optional ScheduleRelationship schedule_relationship = 5 [default = SCHEDULED]; + optional StopTimeProperties stop_time_properties = 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. @@ -309,6 +382,10 @@ message TripUpdate { // NOTE: This field is still experimental, and subject to change. It may be // formally adopted in the future. optional int32 delay = 5; + optional TripProperties trip_properties = 6; + optional VehicleProperties vehicle_properties = 7; + + // The extensions namespace allows 3rd-party developers to extend the // GTFS Realtime Specification in order to add and evaluate new features and From a2986dbcd33a8c6662f52c621294589d375ccb29 Mon Sep 17 00:00:00 2001 From: Lionel N Date: Thu, 30 Jan 2020 16:35:43 -0500 Subject: [PATCH 03/28] Adds StopTime Adds Shape Adds ShapePointExtends TripProperties --- gtfs-realtime/proto/gtfs-realtime.proto | 38 ++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 64dbdb60e..72615373b 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -26,6 +26,32 @@ syntax = "proto2"; option java_package = "com.google.transit.realtime"; package transit_realtime; +message StopTime{ + required int64 stop_sequence = 1; + required Timestamp arrival_time = 2; + required Timestamp departure_time = 3; + required string stop_id = 4; + optional TranslatedString stop_headsign = 5; + optional PickupType pickup_type = 6; + optional DropOffType drop_off_type = 7; + optional float shape_dist_traveled = 8; + + enum PickupType{ + REGULAR_PICKUP = 0; + NO_PICKUP = 1; + MUST_PHONE_AGENCY = 2; + MUST_ASK_DRIVER = 3; + } + + enum DropOffType{ + REGULAR_DROP_OFF = 0; + NO_DROP_OFF = 1; + MUST_PHONE_AGENCY = 2; + MUST_ASK_DRIVER = 3; + } + +} + message StopTimeProperties{ optional string platform_id = 1; optional TranslatedString stop_headsign = 2; @@ -164,6 +190,16 @@ message FeedHeader { extensions 9000 to 9999; } +message Shape{ + required string shape_id = 1; + required ShapePoint shape_point = 2; +} + +message ShapePoint{ + required float shape_pt_lat = 1; + required float shape_pt_lon = 2; + optional float shape_dist_traveled = 3; +} // A definition (or update) of an entity in the transit feed. message FeedEntity { // The ids are used only to provide incrementality support. The id should be @@ -186,7 +222,7 @@ message FeedEntity { optional VehiclePosition vehicle = 4; optional Alert alert = 5; optional Trip trip = 6; - + optional Shape shape = 7; // The extensions namespace allows 3rd-party developers to extend the // GTFS Realtime Specification in order to add and evaluate new features and // modifications to the spec. From b19e8c14b7186cb302dcb5f7e75f18e07bd8db2c Mon Sep 17 00:00:00 2001 From: Lionel N Date: Thu, 30 Jan 2020 16:42:59 -0500 Subject: [PATCH 04/28] Extends FeedEntity Adds Route Adds RouteType Extends TripProperties --- gtfs-realtime/proto/gtfs-realtime.proto | 27 +++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 72615373b..c01923325 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -131,6 +131,7 @@ message TripProperties { optional TranslatedString trip_short_name = 6; optional string block_id = 7; optional string shape_id = 8; + } @@ -200,6 +201,31 @@ message ShapePoint{ required float shape_pt_lon = 2; optional float shape_dist_traveled = 3; } + +message Route{ + required string route_id = 1; + required string agency_id = 2; + optional TranslatedString route_short_name = 3; + optional TranslatedString route_long_name = 4; + optional TranslatedString route_desc = 5; + optional RouteType route_type = 6; + optional TranslatedString route_url = 7; + optional string route_color = 8; + optional string route_text_color = 9; + optional uint32 route_sort_order = 10; + + enum RouteType{ + LIGHT_RAIL = 0; + SUBWAY = 1; + RAIL = 2; + BUS = 3; + FERRY = 4; + CABLE_CAR =5; + GONDOLA = 6; + FUNICULAR =7; + } +} + // A definition (or update) of an entity in the transit feed. message FeedEntity { // The ids are used only to provide incrementality support. The id should be @@ -223,6 +249,7 @@ message FeedEntity { optional Alert alert = 5; optional Trip trip = 6; optional Shape shape = 7; + optional Route route = 8; // The extensions namespace allows 3rd-party developers to extend the // GTFS Realtime Specification in order to add and evaluate new features and // modifications to the spec. From 41890a9703eb1eddaa10222dbb7e1f1462f2479b Mon Sep 17 00:00:00 2001 From: Lionel N Date: Thu, 30 Jan 2020 16:50:29 -0500 Subject: [PATCH 05/28] Extends FeedEntity Adds stop Adds WheelchairBoardingStatus Extends StopTimeProperties --- gtfs-realtime/proto/gtfs-realtime.proto | 26 +++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index c01923325..504d8c7ad 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -58,6 +58,7 @@ message StopTimeProperties{ optional PickupType pickup_type = 3; optional DropOffType drop_off_type = 4; optional float shape_dist_traveled = 5; + optional string stop_id = 6; enum PickupType{ REGULAR_PICKUP = 0; @@ -226,6 +227,30 @@ message Route{ } } +message Stop{ + required string stop_id = 1; + optional string stop_code = 2; + required TranslatedString stop_name = 3; + optional TranslatedString stop_desc = 4; + required float stop_lat = 5; + required float stop_lon = 6; + optional string zone_id = 7; + optional TranslatedString stop_url = 8; + optional string parent_station = 9; + optional string stop_timezone = 10; + optional WheelchairBoardingStatus wheelchair_boarding = 11; + optional string level_id = 12; + optional string platform_code = 13; + + enum WheelchairBoardingStatus{ + UNKNOWN_WHEELCHAIR_BOARDING = 0; + WHEELCHAIR_ACCESSIBLE = 1; + NOT_WHEELCHAIR_ACCESSIBLE = 2; + } + + +} + // A definition (or update) of an entity in the transit feed. message FeedEntity { // The ids are used only to provide incrementality support. The id should be @@ -250,6 +275,7 @@ message FeedEntity { optional Trip trip = 6; optional Shape shape = 7; optional Route route = 8; + optional Stop stop = 9; // The extensions namespace allows 3rd-party developers to extend the // GTFS Realtime Specification in order to add and evaluate new features and // modifications to the spec. From e0d17ec7cbd8597d649fad161e94568d07a933b5 Mon Sep 17 00:00:00 2001 From: Lionel N Date: Thu, 30 Jan 2020 17:05:07 -0500 Subject: [PATCH 06/28] Changes timestapm to unint64. To check ! --- gtfs-realtime/proto/gtfs-realtime.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 504d8c7ad..83e819902 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -28,8 +28,8 @@ package transit_realtime; message StopTime{ required int64 stop_sequence = 1; - required Timestamp arrival_time = 2; - required Timestamp departure_time = 3; + required uint64 arrival_time = 2; + required uint64 departure_time = 3; required string stop_id = 4; optional TranslatedString stop_headsign = 5; optional PickupType pickup_type = 6; From 4ba82c1bb72f20e4a5e13ffd7535653033a2ce73 Mon Sep 17 00:00:00 2001 From: Lionel N Date: Wed, 5 Feb 2020 12:07:13 -0500 Subject: [PATCH 07/28] Adds extra space between curly brackets and message names --- gtfs-realtime/proto/gtfs-realtime.proto | 33 +++++++++++-------------- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 83e819902..2705b0399 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -26,7 +26,7 @@ syntax = "proto2"; option java_package = "com.google.transit.realtime"; package transit_realtime; -message StopTime{ +message StopTime { required int64 stop_sequence = 1; required uint64 arrival_time = 2; required uint64 departure_time = 3; @@ -52,7 +52,7 @@ message StopTime{ } -message StopTimeProperties{ +message StopTimeProperties { optional string platform_id = 1; optional TranslatedString stop_headsign = 2; optional PickupType pickup_type = 3; @@ -60,14 +60,14 @@ message StopTimeProperties{ optional float shape_dist_traveled = 5; optional string stop_id = 6; - enum PickupType{ + enum PickupType { REGULAR_PICKUP = 0; NO_PICKUP = 1; MUST_PHONE_AGENCY = 2; MUST_ASK_DRIVER = 3; } - enum DropOffType{ + enum DropOffType { REGULAR_DROP_OFF = 0; NO_DROP_OFF = 1; MUST_PHONE_AGENCY = 2; @@ -75,24 +75,23 @@ message StopTimeProperties{ } } -message VehicleProperties{ +message VehicleProperties { optional WheelchairAccessibleStatus wheelchair_accessible = 1; - optional BikesAllowedSatus biked_allowed = 2; + optional BikesAllowedStatus biked_allowed = 2; - enum WheelchairAccessibleStatus{ + enum WheelchairAccessibleStatus { UNKNOWN_WHEELCHAIR_ACCESSIBILITY = 0; WHEELCHAIR_ACCESSIBLE = 1; NOT_WHEELCHAIR_ACCESSIBLE = 2; } - enum BikesAllowedSatus{ + enum BikesAllowedStatus { UNKNOWN_BIKES_ALLOWANCE = 0; BIKES_ALLOWED = 1; BIKES_NOT_ALLOWED = 2; } } - message Trip { required string trip_id = 1; @@ -103,16 +102,16 @@ message Trip { optional string block_id = 6; optional string shape_id = 7; optional WheelchairAccessibleStatus wheelchair_accessible = 8; - optional BikesAllowedSatus biked_allowed = 9; + optional BikesAllowedStatus biked_allowed = 9; optional string replaces_trip_id = 10; - enum WheelchairAccessibleStatus{ + enum WheelchairAccessibleStatus { UNKNOWN_WHEELCHAIR_ACCESSIBILITY = 0; WHEELCHAIR_ACCESSIBLE = 1; NOT_WHEELCHAIR_ACCESSIBLE = 2; } - enum BikesAllowedSatus{ + enum BikesAllowedStatus { UNKNOWN_BIKES_ALLOWANCE = 0; BIKES_ALLOWED = 1; BIKES_NOT_ALLOWED = 2; @@ -197,13 +196,13 @@ message Shape{ required ShapePoint shape_point = 2; } -message ShapePoint{ +message ShapePoint { required float shape_pt_lat = 1; required float shape_pt_lon = 2; optional float shape_dist_traveled = 3; } -message Route{ +message Route { required string route_id = 1; required string agency_id = 2; optional TranslatedString route_short_name = 3; @@ -215,7 +214,7 @@ message Route{ optional string route_text_color = 9; optional uint32 route_sort_order = 10; - enum RouteType{ + enum RouteType { LIGHT_RAIL = 0; SUBWAY = 1; RAIL = 2; @@ -227,7 +226,7 @@ message Route{ } } -message Stop{ +message Stop { required string stop_id = 1; optional string stop_code = 2; required TranslatedString stop_name = 3; @@ -247,8 +246,6 @@ message Stop{ WHEELCHAIR_ACCESSIBLE = 1; NOT_WHEELCHAIR_ACCESSIBLE = 2; } - - } // A definition (or update) of an entity in the transit feed. From 720fa699f3ffa05bb513850289fa8cce7b35c010 Mon Sep 17 00:00:00 2001 From: Lionel N Date: Wed, 5 Feb 2020 12:13:17 -0500 Subject: [PATCH 08/28] Moves messages related to v3.1 of GTFS-ServiceChanges at the bottom of the file --- gtfs-realtime/proto/gtfs-realtime.proto | 325 ++++++++++++------------ 1 file changed, 159 insertions(+), 166 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 2705b0399..0a0169285 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -26,115 +26,6 @@ syntax = "proto2"; option java_package = "com.google.transit.realtime"; package transit_realtime; -message StopTime { - required int64 stop_sequence = 1; - required uint64 arrival_time = 2; - required uint64 departure_time = 3; - required string stop_id = 4; - optional TranslatedString stop_headsign = 5; - optional PickupType pickup_type = 6; - optional DropOffType drop_off_type = 7; - optional float shape_dist_traveled = 8; - - enum PickupType{ - REGULAR_PICKUP = 0; - NO_PICKUP = 1; - MUST_PHONE_AGENCY = 2; - MUST_ASK_DRIVER = 3; - } - - enum DropOffType{ - REGULAR_DROP_OFF = 0; - NO_DROP_OFF = 1; - MUST_PHONE_AGENCY = 2; - MUST_ASK_DRIVER = 3; - } - -} - -message StopTimeProperties { - optional string platform_id = 1; - optional TranslatedString stop_headsign = 2; - optional PickupType pickup_type = 3; - optional DropOffType drop_off_type = 4; - optional float shape_dist_traveled = 5; - optional string stop_id = 6; - - enum PickupType { - REGULAR_PICKUP = 0; - NO_PICKUP = 1; - MUST_PHONE_AGENCY = 2; - MUST_ASK_DRIVER = 3; - } - - enum DropOffType { - REGULAR_DROP_OFF = 0; - NO_DROP_OFF = 1; - MUST_PHONE_AGENCY = 2; - MUST_ASK_DRIVER = 3; - } -} - -message VehicleProperties { - optional WheelchairAccessibleStatus wheelchair_accessible = 1; - optional BikesAllowedStatus biked_allowed = 2; - - enum WheelchairAccessibleStatus { - UNKNOWN_WHEELCHAIR_ACCESSIBILITY = 0; - WHEELCHAIR_ACCESSIBLE = 1; - NOT_WHEELCHAIR_ACCESSIBLE = 2; - } - - enum BikesAllowedStatus { - UNKNOWN_BIKES_ALLOWANCE = 0; - BIKES_ALLOWED = 1; - BIKES_NOT_ALLOWED = 2; - } -} - -message Trip { - - required string trip_id = 1; - optional string route_id = 2; - required TranslatedString trip_headsign = 3 ; - required string trip_short_name = 4; - optional int64 direction_id = 5; - optional string block_id = 6; - optional string shape_id = 7; - optional WheelchairAccessibleStatus wheelchair_accessible = 8; - optional BikesAllowedStatus biked_allowed = 9; - optional string replaces_trip_id = 10; - - enum WheelchairAccessibleStatus { - UNKNOWN_WHEELCHAIR_ACCESSIBILITY = 0; - WHEELCHAIR_ACCESSIBLE = 1; - NOT_WHEELCHAIR_ACCESSIBLE = 2; - } - - enum BikesAllowedStatus { - UNKNOWN_BIKES_ALLOWANCE = 0; - BIKES_ALLOWED = 1; - BIKES_NOT_ALLOWED = 2; - } - - - -} - -message TripProperties { - // Metadata about this feed and feed message. - required string id = 1; - required string start_date = 2; - required string start_time = 3; - optional string route_id = 4; - optional TranslatedString trip_headsign = 5; - optional TranslatedString trip_short_name = 6; - optional string block_id = 7; - optional string shape_id = 8; - -} - - // The contents of a feed message. // A feed is a continuous stream of feed messages. Each message in the stream is // obtained as a response to an appropriate HTTP GET request. @@ -191,63 +82,6 @@ message FeedHeader { extensions 9000 to 9999; } -message Shape{ - required string shape_id = 1; - required ShapePoint shape_point = 2; -} - -message ShapePoint { - required float shape_pt_lat = 1; - required float shape_pt_lon = 2; - optional float shape_dist_traveled = 3; -} - -message Route { - required string route_id = 1; - required string agency_id = 2; - optional TranslatedString route_short_name = 3; - optional TranslatedString route_long_name = 4; - optional TranslatedString route_desc = 5; - optional RouteType route_type = 6; - optional TranslatedString route_url = 7; - optional string route_color = 8; - optional string route_text_color = 9; - optional uint32 route_sort_order = 10; - - enum RouteType { - LIGHT_RAIL = 0; - SUBWAY = 1; - RAIL = 2; - BUS = 3; - FERRY = 4; - CABLE_CAR =5; - GONDOLA = 6; - FUNICULAR =7; - } -} - -message Stop { - required string stop_id = 1; - optional string stop_code = 2; - required TranslatedString stop_name = 3; - optional TranslatedString stop_desc = 4; - required float stop_lat = 5; - required float stop_lon = 6; - optional string zone_id = 7; - optional TranslatedString stop_url = 8; - optional string parent_station = 9; - optional string stop_timezone = 10; - optional WheelchairBoardingStatus wheelchair_boarding = 11; - optional string level_id = 12; - optional string platform_code = 13; - - enum WheelchairBoardingStatus{ - UNKNOWN_WHEELCHAIR_BOARDING = 0; - WHEELCHAIR_ACCESSIBLE = 1; - NOT_WHEELCHAIR_ACCESSIBLE = 2; - } -} - // A definition (or update) of an entity in the transit feed. message FeedEntity { // The ids are used only to provide incrementality support. The id should be @@ -894,3 +728,162 @@ message TranslatedString { // The following extension IDs are reserved for private use by any organization. extensions 9000 to 9999; } + +message TripProperties { + // Metadata about this feed and feed message. + required string id = 1; + required string start_date = 2; + required string start_time = 3; + optional string route_id = 4; + optional TranslatedString trip_headsign = 5; + optional TranslatedString trip_short_name = 6; + optional string block_id = 7; + optional string shape_id = 8; +} + +message VehicleProperties { + optional WheelchairAccessibleStatus wheelchair_accessible = 1; + optional BikesAllowedStatus biked_allowed = 2; + + enum WheelchairAccessibleStatus { + UNKNOWN_WHEELCHAIR_ACCESSIBILITY = 0; + WHEELCHAIR_ACCESSIBLE = 1; + NOT_WHEELCHAIR_ACCESSIBLE = 2; + } + + enum BikesAllowedStatus { + UNKNOWN_BIKES_ALLOWANCE = 0; + BIKES_ALLOWED = 1; + BIKES_NOT_ALLOWED = 2; + } +} + +message StopTimeProperties { + optional string platform_id = 1; + optional TranslatedString stop_headsign = 2; + optional PickupType pickup_type = 3; + optional DropOffType drop_off_type = 4; + optional float shape_dist_traveled = 5; + optional string stop_id = 6; + + enum PickupType { + REGULAR_PICKUP = 0; + NO_PICKUP = 1; + MUST_PHONE_AGENCY = 2; + MUST_ASK_DRIVER = 3; + } + + enum DropOffType { + REGULAR_DROP_OFF = 0; + NO_DROP_OFF = 1; + MUST_PHONE_AGENCY = 2; + MUST_ASK_DRIVER = 3; + } +} + +message Trip { + + required string trip_id = 1; + optional string route_id = 2; + required TranslatedString trip_headsign = 3 ; + required string trip_short_name = 4; + optional int64 direction_id = 5; + optional string block_id = 6; + optional string shape_id = 7; + optional WheelchairAccessibleStatus wheelchair_accessible = 8; + optional BikesAllowedStatus biked_allowed = 9; + optional string replaces_trip_id = 10; + + enum WheelchairAccessibleStatus { + UNKNOWN_WHEELCHAIR_ACCESSIBILITY = 0; + WHEELCHAIR_ACCESSIBLE = 1; + NOT_WHEELCHAIR_ACCESSIBLE = 2; + } + + enum BikesAllowedStatus { + UNKNOWN_BIKES_ALLOWANCE = 0; + BIKES_ALLOWED = 1; + BIKES_NOT_ALLOWED = 2; + } +} +message StopTime { + required int64 stop_sequence = 1; + required uint64 arrival_time = 2; + required uint64 departure_time = 3; + required string stop_id = 4; + optional TranslatedString stop_headsign = 5; + optional PickupType pickup_type = 6; + optional DropOffType drop_off_type = 7; + optional float shape_dist_traveled = 8; + + enum PickupType{ + REGULAR_PICKUP = 0; + NO_PICKUP = 1; + MUST_PHONE_AGENCY = 2; + MUST_ASK_DRIVER = 3; + } + + enum DropOffType{ + REGULAR_DROP_OFF = 0; + NO_DROP_OFF = 1; + MUST_PHONE_AGENCY = 2; + MUST_ASK_DRIVER = 3; + } +} + +message Shape { + required string shape_id = 1; + required ShapePoint shape_point = 2; +} + +message ShapePoint { + required float shape_pt_lat = 1; + required float shape_pt_lon = 2; + optional float shape_dist_traveled = 3; +} + +message Route { + required string route_id = 1; + required string agency_id = 2; + optional TranslatedString route_short_name = 3; + optional TranslatedString route_long_name = 4; + optional TranslatedString route_desc = 5; + optional RouteType route_type = 6; + optional TranslatedString route_url = 7; + optional string route_color = 8; + optional string route_text_color = 9; + optional uint32 route_sort_order = 10; + + enum RouteType { + LIGHT_RAIL = 0; + SUBWAY = 1; + RAIL = 2; + BUS = 3; + FERRY = 4; + CABLE_CAR =5; + GONDOLA = 6; + FUNICULAR =7; + } +} + +message Stop { + required string stop_id = 1; + optional string stop_code = 2; + required TranslatedString stop_name = 3; + optional TranslatedString stop_desc = 4; + required float stop_lat = 5; + required float stop_lon = 6; + optional string zone_id = 7; + optional TranslatedString stop_url = 8; + optional string parent_station = 9; + optional string stop_timezone = 10; + optional WheelchairBoardingStatus wheelchair_boarding = 11; + optional string level_id = 12; + optional string platform_code = 13; + + enum WheelchairBoardingStatus { + UNKNOWN_WHEELCHAIR_BOARDING = 0; + WHEELCHAIR_ACCESSIBLE = 1; + NOT_WHEELCHAIR_ACCESSIBLE = 2; + } +} \ No newline at end of file From 46eb2eb5923c06daf0b32aeb9b58fb7efa49868d Mon Sep 17 00:00:00 2001 From: Lionel N Date: Wed, 5 Feb 2020 13:06:37 -0500 Subject: [PATCH 09/28] "scheduled_time" -> "schedule_time" --- gtfs-realtime/proto/gtfs-realtime.proto | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 0a0169285..3e01ebb90 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -188,7 +188,7 @@ message TripUpdate { // To specify a completely certain prediction, set its uncertainty to 0. optional int32 uncertainty = 3; - optional int64 scheduled_time = 4; + optional int64 schedule_time = 4; // The extensions namespace allows 3rd-party developers to extend the // GTFS Realtime Specification in order to add and evaluate new features @@ -729,6 +729,7 @@ message TranslatedString { extensions 9000 to 9999; } +// message TripProperties { // Metadata about this feed and feed message. required string id = 1; @@ -782,7 +783,6 @@ message StopTimeProperties { } message Trip { - required string trip_id = 1; optional string route_id = 2; required TranslatedString trip_headsign = 3 ; @@ -816,14 +816,14 @@ message StopTime { optional DropOffType drop_off_type = 7; optional float shape_dist_traveled = 8; - enum PickupType{ + enum PickupType { REGULAR_PICKUP = 0; NO_PICKUP = 1; MUST_PHONE_AGENCY = 2; MUST_ASK_DRIVER = 3; } - enum DropOffType{ + enum DropOffType { REGULAR_DROP_OFF = 0; NO_DROP_OFF = 1; MUST_PHONE_AGENCY = 2; From 4bafb669aa00d1cba2092c66d820a3936ec46313 Mon Sep 17 00:00:00 2001 From: Lionel N Date: Wed, 5 Feb 2020 13:08:55 -0500 Subject: [PATCH 10/28] stop_code : string to TranslatedString --- gtfs-realtime/proto/gtfs-realtime.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 3e01ebb90..4eb69d4f7 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -868,7 +868,7 @@ message Route { message Stop { required string stop_id = 1; - optional string stop_code = 2; + optional TranslatedString stop_code = 2; required TranslatedString stop_name = 3; optional TranslatedString stop_desc = 4; required float stop_lat = 5; From e291dfdd628d73a330c7ab939302653bd5ce396e Mon Sep 17 00:00:00 2001 From: Lionel N Date: Wed, 5 Feb 2020 13:09:59 -0500 Subject: [PATCH 11/28] Adds extra space after "=" --- gtfs-realtime/proto/gtfs-realtime.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 4eb69d4f7..914e5136b 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -860,9 +860,9 @@ message Route { RAIL = 2; BUS = 3; FERRY = 4; - CABLE_CAR =5; + CABLE_CAR = 5; GONDOLA = 6; - FUNICULAR =7; + FUNICULAR = 7; } } From 284ae003a307c7443aebeeb4bd24bd6de31bd22a Mon Sep 17 00:00:00 2001 From: Lionel N Date: Wed, 5 Feb 2020 13:12:00 -0500 Subject: [PATCH 12/28] route_type in message Route : optional -> required --- gtfs-realtime/proto/gtfs-realtime.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 914e5136b..2806fade0 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -848,7 +848,7 @@ message Route { optional TranslatedString route_short_name = 3; optional TranslatedString route_long_name = 4; optional TranslatedString route_desc = 5; - optional RouteType route_type = 6; + required RouteType route_type = 6; optional TranslatedString route_url = 7; optional string route_color = 8; optional string route_text_color = 9; From 9f4f693582743f47a59f147ada4efbf6f3365c2e Mon Sep 17 00:00:00 2001 From: Lionel N Date: Wed, 5 Feb 2020 17:23:04 -0500 Subject: [PATCH 13/28] Adds comments to describe messages and their fields --- gtfs-realtime/proto/gtfs-realtime.proto | 154 +++++++++++++++++++++--- 1 file changed, 134 insertions(+), 20 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 2806fade0..6820ac69c 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -618,7 +618,7 @@ message TripDescriptor { // 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. - ADDED = 1; + ADDED = 1 [deprecated = true]; // A trip that is running with no schedule associated to it (GTFS frequencies.txt exact_times=0). // Trips with ScheduleRelationship=UNSCHEDULED must also set all StopTimeUpdates.ScheduleRelationship=UNSCHEDULED. @@ -629,6 +629,8 @@ message TripDescriptor { // Should not be used - for backwards-compatibility only. REPLACEMENT = 5 [deprecated=true]; + + DUPLICATED = 6; } optional ScheduleRelationship schedule_relationship = 4; @@ -729,29 +731,50 @@ message TranslatedString { extensions 9000 to 9999; } -// +// All messages below this comment are added in order to reflect the changes v3.1 of GTFS-ServiceChanges provide + +// Provides the updated properties for the trip. message TripProperties { - // Metadata about this feed and feed message. - required string id = 1; + // Identifies a trip. + required string trip_id = 1; + // Dates on which the trip will be run in YYYYMMDD format. required string start_date = 2; + // Departure start time of the trip when it’s duplicated. required string start_time = 3; + // Refers to a route defined in the GTFS. optional string route_id = 4; + // Text that appears on signage identifying the trip's destination to riders. optional TranslatedString trip_headsign = 5; + // Public facing text used to identify the trip to riders. optional TranslatedString trip_short_name = 6; + // Identifies the block to which the trip belongs. optional string block_id = 7; + // Identifies a geospatial shape describing the vehicle travel path for a trip. optional string shape_id = 8; } +// Provides the updated properties for the vehicle. message VehicleProperties { - optional WheelchairAccessibleStatus wheelchair_accessible = 1; - optional BikesAllowedStatus biked_allowed = 2; + // Indicates wheelchair accessibility. + optional WheelchairAccessibleStatus wheelchair_accessible = 1 [default = UNKNOWN_WHEELCHAIR_ACCESSIBILITY]; + // Indicates whether bikes are allowed or not. + optional BikesAllowedStatus biked_allowed = 2 [default = UNKNOWN_BIKES_ALLOWANCE]; + + // Options for wheelchair_accessible: + // 0 or empty - No accessibility information for the trip. + // 1 - Vehicle being used on this particular trip can accommodate at least one rider in a wheelchair. + // 2 - No riders in wheelchairs can be accommodated on this trip. enum WheelchairAccessibleStatus { UNKNOWN_WHEELCHAIR_ACCESSIBILITY = 0; WHEELCHAIR_ACCESSIBLE = 1; NOT_WHEELCHAIR_ACCESSIBLE = 2; } + // Options for biked_allowed: + //0 or empty - No bike information for the trip. + //1 - Vehicle being used on this particular trip can accommodate at least one bicycle. + //2 - No bicycles are allowed on this trip. enum BikesAllowedStatus { UNKNOWN_BIKES_ALLOWANCE = 0; BIKES_ALLOWED = 1; @@ -759,14 +782,22 @@ message VehicleProperties { } } +// Provides the updated values for the stop time. message StopTimeProperties { + // Refers to a stop_id defined in the GTFS. optional string platform_id = 1; + // Text that appears on signage identifying the trip's destination to riders. optional TranslatedString stop_headsign = 2; - optional PickupType pickup_type = 3; - optional DropOffType drop_off_type = 4; + // Indicates pickup method. + optional PickupType pickup_type = 3 [default = REGULAR_PICKUP]; + // Indicates drop off method. + optional DropOffType drop_off_type = 4 [default = REGULAR_DROP_OFF]; + // Actual distance traveled along the associated shape, from the first stop to the stop specified in this record. optional float shape_dist_traveled = 5; + // Identifies the new serviced stop (defined in the RT-GTFS). optional string stop_id = 6; + // Valid options for pickup_type: enum PickupType { REGULAR_PICKUP = 0; NO_PICKUP = 1; @@ -774,48 +805,83 @@ message StopTimeProperties { MUST_ASK_DRIVER = 3; } + // Valid options for drop_off_type: enum DropOffType { REGULAR_DROP_OFF = 0; NO_DROP_OFF = 1; - MUST_PHONE_AGENCY = 2; - MUST_ASK_DRIVER = 3; +// MUST_PHONE_AGENCY = 2; +// MUST_ASK_DRIVER = 3; } } +// Describes new trips. message Trip { + // Identifier of the trip. Must be different than any trip_id defined in the GTFS. required string trip_id = 1; + // Identifies a route. optional string route_id = 2; + // Text that appears on signage identifying the trip's destination to riders. required TranslatedString trip_headsign = 3 ; + // Public facing text used to identify the trip to riders, for instance, to identify train numbers for commuter rail trip required string trip_short_name = 4; + // Indicates the direction of travel for a trip. optional int64 direction_id = 5; + // Identifies the block to which the trip belongs. optional string block_id = 6; + // Identifies a geospatial shape describing the vehicle travel path for a trip. optional string shape_id = 7; - optional WheelchairAccessibleStatus wheelchair_accessible = 8; - optional BikesAllowedStatus biked_allowed = 9; - optional string replaces_trip_id = 10; - + // Indicates wheelchair accessibility. + optional WheelchairAccessibleStatus wheelchair_accessible = 8 [default = UNKNOWN_WHEELCHAIR_ACCESSIBILITY]; + // Indicates whether bikes are allowed or not. + optional BikesAllowedStatus biked_allowed = 9 [default = UNKNOWN_BIKES_ALLOWANCE]; + // Defines which trips are being replaced by this trip. + repeated string replaces_trip_id = 10; + + // Options for wheelchair_accessible: + // 0 or empty - No accessibility information for the trip. + // 1 - Vehicle being used on this particular trip can accommodate at least one rider in a wheelchair. + // 2 - No riders in wheelchairs can be accommodated on this trip. enum WheelchairAccessibleStatus { UNKNOWN_WHEELCHAIR_ACCESSIBILITY = 0; WHEELCHAIR_ACCESSIBLE = 1; NOT_WHEELCHAIR_ACCESSIBLE = 2; } + // Options for biked_allowed: + // 0 or empty - No bike information for the trip. + // 1 - Vehicle being used on this particular trip can accommodate at least one bicycle. + // 2 - No bicycles are allowed on this trip. enum BikesAllowedStatus { UNKNOWN_BIKES_ALLOWANCE = 0; BIKES_ALLOWED = 1; BIKES_NOT_ALLOWED = 2; } } + +// Describes the times that a vehicle arrives at and departs from stops for each updated trip message StopTime { - required int64 stop_sequence = 1; + // Order of stops for a particular trip. The values must increase along the trip but do not need to be consecutive. + required uint32 stop_sequence = 1; + // Arrival time at a specific stop for a specific trip on a route. required uint64 arrival_time = 2; + // Departure time at a specific stop for a specific trip on a route. required uint64 departure_time = 3; + // Identifies the serviced stop. required string stop_id = 4; + // Text that appears on signage identifying the trip's destination to riders. optional TranslatedString stop_headsign = 5; - optional PickupType pickup_type = 6; - optional DropOffType drop_off_type = 7; + // Indicates pickup method. + optional PickupType pickup_type = 6 [default = REGULAR_PICKUP]; + // Indicates drop off method. + optional DropOffType drop_off_type = 7 [default = REGULAR_DROP_OFF]; + // Actual distance traveled along the associated shape, from the first stop to the stop specified in this record. optional float shape_dist_traveled = 8; + // Valid options for pickup_type: + // 0 or empty - Regularly scheduled pickup. + // 1 - No pickup available. + // 2 - Must phone agency to arrange pickup. + // 3 - Must coordinate with driver to arrange pickup. enum PickupType { REGULAR_PICKUP = 0; NO_PICKUP = 1; @@ -823,37 +889,69 @@ message StopTime { MUST_ASK_DRIVER = 3; } + // Valid options for drop_off_type: + // 0 or empty - Regularly scheduled drop off. + // 1 - No drop off available. + // 2 - Must phone agency to arrange drop off. + // 3 - Must coordinate with driver to arrange drop off. enum DropOffType { REGULAR_DROP_OFF = 0; NO_DROP_OFF = 1; - MUST_PHONE_AGENCY = 2; - MUST_ASK_DRIVER = 3; +// MUST_PHONE_AGENCY = 2; +// MUST_ASK_DRIVER = 3; } } +// Defines a shape for a trip that has been updated. message Shape { + // Identifier of the shape. Must be different than any shape_id defined in the GTFS. required string shape_id = 1; + // Points in the shape. A shape must contain at least two shape points. The shape points order in this field defines their order in the shape. required ShapePoint shape_point = 2; } +// Defines the geographical representation of a point in a shape. message ShapePoint { + // Latitude of a shape point. Each record in shapes.txt represents a shape point used to define the shape. required float shape_pt_lat = 1; + // Longitude of a shape point. required float shape_pt_lon = 2; + // Actual distance traveled along the shape from the first shape point to the point specified in this record. optional float shape_dist_traveled = 3; } +// Describes new routes. A route is a group of trips that are displayed to riders as a single service. message Route { + // Identifier of the route. Must be different than any route_id defined in the GTFS. required string route_id = 1; + // Identifies a transit brand which is often synonymous with a transit agency. required string agency_id = 2; + // Short name of a route. optional TranslatedString route_short_name = 3; + // Full name of a route. This name is generally more descriptive than the route_short_name and often includes the route's destination or stop. optional TranslatedString route_long_name = 4; + // Description of a route that provides useful, quality information. Do not simply duplicate the name of the route. optional TranslatedString route_desc = 5; + // Indicates the type of transportation used on a route. required RouteType route_type = 6; + // URL of a web page about the particular route. Should be different from the agency.agency_url value. optional TranslatedString route_url = 7; + // Route color designation that matches public facing material. D optional string route_color = 8; + // Legible color to use for text drawn against a background of route_color. optional string route_text_color = 9; + // Orders the routes in a way which is ideal for presentation to customers. Routes with smaller route_sort_order values should be displayed first. optional uint32 route_sort_order = 10; + // Valid options for route_type: + // 0 - Tram, Streetcar, Light rail. Any light rail or street level system within a metropolitan area. + // 1 - Subway, Metro. Any underground rail system within a metropolitan area. + // 2 - Rail. Used for intercity or long-distance travel. + // 3 - Bus. Used for short- and long-distance bus routes. + // 4 - Ferry. Used for short- and long-distance boat service. + // 5 - Cable car. Used for street-level cable cars where the cable runs beneath the car. + // 6 - Gondola, Suspended cable car. Typically used for aerial cable cars where the car is suspended from the cable. + // 7 - Funicular. Any rail system designed for steep inclines. enum RouteType { LIGHT_RAIL = 0; SUBWAY = 1; @@ -866,21 +964,37 @@ message Route { } } +// Describes new stops where vehicles pick up or drop off riders. message Stop { + // Identifier of the stop. Must be different than any stop_id defines in the GTFS. required string stop_id = 1; + // Short text or a number that identifies the location for riders. These codes are often used in phone-based transit + // information systems or printed on signage to make it easier for riders to get information for a particular location. optional TranslatedString stop_code = 2; + // Name of the location. Use a name that people will understand in the local and tourist vernacular. required TranslatedString stop_name = 3; + // Description of the location that provides useful, quality information. optional TranslatedString stop_desc = 4; + // Latitude of the location. required float stop_lat = 5; + // Longitude of the location. required float stop_lon = 6; + // Identifies the fare zone for a stop. optional string zone_id = 7; + // URL of a web page about the location. optional TranslatedString stop_url = 8; + // Defines hierarchy between the different locations defined in stops.txt. optional string parent_station = 9; + // Timezone of the location. If the location has a parent station, it inherits the parent station’s timezone instead of applying its own. optional string stop_timezone = 10; - optional WheelchairBoardingStatus wheelchair_boarding = 11; + // Indicates whether wheelchair boardings are possible from the location. + optional WheelchairBoardingStatus wheelchair_boarding = 11 [default = UNKNOWN_WHEELCHAIR_BOARDING]; + // Level of the location. optional string level_id = 12; + // Platform identifier for a platform stop. optional string platform_code = 13; + // Valid options for wheelchair_boarding: enum WheelchairBoardingStatus { UNKNOWN_WHEELCHAIR_BOARDING = 0; WHEELCHAIR_ACCESSIBLE = 1; From c3257ed51fd991b7b7c11b8d57f5422e2eef99e0 Mon Sep 17 00:00:00 2001 From: Lionel N Date: Tue, 18 Feb 2020 13:54:11 -0500 Subject: [PATCH 14/28] gtfs-realtime.proto -- modificiation to enum denomination -changes MUST_PHONE_AGENCY to MUST_PHONE_AGENCY_PICKUP -changes MUST_ASK_DRIVER to MUST_ASK_DRIVER_PICKUP -adds MUST_PHONE_AGENCY_DROP_OFF -adds MUST_ASK_DRIVER_DROP_OFF -changes MUST_PHONE_AGENCY to MUST_PHONE_AGENCY_PICKUP -changes MUST_ASK_DRIVER to MUST_ASK_DRIVER_PICK_UP -adds MUST_PHONE_AGENCY_DROP_OFF -adds MUST_ASK_DRIVER_DROP_OFF --- gtfs-realtime/proto/gtfs-realtime.proto | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 6820ac69c..595488684 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -801,16 +801,16 @@ message StopTimeProperties { enum PickupType { REGULAR_PICKUP = 0; NO_PICKUP = 1; - MUST_PHONE_AGENCY = 2; - MUST_ASK_DRIVER = 3; + MUST_PHONE_AGENCY_PICKUP = 2; + MUST_ASK_DRIVER_PICKUP = 3; } // Valid options for drop_off_type: enum DropOffType { REGULAR_DROP_OFF = 0; NO_DROP_OFF = 1; -// MUST_PHONE_AGENCY = 2; -// MUST_ASK_DRIVER = 3; + MUST_PHONE_AGENCY_DROP_OFF = 2; + MUST_ASK_DRIVER_DROP_OFF = 3; } } @@ -885,8 +885,8 @@ message StopTime { enum PickupType { REGULAR_PICKUP = 0; NO_PICKUP = 1; - MUST_PHONE_AGENCY = 2; - MUST_ASK_DRIVER = 3; + MUST_PHONE_AGENCY_PICKUP = 2; + MUST_ASK_DRIVER_PICK_UP = 3; } // Valid options for drop_off_type: @@ -897,8 +897,8 @@ message StopTime { enum DropOffType { REGULAR_DROP_OFF = 0; NO_DROP_OFF = 1; -// MUST_PHONE_AGENCY = 2; -// MUST_ASK_DRIVER = 3; + MUST_PHONE_AGENCY_DROP_OFF = 2; + MUST_ASK_DRIVER_DROP_OFF = 3; } } From e61dd559a49a609423f089a74f0148cb6c3eab75 Mon Sep 17 00:00:00 2001 From: Lionel N Date: Thu, 27 Feb 2020 09:47:41 -0500 Subject: [PATCH 15/28] update gtfs-realtime.proto file -- -add extra space after comment marks -delete "or empty" for fields that have a default value -change PICK_UP -> PICKUP --- gtfs-realtime/proto/gtfs-realtime.proto | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 595488684..1951160ef 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -762,7 +762,7 @@ message VehicleProperties { optional BikesAllowedStatus biked_allowed = 2 [default = UNKNOWN_BIKES_ALLOWANCE]; // Options for wheelchair_accessible: - // 0 or empty - No accessibility information for the trip. + // 0 - No accessibility information for the trip. // 1 - Vehicle being used on this particular trip can accommodate at least one rider in a wheelchair. // 2 - No riders in wheelchairs can be accommodated on this trip. enum WheelchairAccessibleStatus { @@ -772,9 +772,9 @@ message VehicleProperties { } // Options for biked_allowed: - //0 or empty - No bike information for the trip. - //1 - Vehicle being used on this particular trip can accommodate at least one bicycle. - //2 - No bicycles are allowed on this trip. + // 0 - No bike information for the trip. + // 1 - Vehicle being used on this particular trip can accommodate at least one bicycle. + // 2 - No bicycles are allowed on this trip. enum BikesAllowedStatus { UNKNOWN_BIKES_ALLOWANCE = 0; BIKES_ALLOWED = 1; @@ -838,7 +838,7 @@ message Trip { repeated string replaces_trip_id = 10; // Options for wheelchair_accessible: - // 0 or empty - No accessibility information for the trip. + // 0 - No accessibility information for the trip. // 1 - Vehicle being used on this particular trip can accommodate at least one rider in a wheelchair. // 2 - No riders in wheelchairs can be accommodated on this trip. enum WheelchairAccessibleStatus { @@ -848,7 +848,7 @@ message Trip { } // Options for biked_allowed: - // 0 or empty - No bike information for the trip. + // 0 - No bike information for the trip. // 1 - Vehicle being used on this particular trip can accommodate at least one bicycle. // 2 - No bicycles are allowed on this trip. enum BikesAllowedStatus { @@ -878,7 +878,7 @@ message StopTime { optional float shape_dist_traveled = 8; // Valid options for pickup_type: - // 0 or empty - Regularly scheduled pickup. + // 0 - Regularly scheduled pickup. // 1 - No pickup available. // 2 - Must phone agency to arrange pickup. // 3 - Must coordinate with driver to arrange pickup. @@ -886,11 +886,11 @@ message StopTime { REGULAR_PICKUP = 0; NO_PICKUP = 1; MUST_PHONE_AGENCY_PICKUP = 2; - MUST_ASK_DRIVER_PICK_UP = 3; + MUST_ASK_DRIVER_PICKUP = 3; } // Valid options for drop_off_type: - // 0 or empty - Regularly scheduled drop off. + // 0 - Regularly scheduled drop off. // 1 - No drop off available. // 2 - Must phone agency to arrange drop off. // 3 - Must coordinate with driver to arrange drop off. @@ -907,7 +907,7 @@ message Shape { // Identifier of the shape. Must be different than any shape_id defined in the GTFS. required string shape_id = 1; // Points in the shape. A shape must contain at least two shape points. The shape points order in this field defines their order in the shape. - required ShapePoint shape_point = 2; + repeated ShapePoint shape_point = 2; } // Defines the geographical representation of a point in a shape. From 1b45797f471229b58b4edb7e0f307ca8cbcfff31 Mon Sep 17 00:00:00 2001 From: Lionel N Date: Thu, 27 Feb 2020 10:28:46 -0500 Subject: [PATCH 16/28] update gtfs-realtime.proto file -- -change "required" to "optional" for fields that are conditionally required in the spec, due to the wat PBs treat required fields -delete extra whitespace -change arrival_time and departure_time types to strings -details in comment the format of arrival_time and departure_time for message StopTime -change Trip.direction_id to unint32 to keep consistency regarding TripDescriptor --- gtfs-realtime/proto/gtfs-realtime.proto | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 1951160ef..27db9cce1 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -305,8 +305,6 @@ message TripUpdate { optional TripProperties trip_properties = 6; optional VehicleProperties vehicle_properties = 7; - - // The extensions namespace allows 3rd-party developers to extend the // GTFS Realtime Specification in order to add and evaluate new features and // modifications to the spec. @@ -736,11 +734,11 @@ message TranslatedString { // Provides the updated properties for the trip. message TripProperties { // Identifies a trip. - required string trip_id = 1; + optional string trip_id = 1; // Dates on which the trip will be run in YYYYMMDD format. - required string start_date = 2; + optional string start_date = 2; // Departure start time of the trip when it’s duplicated. - required string start_time = 3; + optional string start_time = 3; // Refers to a route defined in the GTFS. optional string route_id = 4; // Text that appears on signage identifying the trip's destination to riders. @@ -821,11 +819,11 @@ message Trip { // Identifies a route. optional string route_id = 2; // Text that appears on signage identifying the trip's destination to riders. - required TranslatedString trip_headsign = 3 ; + required TranslatedString trip_headsign = 3; // Public facing text used to identify the trip to riders, for instance, to identify train numbers for commuter rail trip required string trip_short_name = 4; // Indicates the direction of travel for a trip. - optional int64 direction_id = 5; + optional uint32 direction_id = 5; // Identifies the block to which the trip belongs. optional string block_id = 6; // Identifies a geospatial shape describing the vehicle travel path for a trip. @@ -863,9 +861,11 @@ message StopTime { // Order of stops for a particular trip. The values must increase along the trip but do not need to be consecutive. required uint32 stop_sequence = 1; // Arrival time at a specific stop for a specific trip on a route. - required uint64 arrival_time = 2; + // This field must be in the format of HH:MM:SS. + required string arrival_time = 2; // Departure time at a specific stop for a specific trip on a route. - required uint64 departure_time = 3; + // This field must be in the format of HH:MM:SS. + required string departure_time = 3; // Identifies the serviced stop. required string stop_id = 4; // Text that appears on signage identifying the trip's destination to riders. From a3d59e5da7683cf7fc4dbd69f309b37d083ced65 Mon Sep 17 00:00:00 2001 From: Lionel N Date: Tue, 24 Mar 2020 09:05:01 -0400 Subject: [PATCH 17/28] update gtfs-realtime.proto file -- add StopTime -add optional message stopTime to FeedEntity to ensure compliance with the proposal See https://docs.google.com/document/d/1oPfQ6Xvui0g3xiy1pNiyu5cWFLhvrTVyvYsMVKGyGWM/edit#heading=h.mm6bblup6h8d --- gtfs-realtime/proto/gtfs-realtime.proto | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 27db9cce1..0bc4944fb 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -107,6 +107,8 @@ message FeedEntity { optional Shape shape = 7; optional Route route = 8; optional Stop stop = 9; + optional StopTime stopTime = 10; + // The extensions namespace allows 3rd-party developers to extend the // GTFS Realtime Specification in order to add and evaluate new features and // modifications to the spec. From 536a9932a6825f30c22ae8d4216eca1a1b09ca75 Mon Sep 17 00:00:00 2001 From: Sean Barbeau Date: Mon, 30 Mar 2020 10:13:01 -0400 Subject: [PATCH 18/28] Change from camelCase to snake case --- gtfs-realtime/proto/gtfs-realtime.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 0bc4944fb..7468a86fa 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -107,7 +107,7 @@ message FeedEntity { optional Shape shape = 7; optional Route route = 8; optional Stop stop = 9; - optional StopTime stopTime = 10; + optional StopTime stop_time = 10; // The extensions namespace allows 3rd-party developers to extend the // GTFS Realtime Specification in order to add and evaluate new features and @@ -1002,4 +1002,4 @@ message Stop { WHEELCHAIR_ACCESSIBLE = 1; NOT_WHEELCHAIR_ACCESSIBLE = 2; } -} \ No newline at end of file +} From 6419c8e9949a23c95ee33ce3b15e52a8bfa5271b Mon Sep 17 00:00:00 2001 From: Sean Barbeau Date: Mon, 30 Mar 2020 13:00:54 -0400 Subject: [PATCH 19/28] Add shape point sequence ID See https://docs.google.com/document/d/1oPfQ6Xvui0g3xiy1pNiyu5cWFLhvrTVyvYsMVKGyGWM/edit?pli=1&disco=AAAAGWvNesY --- gtfs-realtime/proto/gtfs-realtime.proto | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 7468a86fa..a41a5142c 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -920,6 +920,8 @@ message ShapePoint { required float shape_pt_lon = 2; // Actual distance traveled along the shape from the first shape point to the point specified in this record. optional float shape_dist_traveled = 3; + // Sequence in which the shape points connect to form the shape. Values must increase along the trip but do not need to be consecutive. + required uint32 shape_pt_sequence = 4; } // Describes new routes. A route is a group of trips that are displayed to riders as a single service. From e2d483af9cb8ed7752061f37a2286c2bbd29e232 Mon Sep 17 00:00:00 2001 From: Sean Barbeau Date: Mon, 30 Mar 2020 16:58:25 -0400 Subject: [PATCH 20/28] Move StopTime to repeated entity within Trip See https://github.com/MobilityData/transit/pull/47#discussion_r400486724 --- gtfs-realtime/proto/gtfs-realtime.proto | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index a41a5142c..e43b422da 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -107,7 +107,6 @@ message FeedEntity { optional Shape shape = 7; optional Route route = 8; optional Stop stop = 9; - optional StopTime stop_time = 10; // The extensions namespace allows 3rd-party developers to extend the // GTFS Realtime Specification in order to add and evaluate new features and @@ -836,6 +835,8 @@ message Trip { optional BikesAllowedStatus biked_allowed = 9 [default = UNKNOWN_BIKES_ALLOWANCE]; // Defines which trips are being replaced by this trip. repeated string replaces_trip_id = 10; + // The arrival and departure times for this trip. Entities must be ordered by stop_sequence. + repeated StopTime stop_time = 11; // Options for wheelchair_accessible: // 0 - No accessibility information for the trip. From 6e754839258cce905443d113befdf69ee083c8bb Mon Sep 17 00:00:00 2001 From: Lionel N Date: Fri, 3 Apr 2020 14:28:38 -0400 Subject: [PATCH 21/28] Add new values to RouteType enum See https://gtfs.org/reference/static#routestxt --- gtfs-realtime/proto/gtfs-realtime.proto | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index e43b422da..2e6ccf894 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -966,6 +966,8 @@ message Route { CABLE_CAR = 5; GONDOLA = 6; FUNICULAR = 7; + TROLLEY_BUS = 11; + MONORAIL = 12; } } From 4c2a43aa65dd7e25efffd9b60123a6444cec99af Mon Sep 17 00:00:00 2001 From: Lionel N Date: Fri, 3 Apr 2020 15:35:57 -0400 Subject: [PATCH 22/28] Add short descriptions to the comments above enum RouteType See https://gtfs.org/reference/static#routestxt --- gtfs-realtime/proto/gtfs-realtime.proto | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 2e6ccf894..94748ece3 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -957,6 +957,8 @@ message Route { // 5 - Cable car. Used for street-level cable cars where the cable runs beneath the car. // 6 - Gondola, Suspended cable car. Typically used for aerial cable cars where the car is suspended from the cable. // 7 - Funicular. Any rail system designed for steep inclines. + // 11 - TROLLEY_BUS. Electric buses that draw power from overhead wires using poles. + // 12 - MONORAIL. Railway in which the track consists of a single rail or a beam. enum RouteType { LIGHT_RAIL = 0; SUBWAY = 1; From e70f138193bc3f49808ae9646629d86dd4b9d906 Mon Sep 17 00:00:00 2001 From: Sean Barbeau Date: Wed, 8 Apr 2020 18:21:15 -0400 Subject: [PATCH 23/28] Remove stop_id - NewStops can't be referenced from TripUpdates --- gtfs-realtime/proto/gtfs-realtime.proto | 2 -- 1 file changed, 2 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 94748ece3..f708a32bf 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -793,8 +793,6 @@ message StopTimeProperties { optional DropOffType drop_off_type = 4 [default = REGULAR_DROP_OFF]; // Actual distance traveled along the associated shape, from the first stop to the stop specified in this record. optional float shape_dist_traveled = 5; - // Identifies the new serviced stop (defined in the RT-GTFS). - optional string stop_id = 6; // Valid options for pickup_type: enum PickupType { From b7e22c4471cbf08d0f2c1f6dcc5fac314c6d085a Mon Sep 17 00:00:00 2001 From: Sean Barbeau Date: Thu, 9 Apr 2020 10:47:33 -0400 Subject: [PATCH 24/28] Add Trip.start_date --- gtfs-realtime/proto/gtfs-realtime.proto | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index f708a32bf..dde2ac0ba 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -835,6 +835,8 @@ message Trip { repeated string replaces_trip_id = 10; // The arrival and departure times for this trip. Entities must be ordered by stop_sequence. repeated StopTime stop_time = 11; + // Date on which the trip will be run. Must be provided in YYYYMMDD format. + required string start_date = 12; // Options for wheelchair_accessible: // 0 - No accessibility information for the trip. From 3638d41953790161324d17a4cc1053dc3a108f67 Mon Sep 17 00:00:00 2001 From: Sean Barbeau Date: Thu, 9 Apr 2020 12:05:29 -0400 Subject: [PATCH 25/28] fix: "biked_allowed" -> "bikes_allowed" --- gtfs-realtime/proto/gtfs-realtime.proto | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index dde2ac0ba..f4fe8a4b2 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -758,7 +758,7 @@ message VehicleProperties { // Indicates wheelchair accessibility. optional WheelchairAccessibleStatus wheelchair_accessible = 1 [default = UNKNOWN_WHEELCHAIR_ACCESSIBILITY]; // Indicates whether bikes are allowed or not. - optional BikesAllowedStatus biked_allowed = 2 [default = UNKNOWN_BIKES_ALLOWANCE]; + optional BikesAllowedStatus bikes_allowed = 2 [default = UNKNOWN_BIKES_ALLOWANCE]; // Options for wheelchair_accessible: // 0 - No accessibility information for the trip. @@ -770,7 +770,7 @@ message VehicleProperties { NOT_WHEELCHAIR_ACCESSIBLE = 2; } - // Options for biked_allowed: + // Options for bikes_allowed: // 0 - No bike information for the trip. // 1 - Vehicle being used on this particular trip can accommodate at least one bicycle. // 2 - No bicycles are allowed on this trip. @@ -830,7 +830,7 @@ message Trip { // Indicates wheelchair accessibility. optional WheelchairAccessibleStatus wheelchair_accessible = 8 [default = UNKNOWN_WHEELCHAIR_ACCESSIBILITY]; // Indicates whether bikes are allowed or not. - optional BikesAllowedStatus biked_allowed = 9 [default = UNKNOWN_BIKES_ALLOWANCE]; + optional BikesAllowedStatus bikes_allowed = 9 [default = UNKNOWN_BIKES_ALLOWANCE]; // Defines which trips are being replaced by this trip. repeated string replaces_trip_id = 10; // The arrival and departure times for this trip. Entities must be ordered by stop_sequence. @@ -848,7 +848,7 @@ message Trip { NOT_WHEELCHAIR_ACCESSIBLE = 2; } - // Options for biked_allowed: + // Options for bikes_allowed: // 0 - No bike information for the trip. // 1 - Vehicle being used on this particular trip can accommodate at least one bicycle. // 2 - No bicycles are allowed on this trip. From 281af876749b98df834555496f18e2d3a0c3f062 Mon Sep 17 00:00:00 2001 From: Lionel N Date: Fri, 10 Apr 2020 15:23:41 -0400 Subject: [PATCH 26/28] Change enum values in enum RouteType to be consistent with declared enum RouteType in static GTFS dataset validator --- gtfs-realtime/proto/gtfs-realtime.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 94748ece3..f7742437d 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -965,8 +965,8 @@ message Route { RAIL = 2; BUS = 3; FERRY = 4; - CABLE_CAR = 5; - GONDOLA = 6; + CABLE_TRAM = 5; + AERIAL_LIFT = 6; FUNICULAR = 7; TROLLEY_BUS = 11; MONORAIL = 12; From e30983ff0dd68ed231a4920a836aa6f1d303a718 Mon Sep 17 00:00:00 2001 From: Sean Barbeau Date: Tue, 14 Apr 2020 16:20:43 -0400 Subject: [PATCH 27/28] Allow repeated start_date for new Trips This allows specifying a new trip (not in CSV GTFS) that can be repeated across multiple dates See https://github.com/MobilityData/transit/pull/47#discussion_r406298976 --- gtfs-realtime/proto/gtfs-realtime.proto | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 98af9da46..48a441f1f 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -736,7 +736,7 @@ message TranslatedString { message TripProperties { // Identifies a trip. optional string trip_id = 1; - // Dates on which the trip will be run in YYYYMMDD format. + // Service date on which the trip will be run in YYYYMMDD format. optional string start_date = 2; // Departure start time of the trip when it’s duplicated. optional string start_time = 3; @@ -835,8 +835,8 @@ message Trip { repeated string replaces_trip_id = 10; // The arrival and departure times for this trip. Entities must be ordered by stop_sequence. repeated StopTime stop_time = 11; - // Date on which the trip will be run. Must be provided in YYYYMMDD format. - required string start_date = 12; + // Service date(s) on which the trip will be run. Must be provided in YYYYMMDD format. + repeated string start_date = 12; // Options for wheelchair_accessible: // 0 - No accessibility information for the trip. From 9c5af291d182eac0fda360e128607ee04772df03 Mon Sep 17 00:00:00 2001 From: Sean Barbeau Date: Tue, 14 Apr 2020 16:42:02 -0400 Subject: [PATCH 28/28] Trip.replaces_trip_id -> TripUpdate.replaced_by_trip_id Make it easier to discover which trips replace a given scheduled trip which is CANCELED by moving the field to the trip that is canceled --- gtfs-realtime/proto/gtfs-realtime.proto | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/gtfs-realtime/proto/gtfs-realtime.proto b/gtfs-realtime/proto/gtfs-realtime.proto index 48a441f1f..f371024a4 100644 --- a/gtfs-realtime/proto/gtfs-realtime.proto +++ b/gtfs-realtime/proto/gtfs-realtime.proto @@ -305,6 +305,10 @@ message TripUpdate { optional int32 delay = 5; optional TripProperties trip_properties = 6; optional VehicleProperties vehicle_properties = 7; + // Defines which trip_ids (defined via GTFS-NewTrips) are replacing this trip. + // This is for information only and doesn’t cancel the original trip. If this + // field is populated, schedule_relationship for this trip must be CANCELED. + repeated string replaced_by_trip_id = 8; // The extensions namespace allows 3rd-party developers to extend the // GTFS Realtime Specification in order to add and evaluate new features and @@ -831,12 +835,10 @@ message Trip { optional WheelchairAccessibleStatus wheelchair_accessible = 8 [default = UNKNOWN_WHEELCHAIR_ACCESSIBILITY]; // Indicates whether bikes are allowed or not. optional BikesAllowedStatus bikes_allowed = 9 [default = UNKNOWN_BIKES_ALLOWANCE]; - // Defines which trips are being replaced by this trip. - repeated string replaces_trip_id = 10; // The arrival and departure times for this trip. Entities must be ordered by stop_sequence. - repeated StopTime stop_time = 11; + repeated StopTime stop_time = 10; // Service date(s) on which the trip will be run. Must be provided in YYYYMMDD format. - repeated string start_date = 12; + repeated string start_date = 11; // Options for wheelchair_accessible: // 0 - No accessibility information for the trip.