From e359750cb2d4a496cf96bdbb1c6e30a73b3fb59f Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Wed, 12 Jul 2023 14:04:07 -0400
Subject: [PATCH 01/41] Modify stop_areas.txt
Modify stop_areas.txt to allow grouping of GeoJSON locations and/or stops which allow predetermined groups of these features to be specified on individual rows of stop_times.txt.
---
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 a917e6012..0e2bf0dfa 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -472,8 +472,8 @@ Assigns stops from [stops.txt](#stopstxt) to areas.
| Field Name | Type | Presence | Description |
| ------ | ------ | ------ | ------ |
-| `area_id` | Foreign ID referencing `areas.area_id` | **Required** | Identifies an area to which one or multiple `stop_id`s belong. The same `stop_id` may be defined in many `area_id`s. |
-| `stop_id` | Foreign ID referencing `stops.stop_id` | **Required** | Identifies a stop. If a station (i.e. a stop with `stops.location_type=1`) is defined in this field, it is assumed that all of its platforms (i.e. all stops with `stops.location_type=0` that have this station defined as `stops.parent_station`) are part of the same area. This behavior can be overridden by assigning platforms to other areas. |
+| `area_id` | Foreign ID referencing `areas.area_id` | **Required** | Identifies an area to which one or multiple `stop_id`s belong. The same `stop_id` may be defined in many `area_id`s.
May also identify a group of stops and/or GeoJSON locations that together indicate locations where a rider may request pickup or drop off.
It is forbidden to define an `area_id` with the same value as a `stop_id` or `id` from `locations.geojson`. |
+| `stop_id` | Foreign ID referencing `stops.stop_id` or `id` from `locations.geojson` | **Required** | Identifies a stop or GeoJSON location. If a station (i.e. a stop with `stops.location_type=1`) is defined in this field, it is assumed that all of its platforms (i.e. all stops with `stops.location_type=0` that have this station defined as `stops.parent_station`) are part of the same area. This behavior can be overridden by assigning platforms to other areas. |
### shapes.txt
From 2efafbfe2b91e0b99313df2391adb3fbc9121861 Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Wed, 12 Jul 2023 14:25:18 -0400
Subject: [PATCH 02/41] 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 0e2bf0dfa..085956acb 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -256,7 +256,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`).
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 local time for the day on which the trip schedule begins.
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`).
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 local time for the day on which the trip schedule begins.
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.| |
-| `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`, `stop_areas.area_id`, or `id` from `locations.geojson` | **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.
If service is on demand, a GeoJSON location or stop area can be referenced:
- `id` from `locations.geojson`
- `stop_areas.area_id` |
| `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 778069ec17636cd1d1b9a13a86bd5c82b75ba43c Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Wed, 12 Jul 2023 14:29:35 -0400
Subject: [PATCH 03/41] 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 085956acb..d12396716 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -257,7 +257,7 @@ 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`).
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 local time for the day on which the trip schedule begins.
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`).
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 local time for the day on which the trip schedule begins.
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.| |
| `stop_id` | Foreign ID referencing `stops.stop_id`, `stop_areas.area_id`, or `id` from `locations.geojson` | **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.
If service is on demand, a GeoJSON location or stop area can be referenced:
- `id` from `locations.geojson`
- `stop_areas.area_id` |
-| `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 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 stop area or GeoJSON location requires two records in `stop_times.txt` with the same `stop_id` and consecutive values of `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. |
| `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 6a95ac291c2bff23e9fa04765293d8ecb11f5e71 Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Wed, 12 Jul 2023 15:30:47 -0400
Subject: [PATCH 04/41] Modify stop_times.arrival_time
---
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 d12396716..5e1ac30b9 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -254,7 +254,7 @@ 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`).
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 local time for the day on which the trip schedule begins.
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.|
+| `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`).
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 local time for the day on which the trip schedule begins.
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`).
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 local time for the day on which the trip schedule begins.
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.| |
| `stop_id` | Foreign ID referencing `stops.stop_id`, `stop_areas.area_id`, or `id` from `locations.geojson` | **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.
If service is on demand, a GeoJSON location or stop area can be referenced:
- `id` from `locations.geojson`
- `stop_areas.area_id` |
| `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.*
Travel within the same stop area or GeoJSON location requires two records in `stop_times.txt` with the same `stop_id` and consecutive values of `stop_sequence`. |
From 86472bd862b512c20aeda0d983248cb4ce066f4e Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Wed, 12 Jul 2023 16:12:49 -0400
Subject: [PATCH 05/41] Modify stop_times.departure_time
---
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 5e1ac30b9..32fd863dc 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -255,7 +255,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`).
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 local time for the day on which the trip schedule begins.
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`).
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 local time for the day on which the trip schedule begins.
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.| |
+| `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`).
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 local time for the day on which the trip schedule begins.
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`, `stop_areas.area_id`, or `id` from `locations.geojson` | **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.
If service is on demand, a GeoJSON location or stop area can be referenced:
- `id` from `locations.geojson`
- `stop_areas.area_id` |
| `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.*
Travel within the same stop area or GeoJSON location requires two records in `stop_times.txt` with the same `stop_id` and consecutive values of `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. |
From 4ee86b9b360f0c5593828c1a759163bb7cac73ac Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Wed, 12 Jul 2023 16:26:15 -0400
Subject: [PATCH 06/41] Modify stop_times.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 32fd863dc..80a72d6ef 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -259,8 +259,8 @@ Primary key (`trip_id`, `stop_sequence`)
| `stop_id` | Foreign ID referencing `stops.stop_id`, `stop_areas.area_id`, or `id` from `locations.geojson` | **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.
If service is on demand, a GeoJSON location or stop area can be referenced:
- `id` from `locations.geojson`
- `stop_areas.area_id` |
| `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.*
Travel within the same stop area or GeoJSON location requires two records in `stop_times.txt` with the same `stop_id` and consecutive values of `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. |
-| `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 | 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.
**Conditionally Forbidden**:
- `pickup_type=0` **forbidden** for `stop_times.stop_id` referring to `stop_areas.area_id` or `id` from `locations.geojson`.
- `pickup_type=3` **forbidden** for `stop_areas.area_id` or `locations.geojson`.
- Optional otherwise. |
+| `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.
**Conditionally Forbidden**:
- `drop_off_type=0` **forbidden** for `stop_times.stop_id` referring to `stop_areas.area_id` or `id` from `locations.geojson`.
- 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`, 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`. If this field is empty, the `stop_time` inherits any continuous pickup behavior defined in `routes.txt`. |
| `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`, 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`. If this field is empty, the `stop_time` inherits any continuous drop-off behavior defined in `routes.txt`. |
| `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.
*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 58018b9bb75e09c43ff2c25199f5887878f165e4 Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Thu, 13 Jul 2023 10:25:04 -0400
Subject: [PATCH 07/41] Extend stop_times with start/end_pickup_dropoff_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 80a72d6ef..b29cecfc4 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -259,6 +259,8 @@ Primary key (`trip_id`, `stop_sequence`)
| `stop_id` | Foreign ID referencing `stops.stop_id`, `stop_areas.area_id`, or `id` from `locations.geojson` | **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.
If service is on demand, a GeoJSON location or stop area can be referenced:
- `id` from `locations.geojson`
- `stop_areas.area_id` |
| `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.*
Travel within the same stop area or GeoJSON location requires two records in `stop_times.txt` with the same `stop_id` and consecutive values of `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, stop area or stop.
**Conditionally Required**:
- **Required** if `stop_times.stop_id` refers to `stop_areas.area_id` or `id` from `locations.geojson`.
- **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, stop area or stop.
**Conditionally Required**:
- **Required** if `stop_times.stop_id` refers to `stop_areas.area_id` or `id` from `locations.geojson`.
- **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.
**Conditionally Forbidden**:
- `pickup_type=0` **forbidden** for `stop_times.stop_id` referring to `stop_areas.area_id` or `id` from `locations.geojson`.
- `pickup_type=3` **forbidden** for `stop_areas.area_id` or `locations.geojson`.
- Optional otherwise. |
| `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.
**Conditionally Forbidden**:
- `drop_off_type=0` **forbidden** for `stop_times.stop_id` referring to `stop_areas.area_id` or `id` from `locations.geojson`.
- 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`, 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`. If this field is empty, the `stop_time` inherits any continuous pickup behavior defined in `routes.txt`. |
From 231b07103cbb3abe4e010cd1cc7af4aba56a06a4 Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Thu, 13 Jul 2023 10:41:57 -0400
Subject: [PATCH 08/41] Extend stop_times with 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 b29cecfc4..bbc496c7b 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -267,6 +267,8 @@ Primary key (`trip_id`, `stop_sequence`)
| `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`, 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`. If this field is empty, the `stop_time` inherits any continuous drop-off behavior defined in `routes.txt`. |
| `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.
*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 | Optional | 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 8dcbbcd37ab97a36d94e0ca9481f8499ae2f6e8f Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Thu, 13 Jul 2023 11:58:32 -0400
Subject: [PATCH 09/41] Add locations.geojson file
---
gtfs/spec/en/reference.md | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md
index bbc496c7b..2a0426c89 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -30,6 +30,7 @@ This document defines the format and structure of the files that comprise a GTFS
- [transfers.txt](#transferstxt)
- [pathways.txt](#pathwaystxt)
- [levels.txt](#levelstxt)
+ - [locations.geojson](#locationsgeojson)
- [translations.txt](#translationstxt)
- [feed\_info.txt](#feed_infotxt)
- [attributions.txt](#attributionstxt)
@@ -121,6 +122,7 @@ 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. |
+| [locations.geojson](#locationsgeojson) | Optional | GeoJSON locations, which are `Polygon` and `MultiPolygon` features that indicate groups of lat/lon coordinates defining zones where riders can request either pickup or drop off. |
| [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. |
@@ -616,6 +618,28 @@ Describes levels in a station. Useful in conjunction with `pathways.txt`, and is
| `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"._|
+### locations.geojson
+
+File: **Optional**
+
+- 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` belongs to the same namespace as `stop_id` in `stops.txt` and `area_id` in `stop_areas.txt`, called “stop locations”.
+- 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** | Location ID belonging to the same namespace as `stops.stop_id`. It is forbidden to define an `id` from `locations.geojson` with the same value as a `stops.stop_id`.|
+| \- `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. |
### translations.txt
From 858fa7b785a0fcd6e23ebe5290a335028a9a5b15 Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Thu, 13 Jul 2023 13:51:25 -0400
Subject: [PATCH 10/41] Add booking_rules.txt file
---
gtfs/spec/en/reference.md | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md
index 2a0426c89..f673504da 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -31,6 +31,7 @@ This document defines the format and structure of the files that comprise a GTFS
- [pathways.txt](#pathwaystxt)
- [levels.txt](#levelstxt)
- [locations.geojson](#locationsgeojson)
+ - [booking_rules.txt](#booking_rulestxt)
- [translations.txt](#translationstxt)
- [feed\_info.txt](#feed_infotxt)
- [attributions.txt](#attributionstxt)
@@ -123,6 +124,7 @@ This specification defines the following files:
| [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. |
| [locations.geojson](#locationsgeojson) | Optional | GeoJSON locations, which are `Polygon` and `MultiPolygon` features that indicate groups of lat/lon coordinates defining zones where riders can request either pickup or drop off. |
+| [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. |
@@ -641,6 +643,32 @@ File: **Optional**
| \- `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
File: **Optional**
From 820289c2758f96883aeed9becba374eec58b614f Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Thu, 13 Jul 2023 14:05:18 -0400
Subject: [PATCH 11/41] Add general description for locations.geojson
---
gtfs/spec/en/reference.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md
index f673504da..5f404b6f8 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -624,6 +624,7 @@ Describes levels in a station. Useful in conjunction with `pathways.txt`, and is
File: **Optional**
+Defines GeoJSON locations that indicate groups of lat/lon coordinates defining zones where riders can request either pickup or drop off.
- 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.
From 04503319f90bf5a161057e09e72bb5e9fd76d594 Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Fri, 21 Jul 2023 09:32:21 -0400
Subject: [PATCH 12/41] Add forbidden location.geojson.id with the same area_id
https://github.com/google/transit/pull/388#discussion_r1269923819
---
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 5f404b6f8..e39288b05 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -636,7 +636,7 @@ Defines GeoJSON locations that indicate groups of lat/lon coordinates defining z
| - `type` | String | **Required** | `"FeatureCollection"` of locations. |
| - `features` | Array | **Required** | Collection of `"Feature"` objects describing the locations. |
| \- `type` | String | **Required** | `"Feature"` |
-| \- `id` | String | **Required** | Location ID belonging to the same namespace as `stops.stop_id`. It is forbidden to define an `id` from `locations.geojson` with the same value as a `stops.stop_id`.|
+| \- `id` | String | **Required** | Location ID belonging to the same namespace as `stops.stop_id`. It is forbidden to define an `id` from `locations.geojson` with the same value as a `stops.stop_id` or a `stop_areas.area_id`.|
| \- `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. |
From fca0f08259594de7359402890d99fa3cccd5c8ab Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Tue, 25 Jul 2023 13:19:39 -0400
Subject: [PATCH 13/41] Removed "consecutive values" in stop_sequence
For travels within the same stop area or GeoJSON location.
---
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 e39288b05..b450fcced 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -261,7 +261,7 @@ 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`).
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 local time for the day on which the trip schedule begins.
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`).
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 local time for the day on which the trip schedule begins.
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`, `stop_areas.area_id`, or `id` from `locations.geojson` | **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.
If service is on demand, a GeoJSON location or stop area can be referenced:
- `id` from `locations.geojson`
- `stop_areas.area_id` |
-| `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.*
Travel within the same stop area or GeoJSON location requires two records in `stop_times.txt` with the same `stop_id` and consecutive values of `stop_sequence`. |
+| `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.*
Travel within the same stop area or GeoJSON location requires two records in `stop_times.txt` with the same `stop_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, stop area or stop.
**Conditionally Required**:
- **Required** if `stop_times.stop_id` refers to `stop_areas.area_id` or `id` from `locations.geojson`.
- **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, stop area or stop.
**Conditionally Required**:
- **Required** if `stop_times.stop_id` refers to `stop_areas.area_id` or `id` from `locations.geojson`.
- **Forbidden** if `stop_times.arrival_time` or `stop_times.departure_time` are defined. |
From 1f6c4632da779c8a3be2c4192a6bb238e1ef1dc4 Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Thu, 3 Aug 2023 10:20:49 -0400
Subject: [PATCH 14/41] Change presence for pickup_type & drop_off_type
From optional to Conditionally Forbidden
---
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 b450fcced..4afa462a3 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -265,8 +265,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, stop area or stop.
**Conditionally Required**:
- **Required** if `stop_times.stop_id` refers to `stop_areas.area_id` or `id` from `locations.geojson`.
- **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, stop area or stop.
**Conditionally Required**:
- **Required** if `stop_times.stop_id` refers to `stop_areas.area_id` or `id` from `locations.geojson`.
- **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.
**Conditionally Forbidden**:
- `pickup_type=0` **forbidden** for `stop_times.stop_id` referring to `stop_areas.area_id` or `id` from `locations.geojson`.
- `pickup_type=3` **forbidden** for `stop_areas.area_id` or `locations.geojson`.
- Optional otherwise. |
-| `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.
**Conditionally Forbidden**:
- `drop_off_type=0` **forbidden** for `stop_times.stop_id` referring to `stop_areas.area_id` or `id` from `locations.geojson`.
- 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** for `stop_times.stop_id` referring to `stop_areas.area_id` or `id` from `locations.geojson`.
- `pickup_type=3` **forbidden** for `stop_areas.area_id` or `locations.geojson`.
- 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** for `stop_times.stop_id` referring to `stop_areas.area_id` or `id` from `locations.geojson`.
- 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`, 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`. If this field is empty, the `stop_time` inherits any continuous pickup behavior defined in `routes.txt`. |
| `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`, 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`. If this field is empty, the `stop_time` inherits any continuous drop-off behavior defined in `routes.txt`. |
| `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.
*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 d69e1574257cc0e839f05678b0adb52d734bdd4f Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Thu, 12 Oct 2023 09:36:17 -0400
Subject: [PATCH 15/41] Clarification on stop_times.stop_id
Clarifying how consumers deal with on-demand services.
---
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 4afa462a3..4e720357b 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -260,7 +260,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`).
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 local time for the day on which the trip schedule begins.
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`).
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 local time for the day on which the trip schedule begins.
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`, `stop_areas.area_id`, or `id` from `locations.geojson` | **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.
If service is on demand, a GeoJSON location or stop area can be referenced:
- `id` from `locations.geojson`
- `stop_areas.area_id` |
+| `stop_id` | Foreign ID referencing `stops.stop_id`, `stop_areas.area_id`, or `id` from `locations.geojson` | **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.
If service is on demand, a GeoJSON location or stop area can be referenced:
- `id` from `locations.geojson`
- `stop_areas.area_id`
On-demand service within locations and stop areas should be referenced in the sequence in which service is available in those areas. A data consumer should assume that a rider picked up in one location can be dropped off at any stop or in any location later in the trip, pursuant to the `pickup/drop_off_type` of those stop_times and the time constraints of each `start/end_pickup_drop_off_window`. |
| `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.*
Travel within the same stop area or GeoJSON location requires two records in `stop_times.txt` with the same `stop_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, stop area or stop.
**Conditionally Required**:
- **Required** if `stop_times.stop_id` refers to `stop_areas.area_id` or `id` from `locations.geojson`.
- **Forbidden** if `stop_times.arrival_time` or `stop_times.departure_time` are defined. |
From a42aa78032c624d81805cc57e24f9606eb051523 Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Wed, 8 Nov 2023 14:41:54 -0500
Subject: [PATCH 16/41] Revert changes in stop_areas.txt
---
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 4e720357b..f94bdf8f4 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -480,8 +480,8 @@ Assigns stops from [stops.txt](#stopstxt) to areas.
| Field Name | Type | Presence | Description |
| ------ | ------ | ------ | ------ |
-| `area_id` | Foreign ID referencing `areas.area_id` | **Required** | Identifies an area to which one or multiple `stop_id`s belong. The same `stop_id` may be defined in many `area_id`s.
May also identify a group of stops and/or GeoJSON locations that together indicate locations where a rider may request pickup or drop off.
It is forbidden to define an `area_id` with the same value as a `stop_id` or `id` from `locations.geojson`. |
-| `stop_id` | Foreign ID referencing `stops.stop_id` or `id` from `locations.geojson` | **Required** | Identifies a stop or GeoJSON location. If a station (i.e. a stop with `stops.location_type=1`) is defined in this field, it is assumed that all of its platforms (i.e. all stops with `stops.location_type=0` that have this station defined as `stops.parent_station`) are part of the same area. This behavior can be overridden by assigning platforms to other areas. |
+| `area_id` | Foreign ID referencing `areas.area_id` | **Required** | Identifies an area to which one or multiple `stop_id`s belong. The same `stop_id` may be defined in many `area_id`s. |
+| `stop_id` | Foreign ID referencing `stops.stop_id` | **Required** | Identifies a stop. If a station (i.e. a stop with `stops.location_type=1`) is defined in this field, it is assumed that all of its platforms (i.e. all stops with `stops.location_type=0` that have this station defined as `stops.parent_station`) are part of the same area. This behavior can be overridden by assigning platforms to other areas. |
### shapes.txt
From af975430b3e9cdd93cd2b48de4c9fc9e0dd0da7f Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Wed, 8 Nov 2023 15:47:15 -0500
Subject: [PATCH 17/41] Add location_groups.txt back
+Remove references to location.geojson ids
---
gtfs/spec/en/reference.md | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md
index f94bdf8f4..89f9dacea 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -30,6 +30,7 @@ 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)
- [locations.geojson](#locationsgeojson)
- [booking_rules.txt](#booking_rulestxt)
- [translations.txt](#translationstxt)
@@ -620,6 +621,20 @@ Describes levels in a station. Useful in conjunction with `pathways.txt`, and is
| `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`, `location_id`)
+
+Defines location groups that indicate groups of stops where a rider may request pickup or drop off.
+
+| Field Name | Type | Required | Description |
+| ---------- | ---- | ------------ | ----------- |
+| `location_group_id` | ID | **Required** | Identifies a location group. A location group is a group of stops that together indicate locations where a rider may request pickup or drop off.
By default, every `stop_id` belongs to a `location_group_id` of the same value. Therefore, it is forbidden to define a `location_group_id` with the same value as a `stop_id`.
Multiple entries in `location_groups.txt` can have the same `location_group_id`. |
+| `location_id` | Foreign ID referencing `stops.stop_id` | **Required** | Identifies a stop belonging to the location group. |
+| `location_group_name` | Text | Optional | Name of the location group. Must be defined either once, or exhaustively for a single `location_group_id`. |
+
### locations.geojson
File: **Optional**
From eafa3e14028d89d50c3ed9bd3bbdc5805a1a80ee Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Wed, 8 Nov 2023 16:38:05 -0500
Subject: [PATCH 18/41] Modify stop_times.stop_id
stop_times.stop_id only references 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 89f9dacea..47880440e 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -261,7 +261,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`).
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 local time for the day on which the trip schedule begins.
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`).
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 local time for the day on which the trip schedule begins.
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`, `stop_areas.area_id`, or `id` from `locations.geojson` | **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.
If service is on demand, a GeoJSON location or stop area can be referenced:
- `id` from `locations.geojson`
- `stop_areas.area_id`
On-demand service within locations and stop areas should be referenced in the sequence in which service is available in those areas. A data consumer should assume that a rider picked up in one location can be dropped off at any stop or in any location later in the trip, pursuant to the `pickup/drop_off_type` of those stop_times and the time constraints of each `start/end_pickup_drop_off_window`. |
+| `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.
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 a rider picked up at one stop or in one location can be dropped off at any stop or in any location later in the trip, pursuant to the `pickup/drop_off_type` of those stop_times and the time constraints of each `start/end_pickup_drop_off_window`. |
| `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.*
Travel within the same stop area or GeoJSON location requires two records in `stop_times.txt` with the same `stop_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, stop area or stop.
**Conditionally Required**:
- **Required** if `stop_times.stop_id` refers to `stop_areas.area_id` or `id` from `locations.geojson`.
- **Forbidden** if `stop_times.arrival_time` or `stop_times.departure_time` are defined. |
From f71374a9b60c394bcc458d59816ab083d764d191 Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Thu, 9 Nov 2023 10:57:36 -0500
Subject: [PATCH 19/41] Change name of location_groups.location_id
change to 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 47880440e..67bf0035b 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -632,7 +632,7 @@ Defines location groups that indicate groups of stops where a rider may request
| Field Name | Type | Required | Description |
| ---------- | ---- | ------------ | ----------- |
| `location_group_id` | ID | **Required** | Identifies a location group. A location group is a group of stops that together indicate locations where a rider may request pickup or drop off.
By default, every `stop_id` belongs to a `location_group_id` of the same value. Therefore, it is forbidden to define a `location_group_id` with the same value as a `stop_id`.
Multiple entries in `location_groups.txt` can have the same `location_group_id`. |
-| `location_id` | Foreign ID referencing `stops.stop_id` | **Required** | Identifies a stop belonging to the location group. |
+| `stop_id` | Foreign ID referencing `stops.stop_id` | **Required** | Identifies a stop belonging to the location group. |
| `location_group_name` | Text | Optional | Name of the location group. Must be defined either once, or exhaustively for a single `location_group_id`. |
### locations.geojson
From fe6b4c6c6407686bc320096bc1906357ec4c8a01 Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Thu, 9 Nov 2023 14:03:59 -0500
Subject: [PATCH 20/41] 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 67bf0035b..43498131e 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -262,6 +262,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`).
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 local time for the day on which the trip schedule begins.
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`).
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 local time for the day on which the trip schedule begins.
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.
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 a rider picked up at one stop or in one location can be dropped off at any stop or in any location later in the trip, pursuant to the `pickup/drop_off_type` of those stop_times and the time constraints of each `start/end_pickup_drop_off_window`. |
+| `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 within locations should be referenced in the sequence in which service is available in those locations. A data consumer should assume that a rider picked up at one stop or in one location can be dropped off at any stop or in any location later in the trip, pursuant to the `pickup/drop_off_type` of those stop_times and the time constraints of each `start/end_pickup_drop_off_window`.
**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 a rider picked up at one stop or in one location can be dropped off at any stop or in any location later in the trip, pursuant to the `pickup/drop_off_type` of those stop_times and the time constraints of each `start/end_pickup_drop_off_window`.
**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.*
Travel within the same stop area or GeoJSON location requires two records in `stop_times.txt` with the same `stop_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, stop area or stop.
**Conditionally Required**:
- **Required** if `stop_times.stop_id` refers to `stop_areas.area_id` or `id` from `locations.geojson`.
- **Forbidden** if `stop_times.arrival_time` or `stop_times.departure_time` are defined. |
From af0c0f8a41b133082462e3dce68e761cd88d2b50 Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Thu, 9 Nov 2023 15:03:47 -0500
Subject: [PATCH 21/41] Change presence of 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 43498131e..a4fc4f206 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -261,7 +261,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`).
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 local time for the day on which the trip schedule begins.
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`).
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 local time for the day on which the trip schedule begins.
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.
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 a rider picked up at one stop or in one location can be dropped off at any stop or in any location later in the trip, pursuant to the `pickup/drop_off_type` of those stop_times and the time constraints of each `start/end_pickup_drop_off_window`. |
+| `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 within locations should be referenced in the sequence in which service is available in those locations. A data consumer should assume that a rider picked up at one stop or in one location can be dropped off at any stop or in any location later in the trip, pursuant to the `pickup/drop_off_type` of those stop_times and the time constraints of each `start/end_pickup_drop_off_window`.
Conditionally Required:
- **Required** if `start_pickup_drop_off_window` or `end_pickup_drop_off_window` 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 within locations should be referenced in the sequence in which service is available in those locations. A data consumer should assume that a rider picked up at one stop or in one location can be dropped off at any stop or in any location later in the trip, pursuant to the `pickup/drop_off_type` of those stop_times and the time constraints of each `start/end_pickup_drop_off_window`.
**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 a rider picked up at one stop or in one location can be dropped off at any stop or in any location later in the trip, pursuant to the `pickup/drop_off_type` of those stop_times and the time constraints of each `start/end_pickup_drop_off_window`.
**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.*
Travel within the same stop area or GeoJSON location requires two records in `stop_times.txt` with the same `stop_id`. |
From 945732281f05d60e77371de827d1006f4bb35714 Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Thu, 9 Nov 2023 15:25:07 -0500
Subject: [PATCH 22/41] Modify stop_times.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 a4fc4f206..0d1dab46f 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -266,8 +266,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 a rider picked up at one stop or in one location can be dropped off at any stop or in any location later in the trip, pursuant to the `pickup/drop_off_type` of those stop_times and the time constraints of each `start/end_pickup_drop_off_window`.
**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.*
Travel within the same stop area or GeoJSON location requires two records in `stop_times.txt` with the same `stop_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, stop area or stop.
**Conditionally Required**:
- **Required** if `stop_times.stop_id` refers to `stop_areas.area_id` or `id` from `locations.geojson`.
- **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, stop area or stop.
**Conditionally Required**:
- **Required** if `stop_times.stop_id` refers to `stop_areas.area_id` or `id` from `locations.geojson`.
- **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` 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 | **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** for `stop_times.stop_id` referring to `stop_areas.area_id` or `id` from `locations.geojson`.
- `pickup_type=3` **forbidden** for `stop_areas.area_id` or `locations.geojson`.
- 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** for `stop_times.stop_id` referring to `stop_areas.area_id` or `id` from `locations.geojson`.
- 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`, 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`. If this field is empty, the `stop_time` inherits any continuous pickup behavior defined in `routes.txt`. |
From 33da9b91043b4ee60efc6a25271532e88094b61b Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Thu, 9 Nov 2023 15:40:41 -0500
Subject: [PATCH 23/41] Modify stop_times.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 0d1dab46f..b0e30b7f4 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -268,8 +268,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 | **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** for `stop_times.stop_id` referring to `stop_areas.area_id` or `id` from `locations.geojson`.
- `pickup_type=3` **forbidden** for `stop_areas.area_id` or `locations.geojson`.
- 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** for `stop_times.stop_id` referring to `stop_areas.area_id` or `id` from `locations.geojson`.
- 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 `stop_times.location_group_id` or `stop_times.location_id` are defined.
- `pickup_type=3` **forbidden** if `stop_times.location_group_id` or `stop_times.location_id` 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 `stop_times.location_group_id` or `stop_times.location_id` 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`, 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`. If this field is empty, the `stop_time` inherits any continuous pickup behavior defined in `routes.txt`. |
| `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`, 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`. If this field is empty, the `stop_time` inherits any continuous drop-off behavior defined in `routes.txt`. |
| `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.
*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 c97df8e473bd28389cb58ff0566df0e8dd358522 Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Thu, 9 Nov 2023 16:11:30 -0500
Subject: [PATCH 24/41] 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 b0e30b7f4..7aec35d0d 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -264,7 +264,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 within locations should be referenced in the sequence in which service is available in those locations. A data consumer should assume that a rider picked up at one stop or in one location can be dropped off at any stop or in any location later in the trip, pursuant to the `pickup/drop_off_type` of those stop_times and the time constraints of each `start/end_pickup_drop_off_window`.
Conditionally Required:
- **Required** if `start_pickup_drop_off_window` or `end_pickup_drop_off_window` 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 within locations should be referenced in the sequence in which service is available in those locations. A data consumer should assume that a rider picked up at one stop or in one location can be dropped off at any stop or in any location later in the trip, pursuant to the `pickup/drop_off_type` of those stop_times and the time constraints of each `start/end_pickup_drop_off_window`.
**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 a rider picked up at one stop or in one location can be dropped off at any stop or in any location later in the trip, pursuant to the `pickup/drop_off_type` of those stop_times and the time constraints of each `start/end_pickup_drop_off_window`.
**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.*
Travel within the same stop area or GeoJSON location requires two records in `stop_times.txt` with the same `stop_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` 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. |
From 757d6766bfdf64cada40b0e04dab5f5b5d7a8b20 Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Thu, 9 Nov 2023 16:32:57 -0500
Subject: [PATCH 25/41] Change requirement condition for 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 7aec35d0d..112797bf5 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -261,7 +261,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`).
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 local time for the day on which the trip schedule begins.
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`).
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 local time for the day on which the trip schedule begins.
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 within locations should be referenced in the sequence in which service is available in those locations. A data consumer should assume that a rider picked up at one stop or in one location can be dropped off at any stop or in any location later in the trip, pursuant to the `pickup/drop_off_type` of those stop_times and the time constraints of each `start/end_pickup_drop_off_window`.
Conditionally Required:
- **Required** if `start_pickup_drop_off_window` or `end_pickup_drop_off_window` are NOT defined.
- **Forbidden** if `stop_times.location_group_id` or `stop_times.location_id` are defined. |
+| `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 within locations should be referenced in the sequence in which service is available in those locations. A data consumer should assume that a rider picked up at one stop or in one location can be dropped off at any stop or in any location later in the trip, pursuant to the `pickup/drop_off_type` of those stop_times and the time constraints of each `start/end_pickup_drop_off_window`.
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 within locations should be referenced in the sequence in which service is available in those locations. A data consumer should assume that a rider picked up at one stop or in one location can be dropped off at any stop or in any location later in the trip, pursuant to the `pickup/drop_off_type` of those stop_times and the time constraints of each `start/end_pickup_drop_off_window`.
**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 a rider picked up at one stop or in one location can be dropped off at any stop or in any location later in the trip, pursuant to the `pickup/drop_off_type` of those stop_times and the time constraints of each `start/end_pickup_drop_off_window`.
**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`. |
From 352f09ef58d9bc74dbf5b5850991d2b5d93d7b2c Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Thu, 9 Nov 2023 17:23:03 -0500
Subject: [PATCH 26/41] Modify locations.geojson
---
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 112797bf5..ccd7b3b75 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -645,7 +645,7 @@ Defines GeoJSON locations that indicate groups of lat/lon coordinates defining z
- 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` belongs to the same namespace as `stop_id` in `stops.txt` and `area_id` in `stop_areas.txt`, called “stop locations”.
+- Every GeoJSON `Feature` must have an `id`. The `id` belongs to the same namespace as `stop_id` in `stops.txt` and `location_group_id` in `location_groups.txt`.
- Every GeoJSON `Feature` should have objects and associated keys according to the table below:
| Field Name | Type | Presence | Description |
@@ -653,7 +653,7 @@ Defines GeoJSON locations that indicate groups of lat/lon coordinates defining z
| - `type` | String | **Required** | `"FeatureCollection"` of locations. |
| - `features` | Array | **Required** | Collection of `"Feature"` objects describing the locations. |
| \- `type` | String | **Required** | `"Feature"` |
-| \- `id` | String | **Required** | Location ID belonging to the same namespace as `stops.stop_id`. It is forbidden to define an `id` from `locations.geojson` with the same value as a `stops.stop_id` or a `stop_areas.area_id`.|
+| \- `id` | String | **Required** | Location ID belonging to the same namespace as `stops.stop_id`. It is forbidden to define an `id` from `locations.geojson` with the same value as a `stops.stop_id` or a `location_groups.location_group_id`.|
| \- `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. |
From fdcf87568c1e30302f6526cff7409c2037f9334f Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Fri, 10 Nov 2023 09:46:19 -0500
Subject: [PATCH 27/41] Modify stop_times.continuous_pickup/drop_off
Forbid continuous pickup/dropoff for flex services
---
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 ccd7b3b75..5aa2af748 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -270,8 +270,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 `stop_times.location_group_id` or `stop_times.location_id` are defined.
- `pickup_type=3` **forbidden** if `stop_times.location_group_id` or `stop_times.location_id` 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 `stop_times.location_group_id` or `stop_times.location_id` 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`, 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`. If this field is empty, the `stop_time` inherits any continuous pickup behavior defined in `routes.txt`. |
-| `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`, 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`. If this field is empty, the `stop_time` inherits any continuous drop-off behavior defined in `routes.txt`. |
+| `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`, 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`. If this field is empty, the `stop_time` inherits any continuous pickup behavior defined in `routes.txt`.
**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`, 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`. If this field is empty, the `stop_time` inherits any continuous drop-off behavior defined in `routes.txt`.
**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.
*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 | Optional | 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`. |
From df038ddd4c42fe18f161a2ca06d122548a7d3245 Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Fri, 10 Nov 2023 10:17:09 -0500
Subject: [PATCH 28/41] Modify routes.continuous_pickup/drop_off
Forbid continuous pickup/dropoff for flex services.
---
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 5aa2af748..1bc12019b 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -210,8 +210,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`, 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`, 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`, 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`, 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 | Optional | Identifies a group of routes. Multiple rows in [routes.txt](#routestxt) may have the same `network_id`.|
### trips.txt
From e428c8e75cda4e0b07a446a44acc5b0c92a2664d Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Fri, 17 Nov 2023 11:37:22 -0500
Subject: [PATCH 29/41] Dedicated clarifications for stop and location group
---
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 1bc12019b..a9f09fd8c 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -261,8 +261,8 @@ 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`).
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 local time for the day on which the trip schedule begins.
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`).
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 local time for the day on which the trip schedule begins.
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 within locations should be referenced in the sequence in which service is available in those locations. A data consumer should assume that a rider picked up at one stop or in one location can be dropped off at any stop or in any location later in the trip, pursuant to the `pickup/drop_off_type` of those stop_times and the time constraints of each `start/end_pickup_drop_off_window`.
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 within locations should be referenced in the sequence in which service is available in those locations. A data consumer should assume that a rider picked up at one stop or in one location can be dropped off at any stop or in any location later in the trip, pursuant to the `pickup/drop_off_type` of those stop_times and the time constraints of each `start/end_pickup_drop_off_window`.
**Conditionally Forbidden**:
- **Forbidden** if `stop_times.stop_id` or `stop_times.location_id` are defined. |
+| `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 a rider picked up at one stop or in one location can be dropped off at any stop or in any location later in the trip, pursuant to the `pickup/drop_off_type` of those stop_times and the time constraints of each `start/end_pickup_drop_off_window`.
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 a rider picked up at one stop or in one location can be dropped off at any stop or in any location later in the trip, pursuant to the `pickup/drop_off_type` of those stop_times and the time constraints of each `start/end_pickup_drop_off_window`.
**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 a rider picked up at one stop or in one location can be dropped off at any stop or in any location later in the trip, pursuant to the `pickup/drop_off_type` of those stop_times and the time constraints of each `start/end_pickup_drop_off_window`.
**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. |
From 6314252ed5c422e6d229654dfac282a3c5ca0ce3 Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Fri, 17 Nov 2023 11:47:26 -0500
Subject: [PATCH 30/41] Remove same id value restriction
---
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 a9f09fd8c..7998cbcac 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -633,7 +633,7 @@ Defines location groups that indicate groups of stops where a rider may request
| Field Name | Type | Required | Description |
| ---------- | ---- | ------------ | ----------- |
-| `location_group_id` | ID | **Required** | Identifies a location group. A location group is a group of stops that together indicate locations where a rider may request pickup or drop off.
By default, every `stop_id` belongs to a `location_group_id` of the same value. Therefore, it is forbidden to define a `location_group_id` with the same value as a `stop_id`.
Multiple entries in `location_groups.txt` can have the same `location_group_id`. |
+| `location_group_id` | ID | **Required** | Identifies a location group. A location group is a group of stops that together indicate locations where a rider may request pickup or drop off.
Multiple entries in `location_groups.txt` can have the same `location_group_id`. |
| `stop_id` | Foreign ID referencing `stops.stop_id` | **Required** | Identifies a stop belonging to the location group. |
| `location_group_name` | Text | Optional | Name of the location group. Must be defined either once, or exhaustively for a single `location_group_id`. |
@@ -653,7 +653,7 @@ Defines GeoJSON locations that indicate groups of lat/lon coordinates defining z
| - `type` | String | **Required** | `"FeatureCollection"` of locations. |
| - `features` | Array | **Required** | Collection of `"Feature"` objects describing the locations. |
| \- `type` | String | **Required** | `"Feature"` |
-| \- `id` | String | **Required** | Location ID belonging to the same namespace as `stops.stop_id`. It is forbidden to define an `id` from `locations.geojson` with the same value as a `stops.stop_id` or a `location_groups.location_group_id`.|
+| \- `id` | String | **Required** | Location ID belonging to the same namespace as `stops.stop_id`. |
| \- `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. |
From 7d10ffa97add72e49974cad95fbc620229885bcc Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Wed, 29 Nov 2023 14:31:47 -0500
Subject: [PATCH 31/41] Add unique ID restriction
Add unique ID description to stops.txt, locations.geojson, and location_groups.txt
---
gtfs/spec/en/reference.md | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md
index 7998cbcac..f045a6d47 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -175,7 +175,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`.
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. |
@@ -633,7 +633,7 @@ Defines location groups that indicate groups of stops where a rider may request
| Field Name | Type | Required | Description |
| ---------- | ---- | ------------ | ----------- |
-| `location_group_id` | ID | **Required** | Identifies a location group. A location group is a group of stops that together indicate locations where a rider may request pickup or drop off.
Multiple entries in `location_groups.txt` can have the same `location_group_id`. |
+| `location_group_id` | 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.
Multiple entries in `location_groups.txt` can have the same `location_group_id`. |
| `stop_id` | Foreign ID referencing `stops.stop_id` | **Required** | Identifies a stop belonging to the location group. |
| `location_group_name` | Text | Optional | Name of the location group. Must be defined either once, or exhaustively for a single `location_group_id`. |
@@ -645,7 +645,7 @@ Defines GeoJSON locations that indicate groups of lat/lon coordinates defining z
- 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` belongs to the same namespace as `stop_id` in `stops.txt` and `location_group_id` in `location_groups.txt`.
+- 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 |
@@ -653,7 +653,7 @@ Defines GeoJSON locations that indicate groups of lat/lon coordinates defining z
| - `type` | String | **Required** | `"FeatureCollection"` of locations. |
| - `features` | Array | **Required** | Collection of `"Feature"` objects describing the locations. |
| \- `type` | String | **Required** | `"Feature"` |
-| \- `id` | String | **Required** | Location ID belonging to the same namespace as `stops.stop_id`. |
+| \- `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. |
From 1fc0e6172ba79f86bc00915ace8bd7e7cbac6cd1 Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Wed, 29 Nov 2023 14:48:53 -0500
Subject: [PATCH 32/41] Add location_groups.txt to dataset files
---
gtfs/spec/en/reference.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md
index f045a6d47..f5c5df60b 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -124,6 +124,7 @@ 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. |
| [locations.geojson](#locationsgeojson) | Optional | GeoJSON locations, which are `Polygon` and `MultiPolygon` features that indicate groups of lat/lon coordinates defining zones where riders can request either pickup or drop off. |
| [booking_rules.txt](#booking_rulestxt) | Optional | Booking information for rider-requested services. |
| [translations.txt](#translationstxt) | Optional | Translations of customer-facing dataset values. |
From 7dee9298242a4ea4febd3cb13741dc37c4d2c48f Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Wed, 29 Nov 2023 15:06:48 -0500
Subject: [PATCH 33/41] Simplify language in stop_times
---
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 f5c5df60b..1afed0e8d 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -262,9 +262,9 @@ 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`).
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 local time for the day on which the trip schedule begins.
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`).
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 local time for the day on which the trip schedule begins.
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 a rider picked up at one stop or in one location can be dropped off at any stop or in any location later in the trip, pursuant to the `pickup/drop_off_type` of those stop_times and the time constraints of each `start/end_pickup_drop_off_window`.
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 a rider picked up at one stop or in one location can be dropped off at any stop or in any location later in the trip, pursuant to the `pickup/drop_off_type` of those stop_times and the time constraints of each `start/end_pickup_drop_off_window`.
**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 a rider picked up at one stop or in one location can be dropped off at any stop or in any location later in the trip, pursuant to the `pickup/drop_off_type` of those stop_times and the time constraints of each `start/end_pickup_drop_off_window`.
**Conditionally Forbidden**:
- **Forbidden** if `stop_times.stop_id` or `stop_times.location_group_id` are defined. |
+| `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_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. |
From c3929b3ffb340787277faf85b8c613bf68fa90a1 Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Thu, 7 Dec 2023 12:49:26 -0500
Subject: [PATCH 34/41] Change an incorrect dot to an underscore
Co-authored-by: Andrew Byrd
---
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 1afed0e8d..dd6bd2a03 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -124,7 +124,7 @@ 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_groups.txt](#location_groupstxt) | Optional | A group of stops that together indicate locations where a rider may request pickup or drop off. |
| [locations.geojson](#locationsgeojson) | Optional | GeoJSON locations, which are `Polygon` and `MultiPolygon` features that indicate groups of lat/lon coordinates defining zones where riders can request either pickup or drop off. |
| [booking_rules.txt](#booking_rulestxt) | Optional | Booking information for rider-requested services. |
| [translations.txt](#translationstxt) | Optional | Translations of customer-facing dataset values. |
From eacf043615b1b36c6751dc612d2737f609536078 Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Mon, 22 Jan 2024 16:15:19 -0500
Subject: [PATCH 35/41] not "indicate" groups, but "are" groups
Co-authored-by: Andrew Byrd
---
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 dd6bd2a03..e4a8410b4 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -630,7 +630,7 @@ File: **Optional**
Primary key (`location_group_id`, `location_id`)
-Defines location groups that indicate groups of stops where a rider may request pickup or drop off.
+Defines location groups, which are groups of stops where a rider may request pickup or drop off.
| Field Name | Type | Required | Description |
| ---------- | ---- | ------------ | ----------- |
From 5e22e1062c2802ce591722e8c47559f011de3ca0 Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Wed, 24 Jan 2024 11:18:07 -0500
Subject: [PATCH 36/41] Update location_groups and location_group_stops
---
gtfs/spec/en/reference.md | 21 ++++++++++++++++++---
1 file changed, 18 insertions(+), 3 deletions(-)
diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md
index e4a8410b4..5e0173725 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -31,6 +31,7 @@ This document defines the format and structure of the files that comprise a GTFS
- [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)
@@ -125,6 +126,7 @@ This specification defines the following files:
| [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 | GeoJSON locations, which are `Polygon` and `MultiPolygon` features that indicate groups of lat/lon coordinates defining zones where riders can request either pickup or drop off. |
| [booking_rules.txt](#booking_rulestxt) | Optional | Booking information for rider-requested services. |
| [translations.txt](#translationstxt) | Optional | Translations of customer-facing dataset values. |
@@ -628,15 +630,28 @@ Describes levels in a station. Useful in conjunction with `pathways.txt`, and is
File: **Optional**
-Primary key (`location_group_id`, `location_id`)
+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` | 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.
Multiple entries in `location_groups.txt` can have the same `location_group_id`. |
+| `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. |
-| `location_group_name` | Text | Optional | Name of the location group. Must be defined either once, or exhaustively for a single `location_group_id`. |
+
### locations.geojson
From 1419292118398bf9388f707e882d468a30839d6e Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Wed, 24 Jan 2024 13:24:43 -0500
Subject: [PATCH 37/41] Modify locations.geojson file description
---
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 5e0173725..cb2750a25 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -127,7 +127,7 @@ This specification defines the following files:
| [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 | GeoJSON locations, which are `Polygon` and `MultiPolygon` features that indicate groups of lat/lon coordinates defining zones where riders can request either pickup or drop off. |
+| [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. |
@@ -657,7 +657,7 @@ Assigns stops from stops.txt to location groups.
File: **Optional**
-Defines GeoJSON locations that indicate groups of lat/lon coordinates defining zones where riders can request either pickup or drop off.
+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.
From 13c858b7c5bfae7bdd3192b50fae0d407b37a65f Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Wed, 24 Jan 2024 15:25:25 -0500
Subject: [PATCH 38/41] Add "Zone Overlap Constraint"
---
gtfs/spec/en/reference.md | 3 +++
1 file changed, 3 insertions(+)
diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md
index cb2750a25..19b94ea32 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -280,6 +280,9 @@ 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 - Zone Overlap Constraint
+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 GTFS-Flex data example page.
+
### calendar.txt
File: **Conditionally Required**
From 088d1e366c6f5445cac4c260e995ddcccc802d7c Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Wed, 24 Jan 2024 16:23:29 -0500
Subject: [PATCH 39/41] Add travel time clarification
---
gtfs/spec/en/reference.md | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md
index 19b94ea32..7efce7956 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -280,8 +280,9 @@ 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 - Zone Overlap Constraint
-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 GTFS-Flex data example page.
+#### 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
From 3dc6aaa67626e1336a8e4886d0b02db7449497d9 Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Tue, 13 Feb 2024 17:04:53 -0500
Subject: [PATCH 40/41] Modify conditions for 4 fields
pickup_type
drop_off_type
start_pickup_drop_off_window
end_pickup_drop_off_window
---
gtfs/spec/en/reference.md | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md
index 7efce7956..ae8b790cf 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -269,10 +269,10 @@ 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 | **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 `stop_times.location_group_id` or `stop_times.location_id` are defined.
- `pickup_type=3` **forbidden** if `stop_times.location_group_id` or `stop_times.location_id` 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 `stop_times.location_group_id` or `stop_times.location_id` are defined.
- Optional otherwise. |
+| `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`, 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`. If this field is empty, the `stop_time` inherits any continuous pickup behavior defined in `routes.txt`.
**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`, 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`. If this field is empty, the `stop_time` inherits any continuous drop-off behavior defined in `routes.txt`.
**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.
*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 709066b1eab22edd274fbfa829b0b66a36eb4168 Mon Sep 17 00:00:00 2001
From: Tzu-Jen Chan <126435471+tzujenchanmbd@users.noreply.github.com>
Date: Tue, 13 Feb 2024 17:10:27 -0500
Subject: [PATCH 41/41] 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 ae8b790cf..3cda76f70 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -262,12 +262,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`).
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 local time for the day on which the trip schedule begins.
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`).
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 local time for the day on which the trip schedule begins.
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`).
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 local time for the day on which the trip schedule begins.
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`).
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 local time for the day on which the trip schedule begins.
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. |