From b7478cc2dd98b25f805354a876ea3f9ab2d4708a Mon Sep 17 00:00:00 2001 From: isabelle-dr Date: Mon, 8 Jan 2024 12:23:30 -0500 Subject: [PATCH 1/6] Add dataset publishing in index --- gtfs/spec/en/reference.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md index 7a9b1058..42647a69 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -9,7 +9,8 @@ This document defines the format and structure of the files that comprise a GTFS 1. [Document Conventions](#document-conventions) 2. [Dataset Files](#dataset-files) 3. [File Requirements](#file-requirements) -4. [Field Definitions](#field-definitions) +4. [Dataset Publishing & General Practices](#dataset-publishing-&-general-practices) +5. [Field Definitions](#field-definitions) - [agency.txt](#agencytxt) - [stops.txt](#stopstxt) - [routes.txt](#routestxt) From 96fc6bb58020fd382381779418dc58aae68f4579 Mon Sep 17 00:00:00 2001 From: isabelle-dr Date: Mon, 8 Jan 2024 12:24:45 -0500 Subject: [PATCH 2/6] Fix link --- 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 42647a69..652620b2 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -9,7 +9,7 @@ This document defines the format and structure of the files that comprise a GTFS 1. [Document Conventions](#document-conventions) 2. [Dataset Files](#dataset-files) 3. [File Requirements](#file-requirements) -4. [Dataset Publishing & General Practices](#dataset-publishing-&-general-practices) +4. [Dataset Publishing & General Practices](#dataset-publishing--general-practices) 5. [Field Definitions](#field-definitions) - [agency.txt](#agencytxt) - [stops.txt](#stopstxt) From 1b1d2831316444145a906f4c50e92a0e0dc10c6f Mon Sep 17 00:00:00 2001 From: isabelle-dr Date: Mon, 8 Jan 2024 12:31:48 -0500 Subject: [PATCH 3/6] Clarify stop_timezone description --- 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 652620b2..bdc1a9ed 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -203,7 +203,7 @@ Primary key (`stop_id`) | `stop_url` | URL | Optional | URL of a web page about the location. This should be different from the `agency.agency_url` and the `routes.route_url` field values. | | `location_type` | Enum | Optional | Location type. Valid options are:

`0` (or blank) - **Stop** (or **Platform**). A location where passengers board or disembark from a transit vehicle. Is called a platform when defined within a `parent_station`.
`1` - **Station**. A physical structure or area that contains one or more platform.
`2` - **Entrance/Exit**. A location where passengers can enter or exit a station from the street. If an entrance/exit belongs to multiple stations, it may be linked by pathways to both, but the data provider must pick one of them as parent.
`3` - **Generic Node**. A location within a station, not matching any other `location_type`, that may be used to link together pathways define in pathways.txt.
`4` - **Boarding Area**. A specific location on a platform, where passengers can board and/or alight vehicles.| | `parent_station` | Foreign ID referencing `stops.stop_id` | **Conditionally Required** | Defines hierarchy between the different locations defined in `stops.txt`. It contains the ID of the parent location, as followed:

- **Stop/platform** (`location_type=0`): the `parent_station` field contains the ID of a station.
- **Station** (`location_type=1`): this field must be empty.
- **Entrance/exit** (`location_type=2`) or **generic node** (`location_type=3`): the `parent_station` field contains the ID of a station (`location_type=1`)
- **Boarding Area** (`location_type=4`): the `parent_station` field contains ID of a platform.

Conditionally Required:
- **Required** for locations which are entrances (`location_type=2`), generic nodes (`location_type=3`) or boarding areas (`location_type=4`).
- Optional for stops/platforms (`location_type=0`).
- Forbidden for stations (`location_type=1`).| -| `stop_timezone` | Timezone | Optional | Timezone of the location. If the location has a parent station, it inherits the parent station’s timezone instead of applying its own. Stations and parentless stops with empty `stop_timezone` inherit the timezone specified by `agency.agency_timezone`. If `stop_timezone` values are provided, the times in [stop_times.txt](#stop_timetxt) should be entered as the time since midnight in the timezone specified by `agency.agency_timezone`. This ensures that the time values in a trip always increase over the course of a trip, regardless of which timezones the trip crosses. | +| `stop_timezone` | Timezone | Optional | Timezone of the location. If the location has a parent station, it inherits the parent station’s timezone instead of applying its own. Stations and parentless stops with empty `stop_timezone` inherit the timezone specified by `agency.agency_timezone`. The times provided in [`stop_times.txt`](#stop_timestxt) are in the timezone specified by `agency.agency_timezone`, not `stop_timezone`. This ensures that the time values in a trip always increase over the course of a trip, regardless of which timezones the trip crosses. | | `wheelchair_boarding` | Enum | Optional | Indicates whether wheelchair boardings are possible from the location. Valid options are:

For parentless stops:
`0` or empty - No accessibility information for the stop.
`1` - Some vehicles at this stop can be boarded by a rider in a wheelchair.
`2` - Wheelchair boarding is not possible at this stop.

For child stops:
`0` or empty - Stop will inherit its `wheelchair_boarding` behavior from the parent station, if specified in the parent.
`1` - There exists some accessible path from outside the station to the specific stop/platform.
`2` - There exists no accessible path from outside the station to the specific stop/platform.

For station entrances/exits:
`0` or empty - Station entrance will inherit its `wheelchair_boarding` behavior from the parent station, if specified for the parent.
`1` - Station entrance is wheelchair accessible.
`2` - No accessible path from station entrance to stops/platforms. | | `level_id` | Foreign ID referencing `levels.level_id` | Optional | Level of the location. The same level may be used by multiple unlinked stations.| | `platform_code` | Text | Optional | Platform identifier for a platform stop (a stop belonging to a station). This should be just the platform identifier (eg. "G" or "3"). Words like “platform” or "track" (or the feed’s language-specific equivalent) should not be included. This allows feed consumers to more easily internationalize and localize the platform identifier into other languages. | From a9f0a522d9c68adf96b61447bc939456ab310894 Mon Sep 17 00:00:00 2001 From: isabelle-dr Date: Mon, 8 Jan 2024 16:14:55 -0500 Subject: [PATCH 4/6] Make references to other files consistent --- gtfs/spec/en/reference.md | 58 +++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md index bdc1a9ed..cd424497 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -122,8 +122,8 @@ This specification defines the following files: | [fare_transfer_rules.txt](#fare_transfer_rulestxt) | Optional | Fare rules for transfers between legs of travel.

Along with [fare_leg_rules.txt](#fare_leg_rulestxt), file [fare_transfer_rules.txt](#fare_transfer_rulestxt) provides a more detailed method for modeling fare structures. As such, the use of [fare_transfer_rules.txt](#fare_transfer_rulestxt) is entirely separate from files [fare_attributes.txt](#fare_attributestxt) and [fare_rules.txt](#fare_rulestxt). | | [areas.txt](#areastxt) | Optional | Area grouping of locations. | | [stop_areas.txt](#stop_areastxt) | Optional | Rules to assign stops to areas. | -| [networks.txt](#networkstxt) | **Conditionally Forbidden** | Network grouping of routes.

Conditionally Forbidden:
- **Forbidden** if `network_id` exists in [routes.txt](#routes.txt).
- Optional otherwise. | -| [route_networks.txt](#route_networkstxt) | **Conditionally Forbidden** | Rules to assign routes to networks.

Conditionally Forbidden:
- **Forbidden** if `network_id` exists in [routes.txt](#routes.txt).
- Optional otherwise. | +| [networks.txt](#networkstxt) | **Conditionally Forbidden** | Network grouping of routes.

Conditionally Forbidden:
- **Forbidden** if `network_id` exists in [routes.txt](#routestxt).
- Optional otherwise. | +| [route_networks.txt](#route_networkstxt) | **Conditionally Forbidden** | Rules to assign routes to networks.

Conditionally Forbidden:
- **Forbidden** if `network_id` exists in [routes.txt](#routestxt).
- Optional otherwise. | | [shapes.txt](#shapestxt) | Optional | Rules for mapping vehicle travel paths, sometimes referred to as route alignments. | | [frequencies.txt](#frequenciestxt) | Optional | Headway (time between trips) for headway-based service or a compressed representation of fixed-schedule service. | | [transfers.txt](#transferstxt) | Optional | Rules for making connections at transfer points between routes. | @@ -194,16 +194,16 @@ Primary key (`stop_id`) | ------ | ------ | ------ | ------ | | `stop_id` | Unique ID | **Required** | Identifies a location: stop/platform, station, entrance/exit, generic node or boarding area (see `location_type`).

Multiple routes may use the same `stop_id`. | | `stop_code` | Text | Optional | Short text or a number that identifies the location for riders. These codes are often used in phone-based transit information systems or printed on signage to make it easier for riders to get information for a particular location. The `stop_code` may be the same as `stop_id` if it is public facing. This field should be left empty for locations without a code presented to riders. | -| `stop_name` | Text | **Conditionally Required** | Name of the location. The `stop_name` should match the agency's rider-facing name for the location as printed on a timetable, published online, or represented on signage. For translations into other languages, use `translations.txt`.

When the location is a boarding area (`location_type=4`), the `stop_name` should contains the name of the boarding area as displayed by the agency. It could be just one letter (like on some European intercity railway stations), or text like “Wheelchair boarding area” (NYC’s Subway) or “Head of short trains” (Paris’ RER).

Conditionally Required:
- **Required** for locations which are stops (`location_type=0`), stations (`location_type=1`) or entrances/exits (`location_type=2`).
- Optional for locations which are generic nodes (`location_type=3`) or boarding areas (`location_type=4`).| +| `stop_name` | Text | **Conditionally Required** | Name of the location. The `stop_name` should match the agency's rider-facing name for the location as printed on a timetable, published online, or represented on signage. For translations into other languages, use [translations.txt](#translationstxt).

When the location is a boarding area (`location_type=4`), the `stop_name` should contains the name of the boarding area as displayed by the agency. It could be just one letter (like on some European intercity railway stations), or text like “Wheelchair boarding area” (NYC’s Subway) or “Head of short trains” (Paris’ RER).

Conditionally Required:
- **Required** for locations which are stops (`location_type=0`), stations (`location_type=1`) or entrances/exits (`location_type=2`).
- Optional for locations which are generic nodes (`location_type=3`) or boarding areas (`location_type=4`).| | `tts_stop_name` | Text | Optional | Readable version of the `stop_name`. See "Text-to-speech field" in the [Term Definitions](#term-definitions) for more. | | `stop_desc` | Text | Optional | Description of the location that provides useful, quality information. Should not be a duplicate of `stop_name`.| | `stop_lat` | Latitude | **Conditionally Required** | Latitude of the location.

For stops/platforms (`location_type=0`) and boarding area (`location_type=4`), the coordinates must be the ones of the bus pole — if exists — and otherwise of where the travelers are boarding the vehicle (on the sidewalk or the platform, and not on the roadway or the track where the vehicle stops).

Conditionally Required:
- **Required** for locations which are stops (`location_type=0`), stations (`location_type=1`) or entrances/exits (`location_type=2`).
- Optional for locations which are generic nodes (`location_type=3`) or boarding areas (`location_type=4`).| | `stop_lon` | Longitude | **Conditionally Required** | Longitude of the location.

For stops/platforms (`location_type=0`) and boarding area (`location_type=4`), the coordinates must be the ones of the bus pole — if exists — and otherwise of where the travelers are boarding the vehicle (on the sidewalk or the platform, and not on the roadway or the track where the vehicle stops).

Conditionally Required:
- **Required** for locations which are stops (`location_type=0`), stations (`location_type=1`) or entrances/exits (`location_type=2`).
- Optional for locations which are generic nodes (`location_type=3`) or boarding areas (`location_type=4`). | | `zone_id` | ID | **Conditionally Required** | Identifies the fare zone for a stop. If this record represents a station or station entrance, the `zone_id` is ignored.

Conditionally Required:
- **Required** if providing fare information using [fare_rules.txt](#fare_rulestxt)
- Optional otherwise.| | `stop_url` | URL | Optional | URL of a web page about the location. This should be different from the `agency.agency_url` and the `routes.route_url` field values. | -| `location_type` | Enum | Optional | Location type. Valid options are:

`0` (or blank) - **Stop** (or **Platform**). A location where passengers board or disembark from a transit vehicle. Is called a platform when defined within a `parent_station`.
`1` - **Station**. A physical structure or area that contains one or more platform.
`2` - **Entrance/Exit**. A location where passengers can enter or exit a station from the street. If an entrance/exit belongs to multiple stations, it may be linked by pathways to both, but the data provider must pick one of them as parent.
`3` - **Generic Node**. A location within a station, not matching any other `location_type`, that may be used to link together pathways define in pathways.txt.
`4` - **Boarding Area**. A specific location on a platform, where passengers can board and/or alight vehicles.| -| `parent_station` | Foreign ID referencing `stops.stop_id` | **Conditionally Required** | Defines hierarchy between the different locations defined in `stops.txt`. It contains the ID of the parent location, as followed:

- **Stop/platform** (`location_type=0`): the `parent_station` field contains the ID of a station.
- **Station** (`location_type=1`): this field must be empty.
- **Entrance/exit** (`location_type=2`) or **generic node** (`location_type=3`): the `parent_station` field contains the ID of a station (`location_type=1`)
- **Boarding Area** (`location_type=4`): the `parent_station` field contains ID of a platform.

Conditionally Required:
- **Required** for locations which are entrances (`location_type=2`), generic nodes (`location_type=3`) or boarding areas (`location_type=4`).
- Optional for stops/platforms (`location_type=0`).
- Forbidden for stations (`location_type=1`).| -| `stop_timezone` | Timezone | Optional | Timezone of the location. If the location has a parent station, it inherits the parent station’s timezone instead of applying its own. Stations and parentless stops with empty `stop_timezone` inherit the timezone specified by `agency.agency_timezone`. The times provided in [`stop_times.txt`](#stop_timestxt) are in the timezone specified by `agency.agency_timezone`, not `stop_timezone`. This ensures that the time values in a trip always increase over the course of a trip, regardless of which timezones the trip crosses. | +| `location_type` | Enum | Optional | Location type. Valid options are:

`0` (or blank) - **Stop** (or **Platform**). A location where passengers board or disembark from a transit vehicle. Is called a platform when defined within a `parent_station`.
`1` - **Station**. A physical structure or area that contains one or more platform.
`2` - **Entrance/Exit**. A location where passengers can enter or exit a station from the street. If an entrance/exit belongs to multiple stations, it may be linked by pathways to both, but the data provider must pick one of them as parent.
`3` - **Generic Node**. A location within a station, not matching any other `location_type`, that may be used to link together pathways define in [pathways.txt](#pathwaystxt).
`4` - **Boarding Area**. A specific location on a platform, where passengers can board and/or alight vehicles.| +| `parent_station` | Foreign ID referencing `stops.stop_id` | **Conditionally Required** | Defines hierarchy between the different locations defined in [stops.txt](#stopstxt). It contains the ID of the parent location, as followed:

- **Stop/platform** (`location_type=0`): the `parent_station` field contains the ID of a station.
- **Station** (`location_type=1`): this field must be empty.
- **Entrance/exit** (`location_type=2`) or **generic node** (`location_type=3`): the `parent_station` field contains the ID of a station (`location_type=1`)
- **Boarding Area** (`location_type=4`): the `parent_station` field contains ID of a platform.

Conditionally Required:
- **Required** for locations which are entrances (`location_type=2`), generic nodes (`location_type=3`) or boarding areas (`location_type=4`).
- Optional for stops/platforms (`location_type=0`).
- Forbidden for stations (`location_type=1`).| +| `stop_timezone` | Timezone | Optional | Timezone of the location. If the location has a parent station, it inherits the parent station’s timezone instead of applying its own. Stations and parentless stops with empty `stop_timezone` inherit the timezone specified by `agency.agency_timezone`. The times provided in [stop_times.txt](#stop_timestxt) are in the timezone specified by `agency.agency_timezone`, not `stop_timezone`. This ensures that the time values in a trip always increase over the course of a trip, regardless of which timezones the trip crosses. | | `wheelchair_boarding` | Enum | Optional | Indicates whether wheelchair boardings are possible from the location. Valid options are:

For parentless stops:
`0` or empty - No accessibility information for the stop.
`1` - Some vehicles at this stop can be boarded by a rider in a wheelchair.
`2` - Wheelchair boarding is not possible at this stop.

For child stops:
`0` or empty - Stop will inherit its `wheelchair_boarding` behavior from the parent station, if specified in the parent.
`1` - There exists some accessible path from outside the station to the specific stop/platform.
`2` - There exists no accessible path from outside the station to the specific stop/platform.

For station entrances/exits:
`0` or empty - Station entrance will inherit its `wheelchair_boarding` behavior from the parent station, if specified for the parent.
`1` - Station entrance is wheelchair accessible.
`2` - No accessible path from station entrance to stops/platforms. | | `level_id` | Foreign ID referencing `levels.level_id` | Optional | Level of the location. The same level may be used by multiple unlinked stations.| | `platform_code` | Text | Optional | Platform identifier for a platform stop (a stop belonging to a station). This should be just the platform identifier (eg. "G" or "3"). Words like “platform” or "track" (or the feed’s language-specific equivalent) should not be included. This allows feed consumers to more easily internationalize and localize the platform identifier into other languages. | @@ -227,9 +227,9 @@ Primary key (`route_id`) | `route_color` | Color | Optional | Route color designation that matches public facing material. Defaults to white (`FFFFFF`) when omitted or left empty. The color difference between `route_color` and `route_text_color` should provide sufficient contrast when viewed on a black and white screen. | | `route_text_color` | Color | Optional | Legible color to use for text drawn against a background of `route_color`. Defaults to black (`000000`) when omitted or left empty. The color difference between `route_color` and `route_text_color` should provide sufficient contrast when viewed on a black and white screen. | | `route_sort_order` | Non-negative integer | Optional | Orders the routes in a way which is ideal for presentation to customers. Routes with smaller `route_sort_order` values should be displayed first. | -| `continuous_pickup` | Enum | Optional | Indicates that the rider can board the transit vehicle at any point along the vehicle’s travel path as described by `shapes.txt`, on every trip of the route. Valid options are:

`0` - Continuous stopping pickup.
`1` or empty - No continuous stopping pickup.
`2` - Must phone agency to arrange continuous stopping pickup.
`3` - Must coordinate with driver to arrange continuous stopping pickup.

Values for `routes.continuous_pickup` may be overridden by defining values in `stop_times.continuous_pickup` for specific `stop_time`s along the route. | -| `continuous_drop_off` | Enum | Optional | Indicates that the rider can alight from the transit vehicle at any point along the vehicle’s travel path as described by `shapes.txt`, on every trip of the route. Valid options are:

`0` - Continuous stopping drop off.
`1` or empty - No continuous stopping drop off.
`2` - Must phone agency to arrange continuous stopping drop off.
`3` - Must coordinate with driver to arrange continuous stopping drop off.

Values for `routes.continuous_drop_off` may be overridden by defining values in `stop_times.continuous_drop_off` for specific `stop_time`s along the route. | -| `network_id` | ID | **Conditionally Forbidden** | Identifies a group of routes. Multiple rows in [routes.txt](#routestxt) may have the same `network_id`.

Conditionally Forbidden:
- **Forbidden** if `route_networks.txt` file exists.
- Optional otherwise. +| `continuous_pickup` | Enum | Optional | Indicates that the rider can board the transit vehicle at any point along the vehicle’s travel path as described by [shapes.txt](#shapestxt), on every trip of the route. Valid options are:

`0` - Continuous stopping pickup.
`1` or empty - No continuous stopping pickup.
`2` - Must phone agency to arrange continuous stopping pickup.
`3` - Must coordinate with driver to arrange continuous stopping pickup.

Values for `routes.continuous_pickup` may be overridden by defining values in `stop_times.continuous_pickup` for specific `stop_time`s along the route. | +| `continuous_drop_off` | Enum | Optional | Indicates that the rider can alight from the transit vehicle at any point along the vehicle’s travel path as described by [shapes.txt](#shapestxt), on every trip of the route. Valid options are:

`0` - Continuous stopping drop off.
`1` or empty - No continuous stopping drop off.
`2` - Must phone agency to arrange continuous stopping drop off.
`3` - Must coordinate with driver to arrange continuous stopping drop off.

Values for `routes.continuous_drop_off` may be overridden by defining values in `stop_times.continuous_drop_off` for specific `stop_time`s along the route. | +| `network_id` | ID | **Conditionally Forbidden** | Identifies a group of routes. Multiple rows in [routes.txt](#routestxt) may have the same `network_id`.

Conditionally Forbidden:
- **Forbidden** if the [route_networks.txt](#route_networkstxt) file exists.
- Optional otherwise. ### trips.txt @@ -246,7 +246,7 @@ Primary key (`trip_id`) | `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). 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. | +| `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](#routestxt) or in [stop_times.txt](stop_timestxt).
- 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. | @@ -283,8 +283,8 @@ Primary key (`trip_id`, `stop_sequence`) | `stop_headsign` | Text | Optional | Text that appears on signage identifying the trip's destination to riders. This field overrides the default `trips.trip_headsign` when the headsign changes between stops. If the headsign is displayed for an entire trip, `trips.trip_headsign` should be used instead.

A `stop_headsign` value specified for one `stop_time` does not apply to subsequent `stop_time`s in the same trip. If you want to override the `trip_headsign` for multiple `stop_time`s in the same trip, the `stop_headsign` value must be repeated in each `stop_time` row. | | `pickup_type` | Enum | Optional | Indicates pickup method. Valid options are:

`0` or empty - Regularly scheduled pickup.
`1` - No pickup available.
`2` - Must phone agency to arrange pickup.
`3` - Must coordinate with driver to arrange pickup. | | `drop_off_type` | Enum | Optional | Indicates drop off method. Valid options are:

`0` or empty - Regularly scheduled drop off.
`1` - No drop off available.
`2` - Must phone agency to arrange drop off.
`3` - Must coordinate with driver to arrange drop off. | -| `continuous_pickup` | Enum | Optional | Indicates that the rider can board the transit vehicle at any point along the vehicle’s travel path as described by `shapes.txt`, from this `stop_time` to the next `stop_time` in the trip’s `stop_sequence`. Valid options are:

`0` - Continuous stopping pickup.
`1` or empty - No continuous stopping pickup.
`2` - Must phone agency to arrange continuous stopping pickup.
`3` - Must coordinate with driver to arrange continuous stopping pickup.

If this field is populated, it overrides any continuous pickup behavior defined in `routes.txt`. If this field is empty, the `stop_time` inherits any continuous pickup behavior defined in `routes.txt`. | -| `continuous_drop_off` | Enum | Optional | Indicates that the rider can alight from the transit vehicle at any point along the vehicle’s travel path as described by `shapes.txt`, from this `stop_time` to the next `stop_time` in the trip’s `stop_sequence`. Valid options are:

`0` - Continuous stopping drop off.
`1` or empty - No continuous stopping drop off.
`2` - Must phone agency to arrange continuous stopping drop off.
`3` - Must coordinate with driver to arrange continuous stopping drop off.

If this field is populated, it overrides any continuous drop-off behavior defined in `routes.txt`. If this field is empty, the `stop_time` inherits any continuous drop-off behavior defined in `routes.txt`. | +| `continuous_pickup` | Enum | Optional | Indicates that the rider can board the transit vehicle at any point along the vehicle’s travel path as described by [shapes.txt](#shapestxt), from this `stop_time` to the next `stop_time` in the trip’s `stop_sequence`. Valid options are:

`0` - Continuous stopping pickup.
`1` or empty - No continuous stopping pickup.
`2` - Must phone agency to arrange continuous stopping pickup.
`3` - Must coordinate with driver to arrange continuous stopping pickup.

If this field is populated, it overrides any continuous pickup behavior defined in [routes.txt](routestxt). If this field is empty, the `stop_time` inherits any continuous pickup behavior defined in [routes.txt](#routestxt). | +| `continuous_drop_off` | Enum | Optional | Indicates that the rider can alight from the transit vehicle at any point along the vehicle’s travel path as described by [shapes.txt](#shapestxt), from this `stop_time` to the next `stop_time` in the trip’s `stop_sequence`. Valid options are:

`0` - Continuous stopping drop off.
`1` or empty - No continuous stopping drop off.
`2` - Must phone agency to arrange continuous stopping drop off.
`3` - Must coordinate with driver to arrange continuous stopping drop off.

If this field is populated, it overrides any continuous drop-off behavior defined in [routes.txt](routestxt). If this field is empty, the `stop_time` inherits any continuous drop-off behavior defined in [routes.txt](routestxt). | | `shape_dist_traveled` | Non-negative float | Optional | Actual distance traveled along the associated shape, from the first stop to the stop specified in this record. This field specifies how much of the shape to draw between any two stops during a trip. Must be in the same units used in [shapes.txt](#shapestxt). Values used for `shape_dist_traveled` must increase along with `stop_sequence`; they must not be used to show reverse travel along a route.

Recommended for routes that have looping or inlining (the vehicle crosses or travels over the same portion of alignment in one trip). See [`shapes.shape_dist_traveled`](#shapestxt).
*Example: If a bus travels a distance of 5.25 kilometers from the start of the shape to the stop,`shape_dist_traveled`=`5.25`.*| | `timepoint` | Enum | Recommended | Indicates if arrival and departure times for a stop are strictly adhered to by the vehicle or if they are instead approximate and/or interpolated times. This field allows a GTFS producer to provide interpolated stop-times, while indicating that the times are approximate. Valid options are:

`0` - Times are considered approximate.
`1` or empty - Times are considered exact. | @@ -296,7 +296,7 @@ Primary key (`service_id`) | Field Name | Type | Presence | Description | | ------ | ------ | ------ |------ | -| `service_id` | Unique ID | **Required** | Identifies a set of dates when service is available for one or more routes. Each `service_id` value must be unique in a [calendar.txt](#calendartxt) file. | +| `service_id` | Unique ID | **Required** | Identifies a set of dates when service is available for one or more routes. | | `monday` | Enum | **Required** | Indicates whether the service operates on all Mondays in the date range specified by the `start_date` and `end_date` fields. Note that exceptions for particular dates may be listed in [calendar_dates.txt](#calendar_datestxt). Valid options are:

`1` - Service is available for all Mondays in the date range.
`0` - Service is not available for Mondays in the date range. | | `tuesday` | Enum | **Required** | Functions in the same way as `monday` except applies to Tuesdays | | `wednesday` | Enum | **Required** | Functions in the same way as `monday` except applies to Wednesdays | @@ -342,7 +342,7 @@ There are two modelling options for describing fares. GTFS-Fares V1 is the legac | `currency_type` | Currency code | **Required** | Currency used to pay the fare. | | `payment_method` | Enum | **Required** | Indicates when the fare must be paid. Valid options are:

`0` - Fare is paid on board.
`1` - Fare must be paid before boarding. | | `transfers` | Enum | **Required** | Indicates the number of transfers permitted on this fare. Valid options are:

`0` - No transfers permitted on this fare.
`1` - Riders may transfer once.
`2` - Riders may transfer twice.
empty - Unlimited transfers are permitted. | -| `agency_id` | Foreign ID referencing `agency.agency_id` | **Conditionally Required** | Identifies the relevant agency for a fare.

Conditionally Required:
- **Required** if multiple agencies are defined in `agency.txt`.
- Recommended otherwise. | +| `agency_id` | Foreign ID referencing `agency.agency_id` | **Conditionally Required** | Identifies the relevant agency for a fare.

Conditionally Required:
- **Required** if multiple agencies are defined in [agency.txt](#agencytxt).
- Recommended otherwise. | | `transfer_duration` | Non-negative integer | Optional | Length of time in seconds before a transfer expires. When `transfers`=`0` this field may be used to indicate how long a ticket is valid for or it may be left empty. | ### fare_rules.txt @@ -373,7 +373,7 @@ File: **Optional** Primary key (*) -Used to describe fares that can vary based on the time of day, the day of the week, or a particular day in the year. Timeframes can be associated with fare products in `fare_leg_rules.txt`.
+Used to describe fares that can vary based on the time of day, the day of the week, or a particular day in the year. Timeframes can be associated with fare products in [fare_leg_rules.txt](fare_leg_rulestxt).
There must not be overlapping time intervals for the same `timeframe_group_id` and `service_id` values. | Field Name | Type | Presence | Description | @@ -384,7 +384,7 @@ There must not be overlapping time intervals for the same `timeframe_group_id` a | `service_id` | Foreign ID referencing `calendar.service_id` or `calendar_dates.service_id` | **Required** | Identifies a set of dates that a timeframe is in effect. | #### Timeframe Local Time Semantics -- When evaluating a fare event’s time against `timeframes.txt`, the event time is computed in local time using the local timezone, as determined by the `stop_timezone`, if specified, of the stop or parent station for the fare event. If not specified, the feed’s agency timezone should be used instead. +- When evaluating a fare event’s time against [timeframes.txt](#timeframestxt), the event time is computed in local time using the local timezone, as determined by the `stop_timezone`, if specified, of the stop or parent station for the fare event. If not specified, the feed’s agency timezone should be used instead. - The “current day” is the current date of the fare event’s time, computed relative to the local timezone. The “current day” may be different from the service day of a fare leg’s trip, especially for trips that extend past midnight. - The “time-of-day” for the fare event is computed relative to “current day” using GTFS Time field-type semantics. @@ -431,7 +431,7 @@ Fares in [`fare_leg_rules.txt`](#fare_leg_rulestxt) must be queried by filtering To process the cost of a leg: -1. The file `fare_leg_rules.txt` must be filtered by the fields that define the characteristics of travel, these fields are: +1. The file [fare_leg_rules.txt](fare_leg_rulestxt) must be filtered by the fields that define the characteristics of travel, these fields are: - `fare_leg_rules.network_id` - `fare_leg_rules.from_area_id` - `fare_leg_rules.to_area_id` @@ -439,11 +439,11 @@ To process the cost of a leg: - `fare_leg_rules.to_timeframe_group_id`

-2. If the leg exactly matches a record in `fare_leg_rules.txt` based on the characteristics of travel, that record must be processed to determine the cost of the leg. +2. If the leg exactly matches a record in [fare_leg_rules.txt](fare_leg_rulestxt) based on the characteristics of travel, that record must be processed to determine the cost of the leg.
3. If no exact matches are found, then empty entries in `fare_leg_rules.network_id`, `fare_leg_rules.from_area_id`, and `fare_leg_rules.to_area_id` must be checked to process the cost of the leg: - - An empty entry in `fare_leg_rules.network_id` corresponds to all networks defined in `routes.txt` excluding the ones listed under `fare_leg_rules.network_id` + - An empty entry in `fare_leg_rules.network_id` corresponds to all networks defined in [routes.txt](#routestxt) or [networks.txt](#networkstxt) excluding the ones listed under `fare_leg_rules.network_id` - An empty entry in `fare_leg_rules.from_area_id` corresponds to all areas defined in `areas.area_id` excluding the ones listed under `fare_leg_rules.from_area_id` - An empty entry in `fare_leg_rules.to_area_id` corresponds to all areas defined in `areas.area_id` excluding the ones listed under `fare_leg_rules.to_area_id`
@@ -455,11 +455,11 @@ To process the cost of a leg: | Field Name | Type | Presence | Description | | ------ | ------ | ------ | ------ | | `leg_group_id` | ID | Optional | Identifies a group of entries in [fare_leg_rules.txt](#fare_leg_rulestxt).

Used to describe fare transfer rules between `fare_transfer_rules.from_leg_group_id` and `fare_transfer_rules.to_leg_group_id`.

Multiple entries in [fare_leg_rules.txt](#fare_leg_rulestxt) may belong to the same `fare_leg_rules.leg_group_id`.

The same entry in [fare_leg_rules.txt](#fare_leg_rulestxt) (not including `fare_leg_rules.leg_group_id`) must not belong to multiple `fare_leg_rules.leg_group_id`.| -| `network_id` | Foreign ID referencing `routes.network_id` or `networks.network_id`| Optional | Identifies a route network that applies for the fare leg rule.

If there are no matching `fare_leg_rules.network_id` values to the `network_id` being filtered, empty `fare_leg_rules.network_id` will be matched by default.

An empty entry in `fare_leg_rules.network_id` corresponds to all networks defined in `routes.txt` or `networks.txt` excluding the ones listed under `fare_leg_rules.network_id` | +| `network_id` | Foreign ID referencing `routes.network_id` or `networks.network_id`| Optional | Identifies a route network that applies for the fare leg rule.

If there are no matching `fare_leg_rules.network_id` values to the `network_id` being filtered, empty `fare_leg_rules.network_id` will be matched by default.

An empty entry in `fare_leg_rules.network_id` corresponds to all networks defined in [routes.txt](#routestxt) or [networks.txt](#networkstxt) excluding the ones listed under `fare_leg_rules.network_id` | | `from_area_id` | Foreign ID referencing `areas.area_id` | Optional | Identifies a departure area.

If there are no matching `fare_leg_rules.from_area_id` values to the `area_id` being filtered, empty `fare_leg_rules.from_area_id` will be matched by default.

An empty entry in `fare_leg_rules.from_area_id` corresponds to all areas defined in `areas.area_id` excluding the ones listed under `fare_leg_rules.from_area_id` | | `to_area_id` | Foreign ID referencing `areas.area_id` | Optional | Identifies an arrival area.

If there are no matching `fare_leg_rules.to_area_id` values to the `area_id` being filtered, empty `fare_leg_rules.to_area_id` will be matched by default.

An empty entry in `fare_leg_rules.to_area_id` corresponds to all areas defined in `areas.area_id` excluding the ones listed under `fare_leg_rules.to_area_id` | -| `from_timeframe_group_id` | Foreign ID referencing `timeframes.timeframe_group_id` | Optional | Defines the timeframe for the fare validation event at the start of the fare leg.

The “start time” of the fare leg is the time at which the event is scheduled to occur. For example, the time could be the scheduled departure time of a bus at the start of a fare leg where the rider boards and validates their fare. For the rule matching semantics below, the start time is computed in local time, as determined by [Local Time Semantics](#localtimesemantics) of [timeframes.txt](#timeframestxt). The stop or station of the fare leg’s departure event should be used for timezone resolution, where appropriate.

For a fare leg rule that specifies a `from_timeframe_group_id`, that rule will match a particular leg if there exists at least one record in `timeframes.txt` where all of the following conditions are true
- The value of `timeframe_group_id` is equal to the `from_timeframe_group_id` value.
- The set of days identified by the record’s `service_id` contains the “current day” of the fare leg’s start time.
- The “time-of-day” of the fare leg's start time is greater than or equal to the record’s `timeframes.start_time` value and less than the `timeframes.end_time` value.

An empty `fare_leg_rules.from_timeframe_group_id` indicates that the start time of the leg does not affect the matching of this rule. | -| `to_timeframe_group_id` | Foreign ID referencing `timeframes.timeframe_group_id` | Optional | Defines the timeframe for the fare validation event at the end of the fare leg.

The “end time” of the fare leg is the time at which the event is scheduled to occur. For example, the time could be the scheduled arrival time of a bus at the end of a fare leg where the rider gets off and validates their fare. For the rule matching semantics below, the end time is computed in local time, as determined by [Local Time Semantics](#localtimesemantics) of [timeframes.txt](#timeframestxt). The stop or station of the fare leg’s arrival event should be used for timezone resolution, where appropriate.

For a fare leg rule that specifies a `to_timeframe_group_id`, that rule will match a particular leg if there exists at least one record in `timeframes.txt` where all of the following conditions are true
- The value of `timeframe_group_id` is equal to the `to_timeframe_group_id` value.
- The set of days identified by the record’s `service_id` contains the “current day” of the fare leg’s end time.
- The “time-of-day” of the fare leg's end time is greater than or equal to the record’s `timeframes.start_time` value and less than the `timeframes.end_time` value.

An empty `fare_leg_rules.to_timeframe_group_id` indicates that the end time of the leg does not affect the matching of this rule. | +| `from_timeframe_group_id` | Foreign ID referencing `timeframes.timeframe_group_id` | Optional | Defines the timeframe for the fare validation event at the start of the fare leg.

The “start time” of the fare leg is the time at which the event is scheduled to occur. For example, the time could be the scheduled departure time of a bus at the start of a fare leg where the rider boards and validates their fare. For the rule matching semantics below, the start time is computed in local time, as determined by [Local Time Semantics](#localtimesemantics) of [timeframes.txt](#timeframestxt). The stop or station of the fare leg’s departure event should be used for timezone resolution, where appropriate.

For a fare leg rule that specifies a `from_timeframe_group_id`, that rule will match a particular leg if there exists at least one record in [timeframes.txt](#timeframestxt) where all of the following conditions are true
- The value of `timeframe_group_id` is equal to the `from_timeframe_group_id` value.
- The set of days identified by the record’s `service_id` contains the “current day” of the fare leg’s start time.
- The “time-of-day” of the fare leg's start time is greater than or equal to the record’s `timeframes.start_time` value and less than the `timeframes.end_time` value.

An empty `fare_leg_rules.from_timeframe_group_id` indicates that the start time of the leg does not affect the matching of this rule. | +| `to_timeframe_group_id` | Foreign ID referencing `timeframes.timeframe_group_id` | Optional | Defines the timeframe for the fare validation event at the end of the fare leg.

The “end time” of the fare leg is the time at which the event is scheduled to occur. For example, the time could be the scheduled arrival time of a bus at the end of a fare leg where the rider gets off and validates their fare. For the rule matching semantics below, the end time is computed in local time, as determined by [Local Time Semantics](#localtimesemantics) of [timeframes.txt](#timeframestxt). The stop or station of the fare leg’s arrival event should be used for timezone resolution, where appropriate.

For a fare leg rule that specifies a `to_timeframe_group_id`, that rule will match a particular leg if there exists at least one record in [timeframes.txt](#timeframestxt) where all of the following conditions are true
- The value of `timeframe_group_id` is equal to the `to_timeframe_group_id` value.
- The set of days identified by the record’s `service_id` contains the “current day” of the fare leg’s end time.
- The “time-of-day” of the fare leg's end time is greater than or equal to the record’s `timeframes.start_time` value and less than the `timeframes.end_time` value.

An empty `fare_leg_rules.to_timeframe_group_id` indicates that the end time of the leg does not affect the matching of this rule. | | `fare_product_id` | Foreign ID referencing `fare_products.fare_product_id` | **Required** | The fare product required to travel the leg. | ### fare_transfer_rules.txt @@ -473,12 +473,12 @@ Fare rules for transfers between legs of travel defined in [`fare_leg_rules.txt` To process the cost of a multi-leg journey: 1. The applicable fare leg groups defined in `fare_leg_rules.txt` should be determined for all individual legs of travel based on the rider’s journey. -2. The file `fare_transfer_rules.txt` must be filtered by the fields that define the characteristics of the transfer, these fields are: +2. The file [fare_transfer_rules.txt](fare_transfer_rulestxt) must be filtered by the fields that define the characteristics of the transfer, these fields are: - `fare_transfer_rules.from_leg_group_id` - `fare_transfer_rules.to_leg_group_id`

-3. If the transfer exactly matches a record in `fare_transfer_rules.txt` based on the characteristics of the transfer, then that record must be processed to determine the transfer cost. +3. If the transfer exactly matches a record in [fare_transfer_rules.txt](fare_transfer_rulestxt) based on the characteristics of the transfer, then that record must be processed to determine the transfer cost. 4. If no exact matches are found, then empty entries in `from_leg_group_id` or in `to_leg_group_id` must be checked to process the transfer cost: - An empty entry in `fare_transfer_rules.from_leg_group_id` corresponds to all leg groups defined under `fare_leg_rules.leg_group_id` excluding the ones listed under `fare_transfer_rules.from_leg_group_id` - An empty entry in `fare_transfer_rules.to_leg_group_id` corresponds to all leg groups defined under `fare_leg_rules.leg_group_id` excluding the ones listed under `fare_transfer_rules.to_leg_group_id`
@@ -564,7 +564,7 @@ Shapes describe the path that a vehicle travels along a route alignment, and are | `shape_pt_lat` | Latitude | **Required** | Latitude of a shape point. Each record in [shapes.txt](#shapestxt) represents a shape point used to define the shape. | | `shape_pt_lon` | Longitude | **Required** | Longitude of a shape point. | | `shape_pt_sequence` | Non-negative integer | **Required** | Sequence in which the shape points connect to form the shape. Values must increase along the trip but do not need to be consecutive.
*Example: If the shape "A_shp" has three points in its definition, the [shapes.txt](#shapestxt) file might contain these records to define the shape:*
`shape_id,shape_pt_lat,shape_pt_lon,shape_pt_sequence`
`A_shp,37.61956,-122.48161,0`
`A_shp,37.64430,-122.41070,6`
`A_shp,37.65863,-122.30839,11` | -| `shape_dist_traveled` | Non-negative float | Optional | Actual distance traveled along the shape from the first shape point to the point specified in this record. Used by trip planners to show the correct portion of the shape on a map. Values must increase along with `shape_pt_sequence`; they must not be used to show reverse travel along a route. Distance units must be consistent with those used in [stop_times.txt](#stop_timestxt).

Recommended for routes that have looping or inlining (the vehicle crosses or travels over the same portion of alignment in one trip).

If a vehicle retraces or crosses the route alignment at points in the course of a trip, `shape_dist_traveled` is important to clarify how portions of the points in `shapes.txt` line up correspond with records in `stop_times.txt`.
*Example: If a bus travels along the three points defined above for A_shp, the additional `shape_dist_traveled` values (shown here in kilometers) would look like this:*
`shape_id,shape_pt_lat,shape_pt_lon,shape_pt_sequence,shape_dist_traveled`
`A_shp,37.61956,-122.48161,0,0`
`A_shp,37.64430,-122.41070,6,6.8310`
`A_shp,37.65863,-122.30839,11,15.8765` | +| `shape_dist_traveled` | Non-negative float | Optional | Actual distance traveled along the shape from the first shape point to the point specified in this record. Used by trip planners to show the correct portion of the shape on a map. Values must increase along with `shape_pt_sequence`; they must not be used to show reverse travel along a route. Distance units must be consistent with those used in [stop_times.txt](#stop_timestxt).

Recommended for routes that have looping or inlining (the vehicle crosses or travels over the same portion of alignment in one trip).

If a vehicle retraces or crosses the route alignment at points in the course of a trip, `shape_dist_traveled` is important to clarify how portions of the points in [shapes.txt](#shapestxt) line up correspond with records in [stop_times.txt](#stop_timestxt).
*Example: If a bus travels along the three points defined above for A_shp, the additional `shape_dist_traveled` values (shown here in kilometers) would look like this:*
`shape_id,shape_pt_lat,shape_pt_lon,shape_pt_sequence,shape_dist_traveled`
`A_shp,37.61956,-122.48161,0,0`
`A_shp,37.64430,-122.41070,6,6.8310`
`A_shp,37.65863,-122.30839,11,15.8765` | ### frequencies.txt @@ -679,7 +679,7 @@ File: **Conditionally Required** Primary key (`level_id`) -Describes levels in a station. Useful in conjunction with `pathways.txt`. +Describes levels in a station. Useful in conjunction with [pathways.txt](#pathwaystxt). | Field Name | Type | Presence | Description | | ------ | ------ | ------ | ------ | @@ -704,13 +704,13 @@ If both referencing methods (`record_id`, `record_sub_id`) and `field_value` are | `field_name` | Text | **Required** | Name of the field to be translated. Fields with type `Text` may be translated, fields with type `URL`, `Email` and `Phone number` may also be “translated” to provide resources in the correct language. Fields with other types should not be translated. | | `language` | Language code | **Required** | Language of translation.

If the language is the same as in `feed_info.feed_lang`, the original value of the field will be assumed to be the default value to use in languages without specific translations (if `default_lang` doesn't specify otherwise).
_Example: In Switzerland, a city in an officially bilingual canton is officially called “Biel/Bienne”, but would simply be called “Bienne” in French and “Biel” in German._ | | `translation` | Text or URL or Email or Phone number | **Required** | Translated value. | -| `record_id` | Foreign ID | **Conditionally Required** | Defines the record that corresponds to the field to be translated. The value in `record_id` must be the first or only field of a table's primary key, as defined in the primary key attribute for each table and below:

- `agency_id` for `agency.txt`
- `stop_id` for `stops.txt`;
- `route_id` for `routes.txt`;
- `trip_id` for `trips.txt`;
- `trip_id` for `stop_times.txt`;
- `pathway_id` for `pathways.txt`;
- `level_id` for `levels.txt`;
- `attribution_id` for `attribution.txt`.

Fields in tables not defined above should not be translated. However producers sometimes add extra fields that are outside the official specification and these unofficial fields may be translated. Below is the recommended way to use `record_id` for those tables:

- `service_id` for `calendar.txt`;
- `service_id` for `calendar_dates.txt`;
- `fare_id` for `fare_attributes.txt`;
- `fare_id` for `fare_rules.txt`;
- `shape_id` for `shapes.txt`;
- `trip_id` for `frequencies.txt`;
- `from_stop_id` for `transfers.txt`.

Conditionally Required:
- **Forbidden** if `table_name` is `feed_info`.
- **Forbidden** if `field_value` is defined.
- **Required** if `field_value` is empty. | -| `record_sub_id` | Foreign ID | **Conditionally Required** | Helps the record that contains the field to be translated when the table doesn’t have a unique ID. Therefore, the value in `record_sub_id` is the secondary ID of the table, as defined by the table below:

- None for `agency.txt`;
- None for `stops.txt`;
- None for `routes.txt`;
- None for `trips.txt`;
- `stop_sequence` for `stop_times.txt`;
- None for `pathways.txt`;
- None for `levels.txt`;
- None for `attributions.txt`.

Fields in tables not defined above should not be translated. However producers sometimes add extra fields that are outside the official specification and these unofficial fields may be translated. Below is the recommended way to use `record_sub_id` for those tables:

- None for `calendar.txt`;
- `date` for `calendar_dates.txt`;
- None for `fare_attributes.txt`;
- `route_id` for `fare_rules.txt`;
- None for `shapes.txt`;
- `start_time` for `frequencies.txt`;
- `to_stop_id` for `transfers.txt`.

Conditionally Required:
- **Forbidden** if `table_name` is `feed_info`.
- **Forbidden** if `field_value` is defined.
- **Required** if `table_name=stop_times` and `record_id` is defined. | +| `record_id` | Foreign ID | **Conditionally Required** | Defines the record that corresponds to the field to be translated. The value in `record_id` must be the first or only field of a table's primary key, as defined in the primary key attribute for each table and below:

- `agency_id` for [agency.txt](#agencytxt)`
- `stop_id` for [stops.txt](#stopstxt);
- `route_id` for [routes.txt](routestxt);
- `trip_id` for [trips.txt](#tripstxt);
- `trip_id` for [stop_times.txt](#stop_timestxt);
- `pathway_id` for [pathways.txt](#pathwaystxt);
- `level_id` for [levels.txt](#levelstxt);
- `attribution_id` for [attributions.txt](#attributionstxt).

Fields in tables not defined above should not be translated. However producers sometimes add extra fields that are outside the official specification and these unofficial fields may be translated. Below is the recommended way to use `record_id` for those tables:

- `service_id` for [calendar.txt](#calendartxt);
- `service_id` for [calendar_dates.txt](#calendar_datestxt);
- `fare_id` for [fare_attributes.txt](fare_attributestxt);
- `fare_id` for [fare_rules.txt](fare_rulestxt);
- `shape_id` for [shapes.txt](#shapestxt);
- `trip_id` for [frequencies.txt](frequenciestxt);
- `from_stop_id` for `transfers.txt`.

Conditionally Required:
- **Forbidden** if `table_name` is `feed_info`.
- **Forbidden** if `field_value` is defined.
- **Required** if `field_value` is empty. | +| `record_sub_id` | Foreign ID | **Conditionally Required** | Helps the record that contains the field to be translated when the table doesn’t have a unique ID. Therefore, the value in `record_sub_id` is the secondary ID of the table, as defined by the table below:

- None for [agency.txt](#agencytxt);
- None for [stops.txt](#stopstxt);
- None for [routes.txt](routestxt);
- None for [trips.txt](#tripstxt);
- `stop_sequence` for [stop_times.txt](#stop_timestxt);
- None for [pathways.txt](#pathwaystxt);
- None for [levels.txt](#levelstxt);
- None for [attributions.txt](#attributionstxt).

Fields in tables not defined above should not be translated. However producers sometimes add extra fields that are outside the official specification and these unofficial fields may be translated. Below is the recommended way to use `record_sub_id` for those tables:

- None for [calendar.txt](#calendartxt);
- `date` for [calendar_dates.txt](#calendar_datestxt);
- None for [fare_attributes.txt](#fare_attributestxt);
- `route_id` for [fare_rules.txt](#fare_rulestxt);
- None for [shapes.txt](#shapestxt);
- `start_time` for [frequencies.txt](#frequenciestxt);
- `to_stop_id` for [transfers.txt](#transferstxt).

Conditionally Required:
- **Forbidden** if `table_name` is `feed_info`.
- **Forbidden** if `field_value` is defined.
- **Required** if `table_name=stop_times` and `record_id` is defined. | | `field_value` | Text or URL or Email or Phone number | **Conditionally Required** | Instead of defining which record should be translated by using `record_id` and `record_sub_id`, this field can be used to define the value which should be translated. When used, the translation will be applied when the fields identified by `table_name` and `field_name` contains the exact same value defined in field_value.

The field must have **exactly** the value defined in `field_value`. If only a subset of the value matches `field_value`, the translation won’t be applied.

If two translation rules match the same record (one with `field_value`, and the other one with `record_id`), the rule with `record_id` takes precedence.

Conditionally Required:
- **Forbidden** if `table_name` is `feed_info`.
- **Forbidden** if `record_id` is defined.
- **Required** if `record_id` is empty. | ### feed_info.txt -File: **Recommended** (**Required** if `translations.txt` is provided) +File: **Recommended** (**Required** if [translations.txt](#translations) is provided) Primary key (none) From 8b2e99e235a6477615854abef8c8c27b58b61013 Mon Sep 17 00:00:00 2001 From: isabelle-dr Date: Mon, 8 Jan 2024 16:16:59 -0500 Subject: [PATCH 5/6] fix link in Dataset Publishing Guidelines --- 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 cd424497..dacfea48 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -163,7 +163,7 @@ The following example demonstrates how a field value would appear in a comma-del * If possible, the GTFS dataset should cover at least the next 30 days of service. * Old services (expired calendars) should be removed from the feed. * If a service modification will go into effect in 7 days or fewer, this service change should be expressed through a GTFS-realtime feed (service advisories or trip updates) rather than static GTFS dataset. - * The web-server hosting GTFS data should be configured to correctly report the file modification date (see [HTTP/1.1 - Request for Comments 2616, under Section 14.29](https://tools.ietf.org/html/rfc2616#section-14.29)https://tools.ietf.org/html/rfc2616#section-14.29). + * The web-server hosting GTFS data should be configured to correctly report the file modification date (see [HTTP/1.1 - Request for Comments 2616, under Section 14.29](https://tools.ietf.org/html/rfc2616#section-14.29)). ## Field Definitions From bb2d7bc115c869a2a727eb08bb3fb11c55982dab Mon Sep 17 00:00:00 2001 From: isabelle-dr Date: Mon, 8 Jan 2024 16:35:51 -0500 Subject: [PATCH 6/6] Fix links --- gtfs/spec/en/reference.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md index dacfea48..1602678f 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -246,7 +246,7 @@ Primary key (`trip_id`) | `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). 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](#routestxt) or in [stop_times.txt](stop_timestxt).
- Optional otherwise. | +| `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](#routestxt) or in [stop_times.txt](#stop_timestxt).
- 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. | @@ -283,8 +283,8 @@ Primary key (`trip_id`, `stop_sequence`) | `stop_headsign` | Text | Optional | Text that appears on signage identifying the trip's destination to riders. This field overrides the default `trips.trip_headsign` when the headsign changes between stops. If the headsign is displayed for an entire trip, `trips.trip_headsign` should be used instead.

A `stop_headsign` value specified for one `stop_time` does not apply to subsequent `stop_time`s in the same trip. If you want to override the `trip_headsign` for multiple `stop_time`s in the same trip, the `stop_headsign` value must be repeated in each `stop_time` row. | | `pickup_type` | Enum | Optional | Indicates pickup method. Valid options are:

`0` or empty - Regularly scheduled pickup.
`1` - No pickup available.
`2` - Must phone agency to arrange pickup.
`3` - Must coordinate with driver to arrange pickup. | | `drop_off_type` | Enum | Optional | Indicates drop off method. Valid options are:

`0` or empty - Regularly scheduled drop off.
`1` - No drop off available.
`2` - Must phone agency to arrange drop off.
`3` - Must coordinate with driver to arrange drop off. | -| `continuous_pickup` | Enum | Optional | Indicates that the rider can board the transit vehicle at any point along the vehicle’s travel path as described by [shapes.txt](#shapestxt), from this `stop_time` to the next `stop_time` in the trip’s `stop_sequence`. Valid options are:

`0` - Continuous stopping pickup.
`1` or empty - No continuous stopping pickup.
`2` - Must phone agency to arrange continuous stopping pickup.
`3` - Must coordinate with driver to arrange continuous stopping pickup.

If this field is populated, it overrides any continuous pickup behavior defined in [routes.txt](routestxt). If this field is empty, the `stop_time` inherits any continuous pickup behavior defined in [routes.txt](#routestxt). | -| `continuous_drop_off` | Enum | Optional | Indicates that the rider can alight from the transit vehicle at any point along the vehicle’s travel path as described by [shapes.txt](#shapestxt), from this `stop_time` to the next `stop_time` in the trip’s `stop_sequence`. Valid options are:

`0` - Continuous stopping drop off.
`1` or empty - No continuous stopping drop off.
`2` - Must phone agency to arrange continuous stopping drop off.
`3` - Must coordinate with driver to arrange continuous stopping drop off.

If this field is populated, it overrides any continuous drop-off behavior defined in [routes.txt](routestxt). If this field is empty, the `stop_time` inherits any continuous drop-off behavior defined in [routes.txt](routestxt). | +| `continuous_pickup` | Enum | Optional | Indicates that the rider can board the transit vehicle at any point along the vehicle’s travel path as described by [shapes.txt](#shapestxt), from this `stop_time` to the next `stop_time` in the trip’s `stop_sequence`. Valid options are:

`0` - Continuous stopping pickup.
`1` or empty - No continuous stopping pickup.
`2` - Must phone agency to arrange continuous stopping pickup.
`3` - Must coordinate with driver to arrange continuous stopping pickup.

If this field is populated, it overrides any continuous pickup behavior defined in [routes.txt](#routestxt). If this field is empty, the `stop_time` inherits any continuous pickup behavior defined in [routes.txt](#routestxt). | +| `continuous_drop_off` | Enum | Optional | Indicates that the rider can alight from the transit vehicle at any point along the vehicle’s travel path as described by [shapes.txt](#shapestxt), from this `stop_time` to the next `stop_time` in the trip’s `stop_sequence`. Valid options are:

`0` - Continuous stopping drop off.
`1` or empty - No continuous stopping drop off.
`2` - Must phone agency to arrange continuous stopping drop off.
`3` - Must coordinate with driver to arrange continuous stopping drop off.

If this field is populated, it overrides any continuous drop-off behavior defined in [routes.txt](#routestxt). If this field is empty, the `stop_time` inherits any continuous drop-off behavior defined in [routes.txt](#routestxt). | | `shape_dist_traveled` | Non-negative float | Optional | Actual distance traveled along the associated shape, from the first stop to the stop specified in this record. This field specifies how much of the shape to draw between any two stops during a trip. Must be in the same units used in [shapes.txt](#shapestxt). Values used for `shape_dist_traveled` must increase along with `stop_sequence`; they must not be used to show reverse travel along a route.

Recommended for routes that have looping or inlining (the vehicle crosses or travels over the same portion of alignment in one trip). See [`shapes.shape_dist_traveled`](#shapestxt).
*Example: If a bus travels a distance of 5.25 kilometers from the start of the shape to the stop,`shape_dist_traveled`=`5.25`.*| | `timepoint` | Enum | Recommended | Indicates if arrival and departure times for a stop are strictly adhered to by the vehicle or if they are instead approximate and/or interpolated times. This field allows a GTFS producer to provide interpolated stop-times, while indicating that the times are approximate. Valid options are:

`0` - Times are considered approximate.
`1` or empty - Times are considered exact. | @@ -373,7 +373,7 @@ File: **Optional** Primary key (*) -Used to describe fares that can vary based on the time of day, the day of the week, or a particular day in the year. Timeframes can be associated with fare products in [fare_leg_rules.txt](fare_leg_rulestxt).
+Used to describe fares that can vary based on the time of day, the day of the week, or a particular day in the year. Timeframes can be associated with fare products in [fare_leg_rules.txt](#fare_leg_rulestxt).
There must not be overlapping time intervals for the same `timeframe_group_id` and `service_id` values. | Field Name | Type | Presence | Description | @@ -431,7 +431,7 @@ Fares in [`fare_leg_rules.txt`](#fare_leg_rulestxt) must be queried by filtering To process the cost of a leg: -1. The file [fare_leg_rules.txt](fare_leg_rulestxt) must be filtered by the fields that define the characteristics of travel, these fields are: +1. The file [fare_leg_rules.txt](#fare_leg_rulestxt) must be filtered by the fields that define the characteristics of travel, these fields are: - `fare_leg_rules.network_id` - `fare_leg_rules.from_area_id` - `fare_leg_rules.to_area_id` @@ -439,7 +439,7 @@ To process the cost of a leg: - `fare_leg_rules.to_timeframe_group_id`

-2. If the leg exactly matches a record in [fare_leg_rules.txt](fare_leg_rulestxt) based on the characteristics of travel, that record must be processed to determine the cost of the leg. +2. If the leg exactly matches a record in [fare_leg_rules.txt](#fare_leg_rulestxt) based on the characteristics of travel, that record must be processed to determine the cost of the leg.
3. If no exact matches are found, then empty entries in `fare_leg_rules.network_id`, `fare_leg_rules.from_area_id`, and `fare_leg_rules.to_area_id` must be checked to process the cost of the leg: @@ -473,12 +473,12 @@ Fare rules for transfers between legs of travel defined in [`fare_leg_rules.txt` To process the cost of a multi-leg journey: 1. The applicable fare leg groups defined in `fare_leg_rules.txt` should be determined for all individual legs of travel based on the rider’s journey. -2. The file [fare_transfer_rules.txt](fare_transfer_rulestxt) must be filtered by the fields that define the characteristics of the transfer, these fields are: +2. The file [fare_transfer_rules.txt](#fare_transfer_rulestxt) must be filtered by the fields that define the characteristics of the transfer, these fields are: - `fare_transfer_rules.from_leg_group_id` - `fare_transfer_rules.to_leg_group_id`

-3. If the transfer exactly matches a record in [fare_transfer_rules.txt](fare_transfer_rulestxt) based on the characteristics of the transfer, then that record must be processed to determine the transfer cost. +3. If the transfer exactly matches a record in [fare_transfer_rules.txt](#fare_transfer_rulestxt) based on the characteristics of the transfer, then that record must be processed to determine the transfer cost. 4. If no exact matches are found, then empty entries in `from_leg_group_id` or in `to_leg_group_id` must be checked to process the transfer cost: - An empty entry in `fare_transfer_rules.from_leg_group_id` corresponds to all leg groups defined under `fare_leg_rules.leg_group_id` excluding the ones listed under `fare_transfer_rules.from_leg_group_id` - An empty entry in `fare_transfer_rules.to_leg_group_id` corresponds to all leg groups defined under `fare_leg_rules.leg_group_id` excluding the ones listed under `fare_transfer_rules.to_leg_group_id`
@@ -704,8 +704,8 @@ If both referencing methods (`record_id`, `record_sub_id`) and `field_value` are | `field_name` | Text | **Required** | Name of the field to be translated. Fields with type `Text` may be translated, fields with type `URL`, `Email` and `Phone number` may also be “translated” to provide resources in the correct language. Fields with other types should not be translated. | | `language` | Language code | **Required** | Language of translation.

If the language is the same as in `feed_info.feed_lang`, the original value of the field will be assumed to be the default value to use in languages without specific translations (if `default_lang` doesn't specify otherwise).
_Example: In Switzerland, a city in an officially bilingual canton is officially called “Biel/Bienne”, but would simply be called “Bienne” in French and “Biel” in German._ | | `translation` | Text or URL or Email or Phone number | **Required** | Translated value. | -| `record_id` | Foreign ID | **Conditionally Required** | Defines the record that corresponds to the field to be translated. The value in `record_id` must be the first or only field of a table's primary key, as defined in the primary key attribute for each table and below:

- `agency_id` for [agency.txt](#agencytxt)`
- `stop_id` for [stops.txt](#stopstxt);
- `route_id` for [routes.txt](routestxt);
- `trip_id` for [trips.txt](#tripstxt);
- `trip_id` for [stop_times.txt](#stop_timestxt);
- `pathway_id` for [pathways.txt](#pathwaystxt);
- `level_id` for [levels.txt](#levelstxt);
- `attribution_id` for [attributions.txt](#attributionstxt).

Fields in tables not defined above should not be translated. However producers sometimes add extra fields that are outside the official specification and these unofficial fields may be translated. Below is the recommended way to use `record_id` for those tables:

- `service_id` for [calendar.txt](#calendartxt);
- `service_id` for [calendar_dates.txt](#calendar_datestxt);
- `fare_id` for [fare_attributes.txt](fare_attributestxt);
- `fare_id` for [fare_rules.txt](fare_rulestxt);
- `shape_id` for [shapes.txt](#shapestxt);
- `trip_id` for [frequencies.txt](frequenciestxt);
- `from_stop_id` for `transfers.txt`.

Conditionally Required:
- **Forbidden** if `table_name` is `feed_info`.
- **Forbidden** if `field_value` is defined.
- **Required** if `field_value` is empty. | -| `record_sub_id` | Foreign ID | **Conditionally Required** | Helps the record that contains the field to be translated when the table doesn’t have a unique ID. Therefore, the value in `record_sub_id` is the secondary ID of the table, as defined by the table below:

- None for [agency.txt](#agencytxt);
- None for [stops.txt](#stopstxt);
- None for [routes.txt](routestxt);
- None for [trips.txt](#tripstxt);
- `stop_sequence` for [stop_times.txt](#stop_timestxt);
- None for [pathways.txt](#pathwaystxt);
- None for [levels.txt](#levelstxt);
- None for [attributions.txt](#attributionstxt).

Fields in tables not defined above should not be translated. However producers sometimes add extra fields that are outside the official specification and these unofficial fields may be translated. Below is the recommended way to use `record_sub_id` for those tables:

- None for [calendar.txt](#calendartxt);
- `date` for [calendar_dates.txt](#calendar_datestxt);
- None for [fare_attributes.txt](#fare_attributestxt);
- `route_id` for [fare_rules.txt](#fare_rulestxt);
- None for [shapes.txt](#shapestxt);
- `start_time` for [frequencies.txt](#frequenciestxt);
- `to_stop_id` for [transfers.txt](#transferstxt).

Conditionally Required:
- **Forbidden** if `table_name` is `feed_info`.
- **Forbidden** if `field_value` is defined.
- **Required** if `table_name=stop_times` and `record_id` is defined. | +| `record_id` | Foreign ID | **Conditionally Required** | Defines the record that corresponds to the field to be translated. The value in `record_id` must be the first or only field of a table's primary key, as defined in the primary key attribute for each table and below:

- `agency_id` for [agency.txt](#agencytxt)`
- `stop_id` for [stops.txt](#stopstxt);
- `route_id` for [routes.txt](#routestxt);
- `trip_id` for [trips.txt](#tripstxt);
- `trip_id` for [stop_times.txt](#stop_timestxt);
- `pathway_id` for [pathways.txt](#pathwaystxt);
- `level_id` for [levels.txt](#levelstxt);
- `attribution_id` for [attributions.txt](#attributionstxt).

Fields in tables not defined above should not be translated. However producers sometimes add extra fields that are outside the official specification and these unofficial fields may be translated. Below is the recommended way to use `record_id` for those tables:

- `service_id` for [calendar.txt](#calendartxt);
- `service_id` for [calendar_dates.txt](#calendar_datestxt);
- `fare_id` for [fare_attributes.txt](#fare_attributestxt);
- `fare_id` for [fare_rules.txt](#fare_rulestxt);
- `shape_id` for [shapes.txt](#shapestxt);
- `trip_id` for [frequencies.txt](#frequenciestxt);
- `from_stop_id` for `transfers.txt`.

Conditionally Required:
- **Forbidden** if `table_name` is `feed_info`.
- **Forbidden** if `field_value` is defined.
- **Required** if `field_value` is empty. | +| `record_sub_id` | Foreign ID | **Conditionally Required** | Helps the record that contains the field to be translated when the table doesn’t have a unique ID. Therefore, the value in `record_sub_id` is the secondary ID of the table, as defined by the table below:

- None for [agency.txt](#agencytxt);
- None for [stops.txt](#stopstxt);
- None for [routes.txt](#routestxt);
- None for [trips.txt](#tripstxt);
- `stop_sequence` for [stop_times.txt](#stop_timestxt);
- None for [pathways.txt](#pathwaystxt);
- None for [levels.txt](#levelstxt);
- None for [attributions.txt](#attributionstxt).

Fields in tables not defined above should not be translated. However producers sometimes add extra fields that are outside the official specification and these unofficial fields may be translated. Below is the recommended way to use `record_sub_id` for those tables:

- None for [calendar.txt](#calendartxt);
- `date` for [calendar_dates.txt](#calendar_datestxt);
- None for [fare_attributes.txt](#fare_attributestxt);
- `route_id` for [fare_rules.txt](#fare_rulestxt);
- None for [shapes.txt](#shapestxt);
- `start_time` for [frequencies.txt](#frequenciestxt);
- `to_stop_id` for [transfers.txt](#transferstxt).

Conditionally Required:
- **Forbidden** if `table_name` is `feed_info`.
- **Forbidden** if `field_value` is defined.
- **Required** if `table_name=stop_times` and `record_id` is defined. | | `field_value` | Text or URL or Email or Phone number | **Conditionally Required** | Instead of defining which record should be translated by using `record_id` and `record_sub_id`, this field can be used to define the value which should be translated. When used, the translation will be applied when the fields identified by `table_name` and `field_name` contains the exact same value defined in field_value.

The field must have **exactly** the value defined in `field_value`. If only a subset of the value matches `field_value`, the translation won’t be applied.

If two translation rules match the same record (one with `field_value`, and the other one with `record_id`), the rule with `record_id` takes precedence.

Conditionally Required:
- **Forbidden** if `table_name` is `feed_info`.
- **Forbidden** if `record_id` is defined.
- **Required** if `record_id` is empty. | ### feed_info.txt