From 21bc2802365d21d319ebfa6a38fd7de65a903ed1 Mon Sep 17 00:00:00 2001 From: Evan Howington Date: Fri, 7 Sep 2018 10:13:38 -0700 Subject: [PATCH 01/30] Added field designations, data types --- gtfs/spec/.DS_Store | Bin 0 -> 8196 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 gtfs/spec/.DS_Store diff --git a/gtfs/spec/.DS_Store b/gtfs/spec/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..31e053ebb88156eeec1697ab190ff7ead78035c3 GIT binary patch literal 8196 zcmeHLT}&NC6h7xd+u7Yx258HVv|XhjRUnt51zWI}KU*xO)yr?e(tFu0tS-Cs?%qo& z#Sp7L8C!j`{wBr;qkS^^VocN*+o*{)B=zUP2YvC;Xf*N3GqVe!r9AkertBm$-^`hF zX7-%83FNq(5VVcgt!o({B%$wQvgDd0?0yr zE;@vIh=~vv0;Cx#7?=_UrWmFe7?_h>5A_luE(92u1BS^5hC5@Jp`hHI*4L#vU?RY% zjUo_5V08q<>k|VLob-%0y)u9I{CNC2#`5wvY}~|{%G3h&@#LgClk`)5*6T=RM#Sh? z%AZV!{XW;Vm;0&ofMw2%@vWV%4 zb8}7cmO8zuDL!AP&owv4>-77Y_RY^LthBnZt>@&_?Af_<^H04T_=Dj$0Sa&O@6wWU zwwLP+oQu6AeohGIzFl%oQMJv7d(FZ9UIo^jVXmNCWr z7%v)6+2dI|<(uucowUxH-r%@vXQv!*$T!dULUP=5Gk&KOj&Yv#%*Ra9w{m6|S$RVi zEhp4CD(u~Y?K`XPu4~+P;9%F{mO@^nmZ;kXbCzeNZL@#IGW^Nmls9fVhUH8gr#Lyj zb;>d`N)gs6eNJl1Tr4dsFVgPNcC2N^coiGUrmfRi%byMQ(6zf1{s9{`=y@J-4Y8sj zXEa@_VQfUmJ2NJ=#$r(+-%`6rQ~Nye$SI~sNqvK=_B}}l$vq{I>}^uDemj*mZEh$` zDmAyL+F&jSB|j1hTT4`JXxyEeB3C?;38%Got&{O9?1b33H|6<9r%gxfT~=P&t!vt_ zkhdF#X)soms0|KUdaqO^;^Db7D2E2Rs`_A*C_N45;dyugF2F^272bx+@IHJDSKumq z317iA_yK-`U*I?R9sYnn5l}%DH)8=-U={AhYHY;)co5sM13R%7AH^j0VLzTg15e=u zPU2~t#W_5O^Y|QIz>D}IUcy)KHGCZ}dm5Tr+S-?o@TN0c$sI|VfD@7{OI(mA zcO&_T#1&elx^pcO_Y>93Gfc3aZ(6J%Ug&pf8W*Hta#&qM!x)j8i5H?my;rMOh^;(N z4z;+tmk}@dhG6!7wOJwN^88?SzuL-(pnRiT>cL7?%DmP=+F+jS;ryhO|! zRin}E9)Y~T!7`Emcdz~b|8@^U Date: Fri, 7 Sep 2018 12:15:34 -0700 Subject: [PATCH 02/30] same as previous, removed sample addition of "primary key" to agency_id --- gtfs/spec/en/reference.md | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md index 6f79764eb..a958ad855 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -28,9 +28,28 @@ This document explains the types of files that comprise a GTFS transit feed and This section defines terms that are used throughout this document. -* **Field required** - The field column must be included in your feed, and a value must be provided for each record. Some required fields permit an empty string as a value. To enter an empty string, just omit any text between the commas for that field. Note that 0 is interpreted as "a string of value 0", and is not an empty string. Please see the field definition for details. -* **Field optional** - The field column may be omitted from your feed. If you choose to include an optional column, each record in your feed must have a value for that column. You may include an empty string as a value for records that do not have values for the column. Some optional fields permit an empty string as a value. To enter an empty string, just omit any text between the commas for that field. Note that 0 is interpreted as "a string of value 0", and is not an empty string. -* **Dataset unique** - The field contains a value that maps to a single distinct entity within the column. For example, if a route is assigned the ID **1A**, then no other route may use that route ID. However, you may assign the ID **1A** to a location because locations are a different type of entity than routes. +* **Field designations** + - **Field required** - The field column must be included, and a value must be provided for each row. Some required fields permit an empty string (see below) as a value. + - **Conditionally required** - The field must be provided and defined in specified circumstances in order to support consuming application features. + - **Field optional** - The field column may be omitted. If you choose to include an optional column, each row must have a value for that column. You may include an empty string as a value for rows that do not have values for the column. Some optional fields permit an empty string (see below) as a value. + - **Dataset unique** - The field contains a value that maps to a single distinct row within the column. For example, if a route is assigned the ID **1A**, then no other route may use that route ID. However, you may assign the ID **1A** to a location because locations are a different type of row than routes. + - **Primary key** - The field contains a value that uniquely identifies rows within a table. These fields can contain any allowed unicode characters (see file requirements). These values are not intended to be shown in customer-facing applications. +* **Empty string** - To enter an empty string, just omit any text between the commas for that field. Note that 0 is interpreted as "a string of value 0", and is not an empty string. +* **Foreign key** - The field references a **primary key** from another file. References are denoted as _filename.fieldname_ +* **Data types** + - **Boolean** - A value that must be either 0 (False) or 1 (True) + - **Integer** - A whole number, including 0. + - **Float (Decimal)** - A number that may also include decimal values. + - **Text string** - A string of alphanumeric text. + - **Enum** - Special data type that enables for a variable to be a set of predefined constants. The variable must be equal to one of the values that have been predefined for it. + - **Date** - A value formatted as YYYY-MM-DD. Based on ISO-8601. + - **Time** - - A value formatted as HH:MM:SS. Based on ISO-8601. + - **Timezone** - Refer to http://en.wikipedia.org/wiki/List_of_tz_zones for a list of valid values. Timezone names never contain the space character but may contain an underscore. + - **URL** - A URL provided in a GTFS dataset must be fully qualified URL that includes http:// or https://, and any special characters in the URL must be correctly escaped. See http://www.w3.org/Addressing/URL/4_URI_Recommentations.html for a description of how to create fully qualified URL values. + - **Hexadecimal string** - A six character string used to represent color. No leading "#" is used. Refer to https://htmlcolorcodes.com/ to generate a valid value. + - **Language** - + - **Currency value** - A **Float (Decimal)** value with no more than four digits after the decimal. + - **Currency code** - Refer to https://en.wikipedia.org/wiki/ISO_4217 for a list of valid values. Must be three letters long with no space characters or special characters. ## Feed Files From 6db709681e3fe386b7de6abe6cec3a2f1dd604fd Mon Sep 17 00:00:00 2001 From: Evan Howington Date: Fri, 7 Sep 2018 12:17:18 -0700 Subject: [PATCH 03/30] Revert "Added field designations, data types" This reverts commit 21bc2802365d21d319ebfa6a38fd7de65a903ed1. --- gtfs/spec/.DS_Store | Bin 8196 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 gtfs/spec/.DS_Store diff --git a/gtfs/spec/.DS_Store b/gtfs/spec/.DS_Store deleted file mode 100644 index 31e053ebb88156eeec1697ab190ff7ead78035c3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8196 zcmeHLT}&NC6h7xd+u7Yx258HVv|XhjRUnt51zWI}KU*xO)yr?e(tFu0tS-Cs?%qo& z#Sp7L8C!j`{wBr;qkS^^VocN*+o*{)B=zUP2YvC;Xf*N3GqVe!r9AkertBm$-^`hF zX7-%83FNq(5VVcgt!o({B%$wQvgDd0?0yr zE;@vIh=~vv0;Cx#7?=_UrWmFe7?_h>5A_luE(92u1BS^5hC5@Jp`hHI*4L#vU?RY% zjUo_5V08q<>k|VLob-%0y)u9I{CNC2#`5wvY}~|{%G3h&@#LgClk`)5*6T=RM#Sh? z%AZV!{XW;Vm;0&ofMw2%@vWV%4 zb8}7cmO8zuDL!AP&owv4>-77Y_RY^LthBnZt>@&_?Af_<^H04T_=Dj$0Sa&O@6wWU zwwLP+oQu6AeohGIzFl%oQMJv7d(FZ9UIo^jVXmNCWr z7%v)6+2dI|<(uucowUxH-r%@vXQv!*$T!dULUP=5Gk&KOj&Yv#%*Ra9w{m6|S$RVi zEhp4CD(u~Y?K`XPu4~+P;9%F{mO@^nmZ;kXbCzeNZL@#IGW^Nmls9fVhUH8gr#Lyj zb;>d`N)gs6eNJl1Tr4dsFVgPNcC2N^coiGUrmfRi%byMQ(6zf1{s9{`=y@J-4Y8sj zXEa@_VQfUmJ2NJ=#$r(+-%`6rQ~Nye$SI~sNqvK=_B}}l$vq{I>}^uDemj*mZEh$` zDmAyL+F&jSB|j1hTT4`JXxyEeB3C?;38%Got&{O9?1b33H|6<9r%gxfT~=P&t!vt_ zkhdF#X)soms0|KUdaqO^;^Db7D2E2Rs`_A*C_N45;dyugF2F^272bx+@IHJDSKumq z317iA_yK-`U*I?R9sYnn5l}%DH)8=-U={AhYHY;)co5sM13R%7AH^j0VLzTg15e=u zPU2~t#W_5O^Y|QIz>D}IUcy)KHGCZ}dm5Tr+S-?o@TN0c$sI|VfD@7{OI(mA zcO&_T#1&elx^pcO_Y>93Gfc3aZ(6J%Ug&pf8W*Hta#&qM!x)j8i5H?my;rMOh^;(N z4z;+tmk}@dhG6!7wOJwN^88?SzuL-(pnRiT>cL7?%DmP=+F+jS;ryhO|! zRin}E9)Y~T!7`Emcdz~b|8@^U Date: Mon, 10 Sep 2018 10:34:18 -0700 Subject: [PATCH 04/30] added language data type --- 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 a958ad855..0bfa6a14b 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -47,7 +47,7 @@ This section defines terms that are used throughout this document. - **Timezone** - Refer to http://en.wikipedia.org/wiki/List_of_tz_zones for a list of valid values. Timezone names never contain the space character but may contain an underscore. - **URL** - A URL provided in a GTFS dataset must be fully qualified URL that includes http:// or https://, and any special characters in the URL must be correctly escaped. See http://www.w3.org/Addressing/URL/4_URI_Recommentations.html for a description of how to create fully qualified URL values. - **Hexadecimal string** - A six character string used to represent color. No leading "#" is used. Refer to https://htmlcolorcodes.com/ to generate a valid value. - - **Language** - + - **Language** - Refer to https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes for a list of valid values. Must be two consecutive lowercase letters with no space characters or special characters. - **Currency value** - A **Float (Decimal)** value with no more than four digits after the decimal. - **Currency code** - Refer to https://en.wikipedia.org/wiki/ISO_4217 for a list of valid values. Must be three letters long with no space characters or special characters. From aaf3c32ad19e38ce379aed5ae16a3e5ebff4a328 Mon Sep 17 00:00:00 2001 From: Evan Howington Date: Tue, 11 Sep 2018 13:00:41 -0700 Subject: [PATCH 05/30] Updated text string, enum, time, hexadecimal number, and language --- 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 0bfa6a14b..3a30a5bbb 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -40,14 +40,14 @@ This section defines terms that are used throughout this document. - **Boolean** - A value that must be either 0 (False) or 1 (True) - **Integer** - A whole number, including 0. - **Float (Decimal)** - A number that may also include decimal values. - - **Text string** - A string of alphanumeric text. - - **Enum** - Special data type that enables for a variable to be a set of predefined constants. The variable must be equal to one of the values that have been predefined for it. - - **Date** - A value formatted as YYYY-MM-DD. Based on ISO-8601. - - **Time** - - A value formatted as HH:MM:SS. Based on ISO-8601. + - **Text string** - A string of UTF-8 Unicode characters. + - **Enum** - A set of predefined constants (i.e., enumerations) for a specific field. + - **Date** - A value formatted as YYYYMMDD. + - **Time** - A value formatted as HH:MM:SS (H:MM:SS is also accepted, if the hour begins with 0.) Time is measured from "noon minus 12h" (effectively midnight, except for days on which daylight savings time changes occur) at the beginning of the service day. For times occurring after midnight on the service day, enter the time as a value greater than 24:00:00 in HH:MM:SS local time for the day on which the trip schedule begins. - **Timezone** - Refer to http://en.wikipedia.org/wiki/List_of_tz_zones for a list of valid values. Timezone names never contain the space character but may contain an underscore. - **URL** - A URL provided in a GTFS dataset must be fully qualified URL that includes http:// or https://, and any special characters in the URL must be correctly escaped. See http://www.w3.org/Addressing/URL/4_URI_Recommentations.html for a description of how to create fully qualified URL values. - - **Hexadecimal string** - A six character string used to represent color. No leading "#" is used. Refer to https://htmlcolorcodes.com/ to generate a valid value. - - **Language** - Refer to https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes for a list of valid values. Must be two consecutive lowercase letters with no space characters or special characters. + - **Hexadecimal number** - A six character string used to represent color. No leading "#" is used. Refer to https://htmlcolorcodes.com/ to generate a valid value. + - **Language** - Refer to https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers for a list of valid values. As specified by IETF BCP 47. - **Currency value** - A **Float (Decimal)** value with no more than four digits after the decimal. - **Currency code** - Refer to https://en.wikipedia.org/wiki/ISO_4217 for a list of valid values. Must be three letters long with no space characters or special characters. From 5fb42c3b2bebf456e11994c9232a2bf2dcfc5d3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Frachet?= Date: Thu, 13 Sep 2018 10:52:00 -0400 Subject: [PATCH 06/30] Update field types definitions --- gtfs/spec/en/reference.md | 48 +++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md index 3a30a5bbb..0e5bec4f6 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -7,9 +7,10 @@ This document explains the types of files that comprise a GTFS transit feed and ## Table of Contents 1. [Term Definitions](#term-definitions) -2. [Feed Files](#feed-files) -3. [File Requirements](#file-requirements) -4. [Field Definitions](#field-definitions) +2. [Field Types](#field-types) +3. [Feed Files](#feed-files) +4. [File Requirements](#file-requirements) +5. [Field Definitions](#field-definitions) - [agency.txt](#agencytxt) - [stops.txt](#stopstxt) - [routes.txt](#routestxt) @@ -28,28 +29,25 @@ This document explains the types of files that comprise a GTFS transit feed and This section defines terms that are used throughout this document. -* **Field designations** - - **Field required** - The field column must be included, and a value must be provided for each row. Some required fields permit an empty string (see below) as a value. - - **Conditionally required** - The field must be provided and defined in specified circumstances in order to support consuming application features. - - **Field optional** - The field column may be omitted. If you choose to include an optional column, each row must have a value for that column. You may include an empty string as a value for rows that do not have values for the column. Some optional fields permit an empty string (see below) as a value. - - **Dataset unique** - The field contains a value that maps to a single distinct row within the column. For example, if a route is assigned the ID **1A**, then no other route may use that route ID. However, you may assign the ID **1A** to a location because locations are a different type of row than routes. - - **Primary key** - The field contains a value that uniquely identifies rows within a table. These fields can contain any allowed unicode characters (see file requirements). These values are not intended to be shown in customer-facing applications. -* **Empty string** - To enter an empty string, just omit any text between the commas for that field. Note that 0 is interpreted as "a string of value 0", and is not an empty string. -* **Foreign key** - The field references a **primary key** from another file. References are denoted as _filename.fieldname_ -* **Data types** - - **Boolean** - A value that must be either 0 (False) or 1 (True) - - **Integer** - A whole number, including 0. - - **Float (Decimal)** - A number that may also include decimal values. - - **Text string** - A string of UTF-8 Unicode characters. - - **Enum** - A set of predefined constants (i.e., enumerations) for a specific field. - - **Date** - A value formatted as YYYYMMDD. - - **Time** - A value formatted as HH:MM:SS (H:MM:SS is also accepted, if the hour begins with 0.) Time is measured from "noon minus 12h" (effectively midnight, except for days on which daylight savings time changes occur) at the beginning of the service day. For times occurring after midnight on the service day, enter the time as a value greater than 24:00:00 in HH:MM:SS local time for the day on which the trip schedule begins. - - **Timezone** - Refer to http://en.wikipedia.org/wiki/List_of_tz_zones for a list of valid values. Timezone names never contain the space character but may contain an underscore. - - **URL** - A URL provided in a GTFS dataset must be fully qualified URL that includes http:// or https://, and any special characters in the URL must be correctly escaped. See http://www.w3.org/Addressing/URL/4_URI_Recommentations.html for a description of how to create fully qualified URL values. - - **Hexadecimal number** - A six character string used to represent color. No leading "#" is used. Refer to https://htmlcolorcodes.com/ to generate a valid value. - - **Language** - Refer to https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers for a list of valid values. As specified by IETF BCP 47. - - **Currency value** - A **Float (Decimal)** value with no more than four digits after the decimal. - - **Currency code** - Refer to https://en.wikipedia.org/wiki/ISO_4217 for a list of valid values. Must be three letters long with no space characters or special characters. +* **Field required** - The field column must be included in your feed, and a value must be provided for each record. Some required fields permit an empty string as a value. To enter an empty string, just omit any text between the commas for that field. Note that 0 is interpreted as "a string of value 0", and is not an empty string. Please see the field definition for details. * **Field designations** +* **Field optional** - The field column may be omitted from your feed. If you choose to include an optional column, each record in your feed must have a value for that column. You may include an empty string as a value for records that do not have values for the column. Some optional fields permit an empty string as a value. To enter an empty string, just omit any text between the commas for that field. Note that 0 is interpreted as "a string of value 0", and is not an empty string. - **Field required** - The field column must be included, and a value must be provided for each row. Some required fields permit an empty string (see below) as a value. +* **Dataset unique** - The field contains a value that maps to a single distinct entity within the column. For example, if a route is assigned the ID **1A**, then no other route may use that route ID. However, you may assign the ID **1A** to a location because locations are a different type of entity than routes. + +## Field Types + +- **Ad-hoc** - Please see the detail column of the field for the definition of the field type. +- **Color** - The field contains a color encoded as a six-character hexadecimal number. Refer to https://htmlcolorcodes.com/ to generate a valid value. E.g. "FFFFFF" for white, "000000" for black or "0039A6" for the A,C,E lines in NYMTA. +- **Enum** - The field contains a value among a set of ad-hoc predefined constants defined in the "Details" column. E.g. the route_type field contains a "0" for tram, a "1" for subway... +- **ID** - The field contains an identifier which uniquely identifies an entity (therefore is dataset unique). Its value is not aimed to be displayed to the user, and is a sequence of any UTF-8 characters, but using only printable ASCII characters is recommended. +- **Positive Integer** - The field contains a non-negative whole number (which includes 0). +- **Language Code** - The field contains a IETF BCP 47 language code. For an introduction to IETF BCP 47, please refer to http://www.rfc-editor.org/rfc/bcp/bcp47.txt and http://www.w3.org/International/articles/language-tags/. E.g. "en" for English, "en-US" for American English or "de" for German. +- **Latitude** - The field contains the WGS84 latitude as a float number (it includes decimals). The value must be higher and -90.0 and smaller than 90.0. +- **Longitude** - The field contains the WGS84 longitude as a float number (it includes decimals). The value must be higher and -180.0 and smaller than 180.0. +- **Service Date** - The field contains the service date in the YYYYMMDD format. Since service time within a service date can be above 24:00:00, a service date often contains information for the subsequent day(s). E.g "20180913" for Septembre 13th, 2018. +- **Service Time** - The field contains the service time in the HH:MM:SS format (H:MM:SS is also accepted). The time is measured from "noon minus 12h" of the service day (effectively midnight except for days on which daylight savings time changes occur). For times occurring after midnight, enter the time as a value greater than 24:00:00 in HH:MM:SS local time for the day on which the trip schedule begins. E.g. "14:30:00" for 2:30PM or "25:35:00" for 1:35AM on the next date. +- **Text string** - The field contains a string of UTF-8 caracters, which is aimed to be displayed to the rider and which must therefore be readable. +- **Timezone** - The field contains a TZ timezone from the TZ database. Timezone names never contain the space character but may contain an underscore. Refer to http://en.wikipedia.org/wiki/List_of_tz_zones for a list of valid values. E.g. "Asia/Tokyo", "America/Los_Angeles" or "Africa/Cairo". +- **URL** - The field contains a fully qualified URL that includes http:// or https://, and any special characters in the URL must be correctly escaped. See http://www.w3.org/Addressing/URL/4_URI_Recommentations.html for a description of how to create fully qualified URL values. ## Feed Files From c3cf788628f95a1c6af2a7e515a08b9b9289e236 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Frachet?= Date: Thu, 13 Sep 2018 10:52:53 -0400 Subject: [PATCH 07/30] Fix typo --- gtfs/spec/en/reference.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md index 0e5bec4f6..2769efd24 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -29,8 +29,8 @@ This document explains the types of files that comprise a GTFS transit feed and This section defines terms that are used throughout this document. -* **Field required** - The field column must be included in your feed, and a value must be provided for each record. Some required fields permit an empty string as a value. To enter an empty string, just omit any text between the commas for that field. Note that 0 is interpreted as "a string of value 0", and is not an empty string. Please see the field definition for details. * **Field designations** -* **Field optional** - The field column may be omitted from your feed. If you choose to include an optional column, each record in your feed must have a value for that column. You may include an empty string as a value for records that do not have values for the column. Some optional fields permit an empty string as a value. To enter an empty string, just omit any text between the commas for that field. Note that 0 is interpreted as "a string of value 0", and is not an empty string. - **Field required** - The field column must be included, and a value must be provided for each row. Some required fields permit an empty string (see below) as a value. +* **Field required** - The field column must be included in your feed, and a value must be provided for each record. Some required fields permit an empty string as a value. To enter an empty string, just omit any text between the commas for that field. Note that 0 is interpreted as "a string of value 0", and is not an empty string. Please see the field definition for details. +* **Field optional** - The field column may be omitted from your feed. If you choose to include an optional column, each record in your feed must have a value for that column. You may include an empty string as a value for records that do not have values for the column. Some optional fields permit an empty string as a value. To enter an empty string, just omit any text between the commas for that field. Note that 0 is interpreted as "a string of value 0", and is not an empty string. * **Dataset unique** - The field contains a value that maps to a single distinct entity within the column. For example, if a route is assigned the ID **1A**, then no other route may use that route ID. However, you may assign the ID **1A** to a location because locations are a different type of entity than routes. ## Field Types From fbaa66944a1b6cceb3281f48a9e5ba8e0bb47ae0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Frachet?= Date: Thu, 13 Sep 2018 11:56:03 -0400 Subject: [PATCH 08/30] Update as per @barbeau review --- 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 2769efd24..938248c55 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -36,17 +36,17 @@ This section defines terms that are used throughout this document. ## Field Types - **Ad-hoc** - Please see the detail column of the field for the definition of the field type. -- **Color** - The field contains a color encoded as a six-character hexadecimal number. Refer to https://htmlcolorcodes.com/ to generate a valid value. E.g. "FFFFFF" for white, "000000" for black or "0039A6" for the A,C,E lines in NYMTA. -- **Enum** - The field contains a value among a set of ad-hoc predefined constants defined in the "Details" column. E.g. the route_type field contains a "0" for tram, a "1" for subway... +- **Color** - The field contains a color encoded as a six-digit hexadecimal number. Refer to https://htmlcolorcodes.com/ to generate a valid value (the leading "#" is not included). For example: "FFFFFF" for white, "000000" for black or "0039A6" for the A,C,E lines in NYMTA. +- **Enum** - The field contains a value from a set of predefined constants defined in the "Details" column. For example: the route_type field contains a "0" for tram, a "1" for subway... - **ID** - The field contains an identifier which uniquely identifies an entity (therefore is dataset unique). Its value is not aimed to be displayed to the user, and is a sequence of any UTF-8 characters, but using only printable ASCII characters is recommended. -- **Positive Integer** - The field contains a non-negative whole number (which includes 0). -- **Language Code** - The field contains a IETF BCP 47 language code. For an introduction to IETF BCP 47, please refer to http://www.rfc-editor.org/rfc/bcp/bcp47.txt and http://www.w3.org/International/articles/language-tags/. E.g. "en" for English, "en-US" for American English or "de" for German. -- **Latitude** - The field contains the WGS84 latitude as a float number (it includes decimals). The value must be higher and -90.0 and smaller than 90.0. -- **Longitude** - The field contains the WGS84 longitude as a float number (it includes decimals). The value must be higher and -180.0 and smaller than 180.0. -- **Service Date** - The field contains the service date in the YYYYMMDD format. Since service time within a service date can be above 24:00:00, a service date often contains information for the subsequent day(s). E.g "20180913" for Septembre 13th, 2018. -- **Service Time** - The field contains the service time in the HH:MM:SS format (H:MM:SS is also accepted). The time is measured from "noon minus 12h" of the service day (effectively midnight except for days on which daylight savings time changes occur). For times occurring after midnight, enter the time as a value greater than 24:00:00 in HH:MM:SS local time for the day on which the trip schedule begins. E.g. "14:30:00" for 2:30PM or "25:35:00" for 1:35AM on the next date. -- **Text string** - The field contains a string of UTF-8 caracters, which is aimed to be displayed to the rider and which must therefore be readable. -- **Timezone** - The field contains a TZ timezone from the TZ database. Timezone names never contain the space character but may contain an underscore. Refer to http://en.wikipedia.org/wiki/List_of_tz_zones for a list of valid values. E.g. "Asia/Tokyo", "America/Los_Angeles" or "Africa/Cairo". +- **Non-negative Integer** - The field contains a non-negative whole number (which includes 0). +- **Language Code** - The field contains a IETF BCP 47 language code. For an introduction to IETF BCP 47, please refer to http://www.rfc-editor.org/rfc/bcp/bcp47.txt and http://www.w3.org/International/articles/language-tags/. For example: "en" for English, "en-US" for American English or "de" for German. +- **Latitude** - The field contains the WGS84 latitude as a floating point number. The value must be greater than or equal to -90.0 and less than or equal to 90.0. For example: "41.890169" for the Colloseum in Roma. +- **Longitude** - The field contains the WGS84 longitude as a a floating point number. The value must be geater than or equal to -180.0 and less than or equal to 180.0. For example: "12.492269" for the Colloseum in Roma. +- **Service Date** - The field contains the service date in the YYYYMMDD format. Since service time within a service date can be above 24:00:00, a service date often contains information for the subsequent day(s). E.g "20180913" for September 13th, 2018. +- **Service Time** - The field contains the service time in the HH:MM:SS format (H:MM:SS is also accepted). The time is measured from "noon minus 12h" of the service day (effectively midnight except for days on which daylight savings time changes occur). For times occurring after midnight, enter the time as a value greater than 24:00:00 in HH:MM:SS local time for the day on which the trip schedule begins. For example: "14:30:00" for 2:30PM or "25:35:00" for 1:35AM on the next date. +- **Text string** - The field contains a string of UTF-8 characters, which is aimed to be displayed to the rider and which must therefore be human readable. +- **Timezone** - The field contains a TZ timezone from the [TZ database](https://www.iana.org/time-zones). Timezone names never contain the space character but may contain an underscore. Refer to http://en.wikipedia.org/wiki/List_of_tz_zones for a list of valid values. For example: "Asia/Tokyo", "America/Los_Angeles" or "Africa/Cairo". - **URL** - The field contains a fully qualified URL that includes http:// or https://, and any special characters in the URL must be correctly escaped. See http://www.w3.org/Addressing/URL/4_URI_Recommentations.html for a description of how to create fully qualified URL values. ## Feed Files From d2ddd86c5a6f33049766d593100b16f7082f08c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Frachet?= Date: Thu, 13 Sep 2018 14:18:39 -0400 Subject: [PATCH 09/30] Improving field type as per @barbeau review (2) --- gtfs/spec/en/reference.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md index 938248c55..b86cb50fc 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -35,14 +35,13 @@ This section defines terms that are used throughout this document. ## Field Types -- **Ad-hoc** - Please see the detail column of the field for the definition of the field type. - **Color** - The field contains a color encoded as a six-digit hexadecimal number. Refer to https://htmlcolorcodes.com/ to generate a valid value (the leading "#" is not included). For example: "FFFFFF" for white, "000000" for black or "0039A6" for the A,C,E lines in NYMTA. - **Enum** - The field contains a value from a set of predefined constants defined in the "Details" column. For example: the route_type field contains a "0" for tram, a "1" for subway... - **ID** - The field contains an identifier which uniquely identifies an entity (therefore is dataset unique). Its value is not aimed to be displayed to the user, and is a sequence of any UTF-8 characters, but using only printable ASCII characters is recommended. -- **Non-negative Integer** - The field contains a non-negative whole number (which includes 0). - **Language Code** - The field contains a IETF BCP 47 language code. For an introduction to IETF BCP 47, please refer to http://www.rfc-editor.org/rfc/bcp/bcp47.txt and http://www.w3.org/International/articles/language-tags/. For example: "en" for English, "en-US" for American English or "de" for German. -- **Latitude** - The field contains the WGS84 latitude as a floating point number. The value must be greater than or equal to -90.0 and less than or equal to 90.0. For example: "41.890169" for the Colloseum in Roma. -- **Longitude** - The field contains the WGS84 longitude as a a floating point number. The value must be geater than or equal to -180.0 and less than or equal to 180.0. For example: "12.492269" for the Colloseum in Roma. +- **Latitude** - The field contains the WGS84 latitude in decimal degrees. The value must be greater than or equal to -90.0 and less than or equal to 90.0. For example: "41.890169" for the Colloseum in Roma. +- **Longitude** - The field contains the WGS84 longitude in decimal degrees. The value must be geater than or equal to -180.0 and less than or equal to 180.0. For example: "12.492269" for the Colloseum in Roma. +- **Non-negative Integer** - The field contains a non-negative whole number (which includes 0). - **Service Date** - The field contains the service date in the YYYYMMDD format. Since service time within a service date can be above 24:00:00, a service date often contains information for the subsequent day(s). E.g "20180913" for September 13th, 2018. - **Service Time** - The field contains the service time in the HH:MM:SS format (H:MM:SS is also accepted). The time is measured from "noon minus 12h" of the service day (effectively midnight except for days on which daylight savings time changes occur). For times occurring after midnight, enter the time as a value greater than 24:00:00 in HH:MM:SS local time for the day on which the trip schedule begins. For example: "14:30:00" for 2:30PM or "25:35:00" for 1:35AM on the next date. - **Text string** - The field contains a string of UTF-8 characters, which is aimed to be displayed to the rider and which must therefore be human readable. From 70d1eae0da929078f88d84c22498b521b62f991d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Frachet?= Date: Thu, 13 Sep 2018 14:18:45 -0400 Subject: [PATCH 10/30] Add email and non-negative float types --- gtfs/spec/en/reference.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md index b86cb50fc..f3bc43a17 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -36,11 +36,13 @@ This section defines terms that are used throughout this document. ## Field Types - **Color** - The field contains a color encoded as a six-digit hexadecimal number. Refer to https://htmlcolorcodes.com/ to generate a valid value (the leading "#" is not included). For example: "FFFFFF" for white, "000000" for black or "0039A6" for the A,C,E lines in NYMTA. +- **Email** - The field contains an email address. For example: example@example.com. - **Enum** - The field contains a value from a set of predefined constants defined in the "Details" column. For example: the route_type field contains a "0" for tram, a "1" for subway... - **ID** - The field contains an identifier which uniquely identifies an entity (therefore is dataset unique). Its value is not aimed to be displayed to the user, and is a sequence of any UTF-8 characters, but using only printable ASCII characters is recommended. - **Language Code** - The field contains a IETF BCP 47 language code. For an introduction to IETF BCP 47, please refer to http://www.rfc-editor.org/rfc/bcp/bcp47.txt and http://www.w3.org/International/articles/language-tags/. For example: "en" for English, "en-US" for American English or "de" for German. - **Latitude** - The field contains the WGS84 latitude in decimal degrees. The value must be greater than or equal to -90.0 and less than or equal to 90.0. For example: "41.890169" for the Colloseum in Roma. - **Longitude** - The field contains the WGS84 longitude in decimal degrees. The value must be geater than or equal to -180.0 and less than or equal to 180.0. For example: "12.492269" for the Colloseum in Roma. +- **Non-negative Float** - The field contains a non-negative floating point number (which includes 0). - **Non-negative Integer** - The field contains a non-negative whole number (which includes 0). - **Service Date** - The field contains the service date in the YYYYMMDD format. Since service time within a service date can be above 24:00:00, a service date often contains information for the subsequent day(s). E.g "20180913" for September 13th, 2018. - **Service Time** - The field contains the service time in the HH:MM:SS format (H:MM:SS is also accepted). The time is measured from "noon minus 12h" of the service day (effectively midnight except for days on which daylight savings time changes occur). For times occurring after midnight, enter the time as a value greater than 24:00:00 in HH:MM:SS local time for the day on which the trip schedule begins. For example: "14:30:00" for 2:30PM or "25:35:00" for 1:35AM on the next date. From 977365c80ddac2052e978fec8cf684a27b707f7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Frachet?= Date: Thu, 13 Sep 2018 14:29:21 -0400 Subject: [PATCH 11/30] Add phone number and use types for agency, stops and routes --- gtfs/spec/en/reference.md | 63 ++++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md index f3bc43a17..a89d02694 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -44,9 +44,10 @@ This section defines terms that are used throughout this document. - **Longitude** - The field contains the WGS84 longitude in decimal degrees. The value must be geater than or equal to -180.0 and less than or equal to 180.0. For example: "12.492269" for the Colloseum in Roma. - **Non-negative Float** - The field contains a non-negative floating point number (which includes 0). - **Non-negative Integer** - The field contains a non-negative whole number (which includes 0). +- **Phone number** - The field contains a phone number. - **Service Date** - The field contains the service date in the YYYYMMDD format. Since service time within a service date can be above 24:00:00, a service date often contains information for the subsequent day(s). E.g "20180913" for September 13th, 2018. - **Service Time** - The field contains the service time in the HH:MM:SS format (H:MM:SS is also accepted). The time is measured from "noon minus 12h" of the service day (effectively midnight except for days on which daylight savings time changes occur). For times occurring after midnight, enter the time as a value greater than 24:00:00 in HH:MM:SS local time for the day on which the trip schedule begins. For example: "14:30:00" for 2:30PM or "25:35:00" for 1:35AM on the next date. -- **Text string** - The field contains a string of UTF-8 characters, which is aimed to be displayed to the rider and which must therefore be human readable. +- **Text** - The field contains a string of UTF-8 characters, which is aimed to be displayed to the rider and which must therefore be human readable. - **Timezone** - The field contains a TZ timezone from the [TZ database](https://www.iana.org/time-zones). Timezone names never contain the space character but may contain an underscore. Refer to http://en.wikipedia.org/wiki/List_of_tz_zones for a list of valid values. For example: "Asia/Tokyo", "America/Los_Angeles" or "Africa/Cairo". - **URL** - The field contains a fully qualified URL that includes http:// or https://, and any special characters in the URL must be correctly escaped. See http://www.w3.org/Addressing/URL/4_URI_Recommentations.html for a description of how to create fully qualified URL values. @@ -94,16 +95,16 @@ The following example demonstrates how a field value would appear in a comma-del File: **Required** -| Field Name | Required | Details | +| Field Name | Required & Type | Details | | ------ | ------ | ------ | -| agency_id | Optional | The **agency_id** field is an ID that uniquely identifies a transit agency. A transit feed may represent data from more than one agency. The **agency_id** is dataset unique. This field is optional for transit feeds that only contain data for a single agency. | -| agency_name | Required | The **agency_name** field contains the full name of the transit agency. Google Maps will display this name. | -| agency_url | Required | The **agency_url** field contains the URL of the transit agency. The value must be a fully qualified URL that includes **http**:// or **https**://, and any special characters in the URL must be correctly escaped. See http://www.w3.org/Addressing/URL/4_URI_Recommentations.html for a description of how to create fully qualified URL values. | -| agency_timezone | Required | The **agency_timezone** field contains the timezone where the transit agency is located. Timezone names never contain the space character but may contain an underscore. Please refer to http://en.wikipedia.org/wiki/List_of_tz_zones for a list of valid values. If multiple agencies are specified in the feed, each must have the same agency_timezone. | -| agency_lang | Optional | The **agency_lang field** contains a two-letter ISO 639-1 code for the primary language used by this transit agency. The language code is case-insensitive (both en and EN are accepted). This setting defines capitalization rules and other language-specific settings for all text contained in this transit agency's feed. Please refer to http://www.loc.gov/standards/iso639-2/php/code_list.php for a list of valid values. | -| agency_phone | Optional | The **agency_phone field** contains a single voice telephone number for the specified agency. This field is a string value that presents the telephone number as typical for the agency's service area. It can and should contain punctuation marks to group the digits of the number. Dialable text (for example, TriMet's "503-238-RIDE") is permitted, but the field must not contain any other descriptive text. | -| agency_fare_url | Optional | The **agency_fare_url** specifies the URL of a web page that allows a rider to purchase tickets or other fare instruments for that agency online. The value must be a fully qualified URL that includes **http**:// or **https**://, and any special characters in the URL must be correctly escaped. See http://www.w3.org/Addressing/URL/4_URI_Recommentations.html for a description of how to create fully qualified URL values. | -| agency_email | Optional | Contains a single valid email address actively monitored by the agency’s customer service department. This email address will be considered a direct contact point where transit riders can reach a customer service representative at the agency. | +| agency_id | Optional ID | The **agency_id** field contains an ID that uniquely identifies a transit agency. A transit feed may represent data from more than one agency. This field is optional for transit feeds that only contain data for a single agency. | +| agency_name | Required text | The **agency_name** field contains the full name of the transit agency. Google Maps will display this name. | +| agency_url | **Required URL** | The **agency_url** field contains the URL of the transit agency. | +| agency_timezone | **Required timezone** | The **agency_timezone** field contains the timezone where the transit agency is located. If multiple agencies are specified in the feed, each must have the same agency_timezone. | +| agency_lang | Optional language code | The **agency_lang field** contains the code of the primary language used by this transit agency. This setting defines capitalization rules and other language-specific settings for all text contained in this transit agency's feed. | +| agency_phone | Optional phone number | The **agency_phone field** contains a single voice telephone number for the specified agency. This field is a string value that presents the telephone number as typical for the agency's service area. It can and should contain punctuation marks to group the digits of the number. Dialable text (for example, TriMet's "503-238-RIDE") is permitted, but the field must not contain any other descriptive text. | +| agency_fare_url | Optional URL | The **agency_fare_url** specifies the URL of a web page that allows a rider to purchase tickets or other fare instruments for that agency online. | +| agency_email | Optional email | Contains a single valid email address actively monitored by the agency’s customer service department. This email address will be considered a direct contact point where transit riders can reach a customer service representative at the agency. | ### stops.txt @@ -111,24 +112,24 @@ File: **Required** | Field Name | Required | Details | | | | ------ | ------ | ------ | ------ | ------ | -| stop_id | **Required** | The **stop_id** field contains an ID that uniquely identifies a stop, station, or station entrance. Multiple routes may use the same stop. The **stop_id** is used by systems as an internal identifier of this record (e.g., primary key in database), and therefore the **stop_id** must be dataset unique. | | | -| stop_code | Optional | The **stop_code** field contains short text or a number that uniquely identifies the stop for passengers. Stop codes are often used in phone-based transit information systems or printed on stop signage to make it easier for riders to get a stop schedule or real-time arrival information for a particular stop. The **stop_code** field contains short text or a number that uniquely identifies the stop for passengers. The **stop_code** can be the same as **stop_id** if it is passenger-facing. This field should be left blank for stops without a code presented to passengers. | | | -| stop_name | **Required** | The **stop_name** field contains the name of a stop, station, or station entrance. Please use a name that people will understand in the local and tourist vernacular. | | | -| stop_desc | Optional | The **stop_desc** field contains a description of a stop. Please provide useful, quality information. Do not simply duplicate the name of the stop. | | | -| stop_lat | **Required** | The **stop_lat** field contains the latitude of a stop, station, or station entrance. The field value must be a valid WGS 84 latitude. | | | -| stop_lon | **Required** | The **stop_lon** field contains the longitude of a stop, station, or station entrance. The field value must be a valid WGS 84 longitude value from -180 to 180. | | | -| zone_id | Optional | The **zone_id** field defines the fare zone for a stop ID. Zone IDs are required if you want to provide fare information using [fare_rules.txt](#fare_rulestxt). If this stop ID represents a station, the zone ID is ignored. | | | -| stop_url | Optional | The **stop_url** field contains the URL of a web page about a particular stop. This should be different from the agency_url and the route_url fields. The value must be a fully qualified URL that includes **http**:// or **https**://, and any special characters in the URL must be correctly escaped. See http://www.w3.org/Addressing/URL/4_URI_Recommentations.html for a description of how to create fully qualified URL values. | | | -| location_type | Optional | The **location_type** field identifies whether this stop ID represents a stop, station, or station entrance. If no location type is specified, or the location_type is blank, stop IDs are treated as stops. Stations may have different properties from stops when they are represented on a map or used in trip planning. The location type field can have the following values: | | | +| stop_id | **Required ID** | The **stop_id** field contains an ID that uniquely identifies a stop, station, or station entrance. Multiple routes may use the same stop. | | | +| stop_code | Optional text | The **stop_code** field contains short text or a number that uniquely identifies the stop for passengers. Stop codes are often used in phone-based transit information systems or printed on stop signage to make it easier for riders to get a stop schedule or real-time arrival information for a particular stop. The **stop_code** field contains short text or a number that uniquely identifies the stop for passengers. The **stop_code** can be the same as **stop_id** if it is passenger-facing. This field should be left blank for stops without a code presented to passengers. | | | +| stop_name | **Required text** | The **stop_name** field contains the name of a stop, station, or station entrance. Please use a name that people will understand in the local and tourist vernacular. | | | +| stop_desc | Optional text | The **stop_desc** field contains a description of a stop. Please provide useful, quality information. Do not simply duplicate the name of the stop. | | | +| stop_lat | **Required latitude** | The **stop_lat** field contains the latitude of a stop, station, or station entrance. | | | +| stop_lon | **Required longitude** | The **stop_lon** field contains the longitude of a stop, station, or station entrance. | | | +| zone_id | Optional ID | The **zone_id** field defines the fare zone for a stop ID. Zone IDs are required if you want to provide fare information using [fare_rules.txt](#fare_rulestxt). If this stop ID represents a station, the zone ID is ignored. | | | +| stop_url | Optional URL | The **stop_url** field contains the URL of a web page about a particular stop. This should be different from the agency_url and the route_url fields. | | | +| location_type | Optional enum | The **location_type** field identifies whether this stop ID represents a stop, station, or station entrance. If no location type is specified, or the location_type is blank, stop IDs are treated as stops. Stations may have different properties from stops when they are represented on a map or used in trip planning. The location type field can have the following values: | | | | | | * **0** or blank - Stop. A location where passengers board or disembark from a transit vehicle. | | | | | | * **1** - Station. A physical structure or area that contains one or more stop. | | | | | | * **2** - Station Entrance/Exit. A location where passengers can enter or exit a station from the street. The stop entry must also specify a parent_station value referencing the stop ID of the parent station for the entrance. | | | -| parent_station | Optional | For stops that are physically located inside stations, the **parent_station** field identifies the station associated with the stop. To use this field, stops.txt must also contain a row where this stop ID is assigned location type=1. | | | +| parent_station | Optional enum | For stops that are physically located inside stations, the **parent_station** field identifies the station associated with the stop. To use this field, stops.txt must also contain a row where this stop ID is assigned location type=1. | | | | | | **This stop ID represents...** | **This entry's location type...** | **This entry's parent_station field contains...** | | | | A stop located inside a station. | 0 or blank | The stop ID of the station where this stop is located. The stop referenced by parent_station must have location_type=1. | | | | A stop located outside a station. | 0 or blank | A blank value. The parent_station field doesn't apply to this stop. | | | | A station. | 1 | A blank value. Stations can't contain other stations. | -| stop_timezone | Optional | The **stop_timezone** field contains the timezone in which this stop, station, or station entrance is located. Please refer to [Wikipedia List of Timezones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) for a list of valid values. If omitted, the stop should be assumed to be located in the timezone specified by **agency_timezone** in [agency.txt](#agencytxt). When a stop has a parent station, the stop is considered to be in the timezone specified by the parent station's **stop_timezone** value. If the parent has no stop_timezone value, the stops that belong to that station are assumed to be in the timezone specified by **agency_timezone**, even if the stops have their own **stop_timezone** values. In other words, if a given stop has a **parent_station** value, any **stop_timezone** value specified for that stop must be ignored. Even if **stop_timezone** values are provided in stops.txt, the times in [stop_times.txt](#stop_timestxt) should continue to be specified as time since midnight in the timezone specified by **agency_timezone** in agency.txt. 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 | Optional timezone | The **stop_timezone** field contains the timezone in which this stop, station, or station entrance is located. If omitted, the stop should be assumed to be located in the timezone specified by **agency_timezone** in [agency.txt](#agencytxt). When a stop has a parent station, the stop is considered to be in the timezone specified by the parent station's **stop_timezone** value. If the parent has no stop_timezone value, the stops that belong to that station are assumed to be in the timezone specified by **agency_timezone**, even if the stops have their own **stop_timezone** values. In other words, if a given stop has a **parent_station** value, any **stop_timezone** value specified for that stop must be ignored. Even if **stop_timezone** values are provided in stops.txt, the times in [stop_times.txt](#stop_timestxt) should continue to be specified as time since midnight in the timezone specified by **agency_timezone** in agency.txt. 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 | Optional | The **wheelchair_boarding field** identifies whether wheelchair boardings are possible from the specified stop, station, or station entrance. The field can have the following values: | | | | | | * **0** (or empty) - indicates that there is no accessibility information for the stop | | | | | | * **1** - indicates that at least some vehicles at this stop can be boarded by a rider in a wheelchair | | | @@ -148,12 +149,12 @@ File: **Required** | Field Name | Required | Details | | ------ | ------ | ------ | -| route_id | **Required** | The **route_id** field contains an ID that uniquely identifies a route. The route_id is dataset unique. | -| agency_id | Optional | The **agency_id** field defines an agency for the specified route. This value is referenced from the [agency.txt](#agencytxt) file. Use this field when you are providing data for routes from more than one agency. | -| route_short_name | **Required** | The **route_short_name** contains the short name of a route. This will often be a short, abstract identifier like "32", "100X", or "Green" that riders use to identify a route, but which doesn't give any indication of what places the route serves. At least one of *route_short_name* or *route_long_name* must be specified, or potentially both if appropriate. If the route does not have a short name, please specify a *route_long_name* and use an empty string as the value for this field. | -| route_long_name | **Required** | The **route_long_name** contains the full name of a route. This name is generally more descriptive than the *route_short_name* and will often include the route's destination or stop. At least one of *route_short_name* or *route_long_name* must be specified, or potentially both if appropriate. If the route does not have a long name, please specify a *route_short_nam*e and use an empty string as the value for this field. | -| route_desc | Optional | The **route_desc** field contains a description of a route. Please provide useful, quality information. Do not simply duplicate the name of the route. For 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 | **Required** | The **route_type** field describes the type of transportation used on a route. Valid values for this field are: | +| route_id | **Required ID** | The **route_id** field contains an ID that uniquely identifies a route. | +| agency_id | Optional ID | The **agency_id** field defines an agency for the specified route. This value is referenced from the [agency.txt](#agencytxt) file. Use this field when you are providing data for routes from more than one agency. | +| route_short_name | **Required text** | The **route_short_name** contains the short name of a route. This will often be a short, abstract identifier like "32", "100X", or "Green" that riders use to identify a route, but which doesn't give any indication of what places the route serves. At least one of *route_short_name* or *route_long_name* must be specified, or potentially both if appropriate. If the route does not have a short name, please specify a *route_long_name* and use an empty string as the value for this field. | +| route_long_name | **Required text** | The **route_long_name** contains the full name of a route. This name is generally more descriptive than the *route_short_name* and will often include the route's destination or stop. At least one of *route_short_name* or *route_long_name* must be specified, or potentially both if appropriate. If the route does not have a long name, please specify a *route_short_nam*e and use an empty string as the value for this field. | +| route_desc | Optional text | The **route_desc** field contains a description of a route. Please provide useful, quality information. Do not simply duplicate the name of the route. For 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 | **Required enum** | The **route_type** field describes the type of transportation used on a route. Valid values for this field 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. | @@ -162,10 +163,10 @@ File: **Required** | | | * **5** - Cable car. Used for street-level cable cars where the cable runs beneath the car. | | | | * **6** - Gondola, Suspended cable car. Typically used for aerial cable cars where the car is suspended from the cable. | | | | * **7** - Funicular. Any rail system designed for steep inclines. | -| route_url | Optional | The **route_url** field contains the URL of a web page about that particular route. This should be different from the agency_url. The value must be a fully qualified URL that includes **http**:// or **https**://, and any special characters in the URL must be correctly escaped. See http://www.w3.org/Addressing/URL/4_URI_Recommentations.html for a description of how to create fully qualified URL values. | -| route_color | Optional | In systems that have colors assigned to routes, the **route_color** field defines a color that corresponds to a route. The color must be provided as a six-character hexadecimal number, for example, 00FFFF. If no color is specified, the default route color is white (FFFFFF). The color difference between **route_color** and **route_text_color** should provide sufficient contrast when viewed on a black and white screen. The [W3C Techniques for Accessibility Evaluation And Repair Tools document](https://www.w3.org/TR/AERT#color-contrast) offers a useful algorithm for evaluating color contrast. There are also helpful online tools for choosing contrasting colors, including the [snook.ca Color Contrast Check application](http://snook.ca/technical/colour_contrast/colour.html#fg=33FF33,bg=333333). | -| route_text_color | Optional | The route_text_color field can be used to specify a legible color to use for text drawn against a background of route_color. The color must be provided as a six-character hexadecimal number, for example, FFD700. If no color is specified, the default text color is black (000000). 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 | Optional | The **route_sort_order** field can be used to order the routes in a way which is ideal for presentation to customers. It must be a non-negative integer. Routes with smaller **route_sort_order** values should be displayed before routes with larger **route_sort_order** values. | +| route_url | Optional URL | The **route_url** field contains the URL of a web page about that particular route. This should be different from the agency_url. | +| route_color | Optional color | In systems that have colors assigned to routes, the **route_color** field defines a color that corresponds to a route. If no color is specified, the default route color is white (FFFFFF). The color difference between **route_color** and **route_text_color** should provide sufficient contrast when viewed on a black and white screen. The [W3C Techniques for Accessibility Evaluation And Repair Tools document](https://www.w3.org/TR/AERT#color-contrast) offers a useful algorithm for evaluating color contrast. There are also helpful online tools for choosing contrasting colors, including the [snook.ca Color Contrast Check application](http://snook.ca/technical/colour_contrast/colour.html#fg=33FF33,bg=333333). | +| route_text_color | Optional color | The route_text_color field can be used to specify a legible color to use for text drawn against a background of route_color. If no color is specified, the default text color is black (000000). 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 | Optional non-negative integer | The **route_sort_order** field can be used to order the routes in a way which is ideal for presentation to customers. It must be a non-negative integer. Routes with smaller **route_sort_order** values should be displayed before routes with larger **route_sort_order** values. | ### trips.txt From 93cd79f1b4db99e1ca016a9ce28bd810ef3187ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Frachet?= Date: Thu, 13 Sep 2018 14:50:44 -0400 Subject: [PATCH 12/30] Add type for all the field and improve formatting --- gtfs/spec/en/reference.md | 183 +++++++++++++++++++------------------- 1 file changed, 92 insertions(+), 91 deletions(-) diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md index a89d02694..140cbfb71 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -36,6 +36,7 @@ This section defines terms that are used throughout this document. ## Field Types - **Color** - The field contains a color encoded as a six-digit hexadecimal number. Refer to https://htmlcolorcodes.com/ to generate a valid value (the leading "#" is not included). For example: "FFFFFF" for white, "000000" for black or "0039A6" for the A,C,E lines in NYMTA. +- **Currency Code** - The field contains an ISO 4217 alphabetical currency code. For the list of current currency, please refer to http://en.wikipedia.org/wiki/ISO_4217. For example: "CAD" for Canadian dollars, "EUR" for euros or "JPY" for Japanese yen. - **Email** - The field contains an email address. For example: example@example.com. - **Enum** - The field contains a value from a set of predefined constants defined in the "Details" column. For example: the route_type field contains a "0" for tram, a "1" for subway... - **ID** - The field contains an identifier which uniquely identifies an entity (therefore is dataset unique). Its value is not aimed to be displayed to the user, and is a sequence of any UTF-8 characters, but using only printable ASCII characters is recommended. @@ -95,42 +96,42 @@ The following example demonstrates how a field value would appear in a comma-del File: **Required** -| Field Name | Required & Type | Details | +| Field Name | Details | | ------ | ------ | ------ | -| agency_id | Optional ID | The **agency_id** field contains an ID that uniquely identifies a transit agency. A transit feed may represent data from more than one agency. This field is optional for transit feeds that only contain data for a single agency. | -| agency_name | Required text | The **agency_name** field contains the full name of the transit agency. Google Maps will display this name. | -| agency_url | **Required URL** | The **agency_url** field contains the URL of the transit agency. | +| agency_id | (Optional, ID) The **agency_id** field contains an ID that uniquely identifies a transit agency. A transit feed may represent data from more than one agency. This field is optional for transit feeds that only contain data for a single agency. | +| agency_name | **(Required, text)** The **agency_name** field contains the full name of the transit agency. Google Maps will display this name. | +| agency_url | **(Required, URL)** The **agency_url** field contains the URL of the transit agency. | | agency_timezone | **Required timezone** | The **agency_timezone** field contains the timezone where the transit agency is located. If multiple agencies are specified in the feed, each must have the same agency_timezone. | -| agency_lang | Optional language code | The **agency_lang field** contains the code of the primary language used by this transit agency. This setting defines capitalization rules and other language-specific settings for all text contained in this transit agency's feed. | -| agency_phone | Optional phone number | The **agency_phone field** contains a single voice telephone number for the specified agency. This field is a string value that presents the telephone number as typical for the agency's service area. It can and should contain punctuation marks to group the digits of the number. Dialable text (for example, TriMet's "503-238-RIDE") is permitted, but the field must not contain any other descriptive text. | -| agency_fare_url | Optional URL | The **agency_fare_url** specifies the URL of a web page that allows a rider to purchase tickets or other fare instruments for that agency online. | -| agency_email | Optional email | Contains a single valid email address actively monitored by the agency’s customer service department. This email address will be considered a direct contact point where transit riders can reach a customer service representative at the agency. | +| agency_lang | (Optional, language code) The **agency_lang field** contains the code of the primary language used by this transit agency. This setting defines capitalization rules and other language-specific settings for all text contained in this transit agency's feed. | +| agency_phone | (Optional, phone number) The **agency_phone field** contains a single voice telephone number for the specified agency. This field is a string value that presents the telephone number as typical for the agency's service area. It can and should contain punctuation marks to group the digits of the number. Dialable text (for example, TriMet's "503-238-RIDE") is permitted, but the field must not contain any other descriptive text. | +| agency_fare_url | (Optional, URL) The **agency_fare_url** specifies the URL of a web page that allows a rider to purchase tickets or other fare instruments for that agency online. | +| agency_email | (Optional, email) Contains a single valid email address actively monitored by the agency’s customer service department. This email address will be considered a direct contact point where transit riders can reach a customer service representative at the agency. | ### stops.txt File: **Required** -| Field Name | Required | Details | | | +| Field Name | Required | Type | Details | | | | ------ | ------ | ------ | ------ | ------ | -| stop_id | **Required ID** | The **stop_id** field contains an ID that uniquely identifies a stop, station, or station entrance. Multiple routes may use the same stop. | | | +| stop_id | **Required** | **ID** | The **stop_id** field contains an ID that uniquely identifies a stop, station, or station entrance. Multiple routes may use the same stop. | | | | stop_code | Optional text | The **stop_code** field contains short text or a number that uniquely identifies the stop for passengers. Stop codes are often used in phone-based transit information systems or printed on stop signage to make it easier for riders to get a stop schedule or real-time arrival information for a particular stop. The **stop_code** field contains short text or a number that uniquely identifies the stop for passengers. The **stop_code** can be the same as **stop_id** if it is passenger-facing. This field should be left blank for stops without a code presented to passengers. | | | -| stop_name | **Required text** | The **stop_name** field contains the name of a stop, station, or station entrance. Please use a name that people will understand in the local and tourist vernacular. | | | +| stop_name | **Required** | **text** | The **stop_name** field contains the name of a stop, station, or station entrance. Please use a name that people will understand in the local and tourist vernacular. | | | | stop_desc | Optional text | The **stop_desc** field contains a description of a stop. Please provide useful, quality information. Do not simply duplicate the name of the stop. | | | -| stop_lat | **Required latitude** | The **stop_lat** field contains the latitude of a stop, station, or station entrance. | | | -| stop_lon | **Required longitude** | The **stop_lon** field contains the longitude of a stop, station, or station entrance. | | | -| zone_id | Optional ID | The **zone_id** field defines the fare zone for a stop ID. Zone IDs are required if you want to provide fare information using [fare_rules.txt](#fare_rulestxt). If this stop ID represents a station, the zone ID is ignored. | | | -| stop_url | Optional URL | The **stop_url** field contains the URL of a web page about a particular stop. This should be different from the agency_url and the route_url fields. | | | +| stop_lat | **Required** | **latitude** | The **stop_lat** field contains the latitude of a stop, station, or station entrance. | | | +| stop_lon | **Required** | **longitude** | The **stop_lon** field contains the longitude of a stop, station, or station entrance. | | | +| zone_id | Optional | ID | The **zone_id** field defines the fare zone for a stop ID. Zone IDs are required if you want to provide fare information using [fare_rules.txt](#fare_rulestxt). If this stop ID represents a station, the zone ID is ignored. | | | +| stop_url | Optional | URL | The **stop_url** field contains the URL of a web page about a particular stop. This should be different from the agency_url and the route_url fields. | | | | location_type | Optional enum | The **location_type** field identifies whether this stop ID represents a stop, station, or station entrance. If no location type is specified, or the location_type is blank, stop IDs are treated as stops. Stations may have different properties from stops when they are represented on a map or used in trip planning. The location type field can have the following values: | | | | | | * **0** or blank - Stop. A location where passengers board or disembark from a transit vehicle. | | | | | | * **1** - Station. A physical structure or area that contains one or more stop. | | | | | | * **2** - Station Entrance/Exit. A location where passengers can enter or exit a station from the street. The stop entry must also specify a parent_station value referencing the stop ID of the parent station for the entrance. | | | -| parent_station | Optional enum | For stops that are physically located inside stations, the **parent_station** field identifies the station associated with the stop. To use this field, stops.txt must also contain a row where this stop ID is assigned location type=1. | | | +| parent_station | Optional | enum | For stops that are physically located inside stations, the **parent_station** field identifies the station associated with the stop. To use this field, stops.txt must also contain a row where this stop ID is assigned location type=1. | | | | | | **This stop ID represents...** | **This entry's location type...** | **This entry's parent_station field contains...** | | | | A stop located inside a station. | 0 or blank | The stop ID of the station where this stop is located. The stop referenced by parent_station must have location_type=1. | | | | A stop located outside a station. | 0 or blank | A blank value. The parent_station field doesn't apply to this stop. | | | | A station. | 1 | A blank value. Stations can't contain other stations. | | stop_timezone | Optional timezone | The **stop_timezone** field contains the timezone in which this stop, station, or station entrance is located. If omitted, the stop should be assumed to be located in the timezone specified by **agency_timezone** in [agency.txt](#agencytxt). When a stop has a parent station, the stop is considered to be in the timezone specified by the parent station's **stop_timezone** value. If the parent has no stop_timezone value, the stops that belong to that station are assumed to be in the timezone specified by **agency_timezone**, even if the stops have their own **stop_timezone** values. In other words, if a given stop has a **parent_station** value, any **stop_timezone** value specified for that stop must be ignored. Even if **stop_timezone** values are provided in stops.txt, the times in [stop_times.txt](#stop_timestxt) should continue to be specified as time since midnight in the timezone specified by **agency_timezone** in agency.txt. 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 | Optional | The **wheelchair_boarding field** identifies whether wheelchair boardings are possible from the specified stop, station, or station entrance. The field can have the following values: | | | +| wheelchair_boarding | Optional | Enum | The **wheelchair_boarding field** identifies whether wheelchair boardings are possible from the specified stop, station, or station entrance. The field can have the following values: | | | | | | * **0** (or empty) - indicates that there is no accessibility information for the stop | | | | | | * **1** - indicates that at least some vehicles at this stop can be boarded by a rider in a wheelchair | | | | | | * **2** - wheelchair boarding is not possible at this stop | | | @@ -147,7 +148,7 @@ File: **Required** File: **Required** -| Field Name | Required | Details | +| Field Name | Required & Type | Details | | ------ | ------ | ------ | | route_id | **Required ID** | The **route_id** field contains an ID that uniquely identifies a route. | | agency_id | Optional ID | The **agency_id** field defines an agency for the specified route. This value is referenced from the [agency.txt](#agencytxt) file. Use this field when you are providing data for routes from more than one agency. | @@ -172,23 +173,23 @@ File: **Required** File: **Required** -| Field Name | Required | Details | +| Field Name | Required & Type | Details | | ------ | ------ | ------ | -| route_id | **Required** | The **route_id** field contains an ID that uniquely identifies a route. This value is referenced from the [routes.txt](#routestxt) file. | -| service_id | **Required** | The **service_id** contains an ID that uniquely identifies a set of dates when service is available for one or more routes. This value is referenced from the [calendar.txt](#calendartxt) or [calendar_dates.txt](#calendar_datestxt) file. | -| trip_id | **Required** | The **trip_id** field contains an ID that identifies a trip. The **trip_id** is dataset unique. | -| trip_headsign | Optional | The **trip_headsign** field contains the text that appears on a sign that identifies the trip's destination to passengers. Use this field to distinguish between different patterns of service in the same route. If the headsign changes during a trip, you can override the **trip_headsign** by specifying values for the **stop_headsign** field in [stop_times.txt](#stop_timestxt). | -| trip_short_name | Optional | The **trip_short_name** field contains the text that appears in schedules and sign boards to identify the trip to passengers, for example, to identify train numbers for commuter rail trips. If riders do not commonly rely on trip names, please leave this field blank. 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 | Optional | The **direction_id** field contains a binary value that indicates the direction of travel for a trip. Use this field to distinguish between bi-directional trips with the same **route_id**. This field is not used in routing; it provides a way to separate trips by direction when publishing time tables. You can specify names for each direction with the **trip_headsign** field. | +| route_id | **Required ID** | The **route_id** field contains an ID that uniquely identifies a route. This value is referenced from the [routes.txt](#routestxt) file. | +| service_id | **Required ID** | The **service_id** contains an ID that uniquely identifies a set of dates when service is available for one or more routes. This value is referenced from the [calendar.txt](#calendartxt) or [calendar_dates.txt](#calendar_datestxt) file. | +| trip_id | **Require ID** | The **trip_id** field contains an ID that uniquely identifies a trip. | +| trip_headsign | Optional text | The **trip_headsign** field contains the text that appears on a sign that identifies the trip's destination to passengers. Use this field to distinguish between different patterns of service in the same route. If the headsign changes during a trip, you can override the **trip_headsign** by specifying values for the **stop_headsign** field in [stop_times.txt](#stop_timestxt). | +| trip_short_name | Optional text | The **trip_short_name** field contains the text that appears in schedules and sign boards to identify the trip to passengers, for example, to identify train numbers for commuter rail trips. If riders do not commonly rely on trip names, please leave this field blank. 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 | Optional enum | The **direction_id** field contains a binary value that indicates the direction of travel for a trip. Use this field to distinguish between bi-directional trips with the same **route_id**. This field is not used in routing; it provides a way to separate trips by direction when publishing time tables. You can specify names for each direction with the **trip_headsign** field. | | | | * 0 - travel in one direction (e.g. outbound travel) | | | | * 1 - travel in the opposite direction (e.g. inbound travel) | | | | For example, you could use the *trip_headsign* and *direction_id* fields together to assign a name to travel in each direction for a set of trips. A [trips.txt](#tripstxt) file could contain these rows for use in time tables: | | | | * `trip_id,...,trip_headsign,direction_id` | | | | * `1234,...,Airport,0` | | | | * `1505,...,Downtown,1` | -| block_id | Optional | The **block_id** field 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 day and block_id. A block_id can have trips with different service days, making distinct blocks. (See [example below](#example-showing-blocks-and-service-day)) | -| shape_id | Optional | The **shape_id** field contains an ID that defines a shape for the trip. This value is referenced from the [shapes.txt](#shapestxt) file. The shapes.txt file allows you to define how a line should be drawn on the map to represent a trip. | -| wheelchair_accessible | Optional | * **0** (or empty) - indicates that there is no accessibility information for the trip | +| block_id | Optional ID | The **block_id** field 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 day and block_id. A block_id can have trips with different service days, making distinct blocks. (See [example below](#example-showing-blocks-and-service-day)) | +| shape_id | Optional ID | The **shape_id** field contains an ID that defines a shape for the trip. This value is referenced from the [shapes.txt](#shapestxt) file. The shapes.txt file allows you to define how a line should be drawn on the map to represent a trip. | +| wheelchair_accessible | Optional enum | * **0** (or empty) - indicates that there is no accessibility information for the trip | | | | * **1** - indicates that the vehicle being used on this particular trip can accommodate at least one rider in a wheelchair | | | | * **2** - indicates that no riders in wheelchairs can be accommodated on this trip | | bikes_allowed | Optional | 0 (or empty) - indicates that there is no bike information for the trip | @@ -215,40 +216,40 @@ Notes on above table: File: **Required** -| Field Name | Required | Details | | +| Field Name | Required & Type | Details | | | ------ | ------ | ------ | ------ | -| trip_id | **Required** | The **trip_id** field contains an ID that identifies a trip. This value is referenced from the [trips.txt](#tripstxt) file. | | -| arrival_time | **Required** | The **arrival_time** specifies the arrival time at a specific stop for a specific trip on a route. The time is measured from "noon minus 12h" (effectively midnight, except for days on which daylight savings time changes occur) at the beginning of the service day. For times occurring after midnight on the service day, enter the time as a value greater than 24:00:00 in HH:MM:SS local time for the day on which the trip schedule begins. If you don't have separate times for arrival and departure at a stop, enter the same value for **arrival_time** and **departure_time**.

Scheduled stops where the vehicle strictly adheres to the specified arrival and departure times are timepoints. For example, if a transit vehicle arrives at a stop before the scheduled departure time, it will hold until the departure time. If this stop is not a timepoint, use either an empty string value for the **arrival_time** field or provide an interpolated time. Further, indicate that interpolated times are provided via the **timepoint** field with a value of zero. If interpolated times are indicated with **timepoint**=0, then time points must be indicated with a value of 1 for the **timepoint** field. Provide arrival times for all stops that are time points.

An arrival time must be specified for the first and the last stop in a trip. Times must be eight digits in HH:MM:SS format (H:MM:SS is also accepted, if the hour begins with 0). Do not pad times with spaces. The following columns list stop times for a trip and the proper way to express those times in the **arrival_time** field: | | +| trip_id | **Required ID** | The **trip_id** field contains an ID that identifies a trip. This value is referenced from the [trips.txt](#tripstxt) file. | | +| arrival_time | **Required service time** | The **arrival_time** specifies the arrival time at a specific stop for a specific trip on a route. The time is measured from "noon minus 12h" (effectively midnight, except for days on which daylight savings time changes occur) at the beginning of the service day. For times occurring after midnight on the service day, enter the time as a value greater than 24:00:00 in HH:MM:SS local time for the day on which the trip schedule begins. If you don't have separate times for arrival and departure at a stop, enter the same value for **arrival_time** and **departure_time**.

Scheduled stops where the vehicle strictly adheres to the specified arrival and departure times are timepoints. For example, if a transit vehicle arrives at a stop before the scheduled departure time, it will hold until the departure time. If this stop is not a timepoint, use either an empty string value for the **arrival_time** field or provide an interpolated time. Further, indicate that interpolated times are provided via the **timepoint** field with a value of zero. If interpolated times are indicated with **timepoint**=0, then time points must be indicated with a value of 1 for the **timepoint** field. Provide arrival times for all stops that are time points.

An arrival time must be specified for the first and the last stop in a trip. Times must be eight digits in HH:MM:SS format (H:MM:SS is also accepted, if the hour begins with 0). Do not pad times with spaces. The following columns list stop times for a trip and the proper way to express those times in the **arrival_time** field: | | | | | **Time** | **arrival_time value** | | | | 08:10:00 A.M. | 08:10:00 or 8:10:00 | | | | 01:05:00 P.M. | 13:05:00 | | | | 07:40:00 P.M. | 19:40:00 | | | | 01:55:00 A.M. | 25:55:00 | | | | **Note:** Trips that span multiple dates will have stop times greater than 24:00:00. For example, if a trip begins at 10:30:00 p.m. and ends at 2:15:00 a.m. on the following day, the stop times would be 22:30:00 and 26:15:00. Entering those stop times as 22:30:00 and 02:15:00 would not produce the desired results. | | -| departure_time | **Required** | The **departure_time** specifies the departure time from a specific stop for a specific trip on a route. The time is measured from "noon minus 12h" (effectively midnight, except for days on which daylight savings time changes occur) at the beginning of the service day. For times occurring after midnight on the service day, enter the time as a value greater than 24:00:00 in HH:MM:SS local time for the day on which the trip schedule begins. If you don't have separate times for arrival and departure at a stop, enter the same value for **arrival_time** and **departure_time**.

Scheduled stops where the vehicle strictly adheres to the specified arrival and departure times are timepoints. For example, if a transit vehicle arrives at a stop before the scheduled departure time, it will hold until the departure time. If this stop is not a timepoint, use either an empty string value for the **departure_time** field or provide an interpolated time (further, indicate that interpolated times are provided via the **timepoint** field with a value of zero). If interpolated times are indicated with **timepoint**=0, then time points must be indicated with a value of 1 for the **timepoint** field. Provide departure times for all stops that are time points.

A departure time must be specified for the first and the last stop in a trip even if the vehicle does not allow boarding at the last stop. Times must be eight digits in HH:MM:SS format (H:MM:SS is also accepted, if the hour begins with 0). Do not pad times with spaces. The following columns list stop times for a trip and the proper way to express those times in the **departure_time** field: | | +| departure_time | **Required service time** | The **departure_time** specifies the departure time from a specific stop for a specific trip on a route. The time is measured from "noon minus 12h" (effectively midnight, except for days on which daylight savings time changes occur) at the beginning of the service day. For times occurring after midnight on the service day, enter the time as a value greater than 24:00:00 in HH:MM:SS local time for the day on which the trip schedule begins. If you don't have separate times for arrival and departure at a stop, enter the same value for **arrival_time** and **departure_time**.

Scheduled stops where the vehicle strictly adheres to the specified arrival and departure times are timepoints. For example, if a transit vehicle arrives at a stop before the scheduled departure time, it will hold until the departure time. If this stop is not a timepoint, use either an empty string value for the **departure_time** field or provide an interpolated time (further, indicate that interpolated times are provided via the **timepoint** field with a value of zero). If interpolated times are indicated with **timepoint**=0, then time points must be indicated with a value of 1 for the **timepoint** field. Provide departure times for all stops that are time points.

A departure time must be specified for the first and the last stop in a trip even if the vehicle does not allow boarding at the last stop. Times must be eight digits in HH:MM:SS format (H:MM:SS is also accepted, if the hour begins with 0). Do not pad times with spaces. The following columns list stop times for a trip and the proper way to express those times in the **departure_time** field: | | | | | Time | departure_time value | | | | 08:10:00 A.M. | 08:10:00 or 8:10:00 | | | | 01:05:00 P.M. | 13:05:00 | | | | 07:40:00 P.M. | 19:40:00 | | | | 01:55:00 A.M. | 25:55:00 | | | | **Note:** Trips that span multiple dates will have stop times greater than 24:00:00. For example, if a trip begins at 10:30:00 p.m. and ends at 2:15:00 a.m. on the following day, the stop times would be 22:30:00 and 26:15:00. Entering those stop times as 22:30:00 and 02:15:00 would not produce the desired results. | | -| stop_id | **Required** | The **stop_id** field contains an ID that uniquely identifies a stop. Multiple routes may use the same stop. The **stop_id** is referenced from the [stops.txt](#stopstxt) file. If **location_type** is used in [stops.txt](#stopstxt), all stops referenced in [stop_times.txt](#stop_timestxt) must have **location_type** of 0. Where possible, **stop_id** values should remain consistent between feed updates. In other words, stop A with **stop_id 1** should have **stop_id 1** in all subsequent data updates. If a stop is not a time point, enter blank values for **arrival_time** and **departure_time**. | | -| stop_sequence | **Required** | The **stop_sequence** field identifies the order of the stops for a particular trip. The values for **stop_sequence** must be non-negative integers, and they must increase along the trip. For example, the first stop on the trip could have a **stop_sequence** of 1, the second stop on the trip could have a **stop_sequence** of 23, the third stop could have a **stop_sequence** of 40, and so on. | | -| stop_headsign | Optional | The **stop_headsign** field contains the text that appears on a sign that identifies the trip's destination to passengers. Use this field to override the default **trip_headsign** when the headsign changes between stops. If this headsign is associated with an entire trip, use **trip_headsign** instead. | | -| pickup_type | Optional | The **pickup_type** field indicates whether passengers are picked up at a stop as part of the normal schedule or whether a pickup at the stop is not available. This field also allows the transit agency to indicate that passengers must call the agency or notify the driver to arrange a pickup at a particular stop. Valid values for this field are: | | +| stop_id | **Required ID** | The **stop_id** field contains an ID that uniquely identifies a stop. Multiple routes may use the same stop. The **stop_id** is referenced from the [stops.txt](#stopstxt) file. If **location_type** is used in [stops.txt](#stopstxt), all stops referenced in [stop_times.txt](#stop_timestxt) must have **location_type** of 0. Where possible, **stop_id** values should remain consistent between feed updates. In other words, stop A with **stop_id 1** should have **stop_id 1** in all subsequent data updates. If a stop is not a time point, enter blank values for **arrival_time** and **departure_time**. | | +| stop_sequence | **Required non-negative integer** | The **stop_sequence** field identifies the order of the stops for a particular trip. The values must increase along the trip. For example, the first stop on the trip could have a **stop_sequence** of 1, the second stop on the trip could have a **stop_sequence** of 23, the third stop could have a **stop_sequence** of 40, and so on. | | +| stop_headsign | Optional text | The **stop_headsign** field contains the text that appears on a sign that identifies the trip's destination to passengers. Use this field to override the default **trip_headsign** when the headsign changes between stops. If this headsign is associated with an entire trip, use **trip_headsign** instead. | | +| pickup_type | Optional enum | The **pickup_type** field indicates whether passengers are picked up at a stop as part of the normal schedule or whether a pickup at the stop is not available. This field also allows the transit agency to indicate that passengers must call the agency or notify the driver to arrange a pickup at a particular stop. Valid values for this field are: | | | | | * **0** - Regularly scheduled pickup | | | | | * **1** - No pickup available | | | | | * **2** - Must phone agency to arrange pickup | | | | | * **3** - Must coordinate with driver to arrange pickup | | | | | The default value for this field is **0**. | | -| drop_off_type | Optional | The **drop_off_type** field indicates whether passengers are dropped off at a stop as part of the normal schedule or whether a drop off at the stop is not available. This field also allows the transit agency to indicate that passengers must call the agency or notify the driver to arrange a drop off at a particular stop. Valid values for this field are: | | +| drop_off_type | Optional enum | The **drop_off_type** field indicates whether passengers are dropped off at a stop as part of the normal schedule or whether a drop off at the stop is not available. This field also allows the transit agency to indicate that passengers must call the agency or notify the driver to arrange a drop off at a particular stop. Valid values for this field are: | | | | | * **0** - 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 | | | | | The default value for this field is **0**. | | -| shape_dist_traveled | Optional | When used in the [stop_times.txt](#stop_timestxt) file, the **shape_dist_traveled** field positions a stop as a distance from the first shape point. The **shape_dist_traveled** field represents a real distance traveled along the route in units such as feet or kilometers. For example, if a bus travels a distance of 5.25 kilometers from the start of the shape to the stop, the **shape_dist_traveled** for the stop ID would be entered as "5.25". This information allows the trip planner to determine how much of the shape to draw when showing part of a trip on the map. The values used for **shape_dist_traveled** must increase along with **stop_sequence**: they cannot be used to show reverse travel along a route. The units used for **shape_dist_traveled** in the [stop_times.txt](#stop_timestxt) file must match the units that are used for this field in the shapes.txt file. | | -| timepoint | Optional | The timepoint field can be used to indicate if the specified arrival and departure times for a stop are strictly adhered to by the transit vehicle or if they are instead approximate and/or interpolated times. The field allows a GTFS producer to provide interpolated stop times that potentially incorporate local knowledge, but still indicate if the times are approximate. For stop-time entries with specified arrival and departure times, valid values for this field are: | | +| shape_dist_traveled | Optional non-negative float | When used in the [stop_times.txt](#stop_timestxt) file, the **shape_dist_traveled** field positions a stop as a distance from the first shape point. The **shape_dist_traveled** field represents a real distance traveled along the route in units such as feet or kilometers. For example, if a bus travels a distance of 5.25 kilometers from the start of the shape to the stop, the **shape_dist_traveled** for the stop ID would be entered as "5.25". This information allows the trip planner to determine how much of the shape to draw when showing part of a trip on the map. The values used for **shape_dist_traveled** must increase along with **stop_sequence**: they cannot be used to show reverse travel along a route. The units used for **shape_dist_traveled** in the [stop_times.txt](#stop_timestxt) file must match the units that are used for this field in the shapes.txt file. | | +| timepoint | Optional enum | The timepoint field can be used to indicate if the specified arrival and departure times for a stop are strictly adhered to by the transit vehicle or if they are instead approximate and/or interpolated times. The field allows a GTFS producer to provide interpolated stop times that potentially incorporate local knowledge, but still indicate if the times are approximate. For stop-time entries with specified arrival and departure times, valid values for this field are: | | | | | * **empty** - Times are considered exact. | | | | | * **0** - Times are considered approximate. | | | | | * **1** - Times are considered exact. | | @@ -258,39 +259,39 @@ File: **Required** File: **Required** -| Field Name | Required | Details | +| Field Name | Required & Type | Details | | ------ | ------ | ------ | -| service_id | **Required** | The **service_id** contains an ID that uniquely identifies a set of dates when service is available for one or more routes. Each service_id value can appear at most once in a calendar.txt file. This value is dataset unique. It is referenced by the [trips.txt](#tripstxt) file. | -| monday | **Required** | The monday field contains a binary value that indicates whether the service is valid for all Mondays. | +| service_id | **Required ID** | The **service_id** contains an ID that uniquely identifies a set of dates when service is available for one or more routes. Each service_id value can appear at most once in a calendar.txt file. This value is dataset unique. It is referenced by the [trips.txt](#tripstxt) file. | +| monday | **Required enum** | The monday field contains a binary value that indicates whether the service is valid for all Mondays. | | | | * A value of **1** indicates that service is available for all Mondays in the date range. (The date range is specified using the **start_date** and **end_date** fields.) | | | | * A value of **0** indicates that service is not available on Mondays in the date range. | | | | **Note:** You may list exceptions for particular dates, such as holidays, in the [calendar_dates.txt](#calendar_datestxt) file. | -| tuesday | **Required** | The tuesday field contains a binary value that indicates whether the service is valid for all Tuesdays. | +| tuesday | **Required enum** | The tuesday field contains a binary value that indicates whether the service is valid for all Tuesdays. | | | | A value of **1** indicates that service is available for all Tuesdays in the date range. (The date range is specified using the **start_date** and **end_date** fields.) | | | | A value of **0** indicates that service is not available on Tuesdays in the date range. | | | | **Note:** You may list exceptions for particular dates, such as holidays, in the [calendar_dates.txt](#calendar_datestxt) file. | -| wednesday | **Required** | The wednesday field contains a binary value that indicates whether the service is valid for all Wednesdays. | +| wednesday | **Required enum** | The wednesday field contains a binary value that indicates whether the service is valid for all Wednesdays. | | | | A value of **1** indicates that service is available for all Wednesdays in the date range. (The date range is specified using the **start_date** and **end_date** fields.) | | | | A value of **0** indicates that service is not available on Wednesdays in the date range. | | | | **Note:** You may list exceptions for particular dates, such as holidays, in the [calendar_dates.txt](#calendar_datestxt) file. | -| thursday | **Required** | The thursday field contains a binary value that indicates whether the service is valid for all Thursdays. | +| thursday | **Required enum** | The thursday field contains a binary value that indicates whether the service is valid for all Thursdays. | | | | A value of **1** indicates that service is available for all Thursdays in the date range. (The date range is specified using the **start_date** and **end_date** fields.) | | | | A value of **0** indicates that service is not available on Thursdays in the date range. | | | | **Note:** You may list exceptions for particular dates, such as holidays, in the [calendar_dates.txt](#calendar_datestxt) file. | -| friday | **Required** | The friday field contains a binary value that indicates whether the service is valid for all Fridays. | +| friday | **Required enum** | The friday field contains a binary value that indicates whether the service is valid for all Fridays. | | | | A value of **1** indicates that service is available for all Fridays in the date range. (The date range is specified using the **start_date** and **end_date** fields.) | | | | A value of **0** indicates that service is not available on Fridays in the date range. | | | | **Note:** You may list exceptions for particular dates, such as holidays, in the [calendar_dates.txt](#calendar_datestxt) file | -| saturday | **Required** | The saturday field contains a binary value that indicates whether the service is valid for all Saturdays. | +| saturday | **Required enum** | The saturday field contains a binary value that indicates whether the service is valid for all Saturdays. | | | | A value of **1** indicates that service is available for all Saturdays in the date range. (The date range is specified using the **start_date** and **end_date** fields.) | | | | A value of **0** indicates that service is not available on Saturdays in the date range. | | | | **Note:** You may list exceptions for particular dates, such as holidays, in the [calendar_dates.txt](#calendar_datestxt) file. | -| sunday | **Required** | The sunday field contains a binary value that indicates whether the service is valid for all Sundays. | +| sunday | **Required enum** | The sunday field contains a binary value that indicates whether the service is valid for all Sundays. | | | | A value of **1** indicates that service is available for all Sundays in the date range. (The date range is specified using the **start_date** and **end_date** fields.) | | | | A value of **0** indicates that service is not available on Sundays in the date range. | | | | **Note:** You may list exceptions for particular dates, such as holidays, in the [calendar_dates.txt](#calendar_datestxt) file. | -| start_date | **Required** | The **start_date** field contains the start date for the service. The start_date field's value should be in YYYYMMDD format. | -| end_date | **Required** | The **end_date** field contains the end date for the service. This date is included in the service interval. The **end_date** field's value should be in YYYYMMDD format. | +| start_date | **Required service date** | The **start_date** field contains the start date for the service. The start_date field's value should be in YYYYMMDD format. | +| end_date | **Required service date** | The **end_date** field contains the end date for the service. This date is included in the service interval. The **end_date** field's value should be in YYYYMMDD format. | ### calendar_dates.txt @@ -301,11 +302,11 @@ The calendar_dates table allows you to explicitly activate or disable service ID * Recommended: Use calendar_dates.txt in conjunction with [calendar.txt](#calendartxt), where calendar_dates.txt defines any exceptions to the default service categories defined in the [calendar.txt](#calendartxt) file. If your service is generally regular, with a few changes on explicit dates (for example, to accommodate special event services, or a school schedule), this is a good approach. * Alternate: Omit [calendar.txt](#calendartxt), and include ALL dates of service in calendar_dates.txt. If your schedule varies most days of the month, or you want to programmatically output service dates without specifying a normal weekly schedule, this approach may be preferable. -| Field Name | Required | Details | +| Field Name | Required & Type | Details | | ------ | ------ | ------ | -| service_id | **Required** | The **service_id** contains an ID that uniquely identifies a set of dates when a service exception is available for one or more routes. Each (service_id, date) pair can only appear once in calendar_dates.txt. If the a service_id value appears in both the calendar.txt and calendar_dates.txt files, the information in calendar_dates.txt modifies the service information specified in [calendar.txt](#calendartxt). This field is referenced by the [trips.txt](#tripstxt) file. | -| date | **Required** | The **date** field specifies a particular date when service availability is different than the norm. You can use the **exception_type** field to indicate whether service is available on the specified date. The **date** field's value should be in YYYYMMDD format. | -| exception_type | **Required** | The **exception_type** indicates whether service is available on the date specified in the date field. | +| service_id | **Required ID** | The **service_id** contains an ID that uniquely identifies a set of dates when a service exception is available for one or more routes. Each (service_id, date) pair can only appear once in calendar_dates.txt. If the a service_id value appears in both the calendar.txt and calendar_dates.txt files, the information in calendar_dates.txt modifies the service information specified in [calendar.txt](#calendartxt). This field is referenced by the [trips.txt](#tripstxt) file. | +| date | **Required service date** | The **date** field specifies a particular date when service availability is different than the norm. You can use the **exception_type** field to indicate whether service is available on the specified date. The **date** field's value should be in YYYYMMDD format. | +| exception_type | **Required enum** | The **exception_type** indicates whether service is available on the date specified in the date field. | | | |* A value of **1** indicates that service has been added for the specified date. | | | |* A value of **2** indicates that service has been removed for the specified date. | | | | For example, suppose a route has one set of trips available on holidays and another set of trips available on all other days. You could have one **service_id** that corresponds to the regular service schedule and another **service_id** that corresponds to the holiday schedule. For a particular holiday, you would use the calendar_dates.txt file to add the holiday to the holiday **service_id** and to remove the holiday from the regular **service_id** schedule. | @@ -314,21 +315,21 @@ The calendar_dates table allows you to explicitly activate or disable service ID File: **Optional** -| Field Name | Required | Details | +| Field Name | Required & Type | Details | | ------ | ------ | ------ | -| fare_id | **Required** | The **fare_id** field contains an ID that uniquely identifies a fare class. The **fare_id** is dataset unique. | -| price | **Required** | The **price** field contains the fare price, in the unit specified by **currency_type**. | -| currency_type | **Required** | The **currency_type** field defines the currency used to pay the fare. Please use the ISO 4217 alphabetical currency codes which can be found at the following URL: http://en.wikipedia.org/wiki/ISO_4217. | -| payment_method | **Required** | The **payment_method** field indicates when the fare must be paid. Valid values for this field are: | +| fare_id | **Required ID** | The **fare_id** field contains an ID that uniquely identifies a fare class. The **fare_id** is dataset unique. | +| price | **Required non-negative float** | The **price** field contains the fare price, in the unit specified by **currency_type**. | +| currency_type | **Required currency code** | The **currency_type** field defines the currency used to pay the fare. | +| payment_method | **Required enum** | The **payment_method** field indicates when the fare must be paid. Valid values for this field are: | | | | * **0** - Fare is paid on board. | | | | * **1** - Fare must be paid before boarding. | -| transfers | **Required** | The transfers field specifies the number of transfers permitted on this fare. Valid values for this field are: | +| transfers | **Required enum** | The transfers field specifies the number of transfers permitted on this fare. Valid values for this field are: | | | | * **0** - No transfers permitted on this fare. | | | | * **1** - Passenger may transfer once. | | | | * **2** - Passenger may transfer twice. | | | | * **(empty)** - If this field is empty, unlimited transfers are permitted. | -| agency_id | Optional | Required for feeds with multiple agencies defined in the agency.txt file. Each fare attribute must specify an agency_id value to indicate which agency the fare applies to. | -| transfer_duration | Optional | The **transfer_duration** field specifies the length of time in seconds before a transfer expires. When used with a **transfers** value of 0, the **transfer_duration** field indicates how long a ticket is valid for a fare where no transfers are allowed. Unless you intend to use this field to indicate ticket validity, **transfer_duration** should be omitted or empty when **transfers** is set to 0. | +| agency_id | Optional ID | Required for feeds with multiple agencies defined in the agency.txt file. Each fare attribute must specify an agency_id value to indicate which agency the fare applies to. | +| transfer_duration | Optional non-negative integer | The **transfer_duration** field specifies the length of time in seconds before a transfer expires. When used with a **transfers** value of 0, the **transfer_duration** field indicates how long a ticket is valid for a fare where no transfers are allowed. Unless you intend to use this field to indicate ticket validity, **transfer_duration** should be omitted or empty when **transfers** is set to 0. | ### fare_rules.txt @@ -342,22 +343,22 @@ The fare_rules table allows you to specify how fares in fare_attributes.txt appl For examples that demonstrate how to specify a fare structure with fare_rules.txt and fare_attributes.txt, see [FareExamples](https://code.google.com/p/googletransitdatafeed/wiki/FareExamples) in the GoogleTransitDataFeed open source project wiki. -| Field Name | Required | Details | +| Field Name | Required & Type | Details | | ------ | ------ | ------ | -| fare_id | **Required** | The **fare_id** field contains an ID that uniquely identifies a fare class. This value is referenced from the [fare_attributes.txt](#fare_attributestxt) file. | -| route_id | Optional | The **route_id** field associates the fare ID with a route. Route IDs are referenced from the [routes.txt](#routestxt) file. If you have several routes with the same fare attributes, create a row in fare_rules.txt for each route. | +| fare_id | **Required ID** | The **fare_id** field contains an ID that uniquely identifies a fare class. This value is referenced from the [fare_attributes.txt](#fare_attributestxt) file. | +| route_id | Optional ID | The **route_id** field associates the fare ID with a route. Route IDs are referenced from the [routes.txt](#routestxt) file. If you have several routes with the same fare attributes, create a row in fare_rules.txt for each route. | | | | For example, if fare class "b" is valid on route "TSW" and "TSE", the fare_rules.txt file would contain these rows for the fare class: | | | | `b,TSW` | | | | `b,TSE` | -| origin_id | Optional | The **origin_id** field associates the fare ID with an origin zone ID. Zone IDs are referenced from the [stops.txt](#stopstxt) file. If you have several origin IDs with the same fare attributes, create a row in fare_rules.txt for each origin ID. | +| origin_id | Optional ID | The **origin_id** field associates the fare ID with an origin zone ID. Zone IDs are referenced from the [stops.txt](#stopstxt) file. If you have several origin IDs with the same fare attributes, create a row in fare_rules.txt for each origin ID. | | | | For example, if fare class "b" is valid for all travel originating from either zone "2" or zone "8", the fare_rules.txt file would contain these rows for the fare class: | | | | `b, , 2` | | | | `b, , 8` | -| destination_id | Optional | The **destination_id** field associates the fare ID with a destination zone ID. Zone IDs are referenced from the [stops.txt](#stopstxt) file. If you have several destination IDs with the same fare attributes, create a row in fare_rules.txt for each destination ID. | +| destination_id | Optional ID | The **destination_id** field associates the fare ID with a destination zone ID. Zone IDs are referenced from the [stops.txt](#stopstxt) file. If you have several destination IDs with the same fare attributes, create a row in fare_rules.txt for each destination ID. | | | | For example, you could use the origin_ID and destination_ID fields together to specify that fare class "b" is valid for travel between zones 3 and 4, and for travel between zones 3 and 5, the fare_rules.txt file would contain these rows for the fare class: | | | | `b, , 3,4` | | | | `b, , 3,5` | -| contains_id | Optional | The **contains_id** field associates the fare ID with a zone ID, referenced from the [stops.txt](#stopstxt) file. The fare ID is then associated with itineraries that pass through every contains_id zone. | +| contains_id | Optional ID | The **contains_id** field associates the fare ID with a zone ID, referenced from the [stops.txt](#stopstxt) file. The fare ID is then associated with itineraries that pass through every contains_id zone. | | | | For example, if fare class "c" is associated with all travel on the GRT route that passes through zones 5, 6, and 7 the fare_rules.txt would contain these rows: | | | | `c,GRT,,,5` | | | | `c,GRT,,,6` | @@ -370,25 +371,25 @@ File: **Optional** Shapes describe the physical path that a vehicle takes, and are defined in the file shapes.txt. Shapes belong to Trips, and consist of a sequence of points. Tracing the points in order provides the path of the vehicle. The points do not need to match stop locations. -| Field Name | Required | Details | +| Field Name | Required & Type | Details | | ------ | ------ | ------ | -| shape_id | **Required** | The **shape_id** field contains an ID that uniquely identifies a shape. | -| shape_pt_lat | **Required** | The **shape_pt_lat** field associates a shape point's latitude with a shape ID. The field value must be a valid WGS 84 latitude. Each row in shapes.txt represents a shape point in your shape definition. | +| shape_id | **Required ID** | The **shape_id** field contains an ID that uniquely identifies a shape. | +| shape_pt_lat | **Required latitude** | The **shape_pt_lat** field associates a shape point's latitude with a shape ID. Each row in shapes.txt represents a shape point in your shape definition. | | | | For example, if the shape "A_shp" has three points in its definition, the shapes.txt file might contain these rows to define the shape: | | | | `A_shp,37.61956,-122.48161,0` | | | | `A_shp,37.64430,-122.41070,6` | | | | `A_shp,37.65863,-122.30839,11` | -| shape_pt_lon | **Required** | The **shape_pt_lon** field associates a shape point's longitude with a shape ID. The field value must be a valid WGS 84 longitude value from -180 to 180. Each row in shapes.txt represents a shape point in your shape definition. | +| shape_pt_lon | **Required longitude** | The **shape_pt_lon** field associates a shape point's longitude with a shape ID. Each row in shapes.txt represents a shape point in your shape definition. | | | | For example, if the shape "A_shp" has three points in its definition, the shapes.txt file might contain these rows to define the shape: | | | | `A_shp,37.61956,-122.48161,0` | | | | `A_shp,37.64430,-122.41070,6` | | | | `A_shp,37.65863,-122.30839,11` | -| shape_pt_sequence | **Required** | The **shape_pt_sequence** field associates the latitude and longitude of a shape point with its sequence order along the shape. The values for **shape_pt_sequence** must be non-negative integers, and they must increase along the trip. | +| shape_pt_sequence | **Required non-negative integer** | The **shape_pt_sequence** field associates the latitude and longitude of a shape point with its sequence order along the shape. The values for **shape_pt_sequence** must increase along the trip. | | | | For example, if the shape "A_shp" has three points in its definition, the shapes.txt file might contain these rows to define the shape: | | | | `A_shp,37.61956,-122.48161,0` | | | | `A_shp,37.64430,-122.41070,6` | | | | `A_shp,37.65863,-122.30839,11` | -| shape_dist_traveled | Optional | When used in the shapes.txt file, the **shape_dist_traveled** field positions a shape point as a distance traveled along a shape from the first shape point. The **shape_dist_traveled** field represents a real distance traveled along the route in units such as feet or kilometers. This information allows the trip planner to determine how much of the shape to draw when showing part of a trip on the map. The values used for **shape_dist_traveled** must increase along with shape_pt_sequence: they cannot be used to show reverse travel along a route. | +| shape_dist_traveled | Optional non-negative float | When used in the shapes.txt file, the **shape_dist_traveled** field positions a shape point as a distance traveled along a shape from the first shape point. The **shape_dist_traveled** field represents a real distance traveled along the route in units such as feet or kilometers. This information allows the trip planner to determine how much of the shape to draw when showing part of a trip on the map. The values used for **shape_dist_traveled** must increase along with shape_pt_sequence: they cannot be used to show reverse travel along a route. | | | | The units used for **shape_dist_traveled** in the shapes.txt file must match the units that are used for this field in the [stop_times.txt](#stop_timestxt) file. | | | | For 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: | | | | `A_shp,37.61956,-122.48161,0,0` | @@ -401,16 +402,16 @@ File: **Optional** This table is intended to represent schedules that don't have a fixed list of stop times. When trips are defined in frequencies.txt, the trip planner ignores the absolute values of the **arrival_time** and **departure_time** fields for those trips in [stop_times.txt](#stop_timestxt). Instead, the **stop_times** table defines the sequence of stops and the time difference between each stop. -| Field Name | Required | Details | +| Field Name | Required & Type | Details | | ------ | ------ | ------ | -| trip_id | **Required** | The **trip_id** contains an ID that identifies a trip on which the specified frequency of service applies. Trip IDs are referenced from the [trips.txt](#tripstxt) file. | -| start_time | **Required** | The **start_time** field specifies the time at which the first vehicle departs from the first stop of the trip with the specified frequency. The time is measured from "noon minus 12h" (effectively midnight, except for days on which daylight savings time changes occur) at the beginning of the service day. For times occurring after midnight, enter the time as a value greater than 24:00:00 in HH:MM:SS local time for the day on which the trip schedule begins. E.g. 25:35:00. | -| end_time | **Required** | The **end_time** field indicates the time at which service changes to a different frequency (or ceases) at the first stop in the trip. The time is measured from "noon minus 12h" (effectively midnight, except for days on which daylight savings time changes occur) at the beginning of the service day. For times occurring after midnight, enter the time as a value greater than 24:00:00 in HH:MM:SS local time for the day on which the trip schedule begins. E.g. 25:35:00. | -| headway_secs | **Required** | The **headway_secs** field indicates the time between departures from the same stop (headway) for this trip type, during the time interval specified by **start_time** and **end_time**. The headway value must be entered in seconds. | +| trip_id | **Required ID** | The **trip_id** contains an ID that identifies a trip on which the specified frequency of service applies. Trip IDs are referenced from the [trips.txt](#tripstxt) file. | +| start_time | **Required service time** | The **start_time** field specifies the time at which the first vehicle departs from the first stop of the trip with the specified frequency. The time is measured from "noon minus 12h" (effectively midnight, except for days on which daylight savings time changes occur) at the beginning of the service day. For times occurring after midnight, enter the time as a value greater than 24:00:00 in HH:MM:SS local time for the day on which the trip schedule begins. E.g. 25:35:00. | +| end_time | **Required service time** | The **end_time** field indicates the time at which service changes to a different frequency (or ceases) at the first stop in the trip. The time is measured from "noon minus 12h" (effectively midnight, except for days on which daylight savings time changes occur) at the beginning of the service day. For times occurring after midnight, enter the time as a value greater than 24:00:00 in HH:MM:SS local time for the day on which the trip schedule begins. E.g. 25:35:00. | +| headway_secs | **Required non-negative integer** | The **headway_secs** field indicates the time between departures from the same stop (headway) for this trip type, during the time interval specified by **start_time** and **end_time**. The headway value must be entered in seconds. | | | | Periods in which headways are defined (the rows in frequencies.txt) shouldn't overlap for the same trip, since it's hard to determine what should be inferred from two overlapping headways. However, a headway period may begin at the exact same time that another one ends, for instance: | | | | `A, 05:00:00, 07:00:00, 600` | | | | `B, 07:00:00, 12:00:00, 1200` | -| exact_times | Optional | The **exact_times** field determines if frequency-based trips should be exactly scheduled based on the specified headway information. Valid values for this field are: | +| exact_times | Optional enum | The **exact_times** field determines if frequency-based trips should be exactly scheduled based on the specified headway information. Valid values for this field are: | | | |* **0** or **(empty)** - Frequency-based trips are not exactly scheduled. This is the default behavior. | | | |* **1** - Frequency-based trips are exactly scheduled. For a frequencies.txt row, trips are scheduled starting with trip_start_time = start_time + x * headway_secs for all x in (0, 1, 2, ...) where trip_start_time < end_time. | | | | The value of **exact_times** must be the same for all frequencies.txt rows with the same **trip_id**. If **exact_times** is 1 and a frequencies.txt row has a **start_time** equal to **end_time**, no trip must be scheduled. When **exact_times** is 1, care must be taken to choose an **end_time** value that is greater than the last desired trip start time but less than the last desired trip start time + **headway_secs**. | @@ -421,11 +422,11 @@ File: **Optional** Trip planners normally calculate transfer points based on the relative proximity of stops in each route. For potentially ambiguous stop pairs, or transfers where you want to specify a particular choice, use transfers.txt to define additional rules for making connections between routes. -| Field Name | Required | Details | +| Field Name | Required & Type | Details | | ------ | ------ | ------ | -| from_stop_id | **Required** | The **from_stop_id** field contains a stop ID that identifies a stop or station where a connection between routes begins. Stop IDs are referenced from the [stops.txt](#stopstxt) file. If the stop ID refers to a station that contains multiple stops, this transfer rule applies to all stops in that station. | -| to_stop_id | **Required** | The **to_stop_id** field contains a stop ID that identifies a stop or station where a connection between routes ends. Stop IDs are referenced from the [stops.txt](#stopstxt) file. If the stop ID refers to a station that contains multiple stops, this transfer rule applies to all stops in that station. | -| transfer_type | **Required** | The **transfer_type** field specifies the type of connection for the specified (from_stop_id, to_stop_id) pair. Valid values for this field are: | +| from_stop_id | **Required ID** | The **from_stop_id** field contains a stop ID that identifies a stop or station where a connection between routes begins. Stop IDs are referenced from the [stops.txt](#stopstxt) file. If the stop ID refers to a station that contains multiple stops, this transfer rule applies to all stops in that station. | +| to_stop_id | **Required ID** | The **to_stop_id** field contains a stop ID that identifies a stop or station where a connection between routes ends. Stop IDs are referenced from the [stops.txt](#stopstxt) file. If the stop ID refers to a station that contains multiple stops, this transfer rule applies to all stops in that station. | +| transfer_type | **Required enum** | The **transfer_type** field specifies the type of connection for the specified (from_stop_id, to_stop_id) pair. Valid values for this field are: | | | | * **0** or **(empty)** - This is a recommended transfer point between routes. | | | | * **1** - This is a timed transfer point between two routes. The departing vehicle is expected to wait for the arriving one, with sufficient time for a passenger to transfer between routes. | | | | * **2** - This transfer requires a minimum amount of time between arrival and departure to ensure a connection. The time required to transfer is specified by **min_transfer_time**. | @@ -439,11 +440,11 @@ File: **Optional** The file contains information about the feed itself, rather than the services that the feed describes. GTFS currently has an [agency.txt](#agencytxt) file to provide information about the agencies that operate the services described by the feed. However, the publisher of the feed is sometimes a different entity than any of the agencies (in the case of regional aggregators). In addition, there are some fields that are really feed-wide settings, rather than agency-wide. -| Field Name | Required | Details | +| Field Name | Required & Type | Details | | ------ | ------ | ------ | -| feed_publisher_name | **Required** | The **feed_publisher_name** field contains the full name of the organization that publishes the feed. (This may be the same as one of the **agency_name** values in [agency.txt](#agencytxt).) GTFS-consuming applications can display this name when giving attribution for a particular feed's data. | -| feed_publisher_url | **Required** | The **feed_publisher_url** field contains the URL of the feed publishing organization's website. (This may be the same as one of the **agency_url** values in [agency.txt](#agencytxt).) The value must be a fully qualified URL that includes **http**:// or **https**://, and any special characters in the URL must be correctly escaped. See http://www.w3.org/Addressing/URL/4_URI_Recommentations.html for a description of how to create fully qualified URL values. | -| feed_lang | Required | The **feed_lang** field contains a IETF BCP 47 language code specifying the default language used for the text in this feed. This setting helps GTFS consumers choose capitalization rules and other language-specific settings for the feed. For an introduction to IETF BCP 47, please refer to http://www.rfc-editor.org/rfc/bcp/bcp47.txt and http://www.w3.org/International/articles/language-tags/. | -| feed_start_date | Optional | The feed 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 are given as dates in YYYYMMDD format as for [calendar.txt](#calendartxt), or left empty if unavailable. The **feed_end_date** date must not precede the **feed_start_date** date if both are given. Feed providers are encouraged to give schedule data outside this period to advise of likely future service, but feed 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 feed 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 | Optional | (see above) | -| feed_version | Optional | The feed publisher can specify a string here that indicates the current version of their GTFS feed. GTFS-consuming applications can display this value to help feed publishers determine whether the latest version of their feed has been incorporated. | +| feed_publisher_name | **Required text** | The **feed_publisher_name** field contains the full name of the organization that publishes the feed. (This may be the same as one of the **agency_name** values in [agency.txt](#agencytxt).) GTFS-consuming applications can display this name when giving attribution for a particular feed's data. | +| feed_publisher_url | **Required URL** | The **feed_publisher_url** field contains the URL of the feed publishing organization's website. (This may be the same as one of the **agency_url** values in [agency.txt](#agencytxt)). | +| feed_lang | Required language | The **feed_lang** field contains a language code specifying the default language used for the text in this feed. This setting helps GTFS consumers choose capitalization rules and other language-specific settings for the feed. | +| feed_start_date | Optional service date | The feed 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 can be left empty if unavailable. The **feed_end_date** date must not precede the **feed_start_date** date if both are given. Feed providers are encouraged to give schedule data outside this period to advise of likely future service, but feed 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 feed 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 | Optional service date | (see above) | +| feed_version | Optional text | The feed publisher can specify a string here that indicates the current version of their GTFS feed. GTFS-consuming applications can display this value to help feed publishers determine whether the latest version of their feed has been incorporated. | From c58b3a79d6fac2edf43c8d81b98e1f15877d70f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Frachet?= Date: Thu, 13 Sep 2018 14:52:39 -0400 Subject: [PATCH 13/30] Fix formatting --- gtfs/spec/en/reference.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md index 140cbfb71..cb1ec4fe1 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -101,7 +101,7 @@ File: **Required** | agency_id | (Optional, ID) The **agency_id** field contains an ID that uniquely identifies a transit agency. A transit feed may represent data from more than one agency. This field is optional for transit feeds that only contain data for a single agency. | | agency_name | **(Required, text)** The **agency_name** field contains the full name of the transit agency. Google Maps will display this name. | | agency_url | **(Required, URL)** The **agency_url** field contains the URL of the transit agency. | -| agency_timezone | **Required timezone** | The **agency_timezone** field contains the timezone where the transit agency is located. If multiple agencies are specified in the feed, each must have the same agency_timezone. | +| agency_timezone | **(Required, timezone)** The **agency_timezone** field contains the timezone where the transit agency is located. If multiple agencies are specified in the feed, each must have the same agency_timezone. | | agency_lang | (Optional, language code) The **agency_lang field** contains the code of the primary language used by this transit agency. This setting defines capitalization rules and other language-specific settings for all text contained in this transit agency's feed. | | agency_phone | (Optional, phone number) The **agency_phone field** contains a single voice telephone number for the specified agency. This field is a string value that presents the telephone number as typical for the agency's service area. It can and should contain punctuation marks to group the digits of the number. Dialable text (for example, TriMet's "503-238-RIDE") is permitted, but the field must not contain any other descriptive text. | | agency_fare_url | (Optional, URL) The **agency_fare_url** specifies the URL of a web page that allows a rider to purchase tickets or other fare instruments for that agency online. | @@ -116,12 +116,12 @@ File: **Required** | stop_id | **Required** | **ID** | The **stop_id** field contains an ID that uniquely identifies a stop, station, or station entrance. Multiple routes may use the same stop. | | | | stop_code | Optional text | The **stop_code** field contains short text or a number that uniquely identifies the stop for passengers. Stop codes are often used in phone-based transit information systems or printed on stop signage to make it easier for riders to get a stop schedule or real-time arrival information for a particular stop. The **stop_code** field contains short text or a number that uniquely identifies the stop for passengers. The **stop_code** can be the same as **stop_id** if it is passenger-facing. This field should be left blank for stops without a code presented to passengers. | | | | stop_name | **Required** | **text** | The **stop_name** field contains the name of a stop, station, or station entrance. Please use a name that people will understand in the local and tourist vernacular. | | | -| stop_desc | Optional text | The **stop_desc** field contains a description of a stop. Please provide useful, quality information. Do not simply duplicate the name of the stop. | | | +| stop_desc | Optional | text | The **stop_desc** field contains a description of a stop. Please provide useful, quality information. Do not simply duplicate the name of the stop. | | | | stop_lat | **Required** | **latitude** | The **stop_lat** field contains the latitude of a stop, station, or station entrance. | | | | stop_lon | **Required** | **longitude** | The **stop_lon** field contains the longitude of a stop, station, or station entrance. | | | | zone_id | Optional | ID | The **zone_id** field defines the fare zone for a stop ID. Zone IDs are required if you want to provide fare information using [fare_rules.txt](#fare_rulestxt). If this stop ID represents a station, the zone ID is ignored. | | | | stop_url | Optional | URL | The **stop_url** field contains the URL of a web page about a particular stop. This should be different from the agency_url and the route_url fields. | | | -| location_type | Optional enum | The **location_type** field identifies whether this stop ID represents a stop, station, or station entrance. If no location type is specified, or the location_type is blank, stop IDs are treated as stops. Stations may have different properties from stops when they are represented on a map or used in trip planning. The location type field can have the following values: | | | +| location_type | Optional | enum | The **location_type** field identifies whether this stop ID represents a stop, station, or station entrance. If no location type is specified, or the location_type is blank, stop IDs are treated as stops. Stations may have different properties from stops when they are represented on a map or used in trip planning. The location type field can have the following values: | | | | | | * **0** or blank - Stop. A location where passengers board or disembark from a transit vehicle. | | | | | | * **1** - Station. A physical structure or area that contains one or more stop. | | | | | | * **2** - Station Entrance/Exit. A location where passengers can enter or exit a station from the street. The stop entry must also specify a parent_station value referencing the stop ID of the parent station for the entrance. | | | @@ -130,7 +130,7 @@ File: **Required** | | | A stop located inside a station. | 0 or blank | The stop ID of the station where this stop is located. The stop referenced by parent_station must have location_type=1. | | | | A stop located outside a station. | 0 or blank | A blank value. The parent_station field doesn't apply to this stop. | | | | A station. | 1 | A blank value. Stations can't contain other stations. | -| stop_timezone | Optional timezone | The **stop_timezone** field contains the timezone in which this stop, station, or station entrance is located. If omitted, the stop should be assumed to be located in the timezone specified by **agency_timezone** in [agency.txt](#agencytxt). When a stop has a parent station, the stop is considered to be in the timezone specified by the parent station's **stop_timezone** value. If the parent has no stop_timezone value, the stops that belong to that station are assumed to be in the timezone specified by **agency_timezone**, even if the stops have their own **stop_timezone** values. In other words, if a given stop has a **parent_station** value, any **stop_timezone** value specified for that stop must be ignored. Even if **stop_timezone** values are provided in stops.txt, the times in [stop_times.txt](#stop_timestxt) should continue to be specified as time since midnight in the timezone specified by **agency_timezone** in agency.txt. 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 | Optional | timezone | The **stop_timezone** field contains the timezone in which this stop, station, or station entrance is located. If omitted, the stop should be assumed to be located in the timezone specified by **agency_timezone** in [agency.txt](#agencytxt). When a stop has a parent station, the stop is considered to be in the timezone specified by the parent station's **stop_timezone** value. If the parent has no stop_timezone value, the stops that belong to that station are assumed to be in the timezone specified by **agency_timezone**, even if the stops have their own **stop_timezone** values. In other words, if a given stop has a **parent_station** value, any **stop_timezone** value specified for that stop must be ignored. Even if **stop_timezone** values are provided in stops.txt, the times in [stop_times.txt](#stop_timestxt) should continue to be specified as time since midnight in the timezone specified by **agency_timezone** in agency.txt. 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 | Optional | Enum | The **wheelchair_boarding field** identifies whether wheelchair boardings are possible from the specified stop, station, or station entrance. The field can have the following values: | | | | | | * **0** (or empty) - indicates that there is no accessibility information for the stop | | | | | | * **1** - indicates that at least some vehicles at this stop can be boarded by a rider in a wheelchair | | | From 9f592df7bd773c59cda6ad60692028a67301cc75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Frachet?= Date: Thu, 13 Sep 2018 14:53:13 -0400 Subject: [PATCH 14/30] ditto --- gtfs/spec/en/reference.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md index cb1ec4fe1..b0bb16e0b 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -97,7 +97,7 @@ The following example demonstrates how a field value would appear in a comma-del File: **Required** | Field Name | Details | -| ------ | ------ | ------ | +| ------ | ------ | | agency_id | (Optional, ID) The **agency_id** field contains an ID that uniquely identifies a transit agency. A transit feed may represent data from more than one agency. This field is optional for transit feeds that only contain data for a single agency. | | agency_name | **(Required, text)** The **agency_name** field contains the full name of the transit agency. Google Maps will display this name. | | agency_url | **(Required, URL)** The **agency_url** field contains the URL of the transit agency. | @@ -112,7 +112,7 @@ File: **Required** File: **Required** | Field Name | Required | Type | Details | | | -| ------ | ------ | ------ | ------ | ------ | +| ------ | ------ | ------ | ------ | ------ | ------ | | stop_id | **Required** | **ID** | The **stop_id** field contains an ID that uniquely identifies a stop, station, or station entrance. Multiple routes may use the same stop. | | | | stop_code | Optional text | The **stop_code** field contains short text or a number that uniquely identifies the stop for passengers. Stop codes are often used in phone-based transit information systems or printed on stop signage to make it easier for riders to get a stop schedule or real-time arrival information for a particular stop. The **stop_code** field contains short text or a number that uniquely identifies the stop for passengers. The **stop_code** can be the same as **stop_id** if it is passenger-facing. This field should be left blank for stops without a code presented to passengers. | | | | stop_name | **Required** | **text** | The **stop_name** field contains the name of a stop, station, or station entrance. Please use a name that people will understand in the local and tourist vernacular. | | | From ab6644a12ef23030104b0bde39fdf2bef3e9b606 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Frachet?= Date: Thu, 13 Sep 2018 14:54:43 -0400 Subject: [PATCH 15/30] ditto --- gtfs/spec/en/reference.md | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md index b0bb16e0b..3a5fdf31d 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -114,7 +114,7 @@ File: **Required** | Field Name | Required | Type | Details | | | | ------ | ------ | ------ | ------ | ------ | ------ | | stop_id | **Required** | **ID** | The **stop_id** field contains an ID that uniquely identifies a stop, station, or station entrance. Multiple routes may use the same stop. | | | -| stop_code | Optional text | The **stop_code** field contains short text or a number that uniquely identifies the stop for passengers. Stop codes are often used in phone-based transit information systems or printed on stop signage to make it easier for riders to get a stop schedule or real-time arrival information for a particular stop. The **stop_code** field contains short text or a number that uniquely identifies the stop for passengers. The **stop_code** can be the same as **stop_id** if it is passenger-facing. This field should be left blank for stops without a code presented to passengers. | | | +| stop_code | Optional | text | The **stop_code** field contains short text or a number that uniquely identifies the stop for passengers. Stop codes are often used in phone-based transit information systems or printed on stop signage to make it easier for riders to get a stop schedule or real-time arrival information for a particular stop. The **stop_code** field contains short text or a number that uniquely identifies the stop for passengers. The **stop_code** can be the same as **stop_id** if it is passenger-facing. This field should be left blank for stops without a code presented to passengers. | | | | stop_name | **Required** | **text** | The **stop_name** field contains the name of a stop, station, or station entrance. Please use a name that people will understand in the local and tourist vernacular. | | | | stop_desc | Optional | text | The **stop_desc** field contains a description of a stop. Please provide useful, quality information. Do not simply duplicate the name of the stop. | | | | stop_lat | **Required** | **latitude** | The **stop_lat** field contains the latitude of a stop, station, or station entrance. | | | @@ -122,27 +122,27 @@ File: **Required** | zone_id | Optional | ID | The **zone_id** field defines the fare zone for a stop ID. Zone IDs are required if you want to provide fare information using [fare_rules.txt](#fare_rulestxt). If this stop ID represents a station, the zone ID is ignored. | | | | stop_url | Optional | URL | The **stop_url** field contains the URL of a web page about a particular stop. This should be different from the agency_url and the route_url fields. | | | | location_type | Optional | enum | The **location_type** field identifies whether this stop ID represents a stop, station, or station entrance. If no location type is specified, or the location_type is blank, stop IDs are treated as stops. Stations may have different properties from stops when they are represented on a map or used in trip planning. The location type field can have the following values: | | | -| | | * **0** or blank - Stop. A location where passengers board or disembark from a transit vehicle. | | | -| | | * **1** - Station. A physical structure or area that contains one or more stop. | | | -| | | * **2** - Station Entrance/Exit. A location where passengers can enter or exit a station from the street. The stop entry must also specify a parent_station value referencing the stop ID of the parent station for the entrance. | | | +| | | | * **0** or blank - Stop. A location where passengers board or disembark from a transit vehicle. | | | +| | | | * **1** - Station. A physical structure or area that contains one or more stop. | | | +| | | | * **2** - Station Entrance/Exit. A location where passengers can enter or exit a station from the street. The stop entry must also specify a parent_station value referencing the stop ID of the parent station for the entrance. | | | | parent_station | Optional | enum | For stops that are physically located inside stations, the **parent_station** field identifies the station associated with the stop. To use this field, stops.txt must also contain a row where this stop ID is assigned location type=1. | | | -| | | **This stop ID represents...** | **This entry's location type...** | **This entry's parent_station field contains...** | -| | | A stop located inside a station. | 0 or blank | The stop ID of the station where this stop is located. The stop referenced by parent_station must have location_type=1. | -| | | A stop located outside a station. | 0 or blank | A blank value. The parent_station field doesn't apply to this stop. | -| | | A station. | 1 | A blank value. Stations can't contain other stations. | +| | | | **This stop ID represents...** | **This entry's location type...** | **This entry's parent_station field contains...** | +| | | | A stop located inside a station. | 0 or blank | The stop ID of the station where this stop is located. The stop referenced by parent_station must have location_type=1. | +| | | | A stop located outside a station. | 0 or blank | A blank value. The parent_station field doesn't apply to this stop. | +| | | | A station. | 1 | A blank value. Stations can't contain other stations. | | stop_timezone | Optional | timezone | The **stop_timezone** field contains the timezone in which this stop, station, or station entrance is located. If omitted, the stop should be assumed to be located in the timezone specified by **agency_timezone** in [agency.txt](#agencytxt). When a stop has a parent station, the stop is considered to be in the timezone specified by the parent station's **stop_timezone** value. If the parent has no stop_timezone value, the stops that belong to that station are assumed to be in the timezone specified by **agency_timezone**, even if the stops have their own **stop_timezone** values. In other words, if a given stop has a **parent_station** value, any **stop_timezone** value specified for that stop must be ignored. Even if **stop_timezone** values are provided in stops.txt, the times in [stop_times.txt](#stop_timestxt) should continue to be specified as time since midnight in the timezone specified by **agency_timezone** in agency.txt. 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 | Optional | Enum | The **wheelchair_boarding field** identifies whether wheelchair boardings are possible from the specified stop, station, or station entrance. The field can have the following values: | | | -| | | * **0** (or empty) - indicates that there is no accessibility information for the stop | | | -| | | * **1** - indicates that at least some vehicles at this stop can be boarded by a rider in a wheelchair | | | -| | | * **2** - wheelchair boarding is not possible at this stop | | | -| | | When a stop is part of a larger station complex, as indicated by a stop with a **parent_station** value, the stop's **wheelchair_boarding** field has the following additional semantics: | | | -| | | * **0** (or empty) - the stop will inherit its **wheelchair_boarding** value 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, the **wheelchair_boarding** field has the following additional semantics: | | | -| | | * **0** (or empty) - the station entrance will inherit its **wheelchair_boarding** value from the parent station, if specified in the parent | | | -| | | * **1** - the station entrance is wheelchair accessible (e.g. an elevator is available to platforms if they are not at-grade) | | | -| | | * **2** - there exists no accessible path from the entrance to station platforms | | | +| | | | * **0** (or empty) - indicates that there is no accessibility information for the stop | | | +| | | | * **1** - indicates that at least some vehicles at this stop can be boarded by a rider in a wheelchair | | | +| | | | * **2** - wheelchair boarding is not possible at this stop | | | +| | | | When a stop is part of a larger station complex, as indicated by a stop with a **parent_station** value, the stop's **wheelchair_boarding** field has the following additional semantics: | | | +| | | | * **0** (or empty) - the stop will inherit its **wheelchair_boarding** value 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, the **wheelchair_boarding** field has the following additional semantics: | | | +| | | | * **0** (or empty) - the station entrance will inherit its **wheelchair_boarding** value from the parent station, if specified in the parent | | | +| | | | * **1** - the station entrance is wheelchair accessible (e.g. an elevator is available to platforms if they are not at-grade) | | | +| | | | * **2** - there exists no accessible path from the entrance to station platforms | | | ### routes.txt From 984750fd3308d007335eab8d5cacedbea7623b2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Frachet?= Date: Thu, 13 Sep 2018 15:01:42 -0400 Subject: [PATCH 16/30] Revert collumn --- gtfs/spec/en/reference.md | 44 +++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md index 3a5fdf31d..c654a8031 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -96,42 +96,42 @@ The following example demonstrates how a field value would appear in a comma-del File: **Required** -| Field Name | Details | +| Field Name | Type | Required | Details | | ------ | ------ | -| agency_id | (Optional, ID) The **agency_id** field contains an ID that uniquely identifies a transit agency. A transit feed may represent data from more than one agency. This field is optional for transit feeds that only contain data for a single agency. | -| agency_name | **(Required, text)** The **agency_name** field contains the full name of the transit agency. Google Maps will display this name. | -| agency_url | **(Required, URL)** The **agency_url** field contains the URL of the transit agency. | -| agency_timezone | **(Required, timezone)** The **agency_timezone** field contains the timezone where the transit agency is located. If multiple agencies are specified in the feed, each must have the same agency_timezone. | -| agency_lang | (Optional, language code) The **agency_lang field** contains the code of the primary language used by this transit agency. This setting defines capitalization rules and other language-specific settings for all text contained in this transit agency's feed. | -| agency_phone | (Optional, phone number) The **agency_phone field** contains a single voice telephone number for the specified agency. This field is a string value that presents the telephone number as typical for the agency's service area. It can and should contain punctuation marks to group the digits of the number. Dialable text (for example, TriMet's "503-238-RIDE") is permitted, but the field must not contain any other descriptive text. | -| agency_fare_url | (Optional, URL) The **agency_fare_url** specifies the URL of a web page that allows a rider to purchase tickets or other fare instruments for that agency online. | -| agency_email | (Optional, email) Contains a single valid email address actively monitored by the agency’s customer service department. This email address will be considered a direct contact point where transit riders can reach a customer service representative at the agency. | +| agency_id | ID | Optional | The **agency_id** field contains an ID that uniquely identifies a transit agency. A transit feed may represent data from more than one agency. This field is optional for transit feeds that only contain data for a single agency. | +| agency_name | Text | **Required** | The **agency_name** field contains the full name of the transit agency. Google Maps will display this name. | +| agency_url | URL | **Required** | The **agency_url** field contains the URL of the transit agency. | | +| agency_timezone | timezone | **Required** The **agency_timezone** field contains the timezone where the transit agency is located. If multiple agencies are specified in the feed, each must have the same agency_timezone. | +| agency_lang | Language code | Optional | The **agency_lang field** contains the code of the primary language used by this transit agency. This setting defines capitalization rules and other language-specific settings for all text contained in this transit agency's feed. | +| agency_phone | Phone number | Optional | The **agency_phone field** contains a single voice telephone number for the specified agency. This field is a string value that presents the telephone number as typical for the agency's service area. It can and should contain punctuation marks to group the digits of the number. Dialable text (for example, TriMet's "503-238-RIDE") is permitted, but the field must not contain any other descriptive text. | +| agency_fare_url | URL | Optional | The **agency_fare_url** specifies the URL of a web page that allows a rider to purchase tickets or other fare instruments for that agency online. | +| agency_email | Email | Optional | Contains a single valid email address actively monitored by the agency’s customer service department. This email address will be considered a direct contact point where transit riders can reach a customer service representative at the agency. | ### stops.txt File: **Required** -| Field Name | Required | Type | Details | | | +| Field Name | Type | Required | Details | | | | ------ | ------ | ------ | ------ | ------ | ------ | -| stop_id | **Required** | **ID** | The **stop_id** field contains an ID that uniquely identifies a stop, station, or station entrance. Multiple routes may use the same stop. | | | -| stop_code | Optional | text | The **stop_code** field contains short text or a number that uniquely identifies the stop for passengers. Stop codes are often used in phone-based transit information systems or printed on stop signage to make it easier for riders to get a stop schedule or real-time arrival information for a particular stop. The **stop_code** field contains short text or a number that uniquely identifies the stop for passengers. The **stop_code** can be the same as **stop_id** if it is passenger-facing. This field should be left blank for stops without a code presented to passengers. | | | -| stop_name | **Required** | **text** | The **stop_name** field contains the name of a stop, station, or station entrance. Please use a name that people will understand in the local and tourist vernacular. | | | -| stop_desc | Optional | text | The **stop_desc** field contains a description of a stop. Please provide useful, quality information. Do not simply duplicate the name of the stop. | | | -| stop_lat | **Required** | **latitude** | The **stop_lat** field contains the latitude of a stop, station, or station entrance. | | | -| stop_lon | **Required** | **longitude** | The **stop_lon** field contains the longitude of a stop, station, or station entrance. | | | -| zone_id | Optional | ID | The **zone_id** field defines the fare zone for a stop ID. Zone IDs are required if you want to provide fare information using [fare_rules.txt](#fare_rulestxt). If this stop ID represents a station, the zone ID is ignored. | | | -| stop_url | Optional | URL | The **stop_url** field contains the URL of a web page about a particular stop. This should be different from the agency_url and the route_url fields. | | | -| location_type | Optional | enum | The **location_type** field identifies whether this stop ID represents a stop, station, or station entrance. If no location type is specified, or the location_type is blank, stop IDs are treated as stops. Stations may have different properties from stops when they are represented on a map or used in trip planning. The location type field can have the following values: | | | +| stop_id | ID | **Required** | The **stop_id** field contains an ID that uniquely identifies a stop, station, or station entrance. Multiple routes may use the same stop. | | | +| stop_code | Text | Optional | The **stop_code** field contains short text or a number that uniquely identifies the stop for passengers. Stop codes are often used in phone-based transit information systems or printed on stop signage to make it easier for riders to get a stop schedule or real-time arrival information for a particular stop. The **stop_code** field contains short text or a number that uniquely identifies the stop for passengers. The **stop_code** can be the same as **stop_id** if it is passenger-facing. This field should be left blank for stops without a code presented to passengers. | | | +| stop_name | Text | **Required** | The **stop_name** field contains the name of a stop, station, or station entrance. Please use a name that people will understand in the local and tourist vernacular. | | | +| stop_desc | Text | Optional | The **stop_desc** field contains a description of a stop. Please provide useful, quality information. Do not simply duplicate the name of the stop. | | | +| stop_lat | Latitude | **Required** | The **stop_lat** field contains the latitude of a stop, station, or station entrance. | | | +| stop_lon | Longitude | **Required** | The **stop_lon** field contains the longitude of a stop, station, or station entrance. | | | +| zone_id | ID | Optional | The **zone_id** field defines the fare zone for a stop ID. Zone IDs are required if you want to provide fare information using [fare_rules.txt](#fare_rulestxt). If this stop ID represents a station, the zone ID is ignored. | | | +| stop_url | URL | Optional | The **stop_url** field contains the URL of a web page about a particular stop. This should be different from the agency_url and the route_url fields. | | | +| location_type | Enum | Optional | The **location_type** field identifies whether this stop ID represents a stop, station, or station entrance. If no location type is specified, or the location_type is blank, stop IDs are treated as stops. Stations may have different properties from stops when they are represented on a map or used in trip planning. The location type field can have the following values: | | | | | | | * **0** or blank - Stop. A location where passengers board or disembark from a transit vehicle. | | | | | | | * **1** - Station. A physical structure or area that contains one or more stop. | | | | | | | * **2** - Station Entrance/Exit. A location where passengers can enter or exit a station from the street. The stop entry must also specify a parent_station value referencing the stop ID of the parent station for the entrance. | | | -| parent_station | Optional | enum | For stops that are physically located inside stations, the **parent_station** field identifies the station associated with the stop. To use this field, stops.txt must also contain a row where this stop ID is assigned location type=1. | | | +| parent_station | Enum | Optional | For stops that are physically located inside stations, the **parent_station** field identifies the station associated with the stop. To use this field, stops.txt must also contain a row where this stop ID is assigned location type=1. | | | | | | | **This stop ID represents...** | **This entry's location type...** | **This entry's parent_station field contains...** | | | | | A stop located inside a station. | 0 or blank | The stop ID of the station where this stop is located. The stop referenced by parent_station must have location_type=1. | | | | | A stop located outside a station. | 0 or blank | A blank value. The parent_station field doesn't apply to this stop. | | | | | A station. | 1 | A blank value. Stations can't contain other stations. | -| stop_timezone | Optional | timezone | The **stop_timezone** field contains the timezone in which this stop, station, or station entrance is located. If omitted, the stop should be assumed to be located in the timezone specified by **agency_timezone** in [agency.txt](#agencytxt). When a stop has a parent station, the stop is considered to be in the timezone specified by the parent station's **stop_timezone** value. If the parent has no stop_timezone value, the stops that belong to that station are assumed to be in the timezone specified by **agency_timezone**, even if the stops have their own **stop_timezone** values. In other words, if a given stop has a **parent_station** value, any **stop_timezone** value specified for that stop must be ignored. Even if **stop_timezone** values are provided in stops.txt, the times in [stop_times.txt](#stop_timestxt) should continue to be specified as time since midnight in the timezone specified by **agency_timezone** in agency.txt. 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 | Optional | Enum | The **wheelchair_boarding field** identifies whether wheelchair boardings are possible from the specified stop, station, or station entrance. The field can have the following values: | | | +| stop_timezone | Timezone | Optional | The **stop_timezone** field contains the timezone in which this stop, station, or station entrance is located. If omitted, the stop should be assumed to be located in the timezone specified by **agency_timezone** in [agency.txt](#agencytxt). When a stop has a parent station, the stop is considered to be in the timezone specified by the parent station's **stop_timezone** value. If the parent has no stop_timezone value, the stops that belong to that station are assumed to be in the timezone specified by **agency_timezone**, even if the stops have their own **stop_timezone** values. In other words, if a given stop has a **parent_station** value, any **stop_timezone** value specified for that stop must be ignored. Even if **stop_timezone** values are provided in stops.txt, the times in [stop_times.txt](#stop_timestxt) should continue to be specified as time since midnight in the timezone specified by **agency_timezone** in agency.txt. 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 | The **wheelchair_boarding field** identifies whether wheelchair boardings are possible from the specified stop, station, or station entrance. The field can have the following values: | | | | | | | * **0** (or empty) - indicates that there is no accessibility information for the stop | | | | | | | * **1** - indicates that at least some vehicles at this stop can be boarded by a rider in a wheelchair | | | | | | | * **2** - wheelchair boarding is not possible at this stop | | | From d631678cebfa2bb984ee64ceb517f2d300e33c78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Frachet?= Date: Thu, 13 Sep 2018 15:06:39 -0400 Subject: [PATCH 17/30] Reduce the number of column in stops --- gtfs/spec/en/reference.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md index c654a8031..f1bffa021 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -97,11 +97,11 @@ The following example demonstrates how a field value would appear in a comma-del File: **Required** | Field Name | Type | Required | Details | -| ------ | ------ | +| ------ | ------ | ------ | ------ | | agency_id | ID | Optional | The **agency_id** field contains an ID that uniquely identifies a transit agency. A transit feed may represent data from more than one agency. This field is optional for transit feeds that only contain data for a single agency. | | agency_name | Text | **Required** | The **agency_name** field contains the full name of the transit agency. Google Maps will display this name. | | agency_url | URL | **Required** | The **agency_url** field contains the URL of the transit agency. | | -| agency_timezone | timezone | **Required** The **agency_timezone** field contains the timezone where the transit agency is located. If multiple agencies are specified in the feed, each must have the same agency_timezone. | +| agency_timezone | Timezone | **Required** The **agency_timezone** field contains the timezone where the transit agency is located. If multiple agencies are specified in the feed, each must have the same agency_timezone. | | agency_lang | Language code | Optional | The **agency_lang field** contains the code of the primary language used by this transit agency. This setting defines capitalization rules and other language-specific settings for all text contained in this transit agency's feed. | | agency_phone | Phone number | Optional | The **agency_phone field** contains a single voice telephone number for the specified agency. This field is a string value that presents the telephone number as typical for the agency's service area. It can and should contain punctuation marks to group the digits of the number. Dialable text (for example, TriMet's "503-238-RIDE") is permitted, but the field must not contain any other descriptive text. | | agency_fare_url | URL | Optional | The **agency_fare_url** specifies the URL of a web page that allows a rider to purchase tickets or other fare instruments for that agency online. | @@ -126,10 +126,9 @@ File: **Required** | | | | * **1** - Station. A physical structure or area that contains one or more stop. | | | | | | | * **2** - Station Entrance/Exit. A location where passengers can enter or exit a station from the street. The stop entry must also specify a parent_station value referencing the stop ID of the parent station for the entrance. | | | | parent_station | Enum | Optional | For stops that are physically located inside stations, the **parent_station** field identifies the station associated with the stop. To use this field, stops.txt must also contain a row where this stop ID is assigned location type=1. | | | -| | | | **This stop ID represents...** | **This entry's location type...** | **This entry's parent_station field contains...** | -| | | | A stop located inside a station. | 0 or blank | The stop ID of the station where this stop is located. The stop referenced by parent_station must have location_type=1. | -| | | | A stop located outside a station. | 0 or blank | A blank value. The parent_station field doesn't apply to this stop. | -| | | | A station. | 1 | A blank value. Stations can't contain other stations. | +| | | | If this stop ID represents **a stop located inside a station**, this entry's location type must be **0 or blank**, and this entry's parent_station field contains **the stop ID of the station where this stop is located. The stop referenced by parent_station must have location_type=1.** | +| | | | If this stop ID represents **a stop located outside a station**, this entry's location type must be **0 or blank**, and this entry's parent_station field contains **a blank value. the parent_station field doesn't apply to this stop.** | +| | | | If this stop ID represents **a station**, this entry's location type must be **1**, and this entry's parent_station field contains **a blank value, stations can't contain other stations.** | | stop_timezone | Timezone | Optional | The **stop_timezone** field contains the timezone in which this stop, station, or station entrance is located. If omitted, the stop should be assumed to be located in the timezone specified by **agency_timezone** in [agency.txt](#agencytxt). When a stop has a parent station, the stop is considered to be in the timezone specified by the parent station's **stop_timezone** value. If the parent has no stop_timezone value, the stops that belong to that station are assumed to be in the timezone specified by **agency_timezone**, even if the stops have their own **stop_timezone** values. In other words, if a given stop has a **parent_station** value, any **stop_timezone** value specified for that stop must be ignored. Even if **stop_timezone** values are provided in stops.txt, the times in [stop_times.txt](#stop_timestxt) should continue to be specified as time since midnight in the timezone specified by **agency_timezone** in agency.txt. 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 | The **wheelchair_boarding field** identifies whether wheelchair boardings are possible from the specified stop, station, or station entrance. The field can have the following values: | | | | | | | * **0** (or empty) - indicates that there is no accessibility information for the stop | | | From 3cf1eb655129ac51dd841eafd0e76ff3492546b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Frachet?= Date: Thu, 13 Sep 2018 15:08:12 -0400 Subject: [PATCH 18/30] Remove the two extra column in stops --- gtfs/spec/en/reference.md | 62 +++++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md index f1bffa021..cbe426796 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -111,37 +111,37 @@ File: **Required** File: **Required** -| Field Name | Type | Required | Details | | | -| ------ | ------ | ------ | ------ | ------ | ------ | -| stop_id | ID | **Required** | The **stop_id** field contains an ID that uniquely identifies a stop, station, or station entrance. Multiple routes may use the same stop. | | | -| stop_code | Text | Optional | The **stop_code** field contains short text or a number that uniquely identifies the stop for passengers. Stop codes are often used in phone-based transit information systems or printed on stop signage to make it easier for riders to get a stop schedule or real-time arrival information for a particular stop. The **stop_code** field contains short text or a number that uniquely identifies the stop for passengers. The **stop_code** can be the same as **stop_id** if it is passenger-facing. This field should be left blank for stops without a code presented to passengers. | | | -| stop_name | Text | **Required** | The **stop_name** field contains the name of a stop, station, or station entrance. Please use a name that people will understand in the local and tourist vernacular. | | | -| stop_desc | Text | Optional | The **stop_desc** field contains a description of a stop. Please provide useful, quality information. Do not simply duplicate the name of the stop. | | | -| stop_lat | Latitude | **Required** | The **stop_lat** field contains the latitude of a stop, station, or station entrance. | | | -| stop_lon | Longitude | **Required** | The **stop_lon** field contains the longitude of a stop, station, or station entrance. | | | -| zone_id | ID | Optional | The **zone_id** field defines the fare zone for a stop ID. Zone IDs are required if you want to provide fare information using [fare_rules.txt](#fare_rulestxt). If this stop ID represents a station, the zone ID is ignored. | | | -| stop_url | URL | Optional | The **stop_url** field contains the URL of a web page about a particular stop. This should be different from the agency_url and the route_url fields. | | | -| location_type | Enum | Optional | The **location_type** field identifies whether this stop ID represents a stop, station, or station entrance. If no location type is specified, or the location_type is blank, stop IDs are treated as stops. Stations may have different properties from stops when they are represented on a map or used in trip planning. The location type field can have the following values: | | | -| | | | * **0** or blank - Stop. A location where passengers board or disembark from a transit vehicle. | | | -| | | | * **1** - Station. A physical structure or area that contains one or more stop. | | | -| | | | * **2** - Station Entrance/Exit. A location where passengers can enter or exit a station from the street. The stop entry must also specify a parent_station value referencing the stop ID of the parent station for the entrance. | | | -| parent_station | Enum | Optional | For stops that are physically located inside stations, the **parent_station** field identifies the station associated with the stop. To use this field, stops.txt must also contain a row where this stop ID is assigned location type=1. | | | -| | | | If this stop ID represents **a stop located inside a station**, this entry's location type must be **0 or blank**, and this entry's parent_station field contains **the stop ID of the station where this stop is located. The stop referenced by parent_station must have location_type=1.** | -| | | | If this stop ID represents **a stop located outside a station**, this entry's location type must be **0 or blank**, and this entry's parent_station field contains **a blank value. the parent_station field doesn't apply to this stop.** | -| | | | If this stop ID represents **a station**, this entry's location type must be **1**, and this entry's parent_station field contains **a blank value, stations can't contain other stations.** | -| stop_timezone | Timezone | Optional | The **stop_timezone** field contains the timezone in which this stop, station, or station entrance is located. If omitted, the stop should be assumed to be located in the timezone specified by **agency_timezone** in [agency.txt](#agencytxt). When a stop has a parent station, the stop is considered to be in the timezone specified by the parent station's **stop_timezone** value. If the parent has no stop_timezone value, the stops that belong to that station are assumed to be in the timezone specified by **agency_timezone**, even if the stops have their own **stop_timezone** values. In other words, if a given stop has a **parent_station** value, any **stop_timezone** value specified for that stop must be ignored. Even if **stop_timezone** values are provided in stops.txt, the times in [stop_times.txt](#stop_timestxt) should continue to be specified as time since midnight in the timezone specified by **agency_timezone** in agency.txt. 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 | The **wheelchair_boarding field** identifies whether wheelchair boardings are possible from the specified stop, station, or station entrance. The field can have the following values: | | | -| | | | * **0** (or empty) - indicates that there is no accessibility information for the stop | | | -| | | | * **1** - indicates that at least some vehicles at this stop can be boarded by a rider in a wheelchair | | | -| | | | * **2** - wheelchair boarding is not possible at this stop | | | -| | | | When a stop is part of a larger station complex, as indicated by a stop with a **parent_station** value, the stop's **wheelchair_boarding** field has the following additional semantics: | | | -| | | | * **0** (or empty) - the stop will inherit its **wheelchair_boarding** value 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, the **wheelchair_boarding** field has the following additional semantics: | | | -| | | | * **0** (or empty) - the station entrance will inherit its **wheelchair_boarding** value from the parent station, if specified in the parent | | | -| | | | * **1** - the station entrance is wheelchair accessible (e.g. an elevator is available to platforms if they are not at-grade) | | | -| | | | * **2** - there exists no accessible path from the entrance to station platforms | | | +| Field Name | Type | Required | Details | +| ------ | ------ | ------ | ------ | +| stop_id | ID | **Required** | The **stop_id** field contains an ID that uniquely identifies a stop, station, or station entrance. Multiple routes may use the same stop. | +| stop_code | Text | Optional | The **stop_code** field contains short text or a number that uniquely identifies the stop for passengers. Stop codes are often used in phone-based transit information systems or printed on stop signage to make it easier for riders to get a stop schedule or real-time arrival information for a particular stop. The **stop_code** field contains short text or a number that uniquely identifies the stop for passengers. The **stop_code** can be the same as **stop_id** if it is passenger-facing. This field should be left blank for stops without a code presented to passengers. | +| stop_name | Text | **Required** | The **stop_name** field contains the name of a stop, station, or station entrance. Please use a name that people will understand in the local and tourist vernacular. | +| stop_desc | Text | Optional | The **stop_desc** field contains a description of a stop. Please provide useful, quality information. Do not simply duplicate the name of the stop. | +| stop_lat | Latitude | **Required** | The **stop_lat** field contains the latitude of a stop, station, or station entrance. | +| stop_lon | Longitude | **Required** | The **stop_lon** field contains the longitude of a stop, station, or station entrance. | +| zone_id | ID | Optional | The **zone_id** field defines the fare zone for a stop ID. Zone IDs are required if you want to provide fare information using [fare_rules.txt](#fare_rulestxt). If this stop ID represents a station, the zone ID is ignored. | +| stop_url | URL | Optional | The **stop_url** field contains the URL of a web page about a particular stop. This should be different from the agency_url and the route_url fields. | +| location_type | Enum | Optional | The **location_type** field identifies whether this stop ID represents a stop, station, or station entrance. If no location type is specified, or the location_type is blank, stop IDs are treated as stops. Stations may have different properties from stops when they are represented on a map or used in trip planning. The location type field can have the following values: | +| | | | * **0** or blank - Stop. A location where passengers board or disembark from a transit vehicle. | +| | | | * **1** - Station. A physical structure or area that contains one or more stop. | +| | | | * **2** - Station Entrance/Exit. A location where passengers can enter or exit a station from the street. The stop entry must also specify a parent_station value referencing the stop ID of the parent station for the entrance. | +| parent_station | Enum | Optional | For stops that are physically located inside stations, the **parent_station** field identifies the station associated with the stop. To use this field, stops.txt must also contain a row where this stop ID is assigned location type=1. | +| | | | * If this stop ID represents **a stop located inside a station**, this entry's location type must be **0 or blank**, and this entry's parent_station field contains **the stop ID of the station where this stop is located. The stop referenced by parent_station must have location_type=1.** | +| | | | * If this stop ID represents **a stop located outside a station**, this entry's location type must be **0 or blank**, and this entry's parent_station field contains **a blank value. the parent_station field doesn't apply to this stop.** | +| | | | * If this stop ID represents **a station**, this entry's location type must be **1**, and this entry's parent_station field contains **a blank value, stations can't contain other stations.** | +| stop_timezone | Timezone | Optional | The **stop_timezone** field contains the timezone in which this stop, station, or station entrance is located. If omitted, the stop should be assumed to be located in the timezone specified by **agency_timezone** in [agency.txt](#agencytxt). When a stop has a parent station, the stop is considered to be in the timezone specified by the parent station's **stop_timezone** value. If the parent has no stop_timezone value, the stops that belong to that station are assumed to be in the timezone specified by **agency_timezone**, even if the stops have their own **stop_timezone** values. In other words, if a given stop has a **parent_station** value, any **stop_timezone** value specified for that stop must be ignored. Even if **stop_timezone** values are provided in stops.txt, the times in [stop_times.txt](#stop_timestxt) should continue to be specified as time since midnight in the timezone specified by **agency_timezone** in agency.txt. 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 | The **wheelchair_boarding field** identifies whether wheelchair boardings are possible from the specified stop, station, or station entrance. The field can have the following values: | +| | | | * **0** (or empty) - indicates that there is no accessibility information for the stop | +| | | | * **1** - indicates that at least some vehicles at this stop can be boarded by a rider in a wheelchair | +| | | | * **2** - wheelchair boarding is not possible at this stop | +| | | | When a stop is part of a larger station complex, as indicated by a stop with a **parent_station** value, the stop's **wheelchair_boarding** field has the following additional semantics: | +| | | | * **0** (or empty) - the stop will inherit its **wheelchair_boarding** value 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, the **wheelchair_boarding** field has the following additional semantics: | +| | | | * **0** (or empty) - the station entrance will inherit its **wheelchair_boarding** value from the parent station, if specified in the parent | +| | | | * **1** - the station entrance is wheelchair accessible (e.g. an elevator is available to platforms if they are not at-grade) | +| | | | * **2** - there exists no accessible path from the entrance to station platforms | ### routes.txt From ad78556efc26b476aded3e70ac1540d630eef7ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Frachet?= Date: Thu, 13 Sep 2018 15:08:48 -0400 Subject: [PATCH 19/30] Replace starts by dots --- 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 cbe426796..d7347e711 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -126,9 +126,9 @@ File: **Required** | | | | * **1** - Station. A physical structure or area that contains one or more stop. | | | | | * **2** - Station Entrance/Exit. A location where passengers can enter or exit a station from the street. The stop entry must also specify a parent_station value referencing the stop ID of the parent station for the entrance. | | parent_station | Enum | Optional | For stops that are physically located inside stations, the **parent_station** field identifies the station associated with the stop. To use this field, stops.txt must also contain a row where this stop ID is assigned location type=1. | -| | | | * If this stop ID represents **a stop located inside a station**, this entry's location type must be **0 or blank**, and this entry's parent_station field contains **the stop ID of the station where this stop is located. The stop referenced by parent_station must have location_type=1.** | -| | | | * If this stop ID represents **a stop located outside a station**, this entry's location type must be **0 or blank**, and this entry's parent_station field contains **a blank value. the parent_station field doesn't apply to this stop.** | -| | | | * If this stop ID represents **a station**, this entry's location type must be **1**, and this entry's parent_station field contains **a blank value, stations can't contain other stations.** | +| | | | • If this stop ID represents **a stop located inside a station**, this entry's location type must be **0 or blank**, and this entry's parent_station field contains **the stop ID of the station where this stop is located. The stop referenced by parent_station must have location_type=1.** | +| | | | • If this stop ID represents **a stop located outside a station**, this entry's location type must be **0 or blank**, and this entry's parent_station field contains **a blank value. the parent_station field doesn't apply to this stop.** | +| | | | • If this stop ID represents **a station**, this entry's location type must be **1**, and this entry's parent_station field contains **a blank value, stations can't contain other stations.** | | stop_timezone | Timezone | Optional | The **stop_timezone** field contains the timezone in which this stop, station, or station entrance is located. If omitted, the stop should be assumed to be located in the timezone specified by **agency_timezone** in [agency.txt](#agencytxt). When a stop has a parent station, the stop is considered to be in the timezone specified by the parent station's **stop_timezone** value. If the parent has no stop_timezone value, the stops that belong to that station are assumed to be in the timezone specified by **agency_timezone**, even if the stops have their own **stop_timezone** values. In other words, if a given stop has a **parent_station** value, any **stop_timezone** value specified for that stop must be ignored. Even if **stop_timezone** values are provided in stops.txt, the times in [stop_times.txt](#stop_timestxt) should continue to be specified as time since midnight in the timezone specified by **agency_timezone** in agency.txt. 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 | The **wheelchair_boarding field** identifies whether wheelchair boardings are possible from the specified stop, station, or station entrance. The field can have the following values: | | | | | * **0** (or empty) - indicates that there is no accessibility information for the stop | From 7223cae4d701796727ebb227733d685d5953fa71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Frachet?= Date: Thu, 13 Sep 2018 15:11:48 -0400 Subject: [PATCH 20/30] Update type formatting for stops --- gtfs/spec/en/reference.md | 42 +++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md index d7347e711..b299e5e10 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -126,9 +126,9 @@ File: **Required** | | | | * **1** - Station. A physical structure or area that contains one or more stop. | | | | | * **2** - Station Entrance/Exit. A location where passengers can enter or exit a station from the street. The stop entry must also specify a parent_station value referencing the stop ID of the parent station for the entrance. | | parent_station | Enum | Optional | For stops that are physically located inside stations, the **parent_station** field identifies the station associated with the stop. To use this field, stops.txt must also contain a row where this stop ID is assigned location type=1. | -| | | | • If this stop ID represents **a stop located inside a station**, this entry's location type must be **0 or blank**, and this entry's parent_station field contains **the stop ID of the station where this stop is located. The stop referenced by parent_station must have location_type=1.** | -| | | | • If this stop ID represents **a stop located outside a station**, this entry's location type must be **0 or blank**, and this entry's parent_station field contains **a blank value. the parent_station field doesn't apply to this stop.** | -| | | | • If this stop ID represents **a station**, this entry's location type must be **1**, and this entry's parent_station field contains **a blank value, stations can't contain other stations.** | +| | | | • If this stop ID represents **a stop located inside a station**, this entry's location type must be **0 or blank**, and this entry's parent_station field contains **the stop ID of the station where this stop is located and the stop referenced by parent_station must have location_type=1.** | +| | | | • If this stop ID represents **a stop located outside a station**, this entry's location type must be **0 or blank**, and this entry's parent_station field contains **a blank value (the parent_station field doesn't apply to this stop).** | +| | | | • If this stop ID represents **a station**, this entry's location type must be **1**, and this entry's parent_station field contains **a blank value (stations can't contain other stations).** | | stop_timezone | Timezone | Optional | The **stop_timezone** field contains the timezone in which this stop, station, or station entrance is located. If omitted, the stop should be assumed to be located in the timezone specified by **agency_timezone** in [agency.txt](#agencytxt). When a stop has a parent station, the stop is considered to be in the timezone specified by the parent station's **stop_timezone** value. If the parent has no stop_timezone value, the stops that belong to that station are assumed to be in the timezone specified by **agency_timezone**, even if the stops have their own **stop_timezone** values. In other words, if a given stop has a **parent_station** value, any **stop_timezone** value specified for that stop must be ignored. Even if **stop_timezone** values are provided in stops.txt, the times in [stop_times.txt](#stop_timestxt) should continue to be specified as time since midnight in the timezone specified by **agency_timezone** in agency.txt. 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 | The **wheelchair_boarding field** identifies whether wheelchair boardings are possible from the specified stop, station, or station entrance. The field can have the following values: | | | | | * **0** (or empty) - indicates that there is no accessibility information for the stop | @@ -147,26 +147,26 @@ File: **Required** File: **Required** -| Field Name | Required & Type | Details | +| Field Name | Type | Required | Details | | ------ | ------ | ------ | -| route_id | **Required ID** | The **route_id** field contains an ID that uniquely identifies a route. | +| route_id | ID | **Required** | The **route_id** field contains an ID that uniquely identifies a route. | | agency_id | Optional ID | The **agency_id** field defines an agency for the specified route. This value is referenced from the [agency.txt](#agencytxt) file. Use this field when you are providing data for routes from more than one agency. | -| route_short_name | **Required text** | The **route_short_name** contains the short name of a route. This will often be a short, abstract identifier like "32", "100X", or "Green" that riders use to identify a route, but which doesn't give any indication of what places the route serves. At least one of *route_short_name* or *route_long_name* must be specified, or potentially both if appropriate. If the route does not have a short name, please specify a *route_long_name* and use an empty string as the value for this field. | -| route_long_name | **Required text** | The **route_long_name** contains the full name of a route. This name is generally more descriptive than the *route_short_name* and will often include the route's destination or stop. At least one of *route_short_name* or *route_long_name* must be specified, or potentially both if appropriate. If the route does not have a long name, please specify a *route_short_nam*e and use an empty string as the value for this field. | -| route_desc | Optional text | The **route_desc** field contains a description of a route. Please provide useful, quality information. Do not simply duplicate the name of the route. For 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 | **Required enum** | The **route_type** field describes the type of transportation used on a route. Valid values for this field 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 car. Used for street-level cable cars where the cable runs beneath the car. | -| | | * **6** - Gondola, Suspended cable car. Typically used for aerial cable cars where the car is suspended from the cable. | -| | | * **7** - Funicular. Any rail system designed for steep inclines. | -| route_url | Optional URL | The **route_url** field contains the URL of a web page about that particular route. This should be different from the agency_url. | -| route_color | Optional color | In systems that have colors assigned to routes, the **route_color** field defines a color that corresponds to a route. If no color is specified, the default route color is white (FFFFFF). The color difference between **route_color** and **route_text_color** should provide sufficient contrast when viewed on a black and white screen. The [W3C Techniques for Accessibility Evaluation And Repair Tools document](https://www.w3.org/TR/AERT#color-contrast) offers a useful algorithm for evaluating color contrast. There are also helpful online tools for choosing contrasting colors, including the [snook.ca Color Contrast Check application](http://snook.ca/technical/colour_contrast/colour.html#fg=33FF33,bg=333333). | -| route_text_color | Optional color | The route_text_color field can be used to specify a legible color to use for text drawn against a background of route_color. If no color is specified, the default text color is black (000000). 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 | Optional non-negative integer | The **route_sort_order** field can be used to order the routes in a way which is ideal for presentation to customers. It must be a non-negative integer. Routes with smaller **route_sort_order** values should be displayed before routes with larger **route_sort_order** values. | +| route_short_name | Text | **Required** | The **route_short_name** contains the short name of a route. This will often be a short, abstract identifier like "32", "100X", or "Green" that riders use to identify a route, but which doesn't give any indication of what places the route serves. At least one of *route_short_name* or *route_long_name* must be specified, or potentially both if appropriate. If the route does not have a short name, please specify a *route_long_name* and use an empty string as the value for this field. | +| route_long_name | Text | **Required* | The **route_long_name** contains the full name of a route. This name is generally more descriptive than the *route_short_name* and will often include the route's destination or stop. At least one of *route_short_name* or *route_long_name* must be specified, or potentially both if appropriate. If the route does not have a long name, please specify a *route_short_nam*e and use an empty string as the value for this field. | +| route_desc | Text | Optional | The **route_desc** field contains a description of a route. Please provide useful, quality information. Do not simply duplicate the name of the route. For 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** | The **route_type** field describes the type of transportation used on a route. Valid values for this field 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 car. Used for street-level cable cars where the cable runs beneath the car. | +| | | | * **6** - Gondola, Suspended cable car. Typically used for aerial cable cars where the car is suspended from the cable. | +| | | | * **7** - Funicular. Any rail system designed for steep inclines. | +| route_url | URL | Optional | The **route_url** field contains the URL of a web page about that particular route. This should be different from the agency_url. | +| route_color | Color | Optional | In systems that have colors assigned to routes, the **route_color** field defines a color that corresponds to a route. If no color is specified, the default route color is white (FFFFFF). The color difference between **route_color** and **route_text_color** should provide sufficient contrast when viewed on a black and white screen. The [W3C Techniques for Accessibility Evaluation And Repair Tools document](https://www.w3.org/TR/AERT#color-contrast) offers a useful algorithm for evaluating color contrast. There are also helpful online tools for choosing contrasting colors, including the [snook.ca Color Contrast Check application](http://snook.ca/technical/colour_contrast/colour.html#fg=33FF33,bg=333333). | +| route_text_color | Color | Optional | The route_text_color field can be used to specify a legible color to use for text drawn against a background of route_color. If no color is specified, the default text color is black (000000). 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 | The **route_sort_order** field can be used to order the routes in a way which is ideal for presentation to customers. It must be a non-negative integer. Routes with smaller **route_sort_order** values should be displayed before routes with larger **route_sort_order** values. | ### trips.txt From 8c309d70cf6f88e2658b13553e701790f90815ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Frachet?= Date: Thu, 13 Sep 2018 15:13:04 -0400 Subject: [PATCH 21/30] Add type column for trips --- gtfs/spec/en/reference.md | 42 +++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md index b299e5e10..837f6ce82 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -148,7 +148,7 @@ File: **Required** File: **Required** | Field Name | Type | Required | Details | -| ------ | ------ | ------ | +| ------ | ------ | ------ | ------ | | route_id | ID | **Required** | The **route_id** field contains an ID that uniquely identifies a route. | | agency_id | Optional ID | The **agency_id** field defines an agency for the specified route. This value is referenced from the [agency.txt](#agencytxt) file. Use this field when you are providing data for routes from more than one agency. | | route_short_name | Text | **Required** | The **route_short_name** contains the short name of a route. This will often be a short, abstract identifier like "32", "100X", or "Green" that riders use to identify a route, but which doesn't give any indication of what places the route serves. At least one of *route_short_name* or *route_long_name* must be specified, or potentially both if appropriate. If the route does not have a short name, please specify a *route_long_name* and use an empty string as the value for this field. | @@ -172,28 +172,28 @@ File: **Required** File: **Required** -| Field Name | Required & Type | Details | -| ------ | ------ | ------ | -| route_id | **Required ID** | The **route_id** field contains an ID that uniquely identifies a route. This value is referenced from the [routes.txt](#routestxt) file. | -| service_id | **Required ID** | The **service_id** contains an ID that uniquely identifies a set of dates when service is available for one or more routes. This value is referenced from the [calendar.txt](#calendartxt) or [calendar_dates.txt](#calendar_datestxt) file. | -| trip_id | **Require ID** | The **trip_id** field contains an ID that uniquely identifies a trip. | -| trip_headsign | Optional text | The **trip_headsign** field contains the text that appears on a sign that identifies the trip's destination to passengers. Use this field to distinguish between different patterns of service in the same route. If the headsign changes during a trip, you can override the **trip_headsign** by specifying values for the **stop_headsign** field in [stop_times.txt](#stop_timestxt). | -| trip_short_name | Optional text | The **trip_short_name** field contains the text that appears in schedules and sign boards to identify the trip to passengers, for example, to identify train numbers for commuter rail trips. If riders do not commonly rely on trip names, please leave this field blank. 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 | Optional enum | The **direction_id** field contains a binary value that indicates the direction of travel for a trip. Use this field to distinguish between bi-directional trips with the same **route_id**. This field is not used in routing; it provides a way to separate trips by direction when publishing time tables. You can specify names for each direction with the **trip_headsign** field. | -| | | * 0 - travel in one direction (e.g. outbound travel) | -| | | * 1 - travel in the opposite direction (e.g. inbound travel) | -| | | For example, you could use the *trip_headsign* and *direction_id* fields together to assign a name to travel in each direction for a set of trips. A [trips.txt](#tripstxt) file could contain these rows for use in time tables: | -| | | * `trip_id,...,trip_headsign,direction_id` | -| | | * `1234,...,Airport,0` | -| | | * `1505,...,Downtown,1` | -| block_id | Optional ID | The **block_id** field 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 day and block_id. A block_id can have trips with different service days, making distinct blocks. (See [example below](#example-showing-blocks-and-service-day)) | -| shape_id | Optional ID | The **shape_id** field contains an ID that defines a shape for the trip. This value is referenced from the [shapes.txt](#shapestxt) file. The shapes.txt file allows you to define how a line should be drawn on the map to represent a trip. | -| wheelchair_accessible | Optional enum | * **0** (or empty) - indicates that there is no accessibility information for the trip | +| Field Name | Type | Required | Details | +| ------ | ------ | ------ | ------ | +| route_id | ID | **Required** | The **route_id** field contains an ID that uniquely identifies a route. This value is referenced from the [routes.txt](#routestxt) file. | +| service_id | ID | **Required** | The **service_id** contains an ID that uniquely identifies a set of dates when service is available for one or more routes. This value is referenced from the [calendar.txt](#calendartxt) or [calendar_dates.txt](#calendar_datestxt) file. | +| trip_id | ID | **Required** | The **trip_id** field contains an ID that uniquely identifies a trip. | +| trip_headsign | Text | Optional | The **trip_headsign** field contains the text that appears on a sign that identifies the trip's destination to passengers. Use this field to distinguish between different patterns of service in the same route. If the headsign changes during a trip, you can override the **trip_headsign** by specifying values for the **stop_headsign** field in [stop_times.txt](#stop_timestxt). | +| trip_short_name | Text | Optional | The **trip_short_name** field contains the text that appears in schedules and sign boards to identify the trip to passengers, for example, to identify train numbers for commuter rail trips. If riders do not commonly rely on trip names, please leave this field blank. 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 | The **direction_id** field contains a binary value that indicates the direction of travel for a trip. Use this field to distinguish between bi-directional trips with the same **route_id**. This field is not used in routing; it provides a way to separate trips by direction when publishing time tables. You can specify names for each direction with the **trip_headsign** field. | +| | | | * 0 - travel in one direction (e.g. outbound travel) | +| | | | * 1 - travel in the opposite direction (e.g. inbound travel) | +| | | | For example, you could use the *trip_headsign* and *direction_id* fields together to assign a name to travel in each direction for a set of trips. A [trips.txt](#tripstxt) file could contain these rows for use in time tables: | +| | | | * `trip_id,...,trip_headsign,direction_id` | +| | | | * `1234,...,Airport,0` | +| | | | * `1505,...,Downtown,1` | +| block_id | ID | Optional | The **block_id** field 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 day and block_id. A block_id can have trips with different service days, making distinct blocks. (See [example below](#example-showing-blocks-and-service-day)) | +| shape_id | ID | Optional | The **shape_id** field contains an ID that defines a shape for the trip. This value is referenced from the [shapes.txt](#shapestxt) file. The shapes.txt file allows you to define how a line should be drawn on the map to represent a trip. | +| wheelchair_accessible | Enum | Optional | * **0** (or empty) - indicates that there is no accessibility information for the trip | | | | * **1** - indicates that the vehicle being used on this particular trip can accommodate at least one rider in a wheelchair | -| | | * **2** - indicates that no riders in wheelchairs can be accommodated on this trip | +| | | | * **2** - indicates that no riders in wheelchairs can be accommodated on this trip | | bikes_allowed | Optional | 0 (or empty) - indicates that there is no bike information for the trip | -| | | * **1** - indicates that the vehicle being used on this particular trip can accommodate at least one bicycle | -| | | * **2** - indicates that no bicycles are allowed on this trip | +| | | | * **1** - indicates that the vehicle being used on this particular trip can accommodate at least one bicycle | +| | | | * **2** - indicates that no bicycles are allowed on this trip | #### Example showing blocks and service day From 318ad850734a2740b9ef8052142ac14eaca7a239 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Frachet?= Date: Thu, 13 Sep 2018 15:26:57 -0400 Subject: [PATCH 22/30] Update stop times and fix issues --- gtfs/spec/en/reference.md | 86 +++++++++++++++++++-------------------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md index 837f6ce82..fdc16e99f 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -46,8 +46,8 @@ This section defines terms that are used throughout this document. - **Non-negative Float** - The field contains a non-negative floating point number (which includes 0). - **Non-negative Integer** - The field contains a non-negative whole number (which includes 0). - **Phone number** - The field contains a phone number. -- **Service Date** - The field contains the service date in the YYYYMMDD format. Since service time within a service date can be above 24:00:00, a service date often contains information for the subsequent day(s). E.g "20180913" for September 13th, 2018. -- **Service Time** - The field contains the service time in the HH:MM:SS format (H:MM:SS is also accepted). The time is measured from "noon minus 12h" of the service day (effectively midnight except for days on which daylight savings time changes occur). For times occurring after midnight, enter the time as a value greater than 24:00:00 in HH:MM:SS local time for the day on which the trip schedule begins. For example: "14:30:00" for 2:30PM or "25:35:00" for 1:35AM on the next date. +- **Date** - The field contains the service day in the YYYYMMDD format. E.g "20180913" for September 13th, 2018. Since time within a service day can be above 24:00:00, a service day often contains information for the subsequent day(s). +- **Time** - The field contains the time in the HH:MM:SS format (H:MM:SS is also accepted). For example: "14:30:00" for 2:30PM or "25:35:00" for 1:35AM on the next day. The time is measured from "noon minus 12h" of the service day (effectively midnight except for days on which daylight savings time changes occur). For times occurring after midnight, enter the time as a value greater than 24:00:00 in HH:MM:SS local time for the day on which the trip schedule begins. - **Text** - The field contains a string of UTF-8 characters, which is aimed to be displayed to the rider and which must therefore be human readable. - **Timezone** - The field contains a TZ timezone from the [TZ database](https://www.iana.org/time-zones). Timezone names never contain the space character but may contain an underscore. Refer to http://en.wikipedia.org/wiki/List_of_tz_zones for a list of valid values. For example: "Asia/Tokyo", "America/Los_Angeles" or "Africa/Cairo". - **URL** - The field contains a fully qualified URL that includes http:// or https://, and any special characters in the URL must be correctly escaped. See http://www.w3.org/Addressing/URL/4_URI_Recommentations.html for a description of how to create fully qualified URL values. @@ -101,7 +101,7 @@ File: **Required** | agency_id | ID | Optional | The **agency_id** field contains an ID that uniquely identifies a transit agency. A transit feed may represent data from more than one agency. This field is optional for transit feeds that only contain data for a single agency. | | agency_name | Text | **Required** | The **agency_name** field contains the full name of the transit agency. Google Maps will display this name. | | agency_url | URL | **Required** | The **agency_url** field contains the URL of the transit agency. | | -| agency_timezone | Timezone | **Required** The **agency_timezone** field contains the timezone where the transit agency is located. If multiple agencies are specified in the feed, each must have the same agency_timezone. | +| agency_timezone | Timezone | **Required** | The **agency_timezone** field contains the timezone where the transit agency is located. If multiple agencies are specified in the feed, each must have the same agency_timezone. | | agency_lang | Language code | Optional | The **agency_lang field** contains the code of the primary language used by this transit agency. This setting defines capitalization rules and other language-specific settings for all text contained in this transit agency's feed. | | agency_phone | Phone number | Optional | The **agency_phone field** contains a single voice telephone number for the specified agency. This field is a string value that presents the telephone number as typical for the agency's service area. It can and should contain punctuation marks to group the digits of the number. Dialable text (for example, TriMet's "503-238-RIDE") is permitted, but the field must not contain any other descriptive text. | | agency_fare_url | URL | Optional | The **agency_fare_url** specifies the URL of a web page that allows a rider to purchase tickets or other fare instruments for that agency online. | @@ -150,7 +150,7 @@ File: **Required** | Field Name | Type | Required | Details | | ------ | ------ | ------ | ------ | | route_id | ID | **Required** | The **route_id** field contains an ID that uniquely identifies a route. | -| agency_id | Optional ID | The **agency_id** field defines an agency for the specified route. This value is referenced from the [agency.txt](#agencytxt) file. Use this field when you are providing data for routes from more than one agency. | +| agency_id | ID | Optional | The **agency_id** field defines an agency for the specified route. This value is referenced from the [agency.txt](#agencytxt) file. Use this field when you are providing data for routes from more than one agency. | | route_short_name | Text | **Required** | The **route_short_name** contains the short name of a route. This will often be a short, abstract identifier like "32", "100X", or "Green" that riders use to identify a route, but which doesn't give any indication of what places the route serves. At least one of *route_short_name* or *route_long_name* must be specified, or potentially both if appropriate. If the route does not have a short name, please specify a *route_long_name* and use an empty string as the value for this field. | | route_long_name | Text | **Required* | The **route_long_name** contains the full name of a route. This name is generally more descriptive than the *route_short_name* and will often include the route's destination or stop. At least one of *route_short_name* or *route_long_name* must be specified, or potentially both if appropriate. If the route does not have a long name, please specify a *route_short_nam*e and use an empty string as the value for this field. | | route_desc | Text | Optional | The **route_desc** field contains a description of a route. Please provide useful, quality information. Do not simply duplicate the name of the route. For 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)." | @@ -189,9 +189,9 @@ File: **Required** | block_id | ID | Optional | The **block_id** field 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 day and block_id. A block_id can have trips with different service days, making distinct blocks. (See [example below](#example-showing-blocks-and-service-day)) | | shape_id | ID | Optional | The **shape_id** field contains an ID that defines a shape for the trip. This value is referenced from the [shapes.txt](#shapestxt) file. The shapes.txt file allows you to define how a line should be drawn on the map to represent a trip. | | wheelchair_accessible | Enum | Optional | * **0** (or empty) - indicates that there is no accessibility information for the trip | -| | | * **1** - indicates that the vehicle being used on this particular trip can accommodate at least one rider in a wheelchair | +| | | | * **1** - indicates that the vehicle being used on this particular trip can accommodate at least one rider in a wheelchair | | | | | * **2** - indicates that no riders in wheelchairs can be accommodated on this trip | -| bikes_allowed | Optional | 0 (or empty) - indicates that there is no bike information for the trip | +| bikes_allowed | Enum | Optional | 0 (or empty) - indicates that there is no bike information for the trip | | | | | * **1** - indicates that the vehicle being used on this particular trip can accommodate at least one bicycle | | | | | * **2** - indicates that no bicycles are allowed on this trip | @@ -215,44 +215,44 @@ Notes on above table: File: **Required** -| Field Name | Required & Type | Details | | +| Field Name | Type | Required | Details | | ------ | ------ | ------ | ------ | -| trip_id | **Required ID** | The **trip_id** field contains an ID that identifies a trip. This value is referenced from the [trips.txt](#tripstxt) file. | | -| arrival_time | **Required service time** | The **arrival_time** specifies the arrival time at a specific stop for a specific trip on a route. The time is measured from "noon minus 12h" (effectively midnight, except for days on which daylight savings time changes occur) at the beginning of the service day. For times occurring after midnight on the service day, enter the time as a value greater than 24:00:00 in HH:MM:SS local time for the day on which the trip schedule begins. If you don't have separate times for arrival and departure at a stop, enter the same value for **arrival_time** and **departure_time**.

Scheduled stops where the vehicle strictly adheres to the specified arrival and departure times are timepoints. For example, if a transit vehicle arrives at a stop before the scheduled departure time, it will hold until the departure time. If this stop is not a timepoint, use either an empty string value for the **arrival_time** field or provide an interpolated time. Further, indicate that interpolated times are provided via the **timepoint** field with a value of zero. If interpolated times are indicated with **timepoint**=0, then time points must be indicated with a value of 1 for the **timepoint** field. Provide arrival times for all stops that are time points.

An arrival time must be specified for the first and the last stop in a trip. Times must be eight digits in HH:MM:SS format (H:MM:SS is also accepted, if the hour begins with 0). Do not pad times with spaces. The following columns list stop times for a trip and the proper way to express those times in the **arrival_time** field: | | -| | | **Time** | **arrival_time value** | -| | | 08:10:00 A.M. | 08:10:00 or 8:10:00 | -| | | 01:05:00 P.M. | 13:05:00 | -| | | 07:40:00 P.M. | 19:40:00 | -| | | 01:55:00 A.M. | 25:55:00 | -| | | **Note:** Trips that span multiple dates will have stop times greater than 24:00:00. For example, if a trip begins at 10:30:00 p.m. and ends at 2:15:00 a.m. on the following day, the stop times would be 22:30:00 and 26:15:00. Entering those stop times as 22:30:00 and 02:15:00 would not produce the desired results. | | -| departure_time | **Required service time** | The **departure_time** specifies the departure time from a specific stop for a specific trip on a route. The time is measured from "noon minus 12h" (effectively midnight, except for days on which daylight savings time changes occur) at the beginning of the service day. For times occurring after midnight on the service day, enter the time as a value greater than 24:00:00 in HH:MM:SS local time for the day on which the trip schedule begins. If you don't have separate times for arrival and departure at a stop, enter the same value for **arrival_time** and **departure_time**.

Scheduled stops where the vehicle strictly adheres to the specified arrival and departure times are timepoints. For example, if a transit vehicle arrives at a stop before the scheduled departure time, it will hold until the departure time. If this stop is not a timepoint, use either an empty string value for the **departure_time** field or provide an interpolated time (further, indicate that interpolated times are provided via the **timepoint** field with a value of zero). If interpolated times are indicated with **timepoint**=0, then time points must be indicated with a value of 1 for the **timepoint** field. Provide departure times for all stops that are time points.

A departure time must be specified for the first and the last stop in a trip even if the vehicle does not allow boarding at the last stop. Times must be eight digits in HH:MM:SS format (H:MM:SS is also accepted, if the hour begins with 0). Do not pad times with spaces. The following columns list stop times for a trip and the proper way to express those times in the **departure_time** field: | | -| | | Time | departure_time value | -| | | 08:10:00 A.M. | 08:10:00 or 8:10:00 | -| | | 01:05:00 P.M. | 13:05:00 | -| | | 07:40:00 P.M. | 19:40:00 | -| | | 01:55:00 A.M. | 25:55:00 | -| | | **Note:** Trips that span multiple dates will have stop times greater than 24:00:00. For example, if a trip begins at 10:30:00 p.m. and ends at 2:15:00 a.m. on the following day, the stop times would be 22:30:00 and 26:15:00. Entering those stop times as 22:30:00 and 02:15:00 would not produce the desired results. | | -| stop_id | **Required ID** | The **stop_id** field contains an ID that uniquely identifies a stop. Multiple routes may use the same stop. The **stop_id** is referenced from the [stops.txt](#stopstxt) file. If **location_type** is used in [stops.txt](#stopstxt), all stops referenced in [stop_times.txt](#stop_timestxt) must have **location_type** of 0. Where possible, **stop_id** values should remain consistent between feed updates. In other words, stop A with **stop_id 1** should have **stop_id 1** in all subsequent data updates. If a stop is not a time point, enter blank values for **arrival_time** and **departure_time**. | | -| stop_sequence | **Required non-negative integer** | The **stop_sequence** field identifies the order of the stops for a particular trip. The values must increase along the trip. For example, the first stop on the trip could have a **stop_sequence** of 1, the second stop on the trip could have a **stop_sequence** of 23, the third stop could have a **stop_sequence** of 40, and so on. | | -| stop_headsign | Optional text | The **stop_headsign** field contains the text that appears on a sign that identifies the trip's destination to passengers. Use this field to override the default **trip_headsign** when the headsign changes between stops. If this headsign is associated with an entire trip, use **trip_headsign** instead. | | -| pickup_type | Optional enum | The **pickup_type** field indicates whether passengers are picked up at a stop as part of the normal schedule or whether a pickup at the stop is not available. This field also allows the transit agency to indicate that passengers must call the agency or notify the driver to arrange a pickup at a particular stop. Valid values for this field are: | | -| | | * **0** - Regularly scheduled pickup | | -| | | * **1** - No pickup available | | -| | | * **2** - Must phone agency to arrange pickup | | -| | | * **3** - Must coordinate with driver to arrange pickup | | -| | | The default value for this field is **0**. | | -| drop_off_type | Optional enum | The **drop_off_type** field indicates whether passengers are dropped off at a stop as part of the normal schedule or whether a drop off at the stop is not available. This field also allows the transit agency to indicate that passengers must call the agency or notify the driver to arrange a drop off at a particular stop. Valid values for this field are: | | -| | | * **0** - 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 | | -| | | The default value for this field is **0**. | | -| shape_dist_traveled | Optional non-negative float | When used in the [stop_times.txt](#stop_timestxt) file, the **shape_dist_traveled** field positions a stop as a distance from the first shape point. The **shape_dist_traveled** field represents a real distance traveled along the route in units such as feet or kilometers. For example, if a bus travels a distance of 5.25 kilometers from the start of the shape to the stop, the **shape_dist_traveled** for the stop ID would be entered as "5.25". This information allows the trip planner to determine how much of the shape to draw when showing part of a trip on the map. The values used for **shape_dist_traveled** must increase along with **stop_sequence**: they cannot be used to show reverse travel along a route. The units used for **shape_dist_traveled** in the [stop_times.txt](#stop_timestxt) file must match the units that are used for this field in the shapes.txt file. | | -| timepoint | Optional enum | The timepoint field can be used to indicate if the specified arrival and departure times for a stop are strictly adhered to by the transit vehicle or if they are instead approximate and/or interpolated times. The field allows a GTFS producer to provide interpolated stop times that potentially incorporate local knowledge, but still indicate if the times are approximate. For stop-time entries with specified arrival and departure times, valid values for this field are: | | -| | | * **empty** - Times are considered exact. | | -| | | * **0** - Times are considered approximate. | | -| | | * **1** - Times are considered exact. | | -| | | For stop-time entries without specified arrival and departure times, feed consumers must interpolate arrival and departure times. Feed producers may optionally indicate that such an entry is not a timepoint (value=0) but it is an error to mark a entry as a timepoint (value=1) without specifying arrival and departure times. | | +| trip_id | ID | **Required** | The **trip_id** field contains an ID that identifies a trip. This value is referenced from the [trips.txt](#tripstxt) file. | +| arrival_time | Time | **Required** | The **arrival_time** specifies the arrival time at a specific stop for a specific trip on a route. The time is measured from "noon minus 12h" (effectively midnight, except for days on which daylight savings time changes occur) at the beginning of the service day. For times occurring after midnight on the service day, enter the time as a value greater than 24:00:00 in HH:MM:SS local time for the day on which the trip schedule begins. If you don't have separate times for arrival and departure at a stop, enter the same value for **arrival_time** and **departure_time**.

Scheduled stops where the vehicle strictly adheres to the specified arrival and departure times are timepoints. For example, if a transit vehicle arrives at a stop before the scheduled departure time, it will hold until the departure time. If this stop is not a timepoint, use either an empty string value for the **arrival_time** field or provide an interpolated time. Further, indicate that interpolated times are provided via the **timepoint** field with a value of zero. If interpolated times are indicated with **timepoint**=0, then time points must be indicated with a value of 1 for the **timepoint** field. Provide arrival times for all stops that are time points.

An arrival time must be specified for the first and the last stop in a trip. Times must be eight digits in HH:MM:SS format (H:MM:SS is also accepted, if the hour begins with 0). Do not pad times with spaces. The following columns list stop times for a trip and the proper way to express those times in the **arrival_time** field: | | +| | | **Time** => **arrival_time value** | +| | | 08:10:00 A.M. => 08:10:00 or 8:10:00 | +| | | 01:05:00 P.M. => 13:05:00 | +| | | 07:40:00 P.M. => 19:40:00 | +| | | 01:55:00 A.M. => 25:55:00 | +| | | **Note:** Trips that span multiple dates will have stop times greater than 24:00:00. For example, if a trip begins at 10:30:00 p.m. and ends at 2:15:00 a.m. on the following day, the stop times would be 22:30:00 and 26:15:00. Entering those stop times as 22:30:00 and 02:15:00 would not produce the desired results. | +| departure_time | Time | **Required** | The **departure_time** specifies the departure time from a specific stop for a specific trip on a route. The time is measured from "noon minus 12h" (effectively midnight, except for days on which daylight savings time changes occur) at the beginning of the service day. For times occurring after midnight on the service day, enter the time as a value greater than 24:00:00 in HH:MM:SS local time for the day on which the trip schedule begins. If you don't have separate times for arrival and departure at a stop, enter the same value for **arrival_time** and **departure_time**.

Scheduled stops where the vehicle strictly adheres to the specified arrival and departure times are timepoints. For example, if a transit vehicle arrives at a stop before the scheduled departure time, it will hold until the departure time. If this stop is not a timepoint, use either an empty string value for the **departure_time** field or provide an interpolated time (further, indicate that interpolated times are provided via the **timepoint** field with a value of zero). If interpolated times are indicated with **timepoint**=0, then time points must be indicated with a value of 1 for the **timepoint** field. Provide departure times for all stops that are time points.

A departure time must be specified for the first and the last stop in a trip even if the vehicle does not allow boarding at the last stop. Times must be eight digits in HH:MM:SS format (H:MM:SS is also accepted, if the hour begins with 0). Do not pad times with spaces. The following columns list stop times for a trip and the proper way to express those times in the **departure_time** field: | +| | | **Time** => **departure_time value** | +| | | 08:10:00 A.M. => 08:10:00 or 8:10:00 | +| | | 01:05:00 P.M. => 13:05:00 | +| | | 07:40:00 P.M. => 19:40:00 | +| | | 01:55:00 A.M. => 25:55:00 | +| | | **Note:** Trips that span multiple dates will have stop times greater than 24:00:00. For example, if a trip begins at 10:30:00 p.m. and ends at 2:15:00 a.m. on the following day, the stop times would be 22:30:00 and 26:15:00. Entering those stop times as 22:30:00 and 02:15:00 would not produce the desired results. | +| stop_id | ID | **Required** | The **stop_id** field contains an ID that uniquely identifies a stop. Multiple routes may use the same stop. The **stop_id** is referenced from the [stops.txt](#stopstxt) file. If **location_type** is used in [stops.txt](#stopstxt), all stops referenced in [stop_times.txt](#stop_timestxt) must have **location_type** of 0. Where possible, **stop_id** values should remain consistent between feed updates. In other words, stop A with **stop_id 1** should have **stop_id 1** in all subsequent data updates. If a stop is not a time point, enter blank values for **arrival_time** and **departure_time**. | +| stop_sequence | Non-negative integer | **Required** | The **stop_sequence** field identifies the order of the stops for a particular trip. The values must increase along the trip. For example, the first stop on the trip could have a **stop_sequence** of 1, the second stop on the trip could have a **stop_sequence** of 23, the third stop could have a **stop_sequence** of 40, and so on. | +| stop_headsign | Text | Optional | The **stop_headsign** field contains the text that appears on a sign that identifies the trip's destination to passengers. Use this field to override the default **trip_headsign** when the headsign changes between stops. If this headsign is associated with an entire trip, use **trip_headsign** instead. | +| pickup_type | Enum | Optional | The **pickup_type** field indicates whether passengers are picked up at a stop as part of the normal schedule or whether a pickup at the stop is not available. This field also allows the transit agency to indicate that passengers must call the agency or notify the driver to arrange a pickup at a particular stop. Valid values for this field are: | +| | | * **0** - Regularly scheduled pickup | +| | | * **1** - No pickup available | +| | | * **2** - Must phone agency to arrange pickup | +| | | * **3** - Must coordinate with driver to arrange pickup | +| | | The default value for this field is **0**. | +| drop_off_type | Enum | Optional | The **drop_off_type** field indicates whether passengers are dropped off at a stop as part of the normal schedule or whether a drop off at the stop is not available. This field also allows the transit agency to indicate that passengers must call the agency or notify the driver to arrange a drop off at a particular stop. Valid values for this field are: | +| | | * **0** - 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 | +| | | The default value for this field is **0**. | +| shape_dist_traveled | Non-negative float | Optional | When used in the [stop_times.txt](#stop_timestxt) file, the **shape_dist_traveled** field positions a stop as a distance from the first shape point. The **shape_dist_traveled** field represents a real distance traveled along the route in units such as feet or kilometers. For example, if a bus travels a distance of 5.25 kilometers from the start of the shape to the stop, the **shape_dist_traveled** for the stop ID would be entered as "5.25". This information allows the trip planner to determine how much of the shape to draw when showing part of a trip on the map. The values used for **shape_dist_traveled** must increase along with **stop_sequence**: they cannot be used to show reverse travel along a route. The units used for **shape_dist_traveled** in the [stop_times.txt](#stop_timestxt) file must match the units that are used for this field in the shapes.txt file. | +| timepoint | Enum | Optional | The timepoint field can be used to indicate if the specified arrival and departure times for a stop are strictly adhered to by the transit vehicle or if they are instead approximate and/or interpolated times. The field allows a GTFS producer to provide interpolated stop times that potentially incorporate local knowledge, but still indicate if the times are approximate. For stop-time entries with specified arrival and departure times, valid values for this field are: | +| | | * **empty** - Times are considered exact. | +| | | * **0** - Times are considered approximate. | +| | | * **1** - Times are considered exact. | +| | | For stop-time entries without specified arrival and departure times, feed consumers must interpolate arrival and departure times. Feed producers may optionally indicate that such an entry is not a timepoint (value=0) but it is an error to mark a entry as a timepoint (value=1) without specifying arrival and departure times. | ### calendar.txt From 0853c51fda0bf1a568222ae3df3e5dac6fea2d10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Frachet?= Date: Thu, 13 Sep 2018 15:28:11 -0400 Subject: [PATCH 23/30] Fix typo --- gtfs/spec/en/reference.md | 54 +++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md index fdc16e99f..5374f740e 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -152,7 +152,7 @@ File: **Required** | route_id | ID | **Required** | The **route_id** field contains an ID that uniquely identifies a route. | | agency_id | ID | Optional | The **agency_id** field defines an agency for the specified route. This value is referenced from the [agency.txt](#agencytxt) file. Use this field when you are providing data for routes from more than one agency. | | route_short_name | Text | **Required** | The **route_short_name** contains the short name of a route. This will often be a short, abstract identifier like "32", "100X", or "Green" that riders use to identify a route, but which doesn't give any indication of what places the route serves. At least one of *route_short_name* or *route_long_name* must be specified, or potentially both if appropriate. If the route does not have a short name, please specify a *route_long_name* and use an empty string as the value for this field. | -| route_long_name | Text | **Required* | The **route_long_name** contains the full name of a route. This name is generally more descriptive than the *route_short_name* and will often include the route's destination or stop. At least one of *route_short_name* or *route_long_name* must be specified, or potentially both if appropriate. If the route does not have a long name, please specify a *route_short_nam*e and use an empty string as the value for this field. | +| route_long_name | Text | **Required** | The **route_long_name** contains the full name of a route. This name is generally more descriptive than the *route_short_name* and will often include the route's destination or stop. At least one of *route_short_name* or *route_long_name* must be specified, or potentially both if appropriate. If the route does not have a long name, please specify a *route_short_nam*e and use an empty string as the value for this field. | | route_desc | Text | Optional | The **route_desc** field contains a description of a route. Please provide useful, quality information. Do not simply duplicate the name of the route. For 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** | The **route_type** field describes the type of transportation used on a route. Valid values for this field are: | | | | | * **0** - Tram, Streetcar, Light rail. Any light rail or street level system within a metropolitan area. | @@ -219,40 +219,40 @@ File: **Required** | ------ | ------ | ------ | ------ | | trip_id | ID | **Required** | The **trip_id** field contains an ID that identifies a trip. This value is referenced from the [trips.txt](#tripstxt) file. | | arrival_time | Time | **Required** | The **arrival_time** specifies the arrival time at a specific stop for a specific trip on a route. The time is measured from "noon minus 12h" (effectively midnight, except for days on which daylight savings time changes occur) at the beginning of the service day. For times occurring after midnight on the service day, enter the time as a value greater than 24:00:00 in HH:MM:SS local time for the day on which the trip schedule begins. If you don't have separate times for arrival and departure at a stop, enter the same value for **arrival_time** and **departure_time**.

Scheduled stops where the vehicle strictly adheres to the specified arrival and departure times are timepoints. For example, if a transit vehicle arrives at a stop before the scheduled departure time, it will hold until the departure time. If this stop is not a timepoint, use either an empty string value for the **arrival_time** field or provide an interpolated time. Further, indicate that interpolated times are provided via the **timepoint** field with a value of zero. If interpolated times are indicated with **timepoint**=0, then time points must be indicated with a value of 1 for the **timepoint** field. Provide arrival times for all stops that are time points.

An arrival time must be specified for the first and the last stop in a trip. Times must be eight digits in HH:MM:SS format (H:MM:SS is also accepted, if the hour begins with 0). Do not pad times with spaces. The following columns list stop times for a trip and the proper way to express those times in the **arrival_time** field: | | -| | | **Time** => **arrival_time value** | -| | | 08:10:00 A.M. => 08:10:00 or 8:10:00 | -| | | 01:05:00 P.M. => 13:05:00 | -| | | 07:40:00 P.M. => 19:40:00 | -| | | 01:55:00 A.M. => 25:55:00 | -| | | **Note:** Trips that span multiple dates will have stop times greater than 24:00:00. For example, if a trip begins at 10:30:00 p.m. and ends at 2:15:00 a.m. on the following day, the stop times would be 22:30:00 and 26:15:00. Entering those stop times as 22:30:00 and 02:15:00 would not produce the desired results. | +| | | | **Time** => **arrival_time value** | +| | | | 08:10:00 A.M. => 08:10:00 or 8:10:00 | +| | | | 01:05:00 P.M. => 13:05:00 | +| | | | 07:40:00 P.M. => 19:40:00 | +| | | | 01:55:00 A.M. => 25:55:00 | +| | | | **Note:** Trips that span multiple dates will have stop times greater than 24:00:00. For example, if a trip begins at 10:30:00 p.m. and ends at 2:15:00 a.m. on the following day, the stop times would be 22:30:00 and 26:15:00. Entering those stop times as 22:30:00 and 02:15:00 would not produce the desired results. | | departure_time | Time | **Required** | The **departure_time** specifies the departure time from a specific stop for a specific trip on a route. The time is measured from "noon minus 12h" (effectively midnight, except for days on which daylight savings time changes occur) at the beginning of the service day. For times occurring after midnight on the service day, enter the time as a value greater than 24:00:00 in HH:MM:SS local time for the day on which the trip schedule begins. If you don't have separate times for arrival and departure at a stop, enter the same value for **arrival_time** and **departure_time**.

Scheduled stops where the vehicle strictly adheres to the specified arrival and departure times are timepoints. For example, if a transit vehicle arrives at a stop before the scheduled departure time, it will hold until the departure time. If this stop is not a timepoint, use either an empty string value for the **departure_time** field or provide an interpolated time (further, indicate that interpolated times are provided via the **timepoint** field with a value of zero). If interpolated times are indicated with **timepoint**=0, then time points must be indicated with a value of 1 for the **timepoint** field. Provide departure times for all stops that are time points.

A departure time must be specified for the first and the last stop in a trip even if the vehicle does not allow boarding at the last stop. Times must be eight digits in HH:MM:SS format (H:MM:SS is also accepted, if the hour begins with 0). Do not pad times with spaces. The following columns list stop times for a trip and the proper way to express those times in the **departure_time** field: | -| | | **Time** => **departure_time value** | -| | | 08:10:00 A.M. => 08:10:00 or 8:10:00 | -| | | 01:05:00 P.M. => 13:05:00 | -| | | 07:40:00 P.M. => 19:40:00 | -| | | 01:55:00 A.M. => 25:55:00 | -| | | **Note:** Trips that span multiple dates will have stop times greater than 24:00:00. For example, if a trip begins at 10:30:00 p.m. and ends at 2:15:00 a.m. on the following day, the stop times would be 22:30:00 and 26:15:00. Entering those stop times as 22:30:00 and 02:15:00 would not produce the desired results. | +| | | | **Time** => **departure_time value** | +| | | | 08:10:00 A.M. => 08:10:00 or 8:10:00 | +| | | | 01:05:00 P.M. => 13:05:00 | +| | | | 07:40:00 P.M. => 19:40:00 | +| | | | 01:55:00 A.M. => 25:55:00 | +| | | | **Note:** Trips that span multiple dates will have stop times greater than 24:00:00. For example, if a trip begins at 10:30:00 p.m. and ends at 2:15:00 a.m. on the following day, the stop times would be 22:30:00 and 26:15:00. Entering those stop times as 22:30:00 and 02:15:00 would not produce the desired results. | | stop_id | ID | **Required** | The **stop_id** field contains an ID that uniquely identifies a stop. Multiple routes may use the same stop. The **stop_id** is referenced from the [stops.txt](#stopstxt) file. If **location_type** is used in [stops.txt](#stopstxt), all stops referenced in [stop_times.txt](#stop_timestxt) must have **location_type** of 0. Where possible, **stop_id** values should remain consistent between feed updates. In other words, stop A with **stop_id 1** should have **stop_id 1** in all subsequent data updates. If a stop is not a time point, enter blank values for **arrival_time** and **departure_time**. | | stop_sequence | Non-negative integer | **Required** | The **stop_sequence** field identifies the order of the stops for a particular trip. The values must increase along the trip. For example, the first stop on the trip could have a **stop_sequence** of 1, the second stop on the trip could have a **stop_sequence** of 23, the third stop could have a **stop_sequence** of 40, and so on. | | stop_headsign | Text | Optional | The **stop_headsign** field contains the text that appears on a sign that identifies the trip's destination to passengers. Use this field to override the default **trip_headsign** when the headsign changes between stops. If this headsign is associated with an entire trip, use **trip_headsign** instead. | | pickup_type | Enum | Optional | The **pickup_type** field indicates whether passengers are picked up at a stop as part of the normal schedule or whether a pickup at the stop is not available. This field also allows the transit agency to indicate that passengers must call the agency or notify the driver to arrange a pickup at a particular stop. Valid values for this field are: | -| | | * **0** - Regularly scheduled pickup | -| | | * **1** - No pickup available | -| | | * **2** - Must phone agency to arrange pickup | -| | | * **3** - Must coordinate with driver to arrange pickup | -| | | The default value for this field is **0**. | +| | | | * **0** - Regularly scheduled pickup | +| | | | * **1** - No pickup available | +| | | | * **2** - Must phone agency to arrange pickup | +| | | | * **3** - Must coordinate with driver to arrange pickup | +| | | | The default value for this field is **0**. | | drop_off_type | Enum | Optional | The **drop_off_type** field indicates whether passengers are dropped off at a stop as part of the normal schedule or whether a drop off at the stop is not available. This field also allows the transit agency to indicate that passengers must call the agency or notify the driver to arrange a drop off at a particular stop. Valid values for this field are: | -| | | * **0** - 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 | -| | | The default value for this field is **0**. | +| | | | * **0** - 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 | +| | | | The default value for this field is **0**. | | shape_dist_traveled | Non-negative float | Optional | When used in the [stop_times.txt](#stop_timestxt) file, the **shape_dist_traveled** field positions a stop as a distance from the first shape point. The **shape_dist_traveled** field represents a real distance traveled along the route in units such as feet or kilometers. For example, if a bus travels a distance of 5.25 kilometers from the start of the shape to the stop, the **shape_dist_traveled** for the stop ID would be entered as "5.25". This information allows the trip planner to determine how much of the shape to draw when showing part of a trip on the map. The values used for **shape_dist_traveled** must increase along with **stop_sequence**: they cannot be used to show reverse travel along a route. The units used for **shape_dist_traveled** in the [stop_times.txt](#stop_timestxt) file must match the units that are used for this field in the shapes.txt file. | | timepoint | Enum | Optional | The timepoint field can be used to indicate if the specified arrival and departure times for a stop are strictly adhered to by the transit vehicle or if they are instead approximate and/or interpolated times. The field allows a GTFS producer to provide interpolated stop times that potentially incorporate local knowledge, but still indicate if the times are approximate. For stop-time entries with specified arrival and departure times, valid values for this field are: | -| | | * **empty** - Times are considered exact. | -| | | * **0** - Times are considered approximate. | -| | | * **1** - Times are considered exact. | -| | | For stop-time entries without specified arrival and departure times, feed consumers must interpolate arrival and departure times. Feed producers may optionally indicate that such an entry is not a timepoint (value=0) but it is an error to mark a entry as a timepoint (value=1) without specifying arrival and departure times. | +| | | | * **empty** - Times are considered exact. | +| | | | * **0** - Times are considered approximate. | +| | | | * **1** - Times are considered exact. | +| | | | For stop-time entries without specified arrival and departure times, feed consumers must interpolate arrival and departure times. Feed producers may optionally indicate that such an entry is not a timepoint (value=0) but it is an error to mark a entry as a timepoint (value=1) without specifying arrival and departure times. | ### calendar.txt From e1ce7a5411c69f39ac002ef95de5c86429c5b22d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Frachet?= Date: Thu, 13 Sep 2018 15:30:55 -0400 Subject: [PATCH 24/30] Update calendar and calendar dates --- gtfs/spec/en/reference.md | 82 +++++++++++++++++++-------------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md index 5374f740e..a584e0f74 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -258,39 +258,39 @@ File: **Required** File: **Required** -| Field Name | Required & Type | Details | -| ------ | ------ | ------ | -| service_id | **Required ID** | The **service_id** contains an ID that uniquely identifies a set of dates when service is available for one or more routes. Each service_id value can appear at most once in a calendar.txt file. This value is dataset unique. It is referenced by the [trips.txt](#tripstxt) file. | -| monday | **Required enum** | The monday field contains a binary value that indicates whether the service is valid for all Mondays. | -| | | * A value of **1** indicates that service is available for all Mondays in the date range. (The date range is specified using the **start_date** and **end_date** fields.) | -| | | * A value of **0** indicates that service is not available on Mondays in the date range. | -| | | **Note:** You may list exceptions for particular dates, such as holidays, in the [calendar_dates.txt](#calendar_datestxt) file. | -| tuesday | **Required enum** | The tuesday field contains a binary value that indicates whether the service is valid for all Tuesdays. | -| | | A value of **1** indicates that service is available for all Tuesdays in the date range. (The date range is specified using the **start_date** and **end_date** fields.) | -| | | A value of **0** indicates that service is not available on Tuesdays in the date range. | -| | | **Note:** You may list exceptions for particular dates, such as holidays, in the [calendar_dates.txt](#calendar_datestxt) file. | -| wednesday | **Required enum** | The wednesday field contains a binary value that indicates whether the service is valid for all Wednesdays. | -| | | A value of **1** indicates that service is available for all Wednesdays in the date range. (The date range is specified using the **start_date** and **end_date** fields.) | -| | | A value of **0** indicates that service is not available on Wednesdays in the date range. | -| | | **Note:** You may list exceptions for particular dates, such as holidays, in the [calendar_dates.txt](#calendar_datestxt) file. | -| thursday | **Required enum** | The thursday field contains a binary value that indicates whether the service is valid for all Thursdays. | -| | | A value of **1** indicates that service is available for all Thursdays in the date range. (The date range is specified using the **start_date** and **end_date** fields.) | -| | | A value of **0** indicates that service is not available on Thursdays in the date range. | -| | | **Note:** You may list exceptions for particular dates, such as holidays, in the [calendar_dates.txt](#calendar_datestxt) file. | -| friday | **Required enum** | The friday field contains a binary value that indicates whether the service is valid for all Fridays. | -| | | A value of **1** indicates that service is available for all Fridays in the date range. (The date range is specified using the **start_date** and **end_date** fields.) | -| | | A value of **0** indicates that service is not available on Fridays in the date range. | -| | | **Note:** You may list exceptions for particular dates, such as holidays, in the [calendar_dates.txt](#calendar_datestxt) file | -| saturday | **Required enum** | The saturday field contains a binary value that indicates whether the service is valid for all Saturdays. | -| | | A value of **1** indicates that service is available for all Saturdays in the date range. (The date range is specified using the **start_date** and **end_date** fields.) | -| | | A value of **0** indicates that service is not available on Saturdays in the date range. | -| | | **Note:** You may list exceptions for particular dates, such as holidays, in the [calendar_dates.txt](#calendar_datestxt) file. | -| sunday | **Required enum** | The sunday field contains a binary value that indicates whether the service is valid for all Sundays. | -| | | A value of **1** indicates that service is available for all Sundays in the date range. (The date range is specified using the **start_date** and **end_date** fields.) | -| | | A value of **0** indicates that service is not available on Sundays in the date range. | -| | | **Note:** You may list exceptions for particular dates, such as holidays, in the [calendar_dates.txt](#calendar_datestxt) file. | -| start_date | **Required service date** | The **start_date** field contains the start date for the service. The start_date field's value should be in YYYYMMDD format. | -| end_date | **Required service date** | The **end_date** field contains the end date for the service. This date is included in the service interval. The **end_date** field's value should be in YYYYMMDD format. | +| Field Name | Type | Required | Details | +| ------ | ------ | ------ |------ | +| service_id | ID | **Required** | The **service_id** contains an ID that uniquely identifies a set of dates when service is available for one or more routes. Each service_id value can appear at most once in a calendar.txt file. This value is dataset unique. It is referenced by the [trips.txt](#tripstxt) file. | +| monday | Enum | **Required** | The monday field contains a binary value that indicates whether the service is valid for all Mondays. | +| | | | * A value of **1** indicates that service is available for all Mondays in the date range. (The date range is specified using the **start_date** and **end_date** fields.) | +| | | | * A value of **0** indicates that service is not available on Mondays in the date range. | +| | | | **Note:** You may list exceptions for particular dates, such as holidays, in the [calendar_dates.txt](#calendar_datestxt) file. | +| tuesday | Enum | **Required** | The tuesday field contains a binary value that indicates whether the service is valid for all Tuesdays. | +| | | | A value of **1** indicates that service is available for all Tuesdays in the date range. (The date range is specified using the **start_date** and **end_date** fields.) | +| | | | A value of **0** indicates that service is not available on Tuesdays in the date range. | +| | | | **Note:** You may list exceptions for particular dates, such as holidays, in the [calendar_dates.txt](#calendar_datestxt) file. | +| wednesday | Enum | **Required** | The wednesday field contains a binary value that indicates whether the service is valid for all Wednesdays. | +| | | | A value of **1** indicates that service is available for all Wednesdays in the date range. (The date range is specified using the **start_date** and **end_date** fields.) | +| | | | A value of **0** indicates that service is not available on Wednesdays in the date range. | +| | | | **Note:** You may list exceptions for particular dates, such as holidays, in the [calendar_dates.txt](#calendar_datestxt) file. | +| thursday | Enum | **Required** | The thursday field contains a binary value that indicates whether the service is valid for all Thursdays. | +| | | | A value of **1** indicates that service is available for all Thursdays in the date range. (The date range is specified using the **start_date** and **end_date** fields.) | +| | | | A value of **0** indicates that service is not available on Thursdays in the date range. | +| | | | **Note:** You may list exceptions for particular dates, such as holidays, in the [calendar_dates.txt](#calendar_datestxt) file. | +| friday | Enum | **Required** | The friday field contains a binary value that indicates whether the service is valid for all Fridays. | +| | | | A value of **1** indicates that service is available for all Fridays in the date range. (The date range is specified using the **start_date** and **end_date** fields.) | +| | | | A value of **0** indicates that service is not available on Fridays in the date range. | +| | | | **Note:** You may list exceptions for particular dates, such as holidays, in the [calendar_dates.txt](#calendar_datestxt) file | +| saturday | Enum | **Required** | The saturday field contains a binary value that indicates whether the service is valid for all Saturdays. | +| | | | A value of **1** indicates that service is available for all Saturdays in the date range. (The date range is specified using the **start_date** and **end_date** fields.) | +| | | | A value of **0** indicates that service is not available on Saturdays in the date range. | +| | | | **Note:** You may list exceptions for particular dates, such as holidays, in the [calendar_dates.txt](#calendar_datestxt) file. | +| sunday | Enum | **Required** | The sunday field contains a binary value that indicates whether the service is valid for all Sundays. | +| | | | A value of **1** indicates that service is available for all Sundays in the date range. (The date range is specified using the **start_date** and **end_date** fields.) | +| | | | A value of **0** indicates that service is not available on Sundays in the date range. | +| | | | **Note:** You may list exceptions for particular dates, such as holidays, in the [calendar_dates.txt](#calendar_datestxt) file. | +| start_date | Date | **Required** | The **start_date** field contains the start date for the service. The start_date field's value should be in YYYYMMDD format. | +| end_date | Date | **Required** | The **end_date** field contains the end date for the service. This date is included in the service interval. The **end_date** field's value should be in YYYYMMDD format. | ### calendar_dates.txt @@ -301,14 +301,14 @@ The calendar_dates table allows you to explicitly activate or disable service ID * Recommended: Use calendar_dates.txt in conjunction with [calendar.txt](#calendartxt), where calendar_dates.txt defines any exceptions to the default service categories defined in the [calendar.txt](#calendartxt) file. If your service is generally regular, with a few changes on explicit dates (for example, to accommodate special event services, or a school schedule), this is a good approach. * Alternate: Omit [calendar.txt](#calendartxt), and include ALL dates of service in calendar_dates.txt. If your schedule varies most days of the month, or you want to programmatically output service dates without specifying a normal weekly schedule, this approach may be preferable. -| Field Name | Required & Type | Details | -| ------ | ------ | ------ | -| service_id | **Required ID** | The **service_id** contains an ID that uniquely identifies a set of dates when a service exception is available for one or more routes. Each (service_id, date) pair can only appear once in calendar_dates.txt. If the a service_id value appears in both the calendar.txt and calendar_dates.txt files, the information in calendar_dates.txt modifies the service information specified in [calendar.txt](#calendartxt). This field is referenced by the [trips.txt](#tripstxt) file. | -| date | **Required service date** | The **date** field specifies a particular date when service availability is different than the norm. You can use the **exception_type** field to indicate whether service is available on the specified date. The **date** field's value should be in YYYYMMDD format. | -| exception_type | **Required enum** | The **exception_type** indicates whether service is available on the date specified in the date field. | -| | |* A value of **1** indicates that service has been added for the specified date. | -| | |* A value of **2** indicates that service has been removed for the specified date. | -| | | For example, suppose a route has one set of trips available on holidays and another set of trips available on all other days. You could have one **service_id** that corresponds to the regular service schedule and another **service_id** that corresponds to the holiday schedule. For a particular holiday, you would use the calendar_dates.txt file to add the holiday to the holiday **service_id** and to remove the holiday from the regular **service_id** schedule. | +| Field Name | Type | Required | Details | +| ------ | ------ | ------ | ------ | +| service_id | ID | **Required** | The **service_id** contains an ID that uniquely identifies a set of dates when a service exception is available for one or more routes. Each (service_id, date) pair can only appear once in calendar_dates.txt. If the a service_id value appears in both the calendar.txt and calendar_dates.txt files, the information in calendar_dates.txt modifies the service information specified in [calendar.txt](#calendartxt). This field is referenced by the [trips.txt](#tripstxt) file. | +| date | Date | **Required** | The **date** field specifies a particular date when service availability is different than the norm. You can use the **exception_type** field to indicate whether service is available on the specified date. The **date** field's value should be in YYYYMMDD format. | +| exception_type | Enum | **Required** | The **exception_type** indicates whether service is available on the date specified in the date field. | +| | | | * A value of **1** indicates that service has been added for the specified date. | +| | | | * A value of **2** indicates that service has been removed for the specified date. | +| | | | For example, suppose a route has one set of trips available on holidays and another set of trips available on all other days. You could have one **service_id** that corresponds to the regular service schedule and another **service_id** that corresponds to the holiday schedule. For a particular holiday, you would use the calendar_dates.txt file to add the holiday to the holiday **service_id** and to remove the holiday from the regular **service_id** schedule. | ### fare_attributes.txt From 90fd3f0293e6712ecdf006d085225a2d9229d268 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Frachet?= Date: Thu, 13 Sep 2018 15:33:17 -0400 Subject: [PATCH 25/30] Add type column for fares_* --- gtfs/spec/en/reference.md | 68 +++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md index a584e0f74..3a594020a 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -314,21 +314,21 @@ The calendar_dates table allows you to explicitly activate or disable service ID File: **Optional** -| Field Name | Required & Type | Details | -| ------ | ------ | ------ | -| fare_id | **Required ID** | The **fare_id** field contains an ID that uniquely identifies a fare class. The **fare_id** is dataset unique. | -| price | **Required non-negative float** | The **price** field contains the fare price, in the unit specified by **currency_type**. | -| currency_type | **Required currency code** | The **currency_type** field defines the currency used to pay the fare. | -| payment_method | **Required enum** | The **payment_method** field indicates when the fare must be paid. Valid values for this field are: | -| | | * **0** - Fare is paid on board. | -| | | * **1** - Fare must be paid before boarding. | -| transfers | **Required enum** | The transfers field specifies the number of transfers permitted on this fare. Valid values for this field are: | -| | | * **0** - No transfers permitted on this fare. | -| | | * **1** - Passenger may transfer once. | -| | | * **2** - Passenger may transfer twice. | -| | | * **(empty)** - If this field is empty, unlimited transfers are permitted. | -| agency_id | Optional ID | Required for feeds with multiple agencies defined in the agency.txt file. Each fare attribute must specify an agency_id value to indicate which agency the fare applies to. | -| transfer_duration | Optional non-negative integer | The **transfer_duration** field specifies the length of time in seconds before a transfer expires. When used with a **transfers** value of 0, the **transfer_duration** field indicates how long a ticket is valid for a fare where no transfers are allowed. Unless you intend to use this field to indicate ticket validity, **transfer_duration** should be omitted or empty when **transfers** is set to 0. | +| Field Name | Type | Required | Details | +| ------ | ------ | ------ | ------ | +| fare_id | ID **Required** | The **fare_id** field contains an ID that uniquely identifies a fare class. The **fare_id** is dataset unique. | +| price | Non-negative float | **Required** | The **price** field contains the fare price, in the unit specified by **currency_type**. | +| currency_type | Currency code | **Required** | The **currency_type** field defines the currency used to pay the fare. | +| payment_method | Enum | **Required** | The **payment_method** field indicates when the fare must be paid. Valid values for this field are: | +| | | | * **0** - Fare is paid on board. | +| | | | * **1** - Fare must be paid before boarding. | +| transfers | Enum | **Required** | The transfers field specifies the number of transfers permitted on this fare. Valid values for this field are: | +| | | | * **0** - No transfers permitted on this fare. | +| | | | * **1** - Passenger may transfer once. | +| | | | * **2** - Passenger may transfer twice. | +| | | | * **(empty)** - If this field is empty, unlimited transfers are permitted. | +| agency_id | ID | Optional | Required for feeds with multiple agencies defined in the agency.txt file. Each fare attribute must specify an agency_id value to indicate which agency the fare applies to. | +| transfer_duration | Non-negative integer | Optional | The **transfer_duration** field specifies the length of time in seconds before a transfer expires. When used with a **transfers** value of 0, the **transfer_duration** field indicates how long a ticket is valid for a fare where no transfers are allowed. Unless you intend to use this field to indicate ticket validity, **transfer_duration** should be omitted or empty when **transfers** is set to 0. | ### fare_rules.txt @@ -342,27 +342,27 @@ The fare_rules table allows you to specify how fares in fare_attributes.txt appl For examples that demonstrate how to specify a fare structure with fare_rules.txt and fare_attributes.txt, see [FareExamples](https://code.google.com/p/googletransitdatafeed/wiki/FareExamples) in the GoogleTransitDataFeed open source project wiki. -| Field Name | Required & Type | Details | -| ------ | ------ | ------ | -| fare_id | **Required ID** | The **fare_id** field contains an ID that uniquely identifies a fare class. This value is referenced from the [fare_attributes.txt](#fare_attributestxt) file. | -| route_id | Optional ID | The **route_id** field associates the fare ID with a route. Route IDs are referenced from the [routes.txt](#routestxt) file. If you have several routes with the same fare attributes, create a row in fare_rules.txt for each route. | -| | | For example, if fare class "b" is valid on route "TSW" and "TSE", the fare_rules.txt file would contain these rows for the fare class: | -| | | `b,TSW` | -| | | `b,TSE` | -| origin_id | Optional ID | The **origin_id** field associates the fare ID with an origin zone ID. Zone IDs are referenced from the [stops.txt](#stopstxt) file. If you have several origin IDs with the same fare attributes, create a row in fare_rules.txt for each origin ID. | -| | | For example, if fare class "b" is valid for all travel originating from either zone "2" or zone "8", the fare_rules.txt file would contain these rows for the fare class: | -| | | `b, , 2` | -| | | `b, , 8` | +| Field Name | Type | Required | Details | +| ------ | ------ | ------ | ------ | +| fare_id | ID | **Required** | The **fare_id** field contains an ID that uniquely identifies a fare class. This value is referenced from the [fare_attributes.txt](#fare_attributestxt) file. | +| route_id | ID | Optional | The **route_id** field associates the fare ID with a route. Route IDs are referenced from the [routes.txt](#routestxt) file. If you have several routes with the same fare attributes, create a row in fare_rules.txt for each route. | +| | | | For example, if fare class "b" is valid on route "TSW" and "TSE", the fare_rules.txt file would contain these rows for the fare class: | +| | | | `b,TSW` | +| | | | `b,TSE` | +| origin_id | ID | Optional | The **origin_id** field associates the fare ID with an origin zone ID. Zone IDs are referenced from the [stops.txt](#stopstxt) file. If you have several origin IDs with the same fare attributes, create a row in fare_rules.txt for each origin ID. | +| | | | For example, if fare class "b" is valid for all travel originating from either zone "2" or zone "8", the fare_rules.txt file would contain these rows for the fare class: | +| | | | `b, , 2` | +| | | | `b, , 8` | | destination_id | Optional ID | The **destination_id** field associates the fare ID with a destination zone ID. Zone IDs are referenced from the [stops.txt](#stopstxt) file. If you have several destination IDs with the same fare attributes, create a row in fare_rules.txt for each destination ID. | -| | | For example, you could use the origin_ID and destination_ID fields together to specify that fare class "b" is valid for travel between zones 3 and 4, and for travel between zones 3 and 5, the fare_rules.txt file would contain these rows for the fare class: | -| | | `b, , 3,4` | -| | | `b, , 3,5` | +| | | | For example, you could use the origin_ID and destination_ID fields together to specify that fare class "b" is valid for travel between zones 3 and 4, and for travel between zones 3 and 5, the fare_rules.txt file would contain these rows for the fare class: | +| | | | `b, , 3,4` | +| | | | `b, , 3,5` | | contains_id | Optional ID | The **contains_id** field associates the fare ID with a zone ID, referenced from the [stops.txt](#stopstxt) file. The fare ID is then associated with itineraries that pass through every contains_id zone. | -| | | For example, if fare class "c" is associated with all travel on the GRT route that passes through zones 5, 6, and 7 the fare_rules.txt would contain these rows: | -| | | `c,GRT,,,5` | -| | | `c,GRT,,,6` | -| | | `c,GRT,,,7` | -| | | Because all contains_id zones must be matched for the fare to apply, an itinerary that passes through zones 5 and 6 but not zone 7 would not have fare class "c". For more detail, see [FareExamples](https://code.google.com/p/googletransitdatafeed/wiki/FareExamples) in the GoogleTransitDataFeed project wiki. | +| | | | For example, if fare class "c" is associated with all travel on the GRT route that passes through zones 5, 6, and 7 the fare_rules.txt would contain these rows: | +| | | | `c,GRT,,,5` | +| | | | `c,GRT,,,6` | +| | | | `c,GRT,,,7` | +| | | | Because all contains_id zones must be matched for the fare to apply, an itinerary that passes through zones 5 and 6 but not zone 7 would not have fare class "c". For more detail, see [FareExamples](https://code.google.com/p/googletransitdatafeed/wiki/FareExamples) in the GoogleTransitDataFeed project wiki. | ### shapes.txt From 246aa6dd4de220a0a6163b0754e96f290a49de65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Frachet?= Date: Thu, 13 Sep 2018 15:36:03 -0400 Subject: [PATCH 26/30] Add column type for frequency and shapes --- gtfs/spec/en/reference.md | 76 +++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md index 3a594020a..5565b14f3 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -316,7 +316,7 @@ File: **Optional** | Field Name | Type | Required | Details | | ------ | ------ | ------ | ------ | -| fare_id | ID **Required** | The **fare_id** field contains an ID that uniquely identifies a fare class. The **fare_id** is dataset unique. | +| fare_id | ID | **Required** | The **fare_id** field contains an ID that uniquely identifies a fare class. The **fare_id** is dataset unique. | | price | Non-negative float | **Required** | The **price** field contains the fare price, in the unit specified by **currency_type**. | | currency_type | Currency code | **Required** | The **currency_type** field defines the currency used to pay the fare. | | payment_method | Enum | **Required** | The **payment_method** field indicates when the fare must be paid. Valid values for this field are: | @@ -353,11 +353,11 @@ For examples that demonstrate how to specify a fare structure with fare_rules.tx | | | | For example, if fare class "b" is valid for all travel originating from either zone "2" or zone "8", the fare_rules.txt file would contain these rows for the fare class: | | | | | `b, , 2` | | | | | `b, , 8` | -| destination_id | Optional ID | The **destination_id** field associates the fare ID with a destination zone ID. Zone IDs are referenced from the [stops.txt](#stopstxt) file. If you have several destination IDs with the same fare attributes, create a row in fare_rules.txt for each destination ID. | +| destination_id | ID | Optional | The **destination_id** field associates the fare ID with a destination zone ID. Zone IDs are referenced from the [stops.txt](#stopstxt) file. If you have several destination IDs with the same fare attributes, create a row in fare_rules.txt for each destination ID. | | | | | For example, you could use the origin_ID and destination_ID fields together to specify that fare class "b" is valid for travel between zones 3 and 4, and for travel between zones 3 and 5, the fare_rules.txt file would contain these rows for the fare class: | | | | | `b, , 3,4` | | | | | `b, , 3,5` | -| contains_id | Optional ID | The **contains_id** field associates the fare ID with a zone ID, referenced from the [stops.txt](#stopstxt) file. The fare ID is then associated with itineraries that pass through every contains_id zone. | +| contains_id | ID | Optional | The **contains_id** field associates the fare ID with a zone ID, referenced from the [stops.txt](#stopstxt) file. The fare ID is then associated with itineraries that pass through every contains_id zone. | | | | | For example, if fare class "c" is associated with all travel on the GRT route that passes through zones 5, 6, and 7 the fare_rules.txt would contain these rows: | | | | | `c,GRT,,,5` | | | | | `c,GRT,,,6` | @@ -370,30 +370,30 @@ File: **Optional** Shapes describe the physical path that a vehicle takes, and are defined in the file shapes.txt. Shapes belong to Trips, and consist of a sequence of points. Tracing the points in order provides the path of the vehicle. The points do not need to match stop locations. -| Field Name | Required & Type | Details | -| ------ | ------ | ------ | -| shape_id | **Required ID** | The **shape_id** field contains an ID that uniquely identifies a shape. | -| shape_pt_lat | **Required latitude** | The **shape_pt_lat** field associates a shape point's latitude with a shape ID. Each row in shapes.txt represents a shape point in your shape definition. | -| | | For example, if the shape "A_shp" has three points in its definition, the shapes.txt file might contain these rows to define the shape: | -| | | `A_shp,37.61956,-122.48161,0` | -| | | `A_shp,37.64430,-122.41070,6` | -| | | `A_shp,37.65863,-122.30839,11` | -| shape_pt_lon | **Required longitude** | The **shape_pt_lon** field associates a shape point's longitude with a shape ID. Each row in shapes.txt represents a shape point in your shape definition. | -| | | For example, if the shape "A_shp" has three points in its definition, the shapes.txt file might contain these rows to define the shape: | -| | | `A_shp,37.61956,-122.48161,0` | -| | | `A_shp,37.64430,-122.41070,6` | -| | | `A_shp,37.65863,-122.30839,11` | -| shape_pt_sequence | **Required non-negative integer** | The **shape_pt_sequence** field associates the latitude and longitude of a shape point with its sequence order along the shape. The values for **shape_pt_sequence** must increase along the trip. | -| | | For example, if the shape "A_shp" has three points in its definition, the shapes.txt file might contain these rows to define the shape: | -| | | `A_shp,37.61956,-122.48161,0` | -| | | `A_shp,37.64430,-122.41070,6` | -| | | `A_shp,37.65863,-122.30839,11` | -| shape_dist_traveled | Optional non-negative float | When used in the shapes.txt file, the **shape_dist_traveled** field positions a shape point as a distance traveled along a shape from the first shape point. The **shape_dist_traveled** field represents a real distance traveled along the route in units such as feet or kilometers. This information allows the trip planner to determine how much of the shape to draw when showing part of a trip on the map. The values used for **shape_dist_traveled** must increase along with shape_pt_sequence: they cannot be used to show reverse travel along a route. | -| | | The units used for **shape_dist_traveled** in the shapes.txt file must match the units that are used for this field in the [stop_times.txt](#stop_timestxt) file. | -| | | For 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: | -| | | `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` | +| Field Name | Type | Required | Details | +| ------ | ------ | ------ | ------ | +| shape_id | ID | **Required** | The **shape_id** field contains an ID that uniquely identifies a shape. | +| shape_pt_lat | Latitude | **Required** | The **shape_pt_lat** field associates a shape point's latitude with a shape ID. Each row in shapes.txt represents a shape point in your shape definition. | +| | | | For example, if the shape "A_shp" has three points in its definition, the shapes.txt file might contain these rows to define the shape: | +| | | | `A_shp,37.61956,-122.48161,0` | +| | | | `A_shp,37.64430,-122.41070,6` | +| | | | `A_shp,37.65863,-122.30839,11` | +| shape_pt_lon | Longitude | **Required** | The **shape_pt_lon** field associates a shape point's longitude with a shape ID. Each row in shapes.txt represents a shape point in your shape definition. | +| | | | For example, if the shape "A_shp" has three points in its definition, the shapes.txt file might contain these rows to define the shape: | +| | | | `A_shp,37.61956,-122.48161,0` | +| | | | `A_shp,37.64430,-122.41070,6` | +| | | | `A_shp,37.65863,-122.30839,11` | +| shape_pt_sequence | Non-negative integer | **Required** | The **shape_pt_sequence** field associates the latitude and longitude of a shape point with its sequence order along the shape. The values for **shape_pt_sequence** must increase along the trip. | +| | | | For example, if the shape "A_shp" has three points in its definition, the shapes.txt file might contain these rows to define the shape: | +| | | | `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 | When used in the shapes.txt file, the **shape_dist_traveled** field positions a shape point as a distance traveled along a shape from the first shape point. The **shape_dist_traveled** field represents a real distance traveled along the route in units such as feet or kilometers. This information allows the trip planner to determine how much of the shape to draw when showing part of a trip on the map. The values used for **shape_dist_traveled** must increase along with shape_pt_sequence: they cannot be used to show reverse travel along a route. | +| | | | The units used for **shape_dist_traveled** in the shapes.txt file must match the units that are used for this field in the [stop_times.txt](#stop_timestxt) file. | +| | | | For 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: | +| | | | `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 @@ -401,19 +401,19 @@ File: **Optional** This table is intended to represent schedules that don't have a fixed list of stop times. When trips are defined in frequencies.txt, the trip planner ignores the absolute values of the **arrival_time** and **departure_time** fields for those trips in [stop_times.txt](#stop_timestxt). Instead, the **stop_times** table defines the sequence of stops and the time difference between each stop. -| Field Name | Required & Type | Details | -| ------ | ------ | ------ | -| trip_id | **Required ID** | The **trip_id** contains an ID that identifies a trip on which the specified frequency of service applies. Trip IDs are referenced from the [trips.txt](#tripstxt) file. | -| start_time | **Required service time** | The **start_time** field specifies the time at which the first vehicle departs from the first stop of the trip with the specified frequency. The time is measured from "noon minus 12h" (effectively midnight, except for days on which daylight savings time changes occur) at the beginning of the service day. For times occurring after midnight, enter the time as a value greater than 24:00:00 in HH:MM:SS local time for the day on which the trip schedule begins. E.g. 25:35:00. | -| end_time | **Required service time** | The **end_time** field indicates the time at which service changes to a different frequency (or ceases) at the first stop in the trip. The time is measured from "noon minus 12h" (effectively midnight, except for days on which daylight savings time changes occur) at the beginning of the service day. For times occurring after midnight, enter the time as a value greater than 24:00:00 in HH:MM:SS local time for the day on which the trip schedule begins. E.g. 25:35:00. | -| headway_secs | **Required non-negative integer** | The **headway_secs** field indicates the time between departures from the same stop (headway) for this trip type, during the time interval specified by **start_time** and **end_time**. The headway value must be entered in seconds. | -| | | Periods in which headways are defined (the rows in frequencies.txt) shouldn't overlap for the same trip, since it's hard to determine what should be inferred from two overlapping headways. However, a headway period may begin at the exact same time that another one ends, for instance: | -| | | `A, 05:00:00, 07:00:00, 600` | +| Field Name | Type | Required | Details | +| ------ | ------ | ------ | ------ | +| trip_id | ID | **Required** | The **trip_id** contains an ID that identifies a trip on which the specified frequency of service applies. Trip IDs are referenced from the [trips.txt](#tripstxt) file. | +| start_time | Time | **Required** | The **start_time** field specifies the time at which the first vehicle departs from the first stop of the trip with the specified frequency. The time is measured from "noon minus 12h" (effectively midnight, except for days on which daylight savings time changes occur) at the beginning of the service day. For times occurring after midnight, enter the time as a value greater than 24:00:00 in HH:MM:SS local time for the day on which the trip schedule begins. E.g. 25:35:00. | +| end_time | Time | **Required** | The **end_time** field indicates the time at which service changes to a different frequency (or ceases) at the first stop in the trip. The time is measured from "noon minus 12h" (effectively midnight, except for days on which daylight savings time changes occur) at the beginning of the service day. For times occurring after midnight, enter the time as a value greater than 24:00:00 in HH:MM:SS local time for the day on which the trip schedule begins. E.g. 25:35:00. | +| headway_secs | Non-negative integer | **Required** | The **headway_secs** field indicates the time between departures from the same stop (headway) for this trip type, during the time interval specified by **start_time** and **end_time**. The headway value must be entered in seconds. | +| | | | Periods in which headways are defined (the rows in frequencies.txt) shouldn't overlap for the same trip, since it's hard to determine what should be inferred from two overlapping headways. However, a headway period may begin at the exact same time that another one ends, for instance: | +| | | | | `A, 05:00:00, 07:00:00, 600` | | | | `B, 07:00:00, 12:00:00, 1200` | | exact_times | Optional enum | The **exact_times** field determines if frequency-based trips should be exactly scheduled based on the specified headway information. Valid values for this field are: | -| | |* **0** or **(empty)** - Frequency-based trips are not exactly scheduled. This is the default behavior. | -| | |* **1** - Frequency-based trips are exactly scheduled. For a frequencies.txt row, trips are scheduled starting with trip_start_time = start_time + x * headway_secs for all x in (0, 1, 2, ...) where trip_start_time < end_time. | -| | | The value of **exact_times** must be the same for all frequencies.txt rows with the same **trip_id**. If **exact_times** is 1 and a frequencies.txt row has a **start_time** equal to **end_time**, no trip must be scheduled. When **exact_times** is 1, care must be taken to choose an **end_time** value that is greater than the last desired trip start time but less than the last desired trip start time + **headway_secs**. | +| | | | * **0** or **(empty)** - Frequency-based trips are not exactly scheduled. This is the default behavior. | +| | | | * **1** - Frequency-based trips are exactly scheduled. For a frequencies.txt row, trips are scheduled starting with trip_start_time = start_time + x * headway_secs for all x in (0, 1, 2, ...) where trip_start_time < end_time. | +| | | | The value of **exact_times** must be the same for all frequencies.txt rows with the same **trip_id**. If **exact_times** is 1 and a frequencies.txt row has a **start_time** equal to **end_time**, no trip must be scheduled. When **exact_times** is 1, care must be taken to choose an **end_time** value that is greater than the last desired trip start time but less than the last desired trip start time + **headway_secs**. | ### transfers.txt From dad473b65ff08d43eb54f2b57879982384cf8445 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Frachet?= Date: Thu, 13 Sep 2018 15:37:41 -0400 Subject: [PATCH 27/30] Add type column for transfer and feed info --- gtfs/spec/en/reference.md | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md index 5565b14f3..0020c9026 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -421,17 +421,17 @@ File: **Optional** Trip planners normally calculate transfer points based on the relative proximity of stops in each route. For potentially ambiguous stop pairs, or transfers where you want to specify a particular choice, use transfers.txt to define additional rules for making connections between routes. -| Field Name | Required & Type | Details | -| ------ | ------ | ------ | -| from_stop_id | **Required ID** | The **from_stop_id** field contains a stop ID that identifies a stop or station where a connection between routes begins. Stop IDs are referenced from the [stops.txt](#stopstxt) file. If the stop ID refers to a station that contains multiple stops, this transfer rule applies to all stops in that station. | -| to_stop_id | **Required ID** | The **to_stop_id** field contains a stop ID that identifies a stop or station where a connection between routes ends. Stop IDs are referenced from the [stops.txt](#stopstxt) file. If the stop ID refers to a station that contains multiple stops, this transfer rule applies to all stops in that station. | -| transfer_type | **Required enum** | The **transfer_type** field specifies the type of connection for the specified (from_stop_id, to_stop_id) pair. Valid values for this field are: | -| | | * **0** or **(empty)** - This is a recommended transfer point between routes. | -| | | * **1** - This is a timed transfer point between two routes. The departing vehicle is expected to wait for the arriving one, with sufficient time for a passenger to transfer between routes. | -| | | * **2** - This transfer requires a minimum amount of time between arrival and departure to ensure a connection. The time required to transfer is specified by **min_transfer_time**. | -| | | * **3** - Transfers are not possible between routes at this location. | -| min_transfer_time | Optional | When a connection between routes requires an amount of time between arrival and departure (transfer_type=2), the **min_transfer_time** field defines the amount of time that must be available in an itinerary to permit a transfer between routes at these stops. The min_transfer_time must be sufficient to permit a typical rider to move between the two stops, including buffer time to allow for schedule variance on each route. | -| | | The min_transfer_time value must be entered in seconds, and must be a non-negative integer. | +| Field Name | Type | Required | Details | +| ------ | ------ | ------ | ------ | +| from_stop_id | ID | **Required** | The **from_stop_id** field contains a stop ID that identifies a stop or station where a connection between routes begins. Stop IDs are referenced from the [stops.txt](#stopstxt) file. If the stop ID refers to a station that contains multiple stops, this transfer rule applies to all stops in that station. | +| to_stop_id | ID | **Required** | The **to_stop_id** field contains a stop ID that identifies a stop or station where a connection between routes ends. Stop IDs are referenced from the [stops.txt](#stopstxt) file. If the stop ID refers to a station that contains multiple stops, this transfer rule applies to all stops in that station. | +| transfer_type | Enum | **Required** | The **transfer_type** field specifies the type of connection for the specified (from_stop_id, to_stop_id) pair. Valid values for this field are: | +| | | | * **0** or **(empty)** - This is a recommended transfer point between routes. | +| | | | * **1** - This is a timed transfer point between two routes. The departing vehicle is expected to wait for the arriving one, with sufficient time for a passenger to transfer between routes. | +| | | | * **2** - This transfer requires a minimum amount of time between arrival and departure to ensure a connection. The time required to transfer is specified by **min_transfer_time**. | +| | | | * **3** - Transfers are not possible between routes at this location. | +| min_transfer_time | Non-negative integer | Optional | When a connection between routes requires an amount of time between arrival and departure (transfer_type=2), the **min_transfer_time** field defines the amount of time that must be available in an itinerary to permit a transfer between routes at these stops. The min_transfer_time must be sufficient to permit a typical rider to move between the two stops, including buffer time to allow for schedule variance on each route. | +| | | | The min_transfer_time value must be entered in seconds, and must be a non-negative integer. | ### feed_info.txt @@ -439,11 +439,11 @@ File: **Optional** The file contains information about the feed itself, rather than the services that the feed describes. GTFS currently has an [agency.txt](#agencytxt) file to provide information about the agencies that operate the services described by the feed. However, the publisher of the feed is sometimes a different entity than any of the agencies (in the case of regional aggregators). In addition, there are some fields that are really feed-wide settings, rather than agency-wide. -| Field Name | Required & Type | Details | -| ------ | ------ | ------ | -| feed_publisher_name | **Required text** | The **feed_publisher_name** field contains the full name of the organization that publishes the feed. (This may be the same as one of the **agency_name** values in [agency.txt](#agencytxt).) GTFS-consuming applications can display this name when giving attribution for a particular feed's data. | -| feed_publisher_url | **Required URL** | The **feed_publisher_url** field contains the URL of the feed publishing organization's website. (This may be the same as one of the **agency_url** values in [agency.txt](#agencytxt)). | -| feed_lang | Required language | The **feed_lang** field contains a language code specifying the default language used for the text in this feed. This setting helps GTFS consumers choose capitalization rules and other language-specific settings for the feed. | -| feed_start_date | Optional service date | The feed 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 can be left empty if unavailable. The **feed_end_date** date must not precede the **feed_start_date** date if both are given. Feed providers are encouraged to give schedule data outside this period to advise of likely future service, but feed 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 feed 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 | Optional service date | (see above) | -| feed_version | Optional text | The feed publisher can specify a string here that indicates the current version of their GTFS feed. GTFS-consuming applications can display this value to help feed publishers determine whether the latest version of their feed has been incorporated. | +| Field Name | Type | Required | Details | +| ------ | ------ | ------ | ------ | +| feed_publisher_name | Text | **Required** | The **feed_publisher_name** field contains the full name of the organization that publishes the feed. (This may be the same as one of the **agency_name** values in [agency.txt](#agencytxt).) GTFS-consuming applications can display this name when giving attribution for a particular feed's data. | +| feed_publisher_url | URL | **Required** | The **feed_publisher_url** field contains the URL of the feed publishing organization's website. (This may be the same as one of the **agency_url** values in [agency.txt](#agencytxt)). | +| feed_lang | Language code | Required | The **feed_lang** field contains a language code specifying the default language used for the text in this feed. This setting helps GTFS consumers choose capitalization rules and other language-specific settings for the feed. | +| feed_start_date | Date | Optional | The feed 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 can be left empty if unavailable. The **feed_end_date** date must not precede the **feed_start_date** date if both are given. Feed providers are encouraged to give schedule data outside this period to advise of likely future service, but feed 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 feed 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 | The feed publisher can specify a string here that indicates the current version of their GTFS feed. GTFS-consuming applications can display this value to help feed publishers determine whether the latest version of their feed has been incorporated. | From 445a575914ab8d9256677e1dcc821a226d8add40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Frachet?= Date: Thu, 13 Sep 2018 15:38:47 -0400 Subject: [PATCH 28/30] fix typos --- 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 0020c9026..960baef9a 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -408,9 +408,9 @@ This table is intended to represent schedules that don't have a fixed list of st | end_time | Time | **Required** | The **end_time** field indicates the time at which service changes to a different frequency (or ceases) at the first stop in the trip. The time is measured from "noon minus 12h" (effectively midnight, except for days on which daylight savings time changes occur) at the beginning of the service day. For times occurring after midnight, enter the time as a value greater than 24:00:00 in HH:MM:SS local time for the day on which the trip schedule begins. E.g. 25:35:00. | | headway_secs | Non-negative integer | **Required** | The **headway_secs** field indicates the time between departures from the same stop (headway) for this trip type, during the time interval specified by **start_time** and **end_time**. The headway value must be entered in seconds. | | | | | Periods in which headways are defined (the rows in frequencies.txt) shouldn't overlap for the same trip, since it's hard to determine what should be inferred from two overlapping headways. However, a headway period may begin at the exact same time that another one ends, for instance: | -| | | | | `A, 05:00:00, 07:00:00, 600` | -| | | `B, 07:00:00, 12:00:00, 1200` | -| exact_times | Optional enum | The **exact_times** field determines if frequency-based trips should be exactly scheduled based on the specified headway information. Valid values for this field are: | +| | | | `A, 05:00:00, 07:00:00, 600` | +| | | | `B, 07:00:00, 12:00:00, 1200` | +| exact_times | Enum | Optional | The **exact_times** field determines if frequency-based trips should be exactly scheduled based on the specified headway information. Valid values for this field are: | | | | | * **0** or **(empty)** - Frequency-based trips are not exactly scheduled. This is the default behavior. | | | | | * **1** - Frequency-based trips are exactly scheduled. For a frequencies.txt row, trips are scheduled starting with trip_start_time = start_time + x * headway_secs for all x in (0, 1, 2, ...) where trip_start_time < end_time. | | | | | The value of **exact_times** must be the same for all frequencies.txt rows with the same **trip_id**. If **exact_times** is 1 and a frequencies.txt row has a **start_time** equal to **end_time**, no trip must be scheduled. When **exact_times** is 1, care must be taken to choose an **end_time** value that is greater than the last desired trip start time but less than the last desired trip start time + **headway_secs**. | From c55ac248be444d8c4ac8d9a19f2b6510b409cc09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Frachet?= Date: Thu, 13 Sep 2018 15:40:24 -0400 Subject: [PATCH 29/30] Fix bold on required --- 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 960baef9a..79f970ce5 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -443,7 +443,7 @@ The file contains information about the feed itself, rather than the services th | ------ | ------ | ------ | ------ | | feed_publisher_name | Text | **Required** | The **feed_publisher_name** field contains the full name of the organization that publishes the feed. (This may be the same as one of the **agency_name** values in [agency.txt](#agencytxt).) GTFS-consuming applications can display this name when giving attribution for a particular feed's data. | | feed_publisher_url | URL | **Required** | The **feed_publisher_url** field contains the URL of the feed publishing organization's website. (This may be the same as one of the **agency_url** values in [agency.txt](#agencytxt)). | -| feed_lang | Language code | Required | The **feed_lang** field contains a language code specifying the default language used for the text in this feed. This setting helps GTFS consumers choose capitalization rules and other language-specific settings for the feed. | +| feed_lang | Language code | **Required** | The **feed_lang** field contains a language code specifying the default language used for the text in this feed. This setting helps GTFS consumers choose capitalization rules and other language-specific settings for the feed. | | feed_start_date | Date | Optional | The feed 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 can be left empty if unavailable. The **feed_end_date** date must not precede the **feed_start_date** date if both are given. Feed providers are encouraged to give schedule data outside this period to advise of likely future service, but feed 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 feed 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 | The feed publisher can specify a string here that indicates the current version of their GTFS feed. GTFS-consuming applications can display this value to help feed publishers determine whether the latest version of their feed has been incorporated. | From c9e7bc86425c6129ae2f68bbf6cd7d527609eea2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Frachet?= Date: Thu, 13 Sep 2018 15:41:21 -0400 Subject: [PATCH 30/30] Rome not Roma --- gtfs/spec/en/reference.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtfs/spec/en/reference.md b/gtfs/spec/en/reference.md index 79f970ce5..6db4866f6 100644 --- a/gtfs/spec/en/reference.md +++ b/gtfs/spec/en/reference.md @@ -41,8 +41,8 @@ This section defines terms that are used throughout this document. - **Enum** - The field contains a value from a set of predefined constants defined in the "Details" column. For example: the route_type field contains a "0" for tram, a "1" for subway... - **ID** - The field contains an identifier which uniquely identifies an entity (therefore is dataset unique). Its value is not aimed to be displayed to the user, and is a sequence of any UTF-8 characters, but using only printable ASCII characters is recommended. - **Language Code** - The field contains a IETF BCP 47 language code. For an introduction to IETF BCP 47, please refer to http://www.rfc-editor.org/rfc/bcp/bcp47.txt and http://www.w3.org/International/articles/language-tags/. For example: "en" for English, "en-US" for American English or "de" for German. -- **Latitude** - The field contains the WGS84 latitude in decimal degrees. The value must be greater than or equal to -90.0 and less than or equal to 90.0. For example: "41.890169" for the Colloseum in Roma. -- **Longitude** - The field contains the WGS84 longitude in decimal degrees. The value must be geater than or equal to -180.0 and less than or equal to 180.0. For example: "12.492269" for the Colloseum in Roma. +- **Latitude** - The field contains the WGS84 latitude in decimal degrees. The value must be greater than or equal to -90.0 and less than or equal to 90.0. For example: "41.890169" for the Colloseum in Rome. +- **Longitude** - The field contains the WGS84 longitude in decimal degrees. The value must be geater than or equal to -180.0 and less than or equal to 180.0. For example: "12.492269" for the Colloseum in Rome. - **Non-negative Float** - The field contains a non-negative floating point number (which includes 0). - **Non-negative Integer** - The field contains a non-negative whole number (which includes 0). - **Phone number** - The field contains a phone number.