From 21bc2802365d21d319ebfa6a38fd7de65a903ed1 Mon Sep 17 00:00:00 2001 From: Evan Howington Date: Fri, 7 Sep 2018 10:13:38 -0700 Subject: [PATCH 1/5] 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 2/5] 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 3/5] 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 4/5] 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 5/5] 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.