@@ -6,6 +6,13 @@ interface DatasetFeature {
66
77type DatasetFeatures = Record < string , DatasetFeature > ;
88
9+ export function getDataFeatureUrl ( feature : string ) : string {
10+ return (
11+ DATASET_FEATURES [ feature ] ?. linkToInfo ??
12+ DATASET_FEATURES . overview . linkToInfo
13+ ) ;
14+ }
15+
916export const DATASET_FEATURES : DatasetFeatures = {
1017 overview : {
1118 component : '' ,
@@ -18,31 +25,38 @@ export const DATASET_FEATURES: DatasetFeatures = {
1825 linkToInfo :
1926 'https://gtfs.org/getting_started/features/accessibility/#text-to-speech' ,
2027 } ,
21- 'Wheelchair Accessibility' : {
28+ 'Stops Wheelchair Accessibility' : {
2229 component : 'Accessibility' ,
2330 fileName : 'trips.txt' ,
24- linkToInfo : 'https://gtfs.org/getting_started/features/accessibility' ,
31+ linkToInfo :
32+ 'https://gtfs.org/getting_started/features/accessibility/#stops-wheelchair-accessibility' ,
2533 } ,
26- 'Route Colors ' : {
34+ 'Trips Wheelchair Accessibility ' : {
2735 component : 'Accessibility' ,
36+ fileName : 'trips.txt' ,
37+ linkToInfo :
38+ 'https://gtfs.org/getting_started/features/accessibility/#trips-wheelchair-accessibility' ,
39+ } ,
40+ 'Route Colors' : {
41+ component : 'Base add-ons' ,
2842 fileName : 'routes.txt' ,
2943 linkToInfo :
3044 'https://gtfs.org/getting_started/features/base_add-ons/#route-colors' ,
3145 } ,
32- 'Bikes Allowance ' : {
33- component : 'Accessibility ' ,
46+ 'Bike Allowed ' : {
47+ component : 'Base add-ons ' ,
3448 fileName : 'trips.txt' ,
3549 linkToInfo :
3650 'https://gtfs.org/getting_started/features/base_add-ons/#bike-allowed' ,
3751 } ,
3852 Translations : {
39- component : 'Accessibility ' ,
53+ component : 'Base add-ons ' ,
4054 fileName : 'translations.txt' ,
4155 linkToInfo :
4256 'https://gtfs.org/getting_started/features/base_add-ons/#translations' ,
4357 } ,
4458 Headsigns : {
45- component : 'Accessibility ' ,
59+ component : 'Base add-ons ' ,
4660 fileName : 'trips.txt' ,
4761 linkToInfo :
4862 'https://gtfs.org/getting_started/features/base_add-ons/#headsigns' ,
@@ -76,24 +90,24 @@ export const DATASET_FEATURES: DatasetFeatures = {
7690 linkToInfo :
7791 'https://gtfs.org/getting_started/features/fares/#zone-based-fares' ,
7892 } ,
79- 'Transfer Fares ' : {
93+ 'Fare Transfers ' : {
8094 component : 'Fares' ,
8195 fileName : 'fare_transfer_rules.txt' ,
8296 linkToInfo :
83- 'https://gtfs.org/getting_started/features/fares/#fares -transfers' ,
97+ 'https://gtfs.org/getting_started/features/fares/#fare -transfers' ,
8498 } ,
8599 'Fares V1' : {
86100 component : 'Fares' ,
87101 fileName : 'fare_attributes.txt' ,
88102 linkToInfo : 'https://gtfs.org/getting_started/features/fares/#fares-v1' ,
89103 } ,
90- 'Pathways (basic) ' : {
104+ 'Pathway Connections ' : {
91105 component : 'Pathways' ,
92106 fileName : 'pathways.txt' ,
93107 linkToInfo :
94108 'https://gtfs.org/getting_started/features/pathways/#pathway-connections' ,
95109 } ,
96- 'Pathways (extra) ' : {
110+ 'Pathway Details ' : {
97111 component : 'Pathways' ,
98112 fileName : 'pathways.txt' ,
99113 linkToInfo :
@@ -104,31 +118,32 @@ export const DATASET_FEATURES: DatasetFeatures = {
104118 fileName : 'levels.txt' ,
105119 linkToInfo : 'https://gtfs.org/getting_started/features/pathways/#levels' ,
106120 } ,
107- 'Traversal Time ' : {
121+ 'In-station traversal time ' : {
108122 component : 'Pathways' ,
109123 fileName : 'pathways.txt' ,
110124 linkToInfo :
111125 'https://gtfs.org/getting_started/features/pathways/#in-station-traversal-time' ,
112126 } ,
113- 'Pathways Directions ' : {
127+ 'Pathway Signs ' : {
114128 component : 'Pathways' ,
115129 fileName : 'pathways.txt' ,
116- linkToInfo : 'https://gtfs.org/schedule/reference/#pathwaystxt' ,
130+ linkToInfo :
131+ 'https://gtfs.org/getting_started/features/pathways/#pathway-signs' ,
117132 } ,
118133 'Location Types' : {
119- component : 'Pathways ' ,
134+ component : 'Base add-ons ' ,
120135 fileName : 'stops.txt' ,
121136 linkToInfo :
122137 'https://gtfs.org/getting_started/features/base_add-ons/#location-types' ,
123138 } ,
124139 'Feed Information' : {
125- component : 'Metadata ' ,
140+ component : 'Base add-ons ' ,
126141 fileName : 'feed_info.txt' ,
127142 linkToInfo :
128143 'https://gtfs.org/getting_started/features/base_add-ons/#feed-information' ,
129144 } ,
130145 Attributions : {
131- component : 'Metadata ' ,
146+ component : 'Base add-ons ' ,
132147 fileName : 'attributions.txt' ,
133148 linkToInfo :
134149 'https://gtfs.org/getting_started/features/base_add-ons/#attributions' ,
@@ -139,22 +154,66 @@ export const DATASET_FEATURES: DatasetFeatures = {
139154 linkToInfo :
140155 'https://gtfs.org/getting_started/features/flexible_services/#continuous-stops' ,
141156 } ,
157+ 'Booking Rules' : {
158+ component : 'Flexible Services' ,
159+ fileName : 'routes.txt' ,
160+ linkToInfo :
161+ 'https://gtfs.org/getting_started/features/flexible_services/#booking-rules' ,
162+ } ,
163+ 'Fixed-Stops Demand Responsive Services' : {
164+ component : 'Flexible Services' ,
165+ fileName : 'location_groups.txt' ,
166+ linkToInfo :
167+ 'https://gtfs.org/getting_started/features/flexible_services/#fixed-stops-demand-responsive-services' ,
168+ } ,
169+ 'Zone-Based Demand Responsive Services' : {
170+ component : 'Flexible Services' ,
171+ fileName : 'stop_times.txt' ,
172+ linkToInfo :
173+ 'https://gtfs.org/getting_started/features/flexible_services/#zone-based-demand-responsive-services' ,
174+ } ,
175+ 'Predefined Routes with Deviation' : {
176+ component : 'Flexible Services' ,
177+ fileName : 'stop_times.txt' ,
178+ linkToInfo :
179+ 'https://gtfs.org/getting_started/features/flexible_services/#predefined-routes-with-deviation' ,
180+ } ,
142181 Shapes : {
143- component : 'Shapes ' ,
182+ component : 'Base add-ons ' ,
144183 fileName : 'shapes.txt' ,
145184 linkToInfo :
146185 'https://gtfs.org/getting_started/features/base_add-ons/#shapes ' ,
147186 } ,
148187 Transfers : {
149- component : 'Transfers ' ,
188+ component : 'Base add-ons ' ,
150189 fileName : 'transfers.txt' ,
151190 linkToInfo :
152191 'https://gtfs.org/getting_started/features/base_add-ons/#transfers' ,
153192 } ,
154193 Frequencies : {
155- component : 'Frequency-based Services ' ,
194+ component : 'Base add-ons ' ,
156195 fileName : 'frequencies.txt' ,
157196 linkToInfo :
158197 'https://gtfs.org/getting_started/features/base_add-ons/#frequency-based-service ' ,
159198 } ,
160199} ;
200+
201+ // DEPRECATED FEATURES
202+ DATASET_FEATURES [ 'Wheelchair Accessibility' ] = {
203+ // as of 6.0
204+ component : 'Accessibility' ,
205+ fileName : 'trips.txt' ,
206+ linkToInfo : 'https://gtfs.org/getting_started/features/accessibility' ,
207+ } ;
208+ DATASET_FEATURES [ 'Bikes Allowance' ] = DATASET_FEATURES [ 'Bike Allowed' ] ;
209+ DATASET_FEATURES [ 'Transfer Fares' ] = DATASET_FEATURES [ 'Fare Transfers' ] ; // as of 6.0
210+ DATASET_FEATURES [ 'Pathways (basic)' ] = DATASET_FEATURES [ 'Pathway Connections' ] ; // as of 6.0
211+ DATASET_FEATURES [ 'Pathways (extra)' ] = DATASET_FEATURES [ 'Pathway Details' ] ; // as of 6.0
212+ DATASET_FEATURES [ 'Traversal Time' ] =
213+ DATASET_FEATURES [ 'In-station traversal time' ] ;
214+ DATASET_FEATURES [ 'Pathways Directions' ] = {
215+ // as of 6.0
216+ component : 'Pathways' ,
217+ fileName : 'pathways.txt' ,
218+ linkToInfo : 'https://gtfs.org/schedule/reference/#pathwaystxt' ,
219+ } ;
0 commit comments