From 2114050b07e458b679d0029d5f4552f00e43fc44 Mon Sep 17 00:00:00 2001
From: Emma Blue <90632321+emmambd@users.noreply.github.com>
Date: Wed, 24 May 2023 15:50:12 -0400
Subject: [PATCH 01/12] Add recommended presence
---
gtfs/spec/en/reference.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md
index a917e601..fe293bb5 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -60,6 +60,7 @@ Presence conditions applicable to fields and files:
* **Optional** - The field or file may be omitted from the dataset.
* **Conditionally Required** - The field or file must be included under conditions outlined in the field or file description.
* **Conditionally Forbidden** - The field or file must not be included under conditions outlined in the field or file description.
+* **Recommended** - The field or file may be omitted from the dataset, but it is a best practice to include it. The best practice should be considered before omission.
### Field Types
From a50fe8471df82d0cf9c4950742049a4d5dd422f1 Mon Sep 17 00:00:00 2001
From: Emma Blue <90632321+emmambd@users.noreply.github.com>
Date: Wed, 24 May 2023 15:56:01 -0400
Subject: [PATCH 02/12] feed_info.txt best practices
---
gtfs/spec/en/reference.md | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md
index fe293bb5..809498b1 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -634,7 +634,7 @@ In regions that have multiple official languages, transit agencies/operators typ
### feed_info.txt
-File: **Optional** (**Required** if `translations.txt` is provided)
+File: **Recommended** (**Required** if `translations.txt` is provided)
Primary key (none)
@@ -648,11 +648,11 @@ If both referencing methods (`record_id`, `record_sub_id`) and `field_value` are
| `feed_publisher_url` | URL | **Required** | URL of the dataset publishing organization's website. This may be the same as one of the `agency.agency_url` values. |
| `feed_lang` | Language code | **Required** | Default language used for the text in this dataset. This setting helps GTFS consumers choose capitalization rules and other language-specific settings for the dataset. The file `translations.txt` can be used if the text needs to be translated into languages other than the default one.
The default language may be multilingual for datasets with the original text in multiple languages. In such cases, the `feed_lang` field should contain the language code `mul` defined by the norm ISO 639-2, and a translation for each language used in the dataset should be provided in `translations.txt`. If all the original text in the dataset is in the same language, then `mul` should not be used.
_Example: Consider a dataset from a multilingual country like Switzerland, with the original `stops.stop_name` field populated with stop names in different languages. Each stop name is written according to the dominant language in that stop’s geographic location, e.g. `Genève` for the French-speaking city of Geneva, `Zürich` for the German-speaking city of Zurich, and `Biel/Bienne` for the bilingual city of Biel/Bienne. The dataset `feed_lang` should be `mul` and translations would be provided in `translations.txt`, in German: `Genf`, `Zürich` and `Biel`; in French: `Genève`, `Zurich` and `Bienne`; in Italian: `Ginevra`, `Zurigo` and `Bienna`; and in English: `Geneva`, `Zurich` and `Biel/Bienne`._ |
| `default_lang` | Language code | Optional | Defines the language that should be used when the data consumer doesn’t know the language of the rider. It will often be `en` (English). |
-| `feed_start_date` | Date | Optional | The dataset provides complete and reliable schedule information for service in the period from the beginning of the `feed_start_date` day to the end of the `feed_end_date` day. Both days may be left empty if unavailable. The `feed_end_date` date must not precede the `feed_start_date` date if both are given. It is recommended that dataset providers give schedule data outside this period to advise of likely future service, but dataset consumers should treat it mindful of its non-authoritative status. If `feed_start_date` or `feed_end_date` extend beyond the active calendar dates defined in [calendar.txt](#calendartxt) and [calendar_dates.txt](#calendar_datestxt), the dataset is making an explicit assertion that there is no service for dates within the `feed_start_date` or `feed_end_date` range but not included in the active calendar dates. |
-| `feed_end_date` | Date | Optional | (see above) |
-| `feed_version` | Text | Optional | String that indicates the current version of their GTFS dataset. GTFS-consuming applications can display this value to help dataset publishers determine whether the latest dataset has been incorporated. |
-| `feed_contact_email` | Email | Optional | Email address for communication regarding the GTFS dataset and data publishing practices. `feed_contact_email` is a technical contact for GTFS-consuming applications. Provide customer service contact information through [agency.txt](#agencytxt). |
-| `feed_contact_url` | URL | Optional | URL for contact information, a web-form, support desk, or other tools for communication regarding the GTFS dataset and data publishing practices. `feed_contact_url` is a technical contact for GTFS-consuming applications. Provide customer service contact information through [agency.txt](#agencytxt). |
+| `feed_start_date` | Date | Recommended | The dataset provides complete and reliable schedule information for service in the period from the beginning of the `feed_start_date` day to the end of the `feed_end_date` day. Both days may be left empty if unavailable. The `feed_end_date` date must not precede the `feed_start_date` date if both are given. It is recommended that dataset providers give schedule data outside this period to advise of likely future service, but dataset consumers should treat it mindful of its non-authoritative status. If `feed_start_date` or `feed_end_date` extend beyond the active calendar dates defined in [calendar.txt](#calendartxt) and [calendar_dates.txt](#calendar_datestxt), the dataset is making an explicit assertion that there is no service for dates within the `feed_start_date` or `feed_end_date` range but not included in the active calendar dates. |
+| `feed_end_date` | Date | Recommended | (see above) |
+| `feed_version` | Text | Recommended | String that indicates the current version of their GTFS dataset. GTFS-consuming applications can display this value to help dataset publishers determine whether the latest dataset has been incorporated. |
+| `feed_contact_email` | Email | Optional | Email address for communication regarding the GTFS dataset and data publishing practices. `feed_contact_email` is a technical contact for GTFS-consuming applications. Provide customer service contact information through [agency.txt](#agencytxt). Should be used when `feed_contact_url` is empty. |
+| `feed_contact_url` | URL | Optional | URL for contact information, a web-form, support desk, or other tools for communication regarding the GTFS dataset and data publishing practices. `feed_contact_url` is a technical contact for GTFS-consuming applications. Provide customer service contact information through [agency.txt](#agencytxt). Should be used when `feed_contact_email` is empty. |
### attributions.txt
From d82bd5a73bb52ddd5a96e1002d4d60262043f642 Mon Sep 17 00:00:00 2001
From: Emma Blue <90632321+emmambd@users.noreply.github.com>
Date: Wed, 24 May 2023 16:03:49 -0400
Subject: [PATCH 03/12] route_short_name best practice
---
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 809498b1..14a40f50 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -198,7 +198,7 @@ Primary key (`route_id`)
| ------ | ------ | ------ | ------ |
| `route_id` | Unique ID | **Required** | Identifies a route. |
| `agency_id` | Foreign ID referencing `agency.agency_id` | **Conditionally Required** | Agency for the specified route.
Conditionally Required: - **Required** if multiple agencies are defined in [agency.txt](#agency). - Optional otherwise. |
-| `route_short_name` | Text | **Conditionally Required** | Short name of a route. Often a short, abstract identifier (e.g., "32", "100X", "Green") that riders use to identify a route. Both `route_short_name` and `route_long_name` may be defined.
Conditionally Required: - **Required** if `routes.route_long_name` is empty. - Optional otherwise. |
+| `route_short_name` | Text | **Conditionally Required** | Short name of a route. Often a short, abstract identifier (e.g., "32", "100X", "Green") that riders use to identify a route. Both `route_short_name` and `route_long_name` may be defined.
Conditionally Required: - **Required** if `routes.route_long_name` is empty. - Recommended if there is a brief service designation. This should be the commonly-known passenger name of the service, no longer than 12 characters. |
| `route_long_name` | Text | **Conditionally Required** | Full name of a route. This name is generally more descriptive than the `route_short_name` and often includes the route's destination or stop. Both `route_short_name` and `route_long_name` may be defined.
Conditionally Required: - **Required** if `routes.route_short_name` is empty. - Optional otherwise. |
| `route_desc` | Text | Optional | Description of a route that provides useful, quality information. Should not be a duplicate of `route_short_name` or `route_long_name`. _Example: "A" trains operate between Inwood-207 St, Manhattan and Far Rockaway-Mott Avenue, Queens at all times. Also from about 6AM until about midnight, additional "A" trains operate between Inwood-207 St and Lefferts Boulevard (trains typically alternate between Lefferts Blvd and Far Rockaway)._ |
| `route_type` | Enum | **Required** | Indicates the type of transportation used on a route. Valid options are:
`0` - Tram, Streetcar, Light rail. Any light rail or street level system within a metropolitan area. `1` - Subway, Metro. Any underground rail system within a metropolitan area. `2` - Rail. Used for intercity or long-distance travel. `3` - Bus. Used for short- and long-distance bus routes. `4` - Ferry. Used for short- and long-distance boat service. `5` - Cable tram. Used for street-level rail cars where the cable runs beneath the vehicle (e.g., cable car in San Francisco). `6` - Aerial lift, suspended cable car (e.g., gondola lift, aerial tramway). Cable transport where cabins, cars, gondolas or open chairs are suspended by means of one or more cables. `7` - Funicular. Any rail system designed for steep inclines. `11` - Trolleybus. Electric buses that draw power from overhead wires using poles. `12` - Monorail. Railway in which the track consists of a single rail or a beam. |
From e2a612317fa2b3589ebeb17244fa533027eda08a Mon Sep 17 00:00:00 2001
From: Emma Blue <90632321+emmambd@users.noreply.github.com>
Date: Wed, 24 May 2023 16:06:44 -0400
Subject: [PATCH 04/12] agency_id best practice
---
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 14a40f50..f7a331e7 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -154,7 +154,7 @@ Primary key (`agency_id`)
| Field Name | Type | Presence | Description |
| ------ | ------ | ------ | ------ |
-| `agency_id` | Unique ID | **Conditionally Required** | Identifies a transit brand which is often synonymous with a transit agency. Note that in some cases, such as when a single agency operates multiple separate services, agencies and brands are distinct. This document uses the term "agency" in place of "brand". A dataset may contain data from multiple agencies.
Conditionally Required: - **Required** when the dataset contains data for multiple transit agencies. - Optional otherwise. |
+| `agency_id` | Unique ID | **Conditionally Required** | Identifies a transit brand which is often synonymous with a transit agency. Note that in some cases, such as when a single agency operates multiple separate services, agencies and brands are distinct. This document uses the term "agency" in place of "brand". A dataset may contain data from multiple agencies.
Conditionally Required: - **Required** when the dataset contains data for multiple transit agencies. - Recommended otherwise. |
| `agency_name` | Text | **Required** | Full name of the transit agency. |
| `agency_url` | URL | **Required** | URL of the transit agency. |
| `agency_timezone` | Timezone | **Required** | Timezone where the transit agency is located. If multiple agencies are specified in the dataset, each must have the same `agency_timezone`. |
@@ -197,7 +197,7 @@ Primary key (`route_id`)
| Field Name | Type | Presence | Description |
| ------ | ------ | ------ | ------ |
| `route_id` | Unique ID | **Required** | Identifies a route. |
-| `agency_id` | Foreign ID referencing `agency.agency_id` | **Conditionally Required** | Agency for the specified route.
Conditionally Required: - **Required** if multiple agencies are defined in [agency.txt](#agency). - Optional otherwise. |
+| `agency_id` | Foreign ID referencing `agency.agency_id` | **Conditionally Required** | Agency for the specified route.
Conditionally Required: - **Required** if multiple agencies are defined in [agency.txt](#agency). - Recommended otherwise. |
| `route_short_name` | Text | **Conditionally Required** | Short name of a route. Often a short, abstract identifier (e.g., "32", "100X", "Green") that riders use to identify a route. Both `route_short_name` and `route_long_name` may be defined.
Conditionally Required: - **Required** if `routes.route_long_name` is empty. - Recommended if there is a brief service designation. This should be the commonly-known passenger name of the service, no longer than 12 characters. |
| `route_long_name` | Text | **Conditionally Required** | Full name of a route. This name is generally more descriptive than the `route_short_name` and often includes the route's destination or stop. Both `route_short_name` and `route_long_name` may be defined.
Conditionally Required: - **Required** if `routes.route_short_name` is empty. - Optional otherwise. |
| `route_desc` | Text | Optional | Description of a route that provides useful, quality information. Should not be a duplicate of `route_short_name` or `route_long_name`. _Example: "A" trains operate between Inwood-207 St, Manhattan and Far Rockaway-Mott Avenue, Queens at all times. Also from about 6AM until about midnight, additional "A" trains operate between Inwood-207 St and Lefferts Boulevard (trains typically alternate between Lefferts Blvd and Far Rockaway)._ |
@@ -321,7 +321,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`. - Optional 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`. - 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
From 160cc1f07ea494bccfe6f684ef7596e7cc4040b3 Mon Sep 17 00:00:00 2001
From: Emma Blue <90632321+emmambd@users.noreply.github.com>
Date: Wed, 24 May 2023 16:10:14 -0400
Subject: [PATCH 05/12] timepoint best practice
---
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 f7a331e7..f13e62ad 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -265,7 +265,7 @@ Primary key (`trip_id`, `stop_sequence`)
| `continuous_pickup` | Enum | Optional | Indicates that the rider can board the transit vehicle at any point along the vehicle’s travel path as described by `shapes.txt`, from this `stop_time` to the next `stop_time` in the trip’s `stop_sequence`. Valid options are:
`0` - Continuous stopping pickup. `1` or empty - No continuous stopping pickup. `2` - Must phone agency to arrange continuous stopping pickup. `3` - Must coordinate with driver to arrange continuous stopping pickup.
If this field is populated, it overrides any continuous pickup behavior defined in `routes.txt`. If this field is empty, the `stop_time` inherits any continuous pickup behavior defined in `routes.txt`. |
| `continuous_drop_off` | Enum | Optional | Indicates that the rider can alight from the transit vehicle at any point along the vehicle’s travel path as described by `shapes.txt`, from this `stop_time` to the next `stop_time` in the trip’s `stop_sequence`. Valid options are:
`0` - Continuous stopping drop off. `1` or empty - No continuous stopping drop off. `2` - Must phone agency to arrange continuous stopping drop off. `3` - Must coordinate with driver to arrange continuous stopping drop off.
If this field is populated, it overrides any continuous drop-off behavior defined in `routes.txt`. If this field is empty, the `stop_time` inherits any continuous drop-off behavior defined in `routes.txt`. |
| `shape_dist_traveled` | Non-negative float | Optional | Actual distance traveled along the associated shape, from the first stop to the stop specified in this record. This field specifies how much of the shape to draw between any two stops during a trip. Must be in the same units used in [shapes.txt](#shapestxt). Values used for `shape_dist_traveled` must increase along with `stop_sequence`; they must not be used to show reverse travel along a route.*Example: If a bus travels a distance of 5.25 kilometers from the start of the shape to the stop,`shape_dist_traveled`=`5.25`.*|
-| `timepoint` | Enum | Optional | Indicates if arrival and departure times for a stop are strictly adhered to by the vehicle or if they are instead approximate and/or interpolated times. This field allows a GTFS producer to provide interpolated stop-times, while indicating that the times are approximate. Valid options are:
`0` - Times are considered approximate. `1` or empty - Times are considered exact. |
+| `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. |
### calendar.txt
From 5465604bb86e20c4ae94ec9cad525b9a01d67032 Mon Sep 17 00:00:00 2001
From: Emma Blue <90632321+emmambd@users.noreply.github.com>
Date: Wed, 24 May 2023 16:22:23 -0400
Subject: [PATCH 06/12] inlining image for shape_dist_traveled
---
gtfs/spec/en/inlining.svg | 1 +
1 file changed, 1 insertion(+)
create mode 100644 gtfs/spec/en/inlining.svg
diff --git a/gtfs/spec/en/inlining.svg b/gtfs/spec/en/inlining.svg
new file mode 100644
index 00000000..616575da
--- /dev/null
+++ b/gtfs/spec/en/inlining.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
From d68a6f5e41ca4bf3d04ce44d299ef314da15d6b0 Mon Sep 17 00:00:00 2001
From: Emma Blue <90632321+emmambd@users.noreply.github.com>
Date: Wed, 24 May 2023 16:31:39 -0400
Subject: [PATCH 07/12] shape_dist_traveled field best practices
---
gtfs/spec/en/reference.md | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md
index f13e62ad..fc12a7fc 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -264,7 +264,7 @@ Primary key (`trip_id`, `stop_sequence`)
| `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`. |
-| `shape_dist_traveled` | Non-negative float | Optional | Actual distance traveled along the associated shape, from the first stop to the stop specified in this record. This field specifies how much of the shape to draw between any two stops during a trip. Must be in the same units used in [shapes.txt](#shapestxt). Values used for `shape_dist_traveled` must increase along with `stop_sequence`; they must not be used to show reverse travel along a route.*Example: If a bus travels a distance of 5.25 kilometers from the start of the shape to the stop,`shape_dist_traveled`=`5.25`.*|
+| `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. |
### calendar.txt
@@ -490,7 +490,8 @@ 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).*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` 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` |
### frequencies.txt
From 0c6fac9a1bde342b85ec75fd2633be4e12f89356 Mon Sep 17 00:00:00 2001
From: Emma Blue <90632321+emmambd@users.noreply.github.com>
Date: Wed, 24 May 2023 16:33:15 -0400
Subject: [PATCH 08/12] block_id field presence best practice
---
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 fc12a7fc..0ef02793 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -224,7 +224,7 @@ 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). To provide in-seat transfers information, [transfers](#transferstxt) of `transfer_type` `4` should be provided instead. |
+| `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. May be provided for frequency-based trips. |
| `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. |
From 30a21ff4c1da162545be99d08cb3b59bed0b71f2 Mon Sep 17 00:00:00 2001
From: Emma Blue <90632321+emmambd@users.noreply.github.com>
Date: Mon, 29 May 2023 13:55:52 -0400
Subject: [PATCH 09/12] Clearer recommended definition
---
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 0ef02793..84315dbf 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -60,7 +60,7 @@ Presence conditions applicable to fields and files:
* **Optional** - The field or file may be omitted from the dataset.
* **Conditionally Required** - The field or file must be included under conditions outlined in the field or file description.
* **Conditionally Forbidden** - The field or file must not be included under conditions outlined in the field or file description.
-* **Recommended** - The field or file may be omitted from the dataset, but it is a best practice to include it. The best practice should be considered before omission.
+* **Recommended** - The field or file may be omitted from the dataset, but it is a best practice to include it. Before omitting this field or file, the best practice should be carefully evaluated and the full implications of omission should be understood.
### Field Types
From 28c8a4b3300caae98e71bdbbb24904fee189039b Mon Sep 17 00:00:00 2001
From: Emma Blue <90632321+emmambd@users.noreply.github.com>
Date: Wed, 5 Jul 2023 17:37:36 -0400
Subject: [PATCH 10/12] clarity improvements
---
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 84315dbf..ae3e0f5a 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -198,7 +198,7 @@ Primary key (`route_id`)
| ------ | ------ | ------ | ------ |
| `route_id` | Unique ID | **Required** | Identifies a route. |
| `agency_id` | Foreign ID referencing `agency.agency_id` | **Conditionally Required** | Agency for the specified route.
Conditionally Required: - **Required** if multiple agencies are defined in [agency.txt](#agency). - Recommended otherwise. |
-| `route_short_name` | Text | **Conditionally Required** | Short name of a route. Often a short, abstract identifier (e.g., "32", "100X", "Green") that riders use to identify a route. Both `route_short_name` and `route_long_name` may be defined.
Conditionally Required: - **Required** if `routes.route_long_name` is empty. - Recommended if there is a brief service designation. This should be the commonly-known passenger name of the service, no longer than 12 characters. |
+| `route_short_name` | Text | **Conditionally Required** | Short name of a route. Often a short, abstract identifier (e.g., "32", "100X", "Green") that riders use to identify a route. Both `route_short_name` and `route_long_name` may be defined.
Conditionally Required: - **Required** if `routes.route_long_name` is empty. - Recommended if there is a brief service designation. This should be the commonly-known passenger name of the service, and should be no longer than 12 characters. |
| `route_long_name` | Text | **Conditionally Required** | Full name of a route. This name is generally more descriptive than the `route_short_name` and often includes the route's destination or stop. Both `route_short_name` and `route_long_name` may be defined.
Conditionally Required: - **Required** if `routes.route_short_name` is empty. - Optional otherwise. |
| `route_desc` | Text | Optional | Description of a route that provides useful, quality information. Should not be a duplicate of `route_short_name` or `route_long_name`. _Example: "A" trains operate between Inwood-207 St, Manhattan and Far Rockaway-Mott Avenue, Queens at all times. Also from about 6AM until about midnight, additional "A" trains operate between Inwood-207 St and Lefferts Boulevard (trains typically alternate between Lefferts Blvd and Far Rockaway)._ |
| `route_type` | Enum | **Required** | Indicates the type of transportation used on a route. Valid options are:
`0` - Tram, Streetcar, Light rail. Any light rail or street level system within a metropolitan area. `1` - Subway, Metro. Any underground rail system within a metropolitan area. `2` - Rail. Used for intercity or long-distance travel. `3` - Bus. Used for short- and long-distance bus routes. `4` - Ferry. Used for short- and long-distance boat service. `5` - Cable tram. Used for street-level rail cars where the cable runs beneath the vehicle (e.g., cable car in San Francisco). `6` - Aerial lift, suspended cable car (e.g., gondola lift, aerial tramway). Cable transport where cabins, cars, gondolas or open chairs are suspended by means of one or more cables. `7` - Funicular. Any rail system designed for steep inclines. `11` - Trolleybus. Electric buses that draw power from overhead wires using poles. `12` - Monorail. Railway in which the track consists of a single rail or a beam. |
@@ -652,8 +652,8 @@ If both referencing methods (`record_id`, `record_sub_id`) and `field_value` are
| `feed_start_date` | Date | Recommended | The dataset provides complete and reliable schedule information for service in the period from the beginning of the `feed_start_date` day to the end of the `feed_end_date` day. Both days may be left empty if unavailable. The `feed_end_date` date must not precede the `feed_start_date` date if both are given. It is recommended that dataset providers give schedule data outside this period to advise of likely future service, but dataset consumers should treat it mindful of its non-authoritative status. If `feed_start_date` or `feed_end_date` extend beyond the active calendar dates defined in [calendar.txt](#calendartxt) and [calendar_dates.txt](#calendar_datestxt), the dataset is making an explicit assertion that there is no service for dates within the `feed_start_date` or `feed_end_date` range but not included in the active calendar dates. |
| `feed_end_date` | Date | Recommended | (see above) |
| `feed_version` | Text | Recommended | String that indicates the current version of their GTFS dataset. GTFS-consuming applications can display this value to help dataset publishers determine whether the latest dataset has been incorporated. |
-| `feed_contact_email` | Email | Optional | Email address for communication regarding the GTFS dataset and data publishing practices. `feed_contact_email` is a technical contact for GTFS-consuming applications. Provide customer service contact information through [agency.txt](#agencytxt). Should be used when `feed_contact_url` is empty. |
-| `feed_contact_url` | URL | Optional | URL for contact information, a web-form, support desk, or other tools for communication regarding the GTFS dataset and data publishing practices. `feed_contact_url` is a technical contact for GTFS-consuming applications. Provide customer service contact information through [agency.txt](#agencytxt). Should be used when `feed_contact_email` is empty. |
+| `feed_contact_email` | Email | Optional | Email address for communication regarding the GTFS dataset and data publishing practices. `feed_contact_email` is a technical contact for GTFS-consuming applications. Provide customer service contact information through [agency.txt](#agencytxt). It's recommended that at least one of `feed_contact_email` or `feed_contact_url` are provided. |
+| `feed_contact_url` | URL | Optional | URL for contact information, a web-form, support desk, or other tools for communication regarding the GTFS dataset and data publishing practices. `feed_contact_url` is a technical contact for GTFS-consuming applications. Provide customer service contact information through [agency.txt](#agencytxt). It's recommended that at least one of `feed_contact_url` or `feed_contact_email` are provided. |
### attributions.txt
From 29d268fe1a569baea3ebff3cf8fb44e11ef9095d Mon Sep 17 00:00:00 2001
From: Emma Blue <90632321+emmambd@users.noreply.github.com>
Date: Thu, 20 Jul 2023 16:31:21 -0400
Subject: [PATCH 11/12] Remove "may" for block_id in frequency based trips
---
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 ae3e0f5a..1c0824ff 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -224,7 +224,7 @@ 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). To provide in-seat transfers information, [transfers](#transferstxt) of `transfer_type` `4` should be provided instead. May be provided for frequency-based trips. |
+| `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. |
From 27237face9aec15ff1541ce416ebd451901b9893 Mon Sep 17 00:00:00 2001
From: Emma Blue <90632321+emmambd@users.noreply.github.com>
Date: Mon, 31 Jul 2023 18:27:21 -0400
Subject: [PATCH 12/12] fix shape_dist_traveled cell formatting
---
gtfs/spec/en/reference.md | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md
index 1c0824ff..b5e8703c 100644
--- a/gtfs/spec/en/reference.md
+++ b/gtfs/spec/en/reference.md
@@ -490,8 +490,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` 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` |
### frequencies.txt