From acd71b6f82b85f1c0d7b208d77c23d9507137063 Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Mon, 12 Feb 2024 17:15:28 -0500
Subject: [PATCH 01/14] Add 3 "location" files and booking rules file
---
gtfs/spec/en/reference.md | 84 +++++++++++++++++++++++++++++++++++++++
1 file changed, 84 insertions(+)
diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md
index 9571e46b..12f0913e 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -34,6 +34,10 @@ This document defines the format and structure of the files that comprise a GTFS
- [transfers.txt](#transferstxt)
- [pathways.txt](#pathwaystxt)
- [levels.txt](#levelstxt)
+ - [location_groups.txt](#location_groupstxt)
+ - [location_group_stops.txt](#location_group_stopstxt)
+ - [locations.geojson](#locationsgeojson)
+ - [booking_rules.txt](#booking_rulestxt)
- [translations.txt](#translationstxt)
- [feed\_info.txt](#feed_infotxt)
- [attributions.txt](#attributionstxt)
@@ -129,6 +133,10 @@ This specification defines the following files:
| [transfers.txt](#transferstxt) | Optional | Rules for making connections at transfer points between routes. |
| [pathways.txt](#pathwaystxt) | Optional | Pathways linking together locations within stations. |
| [levels.txt](#levelstxt) | **Conditionally Required** | Levels within stations.
Conditionally Required:
- **Required** when describing pathways with elevators (`pathway_mode=5`).
- Optional otherwise. |
+| [location_groups.txt](#location_groupstxt) | Optional | A group of stops that together indicate locations where a rider may request pickup or drop off. |
+| [location_group_stops.txt](#location_group_stopstxt) | Optional | Rules to assign stops to location groups. |
+| [locations.geojson](#locationsgeojson) | Optional | Zones for rider pickup or drop-off requests by on-demand services, represented as GeoJSON polygons. |
+| [booking_rules.txt](#booking_rulestxt) | Optional | Booking information for rider-requested services. |
| [translations.txt](#translationstxt) | Optional | Translations of customer-facing dataset values. |
| [feed_info.txt](#feed_infotxt) | Optional | Dataset metadata, including publisher, version, and expiration information. |
| [attributions.txt](#attributionstxt) | Optional | Dataset attributions. |
@@ -687,6 +695,82 @@ Describes levels in a station. Useful in conjunction with [pathways.txt](#pathwa
| `level_index` | Float | **Required** | Numeric index of the level that indicates its relative position.
Ground level should have index `0`, with levels above ground indicated by positive indices and levels below ground by negative indices.|
| `level_name` | Text | Optional | Name of the level as seen by the rider inside the building or station.
_Example: Take the elevator to "Mezzanine" or "Platform" or "-1"._|
+### location_groups.txt
+
+File: **Optional**
+
+Primary key (`location_group_id`)
+
+Defines location groups, which are groups of stops where a rider may request pickup or drop off.
+
+| Field Name | Type | Required | Description |
+| ---------- | ---- | ------------ | ----------- |
+| `location_group_id` | Unique ID | **Required** | Identifies a location group. ID must be unique across all `stops.stop_id`, locations.geojson `id`, and `location_groups.location_group_id` values.
A location group is a group of stops that together indicate locations where a rider may request pickup or drop off. |
+| `location_group_name` | Text | Optional | The name of the location group as displayed to the rider. |
+
+### location_group_stops.txt
+
+File: **Optional**
+
+Primary key (`*`)
+
+Assigns stops from stops.txt to location groups.
+
+| Field Name | Type | Required | Description |
+| ---------- | ---- | ------------ | ----------- |
+| `location_group_id` | Foreign ID referencing `location_groups.location_group_id` | **Required** | Identifies a location group to which one or multiple `stop_id`s belong. The same `stop_id` may be defined in many `location_group_id`s. |
+| `stop_id` | Foreign ID referencing `stops.stop_id` | **Required** | Identifies a stop belonging to the location group. |
+
+
+### locations.geojson
+
+File: **Optional**
+
+Defines zones where riders can request either pickup or drop off by on-demand services. These zones are represented as GeoJSON polygons.
+- This file uses a subset of the GeoJSON format, described in [RFC 7946](https://tools.ietf.org/html/rfc7946).
+- The `locations.geojson` file must contain a `FeatureCollection`.
+- A `FeatureCollection` defines various stop locations where riders may request pickup or drop off.
+- Every GeoJSON `Feature` must have an `id`. The `id` must be unique across all `stops.stop_id`, locations.geojson `id`, and `location_group_id` values.
+- Every GeoJSON `Feature` should have objects and associated keys according to the table below:
+
+| Field Name | Type | Presence | Description |
+| ------ | ------ | ------ | ------ |
+| - `type` | String | **Required** | `"FeatureCollection"` of locations. |
+| - `features` | Array | **Required** | Collection of `"Feature"` objects describing the locations. |
+| \- `type` | String | **Required** | `"Feature"` |
+| \- `id` | String | **Required** | Identifies a location. ID must be unique across all `stops.stop_id`, locations.geojson `id`, and `location_groups.location_group_id` values. |
+| \- `properties` | Object | **Required** | Location property keys. |
+| \- `stop_name` | String | Optional | Indicates the name of the location as displayed to riders. |
+| \- `stop_desc` | String | Optional | Meaningful description of the location to help orient riders. |
+| \- `geometry` | Object | **Required** | Geometry of the location. |
+| \- `type` | String | **Required** | Must be of type:
- `"Polygon"`
- `"MultiPolygon"` |
+| \- `coordinates` | Array | **Required** | Geographic coordinates (latitude and longitude) defining the geometry of the location. |
+
+### booking_rules.txt
+
+File: **Optional**
+
+Primary key (`booking_rule_id`)
+
+Defines the booking rules for rider-requested services
+
+| Field Name | Type | Presence | Description |
+| ------ | ------ | ------ | ------ |
+| `booking_rule_id` | ID | **Required** | Identifies the rule. |
+| `booking_type` | Enum | **Required** | Indicates how far in advance booking can be made. Valid options are:
`0` - Real time booking.
`1` - Up to same-day booking with advance notice.
`2` - Up to prior day(s) booking. |
+| `prior_notice_duration_min` | Integer | **Conditionally Required** | Minimum number of minutes before travel to make the request.
**Conditionally Required**:
- **Required** for `booking_type=1`.
- **Forbidden** otherwise. |
+| `prior_notice_duration_max` | Integer | **Conditionally Forbidden** | Maximum number of minutes before travel to make the booking request.
**Conditionally Forbidden**:
- **Forbidden** for `booking_type=0` and `booking_type=2`.
- Optional for `booking_type=1`.|
+| `prior_notice_last_day` | Integer | **Conditionally Required** | Last day before travel to make the booking request.
Example: “Ride must be booked 1 day in advance before 5PM” will be encoded as `prior_notice_last_day=1`.
**Conditionally Required**:
- **Required** for `booking_type=2`.
- **Forbidden** otherwise. |
+| `prior_notice_last_time` | Time | **Conditionally Required** | Last time on the last day before travel to make the booking request.
Example: “Ride must be booked 1 day in advance before 5PM” will be encoded as `prior_notice_last_time=17:00:00`.
**Conditionally Required**:
- **Required** if `prior_notice_last_day` is defined.
- **Forbidden** otherwise. |
+| `prior_notice_start_day` | Integer | **Conditionally Forbidden** | Earliest day before travel to make the booking request.
Example: “Ride can be booked at the earliest one week in advance at midnight” will be encoded as `prior_notice_start_day=7`.
**Conditionally Forbidden**:
- **Forbidden** for `booking_type=0`.
- **Forbidden** for `booking_type=1` if `prior_notice_duration_max` is defined.
- Optional otherwise. |
+| `prior_notice_start_time` | Time | **Conditionally Required** | Earliest time on the earliest day before travel to make the booking request.
Example: “Ride can be booked at the earliest one week in advance at midnight” will be encoded as `prior_notice_start_time=00:00:00`.
**Conditionally Required**:
- **Required** if `prior_notice_start_day` is defined.
- **Forbidden** otherwise. |
+| `prior_notice_service_id` | ID referencing `calendar.service_id` | **Conditionally Forbidden** | Indicates the service days on which `prior_notice_last_day` or `prior_notice_start_day` are counted.
Example: If empty, `prior_notice_start_day=2` will be two calendar days in advance. If defined as a `service_id` containing only business days (weekdays without holidays), `prior_notice_start_day=2` will be two business days in advance.
**Conditionally Forbidden**:
- Optional if `booking_type=2`.
- **Forbidden** otherwise. |
+| `message` | Text | Optional | Message to riders utilizing service at a `stop_time` when booking on-demand pickup and drop off. Meant to provide minimal information to be transmitted within a user interface about the action a rider must take in order to utilize the service. |
+| `pickup_message` | Text | Optional | Functions in the same way as `message` but used when riders have on-demand pickup only. |
+| `drop_off_message` | Text | Optional | Functions in the same way as `message` but used when riders have on-demand drop off only. |
+| `phone_number` | Phone number | Optional | Phone number to call to make the booking request. |
+| `info_url` | URL | Optional | URL providing information about the booking rule. |
+| `booking_url` | URL | Optional | URL to an online interface or app where the booking request can be made. |
### translations.txt
From 99fe88c1f97293a28e7b48e3ffd9b79934756984 Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Mon, 12 Feb 2024 17:21:35 -0500
Subject: [PATCH 02/14] Modify stops.stop_id
---
gtfs/spec/en/reference.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md
index 12f0913e..1b9a8b82 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -200,7 +200,7 @@ Primary key (`stop_id`)
| Field Name | Type | Presence | Description |
| ------ | ------ | ------ | ------ |
-| `stop_id` | Unique ID | **Required** | Identifies a location: stop/platform, station, entrance/exit, generic node or boarding area (see `location_type`).
Multiple routes may use the same `stop_id`. |
+| `stop_id` | Unique ID | **Required** | Identifies a location: stop/platform, station, entrance/exit, generic node or boarding area (see `location_type`).
ID must be unique across all `stops.stop_id`, locations.geojson `id`, and `location_groups.location_group_id` values.
Multiple routes may use the same `stop_id`. |
| `stop_code` | Text | Optional | 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. The `stop_code` may be the same as `stop_id` if it is public facing. This field should be left empty for locations without a code presented to riders. |
| `stop_name` | Text | **Conditionally Required** | Name of the location. The `stop_name` should match the agency's rider-facing name for the location as printed on a timetable, published online, or represented on signage. For translations into other languages, use [translations.txt](#translationstxt).
When the location is a boarding area (`location_type=4`), the `stop_name` should contains the name of the boarding area as displayed by the agency. It could be just one letter (like on some European intercity railway stations), or text like “Wheelchair boarding area” (NYC’s Subway) or “Head of short trains” (Paris’ RER).
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`).|
| `tts_stop_name` | Text | Optional | Readable version of the `stop_name`. See "Text-to-speech field" in the [Term Definitions](#term-definitions) for more. |
From 45e23b26d5dc832d9009319a05728dcda948a987 Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Tue, 13 Feb 2024 12:32:09 -0500
Subject: [PATCH 03/14] Modify routes.continuous_pickup/drop_off
---
gtfs/spec/en/reference.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md
index 1b9a8b82..666fa9ba 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -235,8 +235,8 @@ Primary key (`route_id`)
| `route_color` | Color | Optional | Route color designation that matches public facing material. Defaults to white (`FFFFFF`) when omitted or left empty. The color difference between `route_color` and `route_text_color` should provide sufficient contrast when viewed on a black and white screen. |
| `route_text_color` | Color | Optional | Legible color to use for text drawn against a background of `route_color`. Defaults to black (`000000`) when omitted or left empty. The color difference between `route_color` and `route_text_color` should provide sufficient contrast when viewed on a black and white screen. |
| `route_sort_order` | Non-negative integer | Optional | Orders the routes in a way which is ideal for presentation to customers. Routes with smaller `route_sort_order` values should be displayed first. |
-| `continuous_pickup` | Enum | Optional | Indicates that the rider can board the transit vehicle at any point along the vehicle’s travel path as described by [shapes.txt](#shapestxt), on every trip of the route. Valid options are:
`0` - Continuous stopping pickup.
`1` or empty - No continuous stopping pickup.
`2` - Must phone agency to arrange continuous stopping pickup.
`3` - Must coordinate with driver to arrange continuous stopping pickup.
Values for `routes.continuous_pickup` may be overridden by defining values in `stop_times.continuous_pickup` for specific `stop_time`s along the route. |
-| `continuous_drop_off` | Enum | Optional | Indicates that the rider can alight from the transit vehicle at any point along the vehicle’s travel path as described by [shapes.txt](#shapestxt), on every trip of the route. Valid options are:
`0` - Continuous stopping drop off.
`1` or empty - No continuous stopping drop off.
`2` - Must phone agency to arrange continuous stopping drop off.
`3` - Must coordinate with driver to arrange continuous stopping drop off.
Values for `routes.continuous_drop_off` may be overridden by defining values in `stop_times.continuous_drop_off` for specific `stop_time`s along the route. |
+| `continuous_pickup` | Enum | **Conditionally Forbidden** | Indicates that the rider can board the transit vehicle at any point along the vehicle’s travel path as described by [shapes.txt](#shapestxt), on every trip of the route. Valid options are:
`0` - Continuous stopping pickup.
`1` or empty - No continuous stopping pickup.
`2` - Must phone agency to arrange continuous stopping pickup.
`3` - Must coordinate with driver to arrange continuous stopping pickup.
Values for `routes.continuous_pickup` may be overridden by defining values in `stop_times.continuous_pickup` for specific `stop_time`s along the route.
**Conditionally Forbidden**:
- **Forbidden** if `stop_times.start_pickup_drop_off_window` or `stop_times.end_pickup_drop_off_window` are defined for any trip of this route.
- Optional otherwise. |
+| `continuous_drop_off` | Enum | **Conditionally Forbidden** | Indicates that the rider can alight from the transit vehicle at any point along the vehicle’s travel path as described by [shapes.txt](#shapestxt), on every trip of the route. Valid options are:
`0` - Continuous stopping drop off.
`1` or empty - No continuous stopping drop off.
`2` - Must phone agency to arrange continuous stopping drop off.
`3` - Must coordinate with driver to arrange continuous stopping drop off.
Values for `routes.continuous_drop_off` may be overridden by defining values in `stop_times.continuous_drop_off` for specific `stop_time`s along the route.
**Conditionally Forbidden**:
- **Forbidden** if `stop_times.start_pickup_drop_off_window` or `stop_times.end_pickup_drop_off_window` are defined for any trip of this route.
- Optional otherwise. |
| `network_id` | ID | **Conditionally Forbidden** | Identifies a group of routes. Multiple rows in [routes.txt](#routestxt) may have the same `network_id`.
Conditionally Forbidden:
- **Forbidden** if the [route_networks.txt](#route_networkstxt) file exists.
- Optional otherwise.
### trips.txt
From a0047918eee0cc12fff2163e9972508d848adaf9 Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Tue, 13 Feb 2024 12:43:32 -0500
Subject: [PATCH 04/14] Modify stop_times.arrival/departure_time
---
gtfs/spec/en/reference.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md
index 666fa9ba..805767b2 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -284,8 +284,8 @@ Primary key (`trip_id`, `stop_sequence`)
| Field Name | Type | Presence | Description |
| ------ | ------ | ------ | ------ |
| `trip_id` | Foreign ID referencing `trips.trip_id` | **Required** | Identifies a trip. |
-| `arrival_time` | Time | **Conditionally Required** | Arrival time at the stop (defined by `stop_times.stop_id`) for a specific trip (defined by `stop_times.trip_id`) in the time zone specified by `agency.agency_timezone`, not `stops.stop_timezone`.
If there are not separate times for arrival and departure at a stop, `arrival_time` and `departure_time` should be the same.
For times occurring after midnight on the service day, enter the time as a value greater than 24:00:00 in HH:MM:SS.
If exact arrival and departure times (`timepoint=1` or empty) are not available, estimated or interpolated arrival and departure times (`timepoint=0`) should be provided.
Conditionally Required:
- **Required** for the first and last stop in a trip (defined by `stop_times.stop_sequence`).
- **Required** for `timepoint=1`.
- Optional otherwise.|
-| `departure_time` | Time | **Conditionally Required** | Departure time from the stop (defined by `stop_times.stop_id`) for a specific trip (defined by `stop_times.trip_id`) in the time zone specified by `agency.agency_timezone`, not `stops.stop_timezone`.
If there are not separate times for arrival and departure at a stop, `arrival_time` and `departure_time` should be the same.
For times occurring after midnight on the service day, enter the time as a value greater than 24:00:00 in HH:MM:SS.
If exact arrival and departure times (`timepoint=1` or empty) are not available, estimated or interpolated arrival and departure times (`timepoint=0`) should be provided.
Conditionally Required:
- **Required** for `timepoint=1`.
- Optional otherwise.| |
+| `arrival_time` | Time | **Conditionally Required** | Arrival time at the stop (defined by `stop_times.stop_id`) for a specific trip (defined by `stop_times.trip_id`) in the time zone specified by `agency.agency_timezone`, not `stops.stop_timezone`.
If there are not separate times for arrival and departure at a stop, `arrival_time` and `departure_time` should be the same.
For times occurring after midnight on the service day, enter the time as a value greater than 24:00:00 in HH:MM:SS.
If exact arrival and departure times (`timepoint=1` or empty) are not available, estimated or interpolated arrival and departure times (`timepoint=0`) should be provided.
Conditionally Required:
- **Required** for the first and last stop in a trip (defined by `stop_times.stop_sequence`).
- **Required** for `timepoint=1`.
- **Forbidden** when `stop_times.start_pickup_drop_off_window` or `stop_times.end_pickup_drop_off_window` are defined.
- Optional otherwise.|
+| `departure_time` | Time | **Conditionally Required** | Departure time from the stop (defined by `stop_times.stop_id`) for a specific trip (defined by `stop_times.trip_id`) in the time zone specified by `agency.agency_timezone`, not `stops.stop_timezone`.
If there are not separate times for arrival and departure at a stop, `arrival_time` and `departure_time` should be the same.
For times occurring after midnight on the service day, enter the time as a value greater than 24:00:00 in HH:MM:SS.
If exact arrival and departure times (`timepoint=1` or empty) are not available, estimated or interpolated arrival and departure times (`timepoint=0`) should be provided.
Conditionally Required:
- **Required** for `timepoint=1`.
- **Forbidden** when `stop_times.start_pickup_drop_off_window` or `stop_times.end_pickup_drop_off_window` are defined.
- Optional otherwise.| |
| `stop_id` | Foreign ID referencing `stops.stop_id` | **Required** | Identifies the serviced stop. All stops serviced during a trip must have a record in [stop_times.txt](#stop_timestxt). Referenced locations must be stops/platforms, i.e. their `stops.location_type` value must be `0` or empty. A stop may be serviced multiple times in the same trip, and multiple trips and routes may service the same stop. |
| `stop_sequence` | Non-negative integer | **Required** | Order of stops for a particular trip. The values must increase along the trip but do not need to be consecutive.
*Example: The first location on the trip could have a `stop_sequence`=`1`, the second location on the trip could have a `stop_sequence`=`23`, the third location could have a `stop_sequence`=`40`, and so on.* |
| `stop_headsign` | Text | Optional | Text that appears on signage identifying the trip's destination to riders. This field overrides the default `trips.trip_headsign` when the headsign changes between stops. If the headsign is displayed for an entire trip, `trips.trip_headsign` should be used instead.
A `stop_headsign` value specified for one `stop_time` does not apply to subsequent `stop_time`s in the same trip. If you want to override the `trip_headsign` for multiple `stop_time`s in the same trip, the `stop_headsign` value must be repeated in each `stop_time` row. |
From 1a4eaf469874f25ecedb063da1038909d9417a7e Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Tue, 13 Feb 2024 13:01:26 -0500
Subject: [PATCH 05/14] Modify stop_times.stop_id
---
gtfs/spec/en/reference.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md
index 805767b2..33ad95f5 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -286,7 +286,7 @@ Primary key (`trip_id`, `stop_sequence`)
| `trip_id` | Foreign ID referencing `trips.trip_id` | **Required** | Identifies a trip. |
| `arrival_time` | Time | **Conditionally Required** | Arrival time at the stop (defined by `stop_times.stop_id`) for a specific trip (defined by `stop_times.trip_id`) in the time zone specified by `agency.agency_timezone`, not `stops.stop_timezone`.
If there are not separate times for arrival and departure at a stop, `arrival_time` and `departure_time` should be the same.
For times occurring after midnight on the service day, enter the time as a value greater than 24:00:00 in HH:MM:SS.
If exact arrival and departure times (`timepoint=1` or empty) are not available, estimated or interpolated arrival and departure times (`timepoint=0`) should be provided.
Conditionally Required:
- **Required** for the first and last stop in a trip (defined by `stop_times.stop_sequence`).
- **Required** for `timepoint=1`.
- **Forbidden** when `stop_times.start_pickup_drop_off_window` or `stop_times.end_pickup_drop_off_window` are defined.
- Optional otherwise.|
| `departure_time` | Time | **Conditionally Required** | Departure time from the stop (defined by `stop_times.stop_id`) for a specific trip (defined by `stop_times.trip_id`) in the time zone specified by `agency.agency_timezone`, not `stops.stop_timezone`.
If there are not separate times for arrival and departure at a stop, `arrival_time` and `departure_time` should be the same.
For times occurring after midnight on the service day, enter the time as a value greater than 24:00:00 in HH:MM:SS.
If exact arrival and departure times (`timepoint=1` or empty) are not available, estimated or interpolated arrival and departure times (`timepoint=0`) should be provided.
Conditionally Required:
- **Required** for `timepoint=1`.
- **Forbidden** when `stop_times.start_pickup_drop_off_window` or `stop_times.end_pickup_drop_off_window` are defined.
- Optional otherwise.| |
-| `stop_id` | Foreign ID referencing `stops.stop_id` | **Required** | Identifies the serviced stop. All stops serviced during a trip must have a record in [stop_times.txt](#stop_timestxt). Referenced locations must be stops/platforms, i.e. their `stops.location_type` value must be `0` or empty. A stop may be serviced multiple times in the same trip, and multiple trips and routes may service the same stop. |
+| `stop_id` | Foreign ID referencing `stops.stop_id` | **Conditionally Required** | Identifies the serviced stop. All stops serviced during a trip must have a record in [stop_times.txt](#stop_timestxt). Referenced locations must be stops/platforms, i.e. their `stops.location_type` value must be `0` or empty. A stop may be serviced multiple times in the same trip, and multiple trips and routes may service the same stop.
On-demand service using stops should be referenced in the sequence in which service is available at those stops. A data consumer should assume that travel is possible from one stop or location to any stop or location later in the trip, provided that the `pickup/drop_off_type` of each stop_time and the time constraints of each `start/end_pickup_drop_off_window` do not forbid it.
Conditionally Required:
- **Required** if `stop_times.location_group_id` AND `stop_times.location_id` are NOT defined.
- **Forbidden** if `stop_times.location_group_id` or `stop_times.location_id` are defined. |
| `stop_sequence` | Non-negative integer | **Required** | Order of stops for a particular trip. The values must increase along the trip but do not need to be consecutive.
*Example: The first location on the trip could have a `stop_sequence`=`1`, the second location on the trip could have a `stop_sequence`=`23`, the third location could have a `stop_sequence`=`40`, and so on.* |
| `stop_headsign` | Text | Optional | Text that appears on signage identifying the trip's destination to riders. This field overrides the default `trips.trip_headsign` when the headsign changes between stops. If the headsign is displayed for an entire trip, `trips.trip_headsign` should be used instead.
A `stop_headsign` value specified for one `stop_time` does not apply to subsequent `stop_time`s in the same trip. If you want to override the `trip_headsign` for multiple `stop_time`s in the same trip, the `stop_headsign` value must be repeated in each `stop_time` row. |
| `pickup_type` | Enum | Optional | Indicates pickup method. Valid options are:
`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. |
From 0253938481204b66f94ec0daf844d957b1d09e1d Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Tue, 13 Feb 2024 13:11:41 -0500
Subject: [PATCH 06/14] Add stop_times.location_group_id & location_id
---
gtfs/spec/en/reference.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md
index 33ad95f5..19a1cb67 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -287,6 +287,8 @@ Primary key (`trip_id`, `stop_sequence`)
| `arrival_time` | Time | **Conditionally Required** | Arrival time at the stop (defined by `stop_times.stop_id`) for a specific trip (defined by `stop_times.trip_id`) in the time zone specified by `agency.agency_timezone`, not `stops.stop_timezone`.
If there are not separate times for arrival and departure at a stop, `arrival_time` and `departure_time` should be the same.
For times occurring after midnight on the service day, enter the time as a value greater than 24:00:00 in HH:MM:SS.
If exact arrival and departure times (`timepoint=1` or empty) are not available, estimated or interpolated arrival and departure times (`timepoint=0`) should be provided.
Conditionally Required:
- **Required** for the first and last stop in a trip (defined by `stop_times.stop_sequence`).
- **Required** for `timepoint=1`.
- **Forbidden** when `stop_times.start_pickup_drop_off_window` or `stop_times.end_pickup_drop_off_window` are defined.
- Optional otherwise.|
| `departure_time` | Time | **Conditionally Required** | Departure time from the stop (defined by `stop_times.stop_id`) for a specific trip (defined by `stop_times.trip_id`) in the time zone specified by `agency.agency_timezone`, not `stops.stop_timezone`.
If there are not separate times for arrival and departure at a stop, `arrival_time` and `departure_time` should be the same.
For times occurring after midnight on the service day, enter the time as a value greater than 24:00:00 in HH:MM:SS.
If exact arrival and departure times (`timepoint=1` or empty) are not available, estimated or interpolated arrival and departure times (`timepoint=0`) should be provided.
Conditionally Required:
- **Required** for `timepoint=1`.
- **Forbidden** when `stop_times.start_pickup_drop_off_window` or `stop_times.end_pickup_drop_off_window` are defined.
- Optional otherwise.| |
| `stop_id` | Foreign ID referencing `stops.stop_id` | **Conditionally Required** | Identifies the serviced stop. All stops serviced during a trip must have a record in [stop_times.txt](#stop_timestxt). Referenced locations must be stops/platforms, i.e. their `stops.location_type` value must be `0` or empty. A stop may be serviced multiple times in the same trip, and multiple trips and routes may service the same stop.
On-demand service using stops should be referenced in the sequence in which service is available at those stops. A data consumer should assume that travel is possible from one stop or location to any stop or location later in the trip, provided that the `pickup/drop_off_type` of each stop_time and the time constraints of each `start/end_pickup_drop_off_window` do not forbid it.
Conditionally Required:
- **Required** if `stop_times.location_group_id` AND `stop_times.location_id` are NOT defined.
- **Forbidden** if `stop_times.location_group_id` or `stop_times.location_id` are defined. |
+| `location_group_id` | Foreign ID referencing `location_groups.location_group_id` | **Conditionally Forbidden** | Identifies the serviced location group that indicates groups of stops where riders may request pickup or drop off. All location groups serviced during a trip must have a record in [stop_times.txt](#stop_timestxt). Multiple trips and routes may service the same location group.
On-demand service using location groups should be referenced in the sequence in which service is available at those location groups. A data consumer should assume that travel is possible from one stop or location to any stop or location later in the trip, provided that the `pickup/drop_off_type` of each stop_time and the time constraints of each `start/end_pickup_drop_off_window` do not forbid it.
**Conditionally Forbidden**:
- **Forbidden** if `stop_times.stop_id` or `stop_times.location_id` are defined. |
+| `location_id` | Foreign ID referencing `id` from `locations.geojson` | **Conditionally Forbidden** | Identifies the GeoJSON location that corresponds to serviced zone where riders may request pickup or drop off. All GeoJSON locations serviced during a trip must have a record in [stop_times.txt](#stop_timestxt). Multiple trips and routes may service the same GeoJSON location.
On-demand service within locations should be referenced in the sequence in which service is available in those locations. A data consumer should assume that travel is possible from one stop or location to any stop or location later in the trip, provided that the `pickup/drop_off_type` of each stop_time and the time constraints of each `start/end_pickup_drop_off_window` do not forbid it.
**Conditionally Forbidden**:
- **Forbidden** if `stop_times.stop_id` or `stop_times.location_group_id` are defined. |
| `stop_sequence` | Non-negative integer | **Required** | Order of stops for a particular trip. The values must increase along the trip but do not need to be consecutive.
*Example: The first location on the trip could have a `stop_sequence`=`1`, the second location on the trip could have a `stop_sequence`=`23`, the third location could have a `stop_sequence`=`40`, and so on.* |
| `stop_headsign` | Text | Optional | Text that appears on signage identifying the trip's destination to riders. This field overrides the default `trips.trip_headsign` when the headsign changes between stops. If the headsign is displayed for an entire trip, `trips.trip_headsign` should be used instead.
A `stop_headsign` value specified for one `stop_time` does not apply to subsequent `stop_time`s in the same trip. If you want to override the `trip_headsign` for multiple `stop_time`s in the same trip, the `stop_headsign` value must be repeated in each `stop_time` row. |
| `pickup_type` | Enum | Optional | Indicates pickup method. Valid options are:
`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. |
From ad65b8873b02067e53b9449955af6dc014b25dc7 Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Tue, 13 Feb 2024 13:23:38 -0500
Subject: [PATCH 07/14] Modify stop_times.stop_sequence
---
gtfs/spec/en/reference.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md
index 19a1cb67..3acd346e 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -289,7 +289,7 @@ Primary key (`trip_id`, `stop_sequence`)
| `stop_id` | Foreign ID referencing `stops.stop_id` | **Conditionally Required** | Identifies the serviced stop. All stops serviced during a trip must have a record in [stop_times.txt](#stop_timestxt). Referenced locations must be stops/platforms, i.e. their `stops.location_type` value must be `0` or empty. A stop may be serviced multiple times in the same trip, and multiple trips and routes may service the same stop.
On-demand service using stops should be referenced in the sequence in which service is available at those stops. A data consumer should assume that travel is possible from one stop or location to any stop or location later in the trip, provided that the `pickup/drop_off_type` of each stop_time and the time constraints of each `start/end_pickup_drop_off_window` do not forbid it.
Conditionally Required:
- **Required** if `stop_times.location_group_id` AND `stop_times.location_id` are NOT defined.
- **Forbidden** if `stop_times.location_group_id` or `stop_times.location_id` are defined. |
| `location_group_id` | Foreign ID referencing `location_groups.location_group_id` | **Conditionally Forbidden** | Identifies the serviced location group that indicates groups of stops where riders may request pickup or drop off. All location groups serviced during a trip must have a record in [stop_times.txt](#stop_timestxt). Multiple trips and routes may service the same location group.
On-demand service using location groups should be referenced in the sequence in which service is available at those location groups. A data consumer should assume that travel is possible from one stop or location to any stop or location later in the trip, provided that the `pickup/drop_off_type` of each stop_time and the time constraints of each `start/end_pickup_drop_off_window` do not forbid it.
**Conditionally Forbidden**:
- **Forbidden** if `stop_times.stop_id` or `stop_times.location_id` are defined. |
| `location_id` | Foreign ID referencing `id` from `locations.geojson` | **Conditionally Forbidden** | Identifies the GeoJSON location that corresponds to serviced zone where riders may request pickup or drop off. All GeoJSON locations serviced during a trip must have a record in [stop_times.txt](#stop_timestxt). Multiple trips and routes may service the same GeoJSON location.
On-demand service within locations should be referenced in the sequence in which service is available in those locations. A data consumer should assume that travel is possible from one stop or location to any stop or location later in the trip, provided that the `pickup/drop_off_type` of each stop_time and the time constraints of each `start/end_pickup_drop_off_window` do not forbid it.
**Conditionally Forbidden**:
- **Forbidden** if `stop_times.stop_id` or `stop_times.location_group_id` are defined. |
-| `stop_sequence` | Non-negative integer | **Required** | Order of stops for a particular trip. The values must increase along the trip but do not need to be consecutive.
*Example: The first location on the trip could have a `stop_sequence`=`1`, the second location on the trip could have a `stop_sequence`=`23`, the third location could have a `stop_sequence`=`40`, and so on.* |
+| `stop_sequence` | Non-negative integer | **Required** | Order of stops, location groups, or GeoJSON locations for a particular trip. The values must increase along the trip but do not need to be consecutive.
*Example: The first location on the trip could have a `stop_sequence`=`1`, the second location on the trip could have a `stop_sequence`=`23`, the third location could have a `stop_sequence`=`40`, and so on.*
Travel within the same location group or GeoJSON location requires two records in `stop_times.txt` with the same `location_group_id` or `location_id`. |
| `stop_headsign` | Text | Optional | Text that appears on signage identifying the trip's destination to riders. This field overrides the default `trips.trip_headsign` when the headsign changes between stops. If the headsign is displayed for an entire trip, `trips.trip_headsign` should be used instead.
A `stop_headsign` value specified for one `stop_time` does not apply to subsequent `stop_time`s in the same trip. If you want to override the `trip_headsign` for multiple `stop_time`s in the same trip, the `stop_headsign` value must be repeated in each `stop_time` row. |
| `pickup_type` | Enum | Optional | Indicates pickup method. Valid options are:
`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. |
| `drop_off_type` | Enum | Optional | Indicates drop off method. Valid options are:
`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. |
From cd9d6ea1a87775f3b72acc18b000833005544796 Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Tue, 13 Feb 2024 13:44:03 -0500
Subject: [PATCH 08/14] Add stop_times.start/end_pickup_drop_off_window
---
gtfs/spec/en/reference.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md
index 3acd346e..00a906cb 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -291,6 +291,8 @@ Primary key (`trip_id`, `stop_sequence`)
| `location_id` | Foreign ID referencing `id` from `locations.geojson` | **Conditionally Forbidden** | Identifies the GeoJSON location that corresponds to serviced zone where riders may request pickup or drop off. All GeoJSON locations serviced during a trip must have a record in [stop_times.txt](#stop_timestxt). Multiple trips and routes may service the same GeoJSON location.
On-demand service within locations should be referenced in the sequence in which service is available in those locations. A data consumer should assume that travel is possible from one stop or location to any stop or location later in the trip, provided that the `pickup/drop_off_type` of each stop_time and the time constraints of each `start/end_pickup_drop_off_window` do not forbid it.
**Conditionally Forbidden**:
- **Forbidden** if `stop_times.stop_id` or `stop_times.location_group_id` are defined. |
| `stop_sequence` | Non-negative integer | **Required** | Order of stops, location groups, or GeoJSON locations for a particular trip. The values must increase along the trip but do not need to be consecutive.
*Example: The first location on the trip could have a `stop_sequence`=`1`, the second location on the trip could have a `stop_sequence`=`23`, the third location could have a `stop_sequence`=`40`, and so on.*
Travel within the same location group or GeoJSON location requires two records in `stop_times.txt` with the same `location_group_id` or `location_id`. |
| `stop_headsign` | Text | Optional | Text that appears on signage identifying the trip's destination to riders. This field overrides the default `trips.trip_headsign` when the headsign changes between stops. If the headsign is displayed for an entire trip, `trips.trip_headsign` should be used instead.
A `stop_headsign` value specified for one `stop_time` does not apply to subsequent `stop_time`s in the same trip. If you want to override the `trip_headsign` for multiple `stop_time`s in the same trip, the `stop_headsign` value must be repeated in each `stop_time` row. |
+| `start_pickup_drop_off_window` | Time | **Conditionally Required** | Time that on-demand service becomes available in a GeoJSON location, location group, or stop.
**Conditionally Required**:
- **Required** if `stop_times.location_group_id` or `stop_times.location_id` are defined.
- **Forbidden** if `stop_times.arrival_time` or `stop_times.departure_time` are defined. |
+| `end_pickup_drop_off_window` | Time | **Conditionally Required** | Time that on-demand service ends in a GeoJSON location, location group, or stop.
**Conditionally Required**:
- **Required** if `stop_times.location_group_id` or `stop_times.location_id` are defined.
- **Forbidden** if `stop_times.arrival_time` or `stop_times.departure_time` are defined. |
| `pickup_type` | Enum | Optional | Indicates pickup method. Valid options are:
`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. |
| `drop_off_type` | Enum | Optional | Indicates drop off method. Valid options are:
`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. |
| `continuous_pickup` | Enum | Optional | Indicates that the rider can board the transit vehicle at any point along the vehicle’s travel path as described by [shapes.txt](#shapestxt), from this `stop_time` to the next `stop_time` in the trip’s `stop_sequence`. Valid options are:
`0` - Continuous stopping pickup.
`1` or empty - No continuous stopping pickup.
`2` - Must phone agency to arrange continuous stopping pickup.
`3` - Must coordinate with driver to arrange continuous stopping pickup.
If this field is populated, it overrides any continuous pickup behavior defined in [routes.txt](#routestxt). If this field is empty, the `stop_time` inherits any continuous pickup behavior defined in [routes.txt](#routestxt). |
From 0a8c0dbd84a391ec09f83b1373bc10c52302913e Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Tue, 13 Feb 2024 15:55:58 -0500
Subject: [PATCH 09/14] Modify pickup_type & drop_off_type
---
gtfs/spec/en/reference.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md
index 00a906cb..82b3c617 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -293,8 +293,8 @@ Primary key (`trip_id`, `stop_sequence`)
| `stop_headsign` | Text | Optional | Text that appears on signage identifying the trip's destination to riders. This field overrides the default `trips.trip_headsign` when the headsign changes between stops. If the headsign is displayed for an entire trip, `trips.trip_headsign` should be used instead.
A `stop_headsign` value specified for one `stop_time` does not apply to subsequent `stop_time`s in the same trip. If you want to override the `trip_headsign` for multiple `stop_time`s in the same trip, the `stop_headsign` value must be repeated in each `stop_time` row. |
| `start_pickup_drop_off_window` | Time | **Conditionally Required** | Time that on-demand service becomes available in a GeoJSON location, location group, or stop.
**Conditionally Required**:
- **Required** if `stop_times.location_group_id` or `stop_times.location_id` are defined.
- **Forbidden** if `stop_times.arrival_time` or `stop_times.departure_time` are defined. |
| `end_pickup_drop_off_window` | Time | **Conditionally Required** | Time that on-demand service ends in a GeoJSON location, location group, or stop.
**Conditionally Required**:
- **Required** if `stop_times.location_group_id` or `stop_times.location_id` are defined.
- **Forbidden** if `stop_times.arrival_time` or `stop_times.departure_time` are defined. |
-| `pickup_type` | Enum | Optional | Indicates pickup method. Valid options are:
`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. |
-| `drop_off_type` | Enum | Optional | Indicates drop off method. Valid options are:
`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. |
+| `pickup_type` | Enum | **Conditionally Forbidden** | Indicates pickup method. Valid options are:
`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.
**Conditionally Forbidden**:
- `pickup_type=0` **forbidden** if `start_pickup_drop_off_window` or `end_pickup_drop_off_window` are defined.
- `pickup_type=3` **forbidden** if `start_pickup_drop_off_window` or `end_pickup_drop_off_window` are defined.
- Optional otherwise. |
+| `drop_off_type` | Enum | **Conditionally Forbidden** | Indicates drop off method. Valid options are:
`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.
**Conditionally Forbidden**:
- `drop_off_type=0` **forbidden** if `start_pickup_drop_off_window` or `end_pickup_drop_off_window` are defined.
- Optional otherwise. |
| `continuous_pickup` | Enum | Optional | Indicates that the rider can board the transit vehicle at any point along the vehicle’s travel path as described by [shapes.txt](#shapestxt), from this `stop_time` to the next `stop_time` in the trip’s `stop_sequence`. Valid options are:
`0` - Continuous stopping pickup.
`1` or empty - No continuous stopping pickup.
`2` - Must phone agency to arrange continuous stopping pickup.
`3` - Must coordinate with driver to arrange continuous stopping pickup.
If this field is populated, it overrides any continuous pickup behavior defined in [routes.txt](#routestxt). If this field is empty, the `stop_time` inherits any continuous pickup behavior defined in [routes.txt](#routestxt). |
| `continuous_drop_off` | Enum | Optional | Indicates that the rider can alight from the transit vehicle at any point along the vehicle’s travel path as described by [shapes.txt](#shapestxt), from this `stop_time` to the next `stop_time` in the trip’s `stop_sequence`. Valid options are:
`0` - Continuous stopping drop off.
`1` or empty - No continuous stopping drop off.
`2` - Must phone agency to arrange continuous stopping drop off.
`3` - Must coordinate with driver to arrange continuous stopping drop off.
If this field is populated, it overrides any continuous drop-off behavior defined in [routes.txt](#routestxt). If this field is empty, the `stop_time` inherits any continuous drop-off behavior defined in [routes.txt](#routestxt). |
| `shape_dist_traveled` | Non-negative float | Optional | Actual distance traveled along the associated shape, from the first stop to the stop specified in this record. This field specifies how much of the shape to draw between any two stops during a trip. Must be in the same units used in [shapes.txt](#shapestxt). Values used for `shape_dist_traveled` must increase along with `stop_sequence`; they must not be used to show reverse travel along a route.
Recommended for routes that have looping or inlining (the vehicle crosses or travels over the same portion of alignment in one trip). See [`shapes.shape_dist_traveled`](#shapestxt).
*Example: If a bus travels a distance of 5.25 kilometers from the start of the shape to the stop,`shape_dist_traveled`=`5.25`.*|
From 5a499a0f29a5d0efbad9fca60c0c62aa7884d046 Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Tue, 13 Feb 2024 16:08:26 -0500
Subject: [PATCH 10/14] Modify stop_times.continuous_pickup/drop_off
---
gtfs/spec/en/reference.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md
index 82b3c617..49a4b15f 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -295,8 +295,8 @@ Primary key (`trip_id`, `stop_sequence`)
| `end_pickup_drop_off_window` | Time | **Conditionally Required** | Time that on-demand service ends in a GeoJSON location, location group, or stop.
**Conditionally Required**:
- **Required** if `stop_times.location_group_id` or `stop_times.location_id` are defined.
- **Forbidden** if `stop_times.arrival_time` or `stop_times.departure_time` are defined. |
| `pickup_type` | Enum | **Conditionally Forbidden** | Indicates pickup method. Valid options are:
`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.
**Conditionally Forbidden**:
- `pickup_type=0` **forbidden** if `start_pickup_drop_off_window` or `end_pickup_drop_off_window` are defined.
- `pickup_type=3` **forbidden** if `start_pickup_drop_off_window` or `end_pickup_drop_off_window` are defined.
- Optional otherwise. |
| `drop_off_type` | Enum | **Conditionally Forbidden** | Indicates drop off method. Valid options are:
`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.
**Conditionally Forbidden**:
- `drop_off_type=0` **forbidden** if `start_pickup_drop_off_window` or `end_pickup_drop_off_window` are defined.
- Optional otherwise. |
-| `continuous_pickup` | Enum | Optional | Indicates that the rider can board the transit vehicle at any point along the vehicle’s travel path as described by [shapes.txt](#shapestxt), from this `stop_time` to the next `stop_time` in the trip’s `stop_sequence`. Valid options are:
`0` - Continuous stopping pickup.
`1` or empty - No continuous stopping pickup.
`2` - Must phone agency to arrange continuous stopping pickup.
`3` - Must coordinate with driver to arrange continuous stopping pickup.
If this field is populated, it overrides any continuous pickup behavior defined in [routes.txt](#routestxt). If this field is empty, the `stop_time` inherits any continuous pickup behavior defined in [routes.txt](#routestxt). |
-| `continuous_drop_off` | Enum | Optional | Indicates that the rider can alight from the transit vehicle at any point along the vehicle’s travel path as described by [shapes.txt](#shapestxt), from this `stop_time` to the next `stop_time` in the trip’s `stop_sequence`. Valid options are:
`0` - Continuous stopping drop off.
`1` or empty - No continuous stopping drop off.
`2` - Must phone agency to arrange continuous stopping drop off.
`3` - Must coordinate with driver to arrange continuous stopping drop off.
If this field is populated, it overrides any continuous drop-off behavior defined in [routes.txt](#routestxt). If this field is empty, the `stop_time` inherits any continuous drop-off behavior defined in [routes.txt](#routestxt). |
+| `continuous_pickup` | Enum | **Conditionally Forbidden** | Indicates that the rider can board the transit vehicle at any point along the vehicle’s travel path as described by [shapes.txt](#shapestxt), from this `stop_time` to the next `stop_time` in the trip’s `stop_sequence`. Valid options are:
`0` - Continuous stopping pickup.
`1` or empty - No continuous stopping pickup.
`2` - Must phone agency to arrange continuous stopping pickup.
`3` - Must coordinate with driver to arrange continuous stopping pickup.
If this field is populated, it overrides any continuous pickup behavior defined in [routes.txt](#routestxt). If this field is empty, the `stop_time` inherits any continuous pickup behavior defined in [routes.txt](#routestxt).
**Conditionally Forbidden**:
- **Forbidden** if `start_pickup_drop_off_window` or `end_pickup_drop_off_window` are defined.
- Optional otherwise. |
+| `continuous_drop_off` | Enum | **Conditionally Forbidden** | Indicates that the rider can alight from the transit vehicle at any point along the vehicle’s travel path as described by [shapes.txt](#shapestxt), from this `stop_time` to the next `stop_time` in the trip’s `stop_sequence`. Valid options are:
`0` - Continuous stopping drop off.
`1` or empty - No continuous stopping drop off.
`2` - Must phone agency to arrange continuous stopping drop off.
`3` - Must coordinate with driver to arrange continuous stopping drop off.
If this field is populated, it overrides any continuous drop-off behavior defined in [routes.txt](#routestxt). If this field is empty, the `stop_time` inherits any continuous drop-off behavior defined in [routes.txt](#routestxt).
**Conditionally Forbidden**:
- **Forbidden** if `start_pickup_drop_off_window` or `end_pickup_drop_off_window` are defined.
- Optional otherwise. |
| `shape_dist_traveled` | Non-negative float | Optional | Actual distance traveled along the associated shape, from the first stop to the stop specified in this record. This field specifies how much of the shape to draw between any two stops during a trip. Must be in the same units used in [shapes.txt](#shapestxt). Values used for `shape_dist_traveled` must increase along with `stop_sequence`; they must not be used to show reverse travel along a route.
Recommended for routes that have looping or inlining (the vehicle crosses or travels over the same portion of alignment in one trip). See [`shapes.shape_dist_traveled`](#shapestxt).
*Example: If a bus travels a distance of 5.25 kilometers from the start of the shape to the stop,`shape_dist_traveled`=`5.25`.*|
| `timepoint` | Enum | Recommended | Indicates if arrival and departure times for a stop are strictly adhered to by the vehicle or if they are instead approximate and/or interpolated times. This field allows a GTFS producer to provide interpolated stop-times, while indicating that the times are approximate. Valid options are:
`0` - Times are considered approximate.
`1` or empty - Times are considered exact. |
From 70fdd360dde32f768cfec8d7ccffc3e2c466e59d Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Tue, 13 Feb 2024 16:22:35 -0500
Subject: [PATCH 11/14] Add pickup/drop_off_booking_rule_id
---
gtfs/spec/en/reference.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md
index 49a4b15f..c6b442a0 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -299,6 +299,8 @@ Primary key (`trip_id`, `stop_sequence`)
| `continuous_drop_off` | Enum | **Conditionally Forbidden** | Indicates that the rider can alight from the transit vehicle at any point along the vehicle’s travel path as described by [shapes.txt](#shapestxt), from this `stop_time` to the next `stop_time` in the trip’s `stop_sequence`. Valid options are:
`0` - Continuous stopping drop off.
`1` or empty - No continuous stopping drop off.
`2` - Must phone agency to arrange continuous stopping drop off.
`3` - Must coordinate with driver to arrange continuous stopping drop off.
If this field is populated, it overrides any continuous drop-off behavior defined in [routes.txt](#routestxt). If this field is empty, the `stop_time` inherits any continuous drop-off behavior defined in [routes.txt](#routestxt).
**Conditionally Forbidden**:
- **Forbidden** if `start_pickup_drop_off_window` or `end_pickup_drop_off_window` are defined.
- Optional otherwise. |
| `shape_dist_traveled` | Non-negative float | Optional | Actual distance traveled along the associated shape, from the first stop to the stop specified in this record. This field specifies how much of the shape to draw between any two stops during a trip. Must be in the same units used in [shapes.txt](#shapestxt). Values used for `shape_dist_traveled` must increase along with `stop_sequence`; they must not be used to show reverse travel along a route.
Recommended for routes that have looping or inlining (the vehicle crosses or travels over the same portion of alignment in one trip). See [`shapes.shape_dist_traveled`](#shapestxt).
*Example: If a bus travels a distance of 5.25 kilometers from the start of the shape to the stop,`shape_dist_traveled`=`5.25`.*|
| `timepoint` | Enum | Recommended | Indicates if arrival and departure times for a stop are strictly adhered to by the vehicle or if they are instead approximate and/or interpolated times. This field allows a GTFS producer to provide interpolated stop-times, while indicating that the times are approximate. Valid options are:
`0` - Times are considered approximate.
`1` or empty - Times are considered exact. |
+| `pickup_booking_rule_id` | ID referencing `booking_rules.booking_rule_id` | Optional | Identifies the boarding booking rule at this stop time.
Recommended when `pickup_type=2`. |
+| `drop_off_booking_rule_id` | ID referencing `booking_rules.booking_rule_id` | Optional | Identifies the alighting booking rule at this stop time.
Recommended when `drop_off_type=2`. |
### calendar.txt
From 7872b8d77e010e98f3bf9730335ac241379d9f97 Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Tue, 13 Feb 2024 16:24:29 -0500
Subject: [PATCH 12/14] Add "On-demand Service Routing Behavior"
---
gtfs/spec/en/reference.md | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md
index c6b442a0..c1480d72 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -302,6 +302,10 @@ Primary key (`trip_id`, `stop_sequence`)
| `pickup_booking_rule_id` | ID referencing `booking_rules.booking_rule_id` | Optional | Identifies the boarding booking rule at this stop time.
Recommended when `pickup_type=2`. |
| `drop_off_booking_rule_id` | ID referencing `booking_rules.booking_rule_id` | Optional | Identifies the alighting booking rule at this stop time.
Recommended when `drop_off_type=2`. |
+#### On-demand Service Routing Behavior
+- When providing routing or travel time between the origin and destination, data consumers should ignore intermediate stop_times.txt records with the same `trip_id` that have `start_pickup_drop_off_window` and `end_pickup_drop_off_window` defined. For examples that demonstrate what should be ignored, see the data example page.
+- Simultaneous overlap of locations.geojson `id` geometry, `start/end_pickup_drop_off_window` time, and `pickup_type` or `drop_off_type` between two or more stop_times.txt records with the same `trip_id` is forbidden. For examples that demonstrate what is forbidden, see the data example page.
+
### calendar.txt
File: **Conditionally Required**
From 57ba907a699adbaf9090f49967ba1eba26fcc500 Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Tue, 13 Feb 2024 16:37:54 -0500
Subject: [PATCH 13/14] Modify conditions for start/end_pickup_drop_off_window
---
gtfs/spec/en/reference.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md
index c1480d72..79973277 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -291,8 +291,8 @@ Primary key (`trip_id`, `stop_sequence`)
| `location_id` | Foreign ID referencing `id` from `locations.geojson` | **Conditionally Forbidden** | Identifies the GeoJSON location that corresponds to serviced zone where riders may request pickup or drop off. All GeoJSON locations serviced during a trip must have a record in [stop_times.txt](#stop_timestxt). Multiple trips and routes may service the same GeoJSON location.
On-demand service within locations should be referenced in the sequence in which service is available in those locations. A data consumer should assume that travel is possible from one stop or location to any stop or location later in the trip, provided that the `pickup/drop_off_type` of each stop_time and the time constraints of each `start/end_pickup_drop_off_window` do not forbid it.
**Conditionally Forbidden**:
- **Forbidden** if `stop_times.stop_id` or `stop_times.location_group_id` are defined. |
| `stop_sequence` | Non-negative integer | **Required** | Order of stops, location groups, or GeoJSON locations for a particular trip. The values must increase along the trip but do not need to be consecutive.
*Example: The first location on the trip could have a `stop_sequence`=`1`, the second location on the trip could have a `stop_sequence`=`23`, the third location could have a `stop_sequence`=`40`, and so on.*
Travel within the same location group or GeoJSON location requires two records in `stop_times.txt` with the same `location_group_id` or `location_id`. |
| `stop_headsign` | Text | Optional | Text that appears on signage identifying the trip's destination to riders. This field overrides the default `trips.trip_headsign` when the headsign changes between stops. If the headsign is displayed for an entire trip, `trips.trip_headsign` should be used instead.
A `stop_headsign` value specified for one `stop_time` does not apply to subsequent `stop_time`s in the same trip. If you want to override the `trip_headsign` for multiple `stop_time`s in the same trip, the `stop_headsign` value must be repeated in each `stop_time` row. |
-| `start_pickup_drop_off_window` | Time | **Conditionally Required** | Time that on-demand service becomes available in a GeoJSON location, location group, or stop.
**Conditionally Required**:
- **Required** if `stop_times.location_group_id` or `stop_times.location_id` are defined.
- **Forbidden** if `stop_times.arrival_time` or `stop_times.departure_time` are defined. |
-| `end_pickup_drop_off_window` | Time | **Conditionally Required** | Time that on-demand service ends in a GeoJSON location, location group, or stop.
**Conditionally Required**:
- **Required** if `stop_times.location_group_id` or `stop_times.location_id` are defined.
- **Forbidden** if `stop_times.arrival_time` or `stop_times.departure_time` are defined. |
+| `start_pickup_drop_off_window` | Time | **Conditionally Required** | Time that on-demand service becomes available in a GeoJSON location, location group, or stop.
**Conditionally Required**:
- **Required** if `stop_times.location_group_id` or `stop_times.location_id` is defined.
- **Required** if `end_pickup_drop_off_window` is defined.
- **Forbidden** if `arrival_time` or `departure_time` is defined.
- Optional otherwise. |
+| `end_pickup_drop_off_window` | Time | **Conditionally Required** | Time that on-demand service ends in a GeoJSON location, location group, or stop.
**Conditionally Required**:
- **Required** if `stop_times.location_group_id` or `stop_times.location_id` is defined.
- **Required** if `start_pickup_drop_off_window` is defined.
- **Forbidden** if `arrival_time` or `departure_time` is defined.
- Optional otherwise. |
| `pickup_type` | Enum | **Conditionally Forbidden** | Indicates pickup method. Valid options are:
`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.
**Conditionally Forbidden**:
- `pickup_type=0` **forbidden** if `start_pickup_drop_off_window` or `end_pickup_drop_off_window` are defined.
- `pickup_type=3` **forbidden** if `start_pickup_drop_off_window` or `end_pickup_drop_off_window` are defined.
- Optional otherwise. |
| `drop_off_type` | Enum | **Conditionally Forbidden** | Indicates drop off method. Valid options are:
`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.
**Conditionally Forbidden**:
- `drop_off_type=0` **forbidden** if `start_pickup_drop_off_window` or `end_pickup_drop_off_window` are defined.
- Optional otherwise. |
| `continuous_pickup` | Enum | **Conditionally Forbidden** | Indicates that the rider can board the transit vehicle at any point along the vehicle’s travel path as described by [shapes.txt](#shapestxt), from this `stop_time` to the next `stop_time` in the trip’s `stop_sequence`. Valid options are:
`0` - Continuous stopping pickup.
`1` or empty - No continuous stopping pickup.
`2` - Must phone agency to arrange continuous stopping pickup.
`3` - Must coordinate with driver to arrange continuous stopping pickup.
If this field is populated, it overrides any continuous pickup behavior defined in [routes.txt](#routestxt). If this field is empty, the `stop_time` inherits any continuous pickup behavior defined in [routes.txt](#routestxt).
**Conditionally Forbidden**:
- **Forbidden** if `start_pickup_drop_off_window` or `end_pickup_drop_off_window` are defined.
- Optional otherwise. |
From ebc98023d115976cf7d7d167e4a8fb1f796d2e97 Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Tue, 13 Feb 2024 16:54:35 -0500
Subject: [PATCH 14/14] Remove unnecessary table name & editorial changes
---
gtfs/spec/en/reference.md | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md
index 79973277..27cbf7a1 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -284,12 +284,12 @@ Primary key (`trip_id`, `stop_sequence`)
| Field Name | Type | Presence | Description |
| ------ | ------ | ------ | ------ |
| `trip_id` | Foreign ID referencing `trips.trip_id` | **Required** | Identifies a trip. |
-| `arrival_time` | Time | **Conditionally Required** | Arrival time at the stop (defined by `stop_times.stop_id`) for a specific trip (defined by `stop_times.trip_id`) in the time zone specified by `agency.agency_timezone`, not `stops.stop_timezone`.
If there are not separate times for arrival and departure at a stop, `arrival_time` and `departure_time` should be the same.
For times occurring after midnight on the service day, enter the time as a value greater than 24:00:00 in HH:MM:SS.
If exact arrival and departure times (`timepoint=1` or empty) are not available, estimated or interpolated arrival and departure times (`timepoint=0`) should be provided.
Conditionally Required:
- **Required** for the first and last stop in a trip (defined by `stop_times.stop_sequence`).
- **Required** for `timepoint=1`.
- **Forbidden** when `stop_times.start_pickup_drop_off_window` or `stop_times.end_pickup_drop_off_window` are defined.
- Optional otherwise.|
-| `departure_time` | Time | **Conditionally Required** | Departure time from the stop (defined by `stop_times.stop_id`) for a specific trip (defined by `stop_times.trip_id`) in the time zone specified by `agency.agency_timezone`, not `stops.stop_timezone`.
If there are not separate times for arrival and departure at a stop, `arrival_time` and `departure_time` should be the same.
For times occurring after midnight on the service day, enter the time as a value greater than 24:00:00 in HH:MM:SS.
If exact arrival and departure times (`timepoint=1` or empty) are not available, estimated or interpolated arrival and departure times (`timepoint=0`) should be provided.
Conditionally Required:
- **Required** for `timepoint=1`.
- **Forbidden** when `stop_times.start_pickup_drop_off_window` or `stop_times.end_pickup_drop_off_window` are defined.
- Optional otherwise.| |
+| `arrival_time` | Time | **Conditionally Required** | Arrival time at the stop (defined by `stop_times.stop_id`) for a specific trip (defined by `stop_times.trip_id`) in the time zone specified by `agency.agency_timezone`, not `stops.stop_timezone`.
If there are not separate times for arrival and departure at a stop, `arrival_time` and `departure_time` should be the same.
For times occurring after midnight on the service day, enter the time as a value greater than 24:00:00 in HH:MM:SS.
If exact arrival and departure times (`timepoint=1` or empty) are not available, estimated or interpolated arrival and departure times (`timepoint=0`) should be provided.
Conditionally Required:
- **Required** for the first and last stop in a trip (defined by `stop_times.stop_sequence`).
- **Required** for `timepoint=1`.
- **Forbidden** when `start_pickup_drop_off_window` or `end_pickup_drop_off_window` are defined.
- Optional otherwise.|
+| `departure_time` | Time | **Conditionally Required** | Departure time from the stop (defined by `stop_times.stop_id`) for a specific trip (defined by `stop_times.trip_id`) in the time zone specified by `agency.agency_timezone`, not `stops.stop_timezone`.
If there are not separate times for arrival and departure at a stop, `arrival_time` and `departure_time` should be the same.
For times occurring after midnight on the service day, enter the time as a value greater than 24:00:00 in HH:MM:SS.
If exact arrival and departure times (`timepoint=1` or empty) are not available, estimated or interpolated arrival and departure times (`timepoint=0`) should be provided.
Conditionally Required:
- **Required** for `timepoint=1`.
- **Forbidden** when `start_pickup_drop_off_window` or `end_pickup_drop_off_window` are defined.
- Optional otherwise.| |
| `stop_id` | Foreign ID referencing `stops.stop_id` | **Conditionally Required** | Identifies the serviced stop. All stops serviced during a trip must have a record in [stop_times.txt](#stop_timestxt). Referenced locations must be stops/platforms, i.e. their `stops.location_type` value must be `0` or empty. A stop may be serviced multiple times in the same trip, and multiple trips and routes may service the same stop.
On-demand service using stops should be referenced in the sequence in which service is available at those stops. A data consumer should assume that travel is possible from one stop or location to any stop or location later in the trip, provided that the `pickup/drop_off_type` of each stop_time and the time constraints of each `start/end_pickup_drop_off_window` do not forbid it.
Conditionally Required:
- **Required** if `stop_times.location_group_id` AND `stop_times.location_id` are NOT defined.
- **Forbidden** if `stop_times.location_group_id` or `stop_times.location_id` are defined. |
| `location_group_id` | Foreign ID referencing `location_groups.location_group_id` | **Conditionally Forbidden** | Identifies the serviced location group that indicates groups of stops where riders may request pickup or drop off. All location groups serviced during a trip must have a record in [stop_times.txt](#stop_timestxt). Multiple trips and routes may service the same location group.
On-demand service using location groups should be referenced in the sequence in which service is available at those location groups. A data consumer should assume that travel is possible from one stop or location to any stop or location later in the trip, provided that the `pickup/drop_off_type` of each stop_time and the time constraints of each `start/end_pickup_drop_off_window` do not forbid it.
**Conditionally Forbidden**:
- **Forbidden** if `stop_times.stop_id` or `stop_times.location_id` are defined. |
| `location_id` | Foreign ID referencing `id` from `locations.geojson` | **Conditionally Forbidden** | Identifies the GeoJSON location that corresponds to serviced zone where riders may request pickup or drop off. All GeoJSON locations serviced during a trip must have a record in [stop_times.txt](#stop_timestxt). Multiple trips and routes may service the same GeoJSON location.
On-demand service within locations should be referenced in the sequence in which service is available in those locations. A data consumer should assume that travel is possible from one stop or location to any stop or location later in the trip, provided that the `pickup/drop_off_type` of each stop_time and the time constraints of each `start/end_pickup_drop_off_window` do not forbid it.
**Conditionally Forbidden**:
- **Forbidden** if `stop_times.stop_id` or `stop_times.location_group_id` are defined. |
-| `stop_sequence` | Non-negative integer | **Required** | Order of stops, location groups, or GeoJSON locations for a particular trip. The values must increase along the trip but do not need to be consecutive.
*Example: The first location on the trip could have a `stop_sequence`=`1`, the second location on the trip could have a `stop_sequence`=`23`, the third location could have a `stop_sequence`=`40`, and so on.*
Travel within the same location group or GeoJSON location requires two records in `stop_times.txt` with the same `location_group_id` or `location_id`. |
+| `stop_sequence` | Non-negative integer | **Required** | Order of stops, location groups, or GeoJSON locations for a particular trip. The values must increase along the trip but do not need to be consecutive.
*Example: The first location on the trip could have a `stop_sequence`=`1`, the second location on the trip could have a `stop_sequence`=`23`, the third location could have a `stop_sequence`=`40`, and so on.*
Travel within the same location group or GeoJSON location requires two records in [stop_times.txt](#stop_timestxt) with the same `location_group_id` or `location_id`. |
| `stop_headsign` | Text | Optional | Text that appears on signage identifying the trip's destination to riders. This field overrides the default `trips.trip_headsign` when the headsign changes between stops. If the headsign is displayed for an entire trip, `trips.trip_headsign` should be used instead.
A `stop_headsign` value specified for one `stop_time` does not apply to subsequent `stop_time`s in the same trip. If you want to override the `trip_headsign` for multiple `stop_time`s in the same trip, the `stop_headsign` value must be repeated in each `stop_time` row. |
| `start_pickup_drop_off_window` | Time | **Conditionally Required** | Time that on-demand service becomes available in a GeoJSON location, location group, or stop.
**Conditionally Required**:
- **Required** if `stop_times.location_group_id` or `stop_times.location_id` is defined.
- **Required** if `end_pickup_drop_off_window` is defined.
- **Forbidden** if `arrival_time` or `departure_time` is defined.
- Optional otherwise. |
| `end_pickup_drop_off_window` | Time | **Conditionally Required** | Time that on-demand service ends in a GeoJSON location, location group, or stop.
**Conditionally Required**:
- **Required** if `stop_times.location_group_id` or `stop_times.location_id` is defined.
- **Required** if `start_pickup_drop_off_window` is defined.
- **Forbidden** if `arrival_time` or `departure_time` is defined.
- Optional otherwise. |