From 25f1287b07e09bd924e4401077819e03fe17a601 Mon Sep 17 00:00:00 2001 From: scmcca Date: Fri, 17 Sep 2021 10:13:47 -0400 Subject: [PATCH 1/8] Trip-to-trip transfers --- 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 e4c1b423c..ed7abf176 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -337,6 +337,8 @@ When calculating an itinerary, GTFS-consuming applications interpolate transfers | ------ | ------ | ------ | ------ | | `from_stop_id` | ID referencing `stops.stop_id` | **Required** | Identifies a stop or station where a connection between routes begins. If this field refers to a station, the transfer rule applies to all its child stops. | | `to_stop_id` | ID referencing `stops.stop_id` | **Required** | Identifies a stop or station where a connection between routes ends. If this field refers to a station, the transfer rule applies to all child stops. | +| `from_trip_id` | ID referencing `trips.trip_id` | Optional | Identifies a trip where a connection between routes begins.

If `from_trip_id` is defined, the transfer will apply to the arriving trip for the given `from_stop_id`. | +| `to_trip_id` | ID referencing `trips.trip_id` | Optional | Identifies a trip where a connection between routes ends.

If `to_trip_id` is defined, the transfer will apply to the departing trip for the given `to_stop_id`. | | `transfer_type` | Enum | **Required** | Indicates the type of connection for the specified (`from_stop_id`, `to_stop_id`) pair. Valid options are:

`0` or empty - Recommended transfer point between routes.
`1` - Timed transfer point between two routes. The departing vehicle is expected to wait for the arriving one and leave sufficient time for a rider to transfer between routes.
`2` - Transfer requires a minimum amount of time between arrival and departure to ensure a connection. The time required to transfer is specified by `min_transfer_time`.
`3` - Transfers are not possible between routes at the location. | | `min_transfer_time` | Non-negative integer | Optional | Amount of time, in seconds, that must be available to permit a transfer between routes at the specified stops. The `min_transfer_time` should be sufficient to permit a typical rider to move between the two stops, including buffer time to allow for schedule variance on each route. | From c5bbaf7bf7ff236a390a2cb6421f4e6d74f0a83e Mon Sep 17 00:00:00 2001 From: scmcca Date: Fri, 17 Sep 2021 11:44:23 -0400 Subject: [PATCH 2/8] route-to-route transfers --- 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 ed7abf176..15b9302cd 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -337,6 +337,8 @@ When calculating an itinerary, GTFS-consuming applications interpolate transfers | ------ | ------ | ------ | ------ | | `from_stop_id` | ID referencing `stops.stop_id` | **Required** | Identifies a stop or station where a connection between routes begins. If this field refers to a station, the transfer rule applies to all its child stops. | | `to_stop_id` | ID referencing `stops.stop_id` | **Required** | Identifies a stop or station where a connection between routes ends. If this field refers to a station, the transfer rule applies to all child stops. | +| `from_route_id` | ID referencing `routes.route_id` | Optional | Identifies a route where a connection begins.

If `from_route_id` is defined, the transfer will apply to the arriving trip on the route for the given `from_stop_id`. | +| `to_route_id` | ID referencing `routes.route_id` | Optional | Identifies a route where a connection ends.

If `to_route_id` is defined, the transfer will apply to the departing trip on the route for the given `to_stop_id`. | | `from_trip_id` | ID referencing `trips.trip_id` | Optional | Identifies a trip where a connection between routes begins.

If `from_trip_id` is defined, the transfer will apply to the arriving trip for the given `from_stop_id`. | | `to_trip_id` | ID referencing `trips.trip_id` | Optional | Identifies a trip where a connection between routes ends.

If `to_trip_id` is defined, the transfer will apply to the departing trip for the given `to_stop_id`. | | `transfer_type` | Enum | **Required** | Indicates the type of connection for the specified (`from_stop_id`, `to_stop_id`) pair. Valid options are:

`0` or empty - Recommended transfer point between routes.
`1` - Timed transfer point between two routes. The departing vehicle is expected to wait for the arriving one and leave sufficient time for a rider to transfer between routes.
`2` - Transfer requires a minimum amount of time between arrival and departure to ensure a connection. The time required to transfer is specified by `min_transfer_time`.
`3` - Transfers are not possible between routes at the location. | From 1c5d65a87ba341527ccd5c958dade86a23f8d5ae Mon Sep 17 00:00:00 2001 From: scmcca Date: Mon, 20 Sep 2021 11:49:44 -0400 Subject: [PATCH 3/8] Conditionally Forbidden --- gtfs/spec/en/reference.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md index 15b9302cd..41d5e3422 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -48,6 +48,7 @@ Presence conditions applicable to fields and files: * **Required** - The field or file must be included in the dataset and contain a valid value for each record. * **Optional** - The field or file may be omitted from the dataset. * **Conditionally Required** - The field or file must be included under conditions outlined in the field or file description. +* **Conditionally Forbidden** - The field or file is forbidden under certain conditions that are outlined in the field or file description. Otherwise, the field or file is optional. ### Field Types @@ -337,10 +338,10 @@ When calculating an itinerary, GTFS-consuming applications interpolate transfers | ------ | ------ | ------ | ------ | | `from_stop_id` | ID referencing `stops.stop_id` | **Required** | Identifies a stop or station where a connection between routes begins. If this field refers to a station, the transfer rule applies to all its child stops. | | `to_stop_id` | ID referencing `stops.stop_id` | **Required** | Identifies a stop or station where a connection between routes ends. If this field refers to a station, the transfer rule applies to all child stops. | -| `from_route_id` | ID referencing `routes.route_id` | Optional | Identifies a route where a connection begins.

If `from_route_id` is defined, the transfer will apply to the arriving trip on the route for the given `from_stop_id`. | -| `to_route_id` | ID referencing `routes.route_id` | Optional | Identifies a route where a connection ends.

If `to_route_id` is defined, the transfer will apply to the departing trip on the route for the given `to_stop_id`. | -| `from_trip_id` | ID referencing `trips.trip_id` | Optional | Identifies a trip where a connection between routes begins.

If `from_trip_id` is defined, the transfer will apply to the arriving trip for the given `from_stop_id`. | -| `to_trip_id` | ID referencing `trips.trip_id` | Optional | Identifies a trip where a connection between routes ends.

If `to_trip_id` is defined, the transfer will apply to the departing trip for the given `to_stop_id`. | +| `from_route_id` | ID referencing `routes.route_id` | **Conditionally Forbidden** | Identifies a route where a connection begins.

If `from_route_id` is defined, the transfer will apply to the arriving trip on the route for the given `from_stop_id`.

Conditionally Forbidden:
- **Forbidden** if `from_trip_id` is defined.
- Optional otherwise. | +| `to_route_id` | ID referencing `routes.route_id` | **Conditionally Forbidden** | Identifies a route where a connection ends.

If `to_route_id` is defined, the transfer will apply to the departing trip on the route for the given `to_stop_id`.

Conditionally Forbidden:
- **Forbidden** if `to_trip_id` is defined.
- Optional otherwise. | +| `from_trip_id` | ID referencing `trips.trip_id` | **Conditionally Forbidden** | Identifies a trip where a connection between routes begins.

If `from_trip_id` is defined, the transfer will apply to the arriving trip for the given `from_stop_id`.

Conditionally Forbidden:
- **Forbidden** if `from_route_id` is defined.
- Optional otherwise. | +| `to_trip_id` | ID referencing `trips.trip_id` | **Conditionally Forbidden** | Identifies a trip where a connection between routes ends.

If `to_trip_id` is defined, the transfer will apply to the departing trip for the given `to_stop_id`.

Conditionally Forbidden:
- **Forbidden** if `to_route_id` is defined.
- Optional otherwise. | | `transfer_type` | Enum | **Required** | Indicates the type of connection for the specified (`from_stop_id`, `to_stop_id`) pair. Valid options are:

`0` or empty - Recommended transfer point between routes.
`1` - Timed transfer point between two routes. The departing vehicle is expected to wait for the arriving one and leave sufficient time for a rider to transfer between routes.
`2` - Transfer requires a minimum amount of time between arrival and departure to ensure a connection. The time required to transfer is specified by `min_transfer_time`.
`3` - Transfers are not possible between routes at the location. | | `min_transfer_time` | Non-negative integer | Optional | Amount of time, in seconds, that must be available to permit a transfer between routes at the specified stops. The `min_transfer_time` should be sufficient to permit a typical rider to move between the two stops, including buffer time to allow for schedule variance on each route. | From 8d168c555e3b72b4d4e748b8205964ff33f0ae8e Mon Sep 17 00:00:00 2001 From: scmcca Date: Mon, 20 Sep 2021 12:12:53 -0400 Subject: [PATCH 4/8] specificity rules --- gtfs/spec/en/reference.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md index 41d5e3422..703995b07 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -334,6 +334,16 @@ File: **Optional** When calculating an itinerary, GTFS-consuming applications interpolate transfers based on allowable time and stop proximity. [Transfers.txt](#transferstxt) specifies additional rules and overrides for selected transfers. +Fields `from_trip_id`, `to_trip_id`, `from_route_id` and `to_route_id` allow higher orders of specificity for transfer rules. Along with `from_stop_id` and `to_stop_id`, the ranking of specificity is as follows: +1. Both `trip_id`s defined: `from_trip_id` and `to_trip_id`. +2. One `trip_id` and `route_id` set defined: (`from_trip_id` and `to_route_id`) or (`from_route_id` and `to_trip_id`). +3. One `trip_id` defined: `from_trip_id` or `to_trip_id`. +4. Both `route_id`s defined: `from_route_id` and `to_route_id`. +5. One `route_id` defined: `from_route_id` or `to_route_id`. +6. Only `from_stop_id` and `to_stop_id` defined: no route or trip related fields set. + +For a given ordered pair of arriving trip and departing trip, the transfer with the greatest specificity that applies between these two trips is chosen. For any pair of trips, there should not be two transfers with equally maximal specificity that could apply. + | Field Name | Type | Presence | Description | | ------ | ------ | ------ | ------ | | `from_stop_id` | ID referencing `stops.stop_id` | **Required** | Identifies a stop or station where a connection between routes begins. If this field refers to a station, the transfer rule applies to all its child stops. | From a1891070e76a707852a45e79aba16c88cc6f2227 Mon Sep 17 00:00:00 2001 From: scmcca Date: Mon, 27 Sep 2021 10:37:41 -0400 Subject: [PATCH 5/8] Conditionally Forbidden to RFC Editorial to reword Conditionally Forbidden to RFC 2119 --- 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 703995b07..32d0e53b6 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -48,7 +48,7 @@ Presence conditions applicable to fields and files: * **Required** - The field or file must be included in the dataset and contain a valid value for each record. * **Optional** - The field or file may be omitted from the dataset. * **Conditionally Required** - The field or file must be included under conditions outlined in the field or file description. -* **Conditionally Forbidden** - The field or file is forbidden under certain conditions that are outlined in the field or file description. Otherwise, the field or file is optional. +* **Conditionally Forbidden** - The field or file must not be included under certain conditions that are outlined in the field or file description. ### Field Types From 19431dfc4052ef287fce5cbcba55ddb08a3fd5c5 Mon Sep 17 00:00:00 2001 From: scmcca Date: Mon, 27 Sep 2021 12:02:49 -0400 Subject: [PATCH 6/8] revert conditionally forbidden updated to match the original Google extension --- gtfs/spec/en/reference.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md index 32d0e53b6..09d5b5ffd 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -48,7 +48,6 @@ Presence conditions applicable to fields and files: * **Required** - The field or file must be included in the dataset and contain a valid value for each record. * **Optional** - The field or file may be omitted from the dataset. * **Conditionally Required** - The field or file must be included under conditions outlined in the field or file description. -* **Conditionally Forbidden** - The field or file must not be included under certain conditions that are outlined in the field or file description. ### Field Types @@ -348,10 +347,10 @@ For a given ordered pair of arriving trip and departing trip, the transfer with | ------ | ------ | ------ | ------ | | `from_stop_id` | ID referencing `stops.stop_id` | **Required** | Identifies a stop or station where a connection between routes begins. If this field refers to a station, the transfer rule applies to all its child stops. | | `to_stop_id` | ID referencing `stops.stop_id` | **Required** | Identifies a stop or station where a connection between routes ends. If this field refers to a station, the transfer rule applies to all child stops. | -| `from_route_id` | ID referencing `routes.route_id` | **Conditionally Forbidden** | Identifies a route where a connection begins.

If `from_route_id` is defined, the transfer will apply to the arriving trip on the route for the given `from_stop_id`.

Conditionally Forbidden:
- **Forbidden** if `from_trip_id` is defined.
- Optional otherwise. | -| `to_route_id` | ID referencing `routes.route_id` | **Conditionally Forbidden** | Identifies a route where a connection ends.

If `to_route_id` is defined, the transfer will apply to the departing trip on the route for the given `to_stop_id`.

Conditionally Forbidden:
- **Forbidden** if `to_trip_id` is defined.
- Optional otherwise. | -| `from_trip_id` | ID referencing `trips.trip_id` | **Conditionally Forbidden** | Identifies a trip where a connection between routes begins.

If `from_trip_id` is defined, the transfer will apply to the arriving trip for the given `from_stop_id`.

Conditionally Forbidden:
- **Forbidden** if `from_route_id` is defined.
- Optional otherwise. | -| `to_trip_id` | ID referencing `trips.trip_id` | **Conditionally Forbidden** | Identifies a trip where a connection between routes ends.

If `to_trip_id` is defined, the transfer will apply to the departing trip for the given `to_stop_id`.

Conditionally Forbidden:
- **Forbidden** if `to_route_id` is defined.
- Optional otherwise. | +| `from_route_id` | ID referencing `routes.route_id` | Optional | Identifies a route where a connection begins.

If `from_route_id` is defined, the transfer will apply to the arriving trip on the route for the given `from_stop_id`.

If both `from_route_id` and `from_trip_id` are defined, `from_trip_id` will take precedence. | +| `to_route_id` | ID referencing `routes.route_id` | Optional | Identifies a route where a connection ends.

If `to_route_id` is defined, the transfer will apply to the departing trip on the route for the given `to_stop_id`.

If both `to_route_id` and `to_trip_id` are defined, `to_trip_id` will take precedence. | +| `from_trip_id` | ID referencing `trips.trip_id` | Optional | Identifies a trip where a connection between routes begins.

If `from_trip_id` is defined, the transfer will apply to the arriving trip for the given `from_stop_id`.

If both `from_route_id` and `from_trip_id` are defined, `from_trip_id` will take precedence. | +| `to_trip_id` | ID referencing `trips.trip_id` | Optional | Identifies a trip where a connection between routes ends.

If `to_trip_id` is defined, the transfer will apply to the departing trip for the given `to_stop_id`.

If both `to_route_id` and `to_trip_id` are defined, `to_trip_id` will take precedence. | | `transfer_type` | Enum | **Required** | Indicates the type of connection for the specified (`from_stop_id`, `to_stop_id`) pair. Valid options are:

`0` or empty - Recommended transfer point between routes.
`1` - Timed transfer point between two routes. The departing vehicle is expected to wait for the arriving one and leave sufficient time for a rider to transfer between routes.
`2` - Transfer requires a minimum amount of time between arrival and departure to ensure a connection. The time required to transfer is specified by `min_transfer_time`.
`3` - Transfers are not possible between routes at the location. | | `min_transfer_time` | Non-negative integer | Optional | Amount of time, in seconds, that must be available to permit a transfer between routes at the specified stops. The `min_transfer_time` should be sufficient to permit a typical rider to move between the two stops, including buffer time to allow for schedule variance on each route. | From 45e4afeeae243020e94817fa85fc8133126997ca Mon Sep 17 00:00:00 2001 From: scmcca Date: Mon, 27 Sep 2021 12:45:46 -0400 Subject: [PATCH 7/8] require matching routes and trips --- 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 09d5b5ffd..c42e215da 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -347,10 +347,10 @@ For a given ordered pair of arriving trip and departing trip, the transfer with | ------ | ------ | ------ | ------ | | `from_stop_id` | ID referencing `stops.stop_id` | **Required** | Identifies a stop or station where a connection between routes begins. If this field refers to a station, the transfer rule applies to all its child stops. | | `to_stop_id` | ID referencing `stops.stop_id` | **Required** | Identifies a stop or station where a connection between routes ends. If this field refers to a station, the transfer rule applies to all child stops. | -| `from_route_id` | ID referencing `routes.route_id` | Optional | Identifies a route where a connection begins.

If `from_route_id` is defined, the transfer will apply to the arriving trip on the route for the given `from_stop_id`.

If both `from_route_id` and `from_trip_id` are defined, `from_trip_id` will take precedence. | -| `to_route_id` | ID referencing `routes.route_id` | Optional | Identifies a route where a connection ends.

If `to_route_id` is defined, the transfer will apply to the departing trip on the route for the given `to_stop_id`.

If both `to_route_id` and `to_trip_id` are defined, `to_trip_id` will take precedence. | -| `from_trip_id` | ID referencing `trips.trip_id` | Optional | Identifies a trip where a connection between routes begins.

If `from_trip_id` is defined, the transfer will apply to the arriving trip for the given `from_stop_id`.

If both `from_route_id` and `from_trip_id` are defined, `from_trip_id` will take precedence. | -| `to_trip_id` | ID referencing `trips.trip_id` | Optional | Identifies a trip where a connection between routes ends.

If `to_trip_id` is defined, the transfer will apply to the departing trip for the given `to_stop_id`.

If both `to_route_id` and `to_trip_id` are defined, `to_trip_id` will take precedence. | +| `from_route_id` | ID referencing `routes.route_id` | Optional | Identifies a route where a connection begins.

If `from_route_id` is defined, the transfer will apply to the arriving trip on the route for the given `from_stop_id`.

If both `from_trip_id` and `from_route_id` are defined, the `trip_id` must belong to the `route_id`. In this case, `from_trip_id` will take precedence. | +| `to_route_id` | ID referencing `routes.route_id` | Optional | Identifies a route where a connection ends.

If `to_route_id` is defined, the transfer will apply to the departing trip on the route for the given `to_stop_id`.

If both `to_trip_id` and `to_route_id` are defined, the `trip_id` must belong to the `route_id`. In this case, `to_trip_id` will take precedence. | +| `from_trip_id` | ID referencing `trips.trip_id` | Optional | Identifies a trip where a connection between routes begins.

If `from_trip_id` is defined, the transfer will apply to the arriving trip for the given `from_stop_id`.

If both `from_trip_id` and `from_route_id` are defined, the `trip_id` must belong to the `route_id`. In this case, `from_trip_id` will take precedence. | +| `to_trip_id` | ID referencing `trips.trip_id` | Optional | Identifies a trip where a connection between routes ends.

If `to_trip_id` is defined, the transfer will apply to the departing trip for the given `to_stop_id`.

If both `to_trip_id` and `to_route_id` are defined, the `trip_id` must belong to the `route_id`. In this case, `to_trip_id` will take precedence. | | `transfer_type` | Enum | **Required** | Indicates the type of connection for the specified (`from_stop_id`, `to_stop_id`) pair. Valid options are:

`0` or empty - Recommended transfer point between routes.
`1` - Timed transfer point between two routes. The departing vehicle is expected to wait for the arriving one and leave sufficient time for a rider to transfer between routes.
`2` - Transfer requires a minimum amount of time between arrival and departure to ensure a connection. The time required to transfer is specified by `min_transfer_time`.
`3` - Transfers are not possible between routes at the location. | | `min_transfer_time` | Non-negative integer | Optional | Amount of time, in seconds, that must be available to permit a transfer between routes at the specified stops. The `min_transfer_time` should be sufficient to permit a typical rider to move between the two stops, including buffer time to allow for schedule variance on each route. | From 61f76fc688ee9f1f73f18ec958a78f3da955e553 Mon Sep 17 00:00:00 2001 From: scmcca Date: Tue, 28 Sep 2021 14:56:45 -0400 Subject: [PATCH 8/8] reword trip_id precedence --- 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 c42e215da..6d95b42ff 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -347,10 +347,10 @@ For a given ordered pair of arriving trip and departing trip, the transfer with | ------ | ------ | ------ | ------ | | `from_stop_id` | ID referencing `stops.stop_id` | **Required** | Identifies a stop or station where a connection between routes begins. If this field refers to a station, the transfer rule applies to all its child stops. | | `to_stop_id` | ID referencing `stops.stop_id` | **Required** | Identifies a stop or station where a connection between routes ends. If this field refers to a station, the transfer rule applies to all child stops. | -| `from_route_id` | ID referencing `routes.route_id` | Optional | Identifies a route where a connection begins.

If `from_route_id` is defined, the transfer will apply to the arriving trip on the route for the given `from_stop_id`.

If both `from_trip_id` and `from_route_id` are defined, the `trip_id` must belong to the `route_id`. In this case, `from_trip_id` will take precedence. | -| `to_route_id` | ID referencing `routes.route_id` | Optional | Identifies a route where a connection ends.

If `to_route_id` is defined, the transfer will apply to the departing trip on the route for the given `to_stop_id`.

If both `to_trip_id` and `to_route_id` are defined, the `trip_id` must belong to the `route_id`. In this case, `to_trip_id` will take precedence. | -| `from_trip_id` | ID referencing `trips.trip_id` | Optional | Identifies a trip where a connection between routes begins.

If `from_trip_id` is defined, the transfer will apply to the arriving trip for the given `from_stop_id`.

If both `from_trip_id` and `from_route_id` are defined, the `trip_id` must belong to the `route_id`. In this case, `from_trip_id` will take precedence. | -| `to_trip_id` | ID referencing `trips.trip_id` | Optional | Identifies a trip where a connection between routes ends.

If `to_trip_id` is defined, the transfer will apply to the departing trip for the given `to_stop_id`.

If both `to_trip_id` and `to_route_id` are defined, the `trip_id` must belong to the `route_id`. In this case, `to_trip_id` will take precedence. | +| `from_route_id` | ID referencing `routes.route_id` | Optional | Identifies a route where a connection begins.

If `from_route_id` is defined, the transfer will apply to the arriving trip on the route for the given `from_stop_id`.

If both `from_trip_id` and `from_route_id` are defined, the `trip_id` must belong to the `route_id`, and `from_trip_id` will take precedence. | +| `to_route_id` | ID referencing `routes.route_id` | Optional | Identifies a route where a connection ends.

If `to_route_id` is defined, the transfer will apply to the departing trip on the route for the given `to_stop_id`.

If both `to_trip_id` and `to_route_id` are defined, the `trip_id` must belong to the `route_id`, and `to_trip_id` will take precedence. | +| `from_trip_id` | ID referencing `trips.trip_id` | Optional | Identifies a trip where a connection between routes begins.

If `from_trip_id` is defined, the transfer will apply to the arriving trip for the given `from_stop_id`.

If both `from_trip_id` and `from_route_id` are defined, the `trip_id` must belong to the `route_id`, and `from_trip_id` will take precedence. | +| `to_trip_id` | ID referencing `trips.trip_id` | Optional | Identifies a trip where a connection between routes ends.

If `to_trip_id` is defined, the transfer will apply to the departing trip for the given `to_stop_id`.

If both `to_trip_id` and `to_route_id` are defined, the `trip_id` must belong to the `route_id`, and `to_trip_id` will take precedence. | | `transfer_type` | Enum | **Required** | Indicates the type of connection for the specified (`from_stop_id`, `to_stop_id`) pair. Valid options are:

`0` or empty - Recommended transfer point between routes.
`1` - Timed transfer point between two routes. The departing vehicle is expected to wait for the arriving one and leave sufficient time for a rider to transfer between routes.
`2` - Transfer requires a minimum amount of time between arrival and departure to ensure a connection. The time required to transfer is specified by `min_transfer_time`.
`3` - Transfers are not possible between routes at the location. | | `min_transfer_time` | Non-negative integer | Optional | Amount of time, in seconds, that must be available to permit a transfer between routes at the specified stops. The `min_transfer_time` should be sufficient to permit a typical rider to move between the two stops, including buffer time to allow for schedule variance on each route. |