From 59db69d655fb2605c9b108718bcfd70380c0647e Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Wed, 24 Nov 2021 15:49:05 -0500 Subject: [PATCH 01/13] Define transfer_type 4, 5. Deprecate block_id. --- gtfs/spec/en/reference.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md index b5a76344e..615f5981a 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -185,16 +185,26 @@ File: **Required** | `route_id` | ID referencing `routes.route_id` | **Required** | Identifies a route. | | `service_id` | ID referencing `calendar.service_id` or `calendar_dates.service_id` | **Required** | Identifies a set of dates when service is available for one or more routes. | | `trip_id` | ID | **Required** | Identifies a trip. | +<<<<<<< Updated upstream | `trip_headsign` | Text | Optional | Text that appears on signage identifying the trip's destination to riders. Should be used to distinguish between different patterns of service on the same route.

If the headsign changes during a trip, values for `trip_headsign` may be overridden by defining values in `stop_times.stop_headsign` for specific `stop_time`s along the trip. | | `trip_short_name` | Text | Optional | Public facing text used to identify the trip to riders, for instance, to identify train numbers for commuter rail trips. If riders do not commonly rely on trip names, `trip_short_name` should be empty. A `trip_short_name` value, if provided, should uniquely identify a trip within a service day; it should not be used for destination names or limited/express designations. | | `direction_id` | Enum | Optional | Indicates the direction of travel for a trip. This field should not be used in routing; it provides a way to separate trips by direction when publishing time tables. Valid options are:

`0` - Travel in one direction (e.g. outbound travel).
`1` - Travel in the opposite direction (e.g. inbound travel).
*Example: The `trip_headsign` and `direction_id` fields may be used together to assign a name to travel in each direction for a set of trips. A [trips.txt](#tripstxt) file could contain these records for use in time tables:*
`trip_id,...,trip_headsign,direction_id`
`1234,...,Airport,0`
`1505,...,Downtown,1` | | `block_id` | ID | Optional | Identifies the block to which the trip belongs. A block consists of a single trip or many sequential trips made using the same vehicle, defined by shared service days and `block_id`. A `block_id` may have trips with different service days, making distinct blocks. See the [example below](#example-blocks-and-service-day) | | `shape_id` | ID referencing `shapes.shape_id` | **Conditionally Required** | Identifies a geospatial shape describing the vehicle travel path for a trip.

Conditionally Required:
- **Required** if the trip has a continuous pickup or drop-off behavior defined either in `routes.txt` or in `stop_times.txt`.
- Optional otherwise. | +======= +| `trip_headsign` | Text | Optional | Text that appears on signage identifying the trip's destination to riders. Use this field to distinguish between different patterns of service on the same route. If the headsign changes during a trip, `trip_headsign` can be overridden by specifying values for the `stop_times.stop_headsign`. | +| `trip_short_name` | Text | Optional | Public facing text used to identify the trip to riders, for instance, to identify train numbers for commuter rail trips. If riders do not commonly rely on trip names, leave this field empty. A `trip_short_name` value, if provided, should uniquely identify a trip within a service day; it should not be used for destination names or limited/express designations. | +| `direction_id` | Enum | Optional | Indicates the direction of travel for a trip. This field is not used in routing; it provides a way to separate trips by direction when publishing time tables. Valid options are:

`0` - Travel in one direction (e.g. outbound travel).
`1` - Travel in the opposite direction (e.g. inbound travel).
*Example: The `trip_headsign` and `direction_id` fields could be used together to assign a name to travel in each direction for a set of trips. A [trips.txt](#tripstxt) file could contain these records for use in time tables:*
`trip_id,...,trip_headsign,direction_id`
`1234,...,Airport,0`
`1505,...,Downtown,1` | +| `block_id` | ID | Optional | Identifies the block to which the trip belongs. A block consists of a single trip or many sequential trips made using the same vehicle, defined by shared service days and `block_id`. A `block_id` can have trips with different service days, making distinct blocks. See the [example below](#example-blocks-and-service-day).

**Usage of `block_id` is now deprecated, trip to trip transfers with `transfers_type` with value 4 (in-seat transfer) or value 5 (no in-seat transfer) is preffered.** | +| `shape_id` | ID referencing `shapes.shape_id` | **Conditionally Required** | Identifies a geospatial shape describing the vehicle travel path for a trip.

Conditionally Required:
- **Required** if the trip has a continuous pickup or drop-off behavior defined either in `routes.txt` or in `stop_times.txt`.
- **Optional** otherwise. | +>>>>>>> Stashed changes | `wheelchair_accessible` | Enum | Optional | Indicates wheelchair accessibility. Valid options are:

`0` or empty - No accessibility information for the trip.
`1` - Vehicle being used on this particular trip can accommodate at least one rider in a wheelchair.
`2` - No riders in wheelchairs can be accommodated on this trip. | | `bikes_allowed` | Enum | Optional | Indicates whether bikes are allowed. Valid options are:

`0` or empty - No bike information for the trip.
`1` - Vehicle being used on this particular trip can accommodate at least one bicycle.
`2` - No bicycles are allowed on this trip. | #### Example: Blocks and service day +**Usage of `block_id` is now deprecated, trip to trip transfers with `transfers_type` with value 4 (in-seat transfer) or value 5 (no in-seat transfer) is preffered.** + The example below is valid, with distinct blocks every day of the week. | route_id | trip_id | service_id | block_id | *(first stop time)* | *(last stop time)* | @@ -351,7 +361,7 @@ For a given ordered pair of arriving trip and departing trip, the transfer with | `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. | +| `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.
`4` - Passengers can transfer from one trip to another by staying onboard the same vehicle (an "in-seat transfer"). Using this transfer type REQUIRES that the the two trips linked are operated by the same vehicle. When using this type of transfer, it's REQUIRED that both `from_trip_id` and `to_trip_id` values are set. Additionally, the last stop of `from_trip_id` SHOULD be geographically close from the first stop `to_trip_id` and the last arrival time of `from_trip_id` SHOULD be close to the first departure time of `to_trip_id`.
`5` - In-seat transfers are not allowed between sequential trips. The passenger must alight from the vehicle and re-board. Using this transfer type REQUIRES that the the two trips linked are operated by the same vehicle. When using this type of transfer, it's REQUIRED that both `from_trip_id` and `to_trip_id` values are set. Additionally, the last stop of `from_trip_id` SHOULD be geographically close from the first stop `to_trip_id` and the last arrival time of `from_trip_id` SHOULD be close to the first departure time of `to_trip_id`. | | `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. | ### pathways.txt From a86296a0463d62354bf56a9e2a36ede5561439c2 Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Wed, 24 Nov 2021 15:49:52 -0500 Subject: [PATCH 02/13] Fix bad merge --- gtfs/spec/en/reference.md | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md index 615f5981a..e6ccbe596 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -189,15 +189,8 @@ File: **Required** | `trip_headsign` | Text | Optional | Text that appears on signage identifying the trip's destination to riders. Should be used to distinguish between different patterns of service on the same route.

If the headsign changes during a trip, values for `trip_headsign` may be overridden by defining values in `stop_times.stop_headsign` for specific `stop_time`s along the trip. | | `trip_short_name` | Text | Optional | Public facing text used to identify the trip to riders, for instance, to identify train numbers for commuter rail trips. If riders do not commonly rely on trip names, `trip_short_name` should be empty. A `trip_short_name` value, if provided, should uniquely identify a trip within a service day; it should not be used for destination names or limited/express designations. | | `direction_id` | Enum | Optional | Indicates the direction of travel for a trip. This field should not be used in routing; it provides a way to separate trips by direction when publishing time tables. Valid options are:

`0` - Travel in one direction (e.g. outbound travel).
`1` - Travel in the opposite direction (e.g. inbound travel).
*Example: The `trip_headsign` and `direction_id` fields may be used together to assign a name to travel in each direction for a set of trips. A [trips.txt](#tripstxt) file could contain these records for use in time tables:*
`trip_id,...,trip_headsign,direction_id`
`1234,...,Airport,0`
`1505,...,Downtown,1` | -| `block_id` | ID | Optional | Identifies the block to which the trip belongs. A block consists of a single trip or many sequential trips made using the same vehicle, defined by shared service days and `block_id`. A `block_id` may have trips with different service days, making distinct blocks. See the [example below](#example-blocks-and-service-day) | +| `block_id` | ID | Optional | Identifies the block to which the trip belongs. A block consists of a single trip or many sequential trips made using the same vehicle, defined by shared service days and `block_id`. A `block_id` may have trips with different service days, making distinct blocks. See the [example below](#example-blocks-and-service-day)

**Usage of `block_id` is now deprecated, trip to trip transfers with `transfers_type` with value 4 (in-seat transfer) or value 5 (no in-seat transfer) is preffered.** | | `shape_id` | ID referencing `shapes.shape_id` | **Conditionally Required** | Identifies a geospatial shape describing the vehicle travel path for a trip.

Conditionally Required:
- **Required** if the trip has a continuous pickup or drop-off behavior defined either in `routes.txt` or in `stop_times.txt`.
- Optional otherwise. | -======= -| `trip_headsign` | Text | Optional | Text that appears on signage identifying the trip's destination to riders. Use this field to distinguish between different patterns of service on the same route. If the headsign changes during a trip, `trip_headsign` can be overridden by specifying values for the `stop_times.stop_headsign`. | -| `trip_short_name` | Text | Optional | Public facing text used to identify the trip to riders, for instance, to identify train numbers for commuter rail trips. If riders do not commonly rely on trip names, leave this field empty. A `trip_short_name` value, if provided, should uniquely identify a trip within a service day; it should not be used for destination names or limited/express designations. | -| `direction_id` | Enum | Optional | Indicates the direction of travel for a trip. This field is not used in routing; it provides a way to separate trips by direction when publishing time tables. Valid options are:

`0` - Travel in one direction (e.g. outbound travel).
`1` - Travel in the opposite direction (e.g. inbound travel).
*Example: The `trip_headsign` and `direction_id` fields could be used together to assign a name to travel in each direction for a set of trips. A [trips.txt](#tripstxt) file could contain these records for use in time tables:*
`trip_id,...,trip_headsign,direction_id`
`1234,...,Airport,0`
`1505,...,Downtown,1` | -| `block_id` | ID | Optional | Identifies the block to which the trip belongs. A block consists of a single trip or many sequential trips made using the same vehicle, defined by shared service days and `block_id`. A `block_id` can have trips with different service days, making distinct blocks. See the [example below](#example-blocks-and-service-day).

**Usage of `block_id` is now deprecated, trip to trip transfers with `transfers_type` with value 4 (in-seat transfer) or value 5 (no in-seat transfer) is preffered.** | -| `shape_id` | ID referencing `shapes.shape_id` | **Conditionally Required** | Identifies a geospatial shape describing the vehicle travel path for a trip.

Conditionally Required:
- **Required** if the trip has a continuous pickup or drop-off behavior defined either in `routes.txt` or in `stop_times.txt`.
- **Optional** otherwise. | ->>>>>>> Stashed changes | `wheelchair_accessible` | Enum | Optional | Indicates wheelchair accessibility. Valid options are:

`0` or empty - No accessibility information for the trip.
`1` - Vehicle being used on this particular trip can accommodate at least one rider in a wheelchair.
`2` - No riders in wheelchairs can be accommodated on this trip. | | `bikes_allowed` | Enum | Optional | Indicates whether bikes are allowed. Valid options are:

`0` or empty - No bike information for the trip.
`1` - Vehicle being used on this particular trip can accommodate at least one bicycle.
`2` - No bicycles are allowed on this trip. | From 9591411e1bf7791cab878635bfcd031cc89e0b93 Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Wed, 24 Nov 2021 15:50:11 -0500 Subject: [PATCH 03/13] Fix bad merge --- gtfs/spec/en/reference.md | 1 - 1 file changed, 1 deletion(-) diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md index e6ccbe596..33a01a462 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -185,7 +185,6 @@ File: **Required** | `route_id` | ID referencing `routes.route_id` | **Required** | Identifies a route. | | `service_id` | ID referencing `calendar.service_id` or `calendar_dates.service_id` | **Required** | Identifies a set of dates when service is available for one or more routes. | | `trip_id` | ID | **Required** | Identifies a trip. | -<<<<<<< Updated upstream | `trip_headsign` | Text | Optional | Text that appears on signage identifying the trip's destination to riders. Should be used to distinguish between different patterns of service on the same route.

If the headsign changes during a trip, values for `trip_headsign` may be overridden by defining values in `stop_times.stop_headsign` for specific `stop_time`s along the trip. | | `trip_short_name` | Text | Optional | Public facing text used to identify the trip to riders, for instance, to identify train numbers for commuter rail trips. If riders do not commonly rely on trip names, `trip_short_name` should be empty. A `trip_short_name` value, if provided, should uniquely identify a trip within a service day; it should not be used for destination names or limited/express designations. | | `direction_id` | Enum | Optional | Indicates the direction of travel for a trip. This field should not be used in routing; it provides a way to separate trips by direction when publishing time tables. Valid options are:

`0` - Travel in one direction (e.g. outbound travel).
`1` - Travel in the opposite direction (e.g. inbound travel).
*Example: The `trip_headsign` and `direction_id` fields may be used together to assign a name to travel in each direction for a set of trips. A [trips.txt](#tripstxt) file could contain these records for use in time tables:*
`trip_id,...,trip_headsign,direction_id`
`1234,...,Airport,0`
`1505,...,Downtown,1` | From a11f6f0f18369d17bb51c24506827438ebd4c9aa Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Wed, 24 Nov 2021 16:04:09 -0500 Subject: [PATCH 04/13] Fix merge again --- gtfs/spec/en/reference.md | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md index 8bdc3a9c7..88a2520f1 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -376,23 +376,13 @@ For a given ordered pair of arriving trip and departing trip, the transfer with | Field Name | Type | Presence | Description | | ------ | ------ | ------ | ------ | -<<<<<<< HEAD -| `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`, 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.
`4` - Passengers can transfer from one trip to another by staying onboard the same vehicle (an "in-seat transfer"). Using this transfer type REQUIRES that the the two trips linked are operated by the same vehicle. When using this type of transfer, it's REQUIRED that both `from_trip_id` and `to_trip_id` values are set. Additionally, the last stop of `from_trip_id` SHOULD be geographically close from the first stop `to_trip_id` and the last arrival time of `from_trip_id` SHOULD be close to the first departure time of `to_trip_id`.
`5` - In-seat transfers are not allowed between sequential trips. The passenger must alight from the vehicle and re-board. Using this transfer type REQUIRES that the the two trips linked are operated by the same vehicle. When using this type of transfer, it's REQUIRED that both `from_trip_id` and `to_trip_id` values are set. Additionally, the last stop of `from_trip_id` SHOULD be geographically close from the first stop `to_trip_id` and the last arrival time of `from_trip_id` SHOULD be close to the first departure time of `to_trip_id`. | -======= | `from_stop_id` | Foreign 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` | Foreign 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` | Foreign 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` | Foreign 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` | Foreign 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` | Foreign 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. | ->>>>>>> origin/master +| `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.
`4` - Passengers can transfer from one trip to another by staying onboard the same vehicle (an "in-seat transfer"). Using this transfer type REQUIRES that the the two trips linked are operated by the same vehicle. When using this type of transfer, it's REQUIRED that both `from_trip_id` and `to_trip_id` values are set. Additionally, the last stop of `from_trip_id` SHOULD be geographically close from the first stop `to_trip_id` and the last arrival time of `from_trip_id` SHOULD be close to the first departure time of `to_trip_id`.
`5` - In-seat transfers are not allowed between sequential trips. The passenger must alight from the vehicle and re-board. Using this transfer type REQUIRES that the the two trips linked are operated by the same vehicle. When using this type of transfer, it's REQUIRED that both `from_trip_id` and `to_trip_id` values are set. Additionally, the last stop of `from_trip_id` SHOULD be geographically close from the first stop `to_trip_id` and the last arrival time of `from_trip_id` SHOULD be close to the first departure time of `to_trip_id`. | | `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. | ### pathways.txt From e7cbab49dd0feb88c6d8b24fb2bf1b2a5d49b3b9 Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Thu, 25 Nov 2021 13:36:53 -0500 Subject: [PATCH 05/13] Remove deprecation, fix typo --- gtfs/spec/en/reference.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md index 88a2520f1..5af315e3e 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -201,15 +201,13 @@ Primary key (`trip_id`) | `trip_headsign` | Text | Optional | Text that appears on signage identifying the trip's destination to riders. Should be used to distinguish between different patterns of service on the same route.

If the headsign changes during a trip, values for `trip_headsign` may be overridden by defining values in `stop_times.stop_headsign` for specific `stop_time`s along the trip. | | `trip_short_name` | Text | Optional | Public facing text used to identify the trip to riders, for instance, to identify train numbers for commuter rail trips. If riders do not commonly rely on trip names, `trip_short_name` should be empty. A `trip_short_name` value, if provided, should uniquely identify a trip within a service day; it should not be used for destination names or limited/express designations. | | `direction_id` | Enum | Optional | Indicates the direction of travel for a trip. This field should not be used in routing; it provides a way to separate trips by direction when publishing time tables. Valid options are:

`0` - Travel in one direction (e.g. outbound travel).
`1` - Travel in the opposite direction (e.g. inbound travel).
*Example: The `trip_headsign` and `direction_id` fields may be used together to assign a name to travel in each direction for a set of trips. A [trips.txt](#tripstxt) file could contain these records for use in time tables:*
`trip_id,...,trip_headsign,direction_id`
`1234,...,Airport,0`
`1505,...,Downtown,1` | -| `block_id` | ID | Optional | Identifies the block to which the trip belongs. A block consists of a single trip or many sequential trips made using the same vehicle, defined by shared service days and `block_id`. A `block_id` may have trips with different service days, making distinct blocks. See the [example below](#example-blocks-and-service-day).

**Usage of `block_id` is now deprecated, trip to trip transfers with `transfers_type` with value 4 (in-seat transfer) or value 5 (no in-seat transfer) is preffered.**| +| `block_id` | ID | Optional | Identifies the block to which the trip belongs. A block consists of a single trip or many sequential trips made using the same vehicle, defined by shared service days and `block_id`. A `block_id` may have trips with different service days, making distinct blocks. See the [example below](#example-blocks-and-service-day). To provide in-seat transfers information, [transfers](#transferstxt) of `transfer_type` `4` should be provided instead. | | `shape_id` | Foreign ID referencing `shapes.shape_id` | **Conditionally Required** | Identifies a geospatial shape describing the vehicle travel path for a trip.

Conditionally Required:
- **Required** if the trip has a continuous pickup or drop-off behavior defined either in `routes.txt` or in `stop_times.txt`.
- Optional otherwise. | | `wheelchair_accessible` | Enum | Optional | Indicates wheelchair accessibility. Valid options are:

`0` or empty - No accessibility information for the trip.
`1` - Vehicle being used on this particular trip can accommodate at least one rider in a wheelchair.
`2` - No riders in wheelchairs can be accommodated on this trip. | | `bikes_allowed` | Enum | Optional | Indicates whether bikes are allowed. Valid options are:

`0` or empty - No bike information for the trip.
`1` - Vehicle being used on this particular trip can accommodate at least one bicycle.
`2` - No bicycles are allowed on this trip. | #### Example: Blocks and service day -**Usage of `block_id` is now deprecated, trip to trip transfers with `transfers_type` with value 4 (in-seat transfer) or value 5 (no in-seat transfer) is preffered.** - The example below is valid, with distinct blocks every day of the week. | route_id | trip_id | service_id | block_id | *(first stop time)* | *(last stop time)* | From 4a6629809043d710432807614abec0364243ffe7 Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Thu, 25 Nov 2021 20:53:30 -0500 Subject: [PATCH 06/13] Clarify timing --- 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 5af315e3e..f847f06cc 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -380,7 +380,7 @@ For a given ordered pair of arriving trip and departing trip, the transfer with | `to_route_id` | Foreign 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` | Foreign 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` | Foreign 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.
`4` - Passengers can transfer from one trip to another by staying onboard the same vehicle (an "in-seat transfer"). Using this transfer type REQUIRES that the the two trips linked are operated by the same vehicle. When using this type of transfer, it's REQUIRED that both `from_trip_id` and `to_trip_id` values are set. Additionally, the last stop of `from_trip_id` SHOULD be geographically close from the first stop `to_trip_id` and the last arrival time of `from_trip_id` SHOULD be close to the first departure time of `to_trip_id`.
`5` - In-seat transfers are not allowed between sequential trips. The passenger must alight from the vehicle and re-board. Using this transfer type REQUIRES that the the two trips linked are operated by the same vehicle. When using this type of transfer, it's REQUIRED that both `from_trip_id` and `to_trip_id` values are set. Additionally, the last stop of `from_trip_id` SHOULD be geographically close from the first stop `to_trip_id` and the last arrival time of `from_trip_id` SHOULD be close to the first departure time of `to_trip_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.
`4` - Passengers can transfer from one trip to another by staying onboard the same vehicle (an "in-seat transfer"). Using this transfer type REQUIRES that the the two trips linked are operated by the same vehicle. When using this type of transfer, it's REQUIRED that both `from_trip_id` and `to_trip_id` values are set. Additionally, the last stop of `from_trip_id` SHOULD be geographically close to the first stop of `to_trip_id` and the last arrival time of from_trip_id SHOULD be prior but close to the first departure time of to_trip_id. The last arrival time of from_trip_id MAY be later than the first departure time of to_trip_id in case the to_trip_id trip is occurring the subsequent service day.
`5` - In-seat transfers are not allowed between sequential trips. The passenger must alight from the vehicle and re-board. Using this transfer type REQUIRES that the the two trips linked are operated by the same vehicle. When using this type of transfer, it's REQUIRED that both `from_trip_id` and `to_trip_id` values are set. Additionally, the last stop of `from_trip_id` SHOULD be geographically close from the first stop `to_trip_id` and the last arrival time of from_trip_id SHOULD be prior but close to the first departure time of to_trip_id. The last arrival time of from_trip_id MAY be later than the first departure time of to_trip_id in case the to_trip_id trip is occurring the subsequent service day. | | `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. | ### pathways.txt From 65e7b7016a444d074db7bc09ccae6ad8123f838e Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Thu, 25 Nov 2021 20:59:20 -0500 Subject: [PATCH 07/13] trip_ids are Conditionally REQUIRED --- 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 f847f06cc..66d4f8548 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -378,9 +378,9 @@ For a given ordered pair of arriving trip and departing trip, the transfer with | `to_stop_id` | Foreign 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` | Foreign 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` | Foreign 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` | Foreign 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` | Foreign 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.
`4` - Passengers can transfer from one trip to another by staying onboard the same vehicle (an "in-seat transfer"). Using this transfer type REQUIRES that the the two trips linked are operated by the same vehicle. When using this type of transfer, it's REQUIRED that both `from_trip_id` and `to_trip_id` values are set. Additionally, the last stop of `from_trip_id` SHOULD be geographically close to the first stop of `to_trip_id` and the last arrival time of from_trip_id SHOULD be prior but close to the first departure time of to_trip_id. The last arrival time of from_trip_id MAY be later than the first departure time of to_trip_id in case the to_trip_id trip is occurring the subsequent service day.
`5` - In-seat transfers are not allowed between sequential trips. The passenger must alight from the vehicle and re-board. Using this transfer type REQUIRES that the the two trips linked are operated by the same vehicle. When using this type of transfer, it's REQUIRED that both `from_trip_id` and `to_trip_id` values are set. Additionally, the last stop of `from_trip_id` SHOULD be geographically close from the first stop `to_trip_id` and the last arrival time of from_trip_id SHOULD be prior but close to the first departure time of to_trip_id. The last arrival time of from_trip_id MAY be later than the first departure time of to_trip_id in case the to_trip_id trip is occurring the subsequent service day. | +| `from_trip_id` | Foreign ID referencing `trips.trip_id` | Conditionally REQUIRED | 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. REQUIRED if `transfer_type` is `4` or `5`. | +| `to_trip_id` | Foreign ID referencing `trips.trip_id` | Conditionally REQUIRED | 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. REQUIRED if `transfer_type` is `4` or `5`. | +| `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.
`4` - Passengers can transfer from one trip to another by staying onboard the same vehicle (an "in-seat transfer"). Using this transfer type REQUIRES that the the two trips linked are operated by the same vehicle. Additionally, the last stop of `from_trip_id` SHOULD be geographically close to the first stop of `to_trip_id` and the last arrival time of `from_trip_id` SHOULD be prior but close to the first departure time of `to_trip_id`. The last arrival time of `from_trip_id` MAY be later than the first departure time of `to_trip_id` in case the `to_trip_id` trip is occurring the subsequent service day.
`5` - In-seat transfers are not allowed between sequential trips. The passenger must alight from the vehicle and re-board. Using this transfer type REQUIRES that the the two trips linked are operated by the same vehicle. Additionally, the last stop of `from_trip_id` SHOULD be geographically close from the first stop `to_trip_id` and the last arrival time of `from_trip_id` SHOULD be prior but close to the first departure time of `to_trip_id`. The last arrival time of `from_trip_id` MAY be later than the first departure time of `to_trip_id` in case the `to_trip_id` trip is occurring the subsequent service day. | | `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. | ### pathways.txt From 805843f873c28c791ec146364597e8e7f63ef34e Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Sat, 4 Dec 2021 21:47:26 -0500 Subject: [PATCH 08/13] Forbid station in transfers 4 and 5. --- 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 66d4f8548..2543cb69f 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -374,8 +374,8 @@ For a given ordered pair of arriving trip and departing trip, the transfer with | Field Name | Type | Presence | Description | | ------ | ------ | ------ | ------ | -| `from_stop_id` | Foreign 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` | Foreign 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_stop_id` | Foreign 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. Refering to a station is forbiden for `transfer_types` 4 and 5. | +| `to_stop_id` | Foreign 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. Refering to a station is forbiden for `transfer_types` 4 and 5. | | `from_route_id` | Foreign 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` | Foreign 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` | Foreign ID referencing `trips.trip_id` | Conditionally REQUIRED | 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. REQUIRED if `transfer_type` is `4` or `5`. | From fa3c21cf2a363801613ffe8bb08aea1f93208c4b Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Sun, 5 Dec 2021 21:19:27 -0500 Subject: [PATCH 09/13] WIP on many to many trip continuations --- gtfs/spec/en/reference.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md index 2543cb69f..d642bc50d 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -380,9 +380,28 @@ For a given ordered pair of arriving trip and departing trip, the transfer with | `to_route_id` | Foreign 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` | Foreign ID referencing `trips.trip_id` | Conditionally REQUIRED | 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. REQUIRED if `transfer_type` is `4` or `5`. | | `to_trip_id` | Foreign ID referencing `trips.trip_id` | Conditionally REQUIRED | 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. REQUIRED if `transfer_type` is `4` or `5`. | -| `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.
`4` - Passengers can transfer from one trip to another by staying onboard the same vehicle (an "in-seat transfer"). Using this transfer type REQUIRES that the the two trips linked are operated by the same vehicle. Additionally, the last stop of `from_trip_id` SHOULD be geographically close to the first stop of `to_trip_id` and the last arrival time of `from_trip_id` SHOULD be prior but close to the first departure time of `to_trip_id`. The last arrival time of `from_trip_id` MAY be later than the first departure time of `to_trip_id` in case the `to_trip_id` trip is occurring the subsequent service day.
`5` - In-seat transfers are not allowed between sequential trips. The passenger must alight from the vehicle and re-board. Using this transfer type REQUIRES that the the two trips linked are operated by the same vehicle. Additionally, the last stop of `from_trip_id` SHOULD be geographically close from the first stop `to_trip_id` and the last arrival time of `from_trip_id` SHOULD be prior but close to the first departure time of `to_trip_id`. The last arrival time of `from_trip_id` MAY be later than the first departure time of `to_trip_id` in case the `to_trip_id` trip is occurring the subsequent service day. | +| `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.
`4` - Passengers can transfer from one trip to another by staying onboard the same vehicle (an "in-seat transfer"). More details about this type of transfer [below](#linked-trips-with-transfers-(operational-linkage-and-in-seats-transfers)).
`5` - In-seat transfers are not allowed between sequential trips. The passenger must alight from the vehicle and re-board. More details about this type of transfer [below](#linked-trips-with-transfers-(operational-linkage-and-in-seats-transfers)). | | `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. | +#### Linked trips with transfers (operational linkage and in-seats transfers) + +The following applies to `transfer_type` 4 and 5. + +Using this transfer type REQUIRES that the the two trips linked are operated by the same vehicle. + +Additionally, the last stop of `from_trip_id` SHOULD be geographically close from the first stop `to_trip_id` and the last arrival time of `from_trip_id` SHOULD be prior but close to the first departure time of `to_trip_id`. The last arrival time of `from_trip_id` MAY be later than the first departure time of `to_trip_id` in case the `to_trip_id` trip is occurring the subsequent service day. + +Trip can be linked 1 to 1 in the regular case when a bus continues from one line to an other or other simple continuations. However, trips can also be linked n to n in more complex cases. For example, two trains trips can merge in a single trips that continues into a single trains as shown below. As shown in the diagram below, Trip A and B could meet in a common station and depart together at the same time creating Trip C. The transfers in this case would be from trip A to C and B to C. + +
+Trip A
+───────────────────\
+                    \    Trip C
+                     ─────────────
+Trip B              /
+───────────────────/
+
+ ### pathways.txt File: **Optional** From 9caa5654b1e5e305981c4daeaf589a6ecfe2c413 Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Sun, 5 Dec 2021 21:22:29 -0500 Subject: [PATCH 10/13] Fix link in url --- 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 d642bc50d..ecc348afe 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -380,12 +380,12 @@ For a given ordered pair of arriving trip and departing trip, the transfer with | `to_route_id` | Foreign 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` | Foreign ID referencing `trips.trip_id` | Conditionally REQUIRED | 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. REQUIRED if `transfer_type` is `4` or `5`. | | `to_trip_id` | Foreign ID referencing `trips.trip_id` | Conditionally REQUIRED | 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. REQUIRED if `transfer_type` is `4` or `5`. | -| `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.
`4` - Passengers can transfer from one trip to another by staying onboard the same vehicle (an "in-seat transfer"). More details about this type of transfer [below](#linked-trips-with-transfers-(operational-linkage-and-in-seats-transfers)).
`5` - In-seat transfers are not allowed between sequential trips. The passenger must alight from the vehicle and re-board. More details about this type of transfer [below](#linked-trips-with-transfers-(operational-linkage-and-in-seats-transfers)). | +| `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.
`4` - Passengers can transfer from one trip to another by staying onboard the same vehicle (an "in-seat transfer"). More details about this type of transfer [below](#linked-trips)).
`5` - In-seat transfers are not allowed between sequential trips. The passenger must alight from the vehicle and re-board. More details about this type of transfer [below](#linked-trips)). | | `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. | -#### Linked trips with transfers (operational linkage and in-seats transfers) +#### Linked trips -The following applies to `transfer_type` 4 and 5. +The following applies to `transfer_type` 4 and 5 that are linking trips together with or without in-seats transfers. Using this transfer type REQUIRES that the the two trips linked are operated by the same vehicle. From 8c22ed5275de1c53e08d7109a10069a98c768133 Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Sun, 5 Dec 2021 21:24:16 -0500 Subject: [PATCH 11/13] Remove extra parentesis --- 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 ecc348afe..a1bffe0b5 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -380,7 +380,7 @@ For a given ordered pair of arriving trip and departing trip, the transfer with | `to_route_id` | Foreign 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` | Foreign ID referencing `trips.trip_id` | Conditionally REQUIRED | 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. REQUIRED if `transfer_type` is `4` or `5`. | | `to_trip_id` | Foreign ID referencing `trips.trip_id` | Conditionally REQUIRED | 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. REQUIRED if `transfer_type` is `4` or `5`. | -| `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.
`4` - Passengers can transfer from one trip to another by staying onboard the same vehicle (an "in-seat transfer"). More details about this type of transfer [below](#linked-trips)).
`5` - In-seat transfers are not allowed between sequential trips. The passenger must alight from the vehicle and re-board. More details about this type of transfer [below](#linked-trips)). | +| `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.
`4` - Passengers can transfer from one trip to another by staying onboard the same vehicle (an "in-seat transfer"). More details about this type of transfer [below](#linked-trips).
`5` - In-seat transfers are not allowed between sequential trips. The passenger must alight from the vehicle and re-board. More details about this type of transfer [below](#linked-trips). | | `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. | #### Linked trips From 95f6dd477363a6fb9e4a1b660e47f6173c3a9543 Mon Sep 17 00:00:00 2001 From: Guillaume Campagna Date: Sat, 18 Dec 2021 22:42:02 -0500 Subject: [PATCH 12/13] Fix typos --- 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 a1bffe0b5..cdd9d63e9 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -387,9 +387,9 @@ For a given ordered pair of arriving trip and departing trip, the transfer with The following applies to `transfer_type` 4 and 5 that are linking trips together with or without in-seats transfers. -Using this transfer type REQUIRES that the the two trips linked are operated by the same vehicle. +Using this transfer type REQUIRES that the two trips linked are operated by the same vehicle. -Additionally, the last stop of `from_trip_id` SHOULD be geographically close from the first stop `to_trip_id` and the last arrival time of `from_trip_id` SHOULD be prior but close to the first departure time of `to_trip_id`. The last arrival time of `from_trip_id` MAY be later than the first departure time of `to_trip_id` in case the `to_trip_id` trip is occurring the subsequent service day. +Additionally, the last stop of `from_trip_id` SHOULD be geographically close to the first stop `to_trip_id` and the last arrival time of `from_trip_id` SHOULD be prior but close to the first departure time of `to_trip_id`. The last arrival time of `from_trip_id` MAY be later than the first departure time of `to_trip_id` in case the `to_trip_id` trip is occurring the subsequent service day. Trip can be linked 1 to 1 in the regular case when a bus continues from one line to an other or other simple continuations. However, trips can also be linked n to n in more complex cases. For example, two trains trips can merge in a single trips that continues into a single trains as shown below. As shown in the diagram below, Trip A and B could meet in a common station and depart together at the same time creating Trip C. The transfers in this case would be from trip A to C and B to C. From a1333978bc05433a37cca718f16dd261397db749 Mon Sep 17 00:00:00 2001 From: Nicholas Paun Date: Tue, 25 Jan 2022 10:05:53 -0800 Subject: [PATCH 13/13] service_ids define coupling/uncoupling --- gtfs/spec/en/reference.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md index cdd9d63e9..22052152e 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -385,13 +385,18 @@ For a given ordered pair of arriving trip and departing trip, the transfer with #### Linked trips -The following applies to `transfer_type` 4 and 5 that are linking trips together with or without in-seats transfers. +The following applies to `transfer_type=4` and `=5`, which are used to link trips together, with or without in-seats transfers. -Using this transfer type REQUIRES that the two trips linked are operated by the same vehicle. +The trips linked together MUST be operated by the same vehicle. The vehicle MAY be coupled to, or uncoupled from, other vehicles. -Additionally, the last stop of `from_trip_id` SHOULD be geographically close to the first stop `to_trip_id` and the last arrival time of `from_trip_id` SHOULD be prior but close to the first departure time of `to_trip_id`. The last arrival time of `from_trip_id` MAY be later than the first departure time of `to_trip_id` in case the `to_trip_id` trip is occurring the subsequent service day. +The last stop of `from_trip_id` SHOULD be geographically close to the first stop of `to_trip_id`, and the last arrival time of `from_trip_id` SHOULD be prior but close to the first departure time of `to_trip_id`. The last arrival time of `from_trip_id` MAY be later than the first departure time of `to_trip_id` in case the `to_trip_id` trip is occurring the subsequent service day. -Trip can be linked 1 to 1 in the regular case when a bus continues from one line to an other or other simple continuations. However, trips can also be linked n to n in more complex cases. For example, two trains trips can merge in a single trips that continues into a single trains as shown below. As shown in the diagram below, Trip A and B could meet in a common station and depart together at the same time creating Trip C. The transfers in this case would be from trip A to C and B to C. +Trips MAY be linked 1-to-1 in the regular case, but MAY also be linked 1-to-n, n-to-1, or n-to-n to represent more complex trip continuations. For example, two train trips (trip A and trip B in the diagram below) can merge into a single train trip (trip C) after a vehicle coupling operation at a common station: + +- In a 1-to-n continuation, the `trips.service_id` for each `to_trip_id` MUST be identical. +- In an n-to-1 continuation, the `trips.service_id` for each `from_trip_id` MUST be identical. +- n-to-n continuations must respect both constraints. +- Trips may be linked together as part of multiple distinct continuations, provided that the `trip.service_id` MUST NOT overlap on any day of service.
 Trip A