EggFormats |
UserPreferences |
The PEAK Developers' Center | FrontPage | RecentChanges | TitleIndex | WordIndex | SiteNavigation | HelpContents |
Support browsers that contribute to open source, try Firefox or Google Chrome.
googletransitdatafeed
?GoogleTransitDataFeed
Project Home Downloads Wiki Issues Source Checkout | Browse | Changes |
r977 r978›
Source path: svn/ wiki/ files/ ?FeedSpecHistory/ transit_feed_specification-20080807.htm
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/> <title>Google Transit Feed Specification - Google Transit Feed Specification - Google Code</title> <script type="text/javascript"><!-- (function(){function a(){this.t={};this.tick=function(c){this.t[c]=(new Date).getTime()};this.tick("start")}var b=new a;window.jstiming={a,load:b};if(window.external&&window.external.pageT)window.jstiming.pt=window.external.pageT;})();
var _tocPath_ = '/html/transit/spec/_toc.ezt'; //--></script> <link href="/css/codesite.pack.01312008.css" type="text/css" rel="stylesheet"></link> <script src="/js/codesite.pack.01312008.js" type="text/javascript"></script> <link rel="search" type="application/opensearchdescription+xml" title="Google Code" href="/osd.xml" />
<!--[if IE]><link rel="stylesheet" type="text/css" href="/css/iehacks.css" /><![endif]-->
</head>
<body class="gc-documentation">
<div id="gc-container">
<a name="top"></a> <div id="skipto">
<a href="#gc-pagecontent-anchor">Skip to page content</a> <a href="#gc-toc-anchor">Skip to main navigation</a>
</div> <div id="langpref">
<a class="dropdown" href="/">English</a> <span>|</span> <a href="/more/#products-products-android">Site Directory</a>
</div> <div id="gc-header">
<div id="logo"><a href="/">
<img src="/images/cleardot.gif" height="1px" width="1px" alt="Google Code Home Page" id="gc-logo-img"/>
</a></div> <div id="search">
<div id="searchForm" class="searchForm">
<form id="cse" action="http://www.google.com/cse" accept-charset="utf-8" class="gsc-search-box" onsubmit="executeGSearch(document.get?ElementById('gsearchInput').value); return false;"> <noscript> <input type="hidden" name="cref" value="http://code.google.com/cse/googlecode-context.xml"/> </noscript>
<table class="gsc-search-box" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="gsc-input">
<input id="gsearchInput" type="text" name="q" maxlength="2048" class="gsc-input" autocomplete="off" title="Google Code Search" style="width:345px"/>
</td> <td class="gsc-search-button">
<div id="cs-searchresults" onclick="event.cancelBubble = true;"></div> <input title="Search" id="gsearchButton" class="gsc-search-button" name="sa" value="Search" type="submit"/>
</td>
</tr> <tr>
<td colspan="2" class="greytext">e.g. "ajax apis" or "open source"</td>
</tr>
</tbody>
</table>
</form>
</div> <!-- end searchForm -->
</div> <!-- end search -->
</div> <!-- end gc-header -->
<div id="codesiteContent">
<a name="gc-topnav-anchor"></a> <div id="gc-topnav">
<h1>Google Transit Feed Specification</h1> <ul id="docs" class="gc-topnav-tabs">
<li> </li>
</ul>
</div> <!-- end gc-topnav -->
<div class="g-section g-tpl-170">
<a name="gc-toc-anchor"></a> <div class="g-unit g-first" id="gc-toc">
<ul>
<li>
<h1>For Riders</h1> <ul>
<li><a href="http://www.google.com/transit">Google Transit Trip Planner</a></li>
<li><a href="http://maps.google.com/support/bin/topic.py?topic=12356">About Public Transit in Google Maps</a></li> <li><a href="http://groups.google.com/group/googletransit/">Google Transit Group</a></li> <li><a href="http://maps.google.com">Google Maps</a></li> <li><a href="http://earth.google.com/">Google Earth </a>
<div class="line"> </div>
</li>
</ul>
</li>
<li><h1>For Feed Developers</h1>
<ul> <li><a href="./transit_feed_specification.html" id="transitfeedspec_lnk">Google Transit Feed Specification</a></li> <li><a href="http://code.google.com/p/googletransitdatafeed/wiki/FeedSpecHistory">Revision History</a>
<li><a href="http://code.google.com/p/googletransitdatafeed/">Open Source GTFS Feed Tools </a></li> <li><a href="http://spreadsheets.google.com/pub?key=puMHBiWYEbXT0UxQGLDpuBA&gid=11">Example Feed </a></li>
<li><a href="http://groups.google.com/group/gtfs-changes/">GTFS Changes Group</a></li>
</ul>
</li>
<li><h1>Public GTFS Feeds </h1>
<ul>
<li><a href="http://developer.trimet.org/schedule/GTFS/">Portland ?TriMet</a></li> <li><a href="http://bart.gov/stations/schedules/openformat.asp">SF Bay Area BART </a></li>
<li><a href="http://www.dart.org/transitdata/">Dallas DART</a></li>
<li><a href="http://www.octa.net/google/">Orange County OCTA</a></li> <li><a href="http://iportal.sacrt.com/GTFS/SRTD/">Sacramento RT</a></li> <li><a href="http://www.capmetro.org/gisdata/google_transit.zip">Austin Capital Metro</a></li> <li><a href="http://www.transitinfosolutions.com/transit_feeds/humboldt/">Humboldt County Transit Authority</a></li> <li><a href="http://code.google.com/p/googletransitdatafeed/wiki/PublicFeeds">More Public Feeds...</a></li>
</ul>
<div class="line"></div>
</li> </ul>
<a class="hidden" href="#gc-topnav-anchor">More Google Transit Feed Specification resource links</a>
</div>
<a name="gc-pagecontent-anchor"></a> <div class="g-unit" id="gc-pagecontent">
<h1 class="page_title">Google Transit Feed Specification</h1>
<p><b>Revised August 7, 2008</b></p> <p>The transit trip planning feature in Google Maps enables users to create efficient travel itineraries using public transportation schedules. This document explains how you can provide public transportation schedules to Google so that those schedules can be incorporated into Google Maps and other Google applications that show geographic data. This document explains the types of files that comprise a transit feed and defines the fields used in all of those files.</p> <h1>Table of Contents</h1>
<a class="hidden" href="#transit?FeedSubmit">Skip over contents</a> <div class="toc">
<ol class="toc">
<li><a href="#transit?FeedSubmit">Submitting a Transit Feed to Google </a></li>
<li><a href="#transit?TermDefinitions">Term Definitions</a></li> <li><a href="#transit?FeedFiles">Requirements </a>
<ol class="toc">
</ol></li> <li><a href="#Google_Transit_Feed_Field_Definitions"> Field Definitions</a> <ol class="toc">
<li><a href="#agency_txt___Field_Definitions">agency.txt</a></li> <li><a href="#stops_txt___Field_Definitions">stops.txt</a></li> <li><a href="#routes_txt___Field_Definitions">routes.txt</a></li> <li><a href="#trips_txt___Field_Definitions">trips.txt</a></li> <li><a href="#stop_times_txt___Field_Definitions">stop_times.txt</a></li> <li><a href="#calendar_txt___Field_Definitions">calendar.txt</a></li> <li><a href="#calendar_dates_txt___Field_Definitions">calendar_dates.txt</a></li> <li><a href="#fare_attributes_txt___Field_Definitions">fare_attributes.txt</a></li> <li><a href="#fare_rules_txt___Field_Definitions">fare_rules.txt</a></li> <li><a href="#shapes_txt___Field_Definitions">shapes.txt</a></li> <li><a href="#frequencies_txt___Field_Definitions">frequencies.txt</a></li>
<li><a href="#transfers_txt___Field_Definitions">transfers.txt</a></li>
</ol> </li> <li><a href="#transit?FeedSampleData">Sample Data</a></li> <li><a href="#transit?AgencyExample">Demo Transit Agency Example </a></li> <li><a href="#transitScreenshots">Displaying Transit Data to Maps Users</a></li> </ol> </div>
<h1><a name="transit?FeedSubmit" id="transit?FeedSubmit"></a>Submitting a Transit Feed to Google </h1> <p>If you're at a public agency that oversees public transportation for your city and would like your data to be included, these are the steps in submitting a transit feed to Google: </p> <ol>
<li>The agency prepares transit data as a zip file in the Google Transit Feed Spec (GTFS) format.</li> <li>The agency <a href="#transit?TestingFeeds">tests</a> the GTFS zip file to ensure that it is valid, and that the schedules are accurate. </li> <li>The agency hosts the transit data zip files on a standard web server and sends an e-mail to <a href="mailto:maps-transit-content@google.com">maps-transit-content@google.com</a>. The e-mail must contain a link to the location of the transit data zip file and the Google account IDs that should have access to the preview. To create a free Google account ID, click here: <a href="https://www.google.com/accounts/NewAccount" title="Go to create an account">https://www.google.com/accounts/NewAccount</a>.</li> <li>Google sends the agency a link to an online data use agreement. </li> <li>Google fetches the validated transit files from the agency's web server.</li> <li>Google builds a preview of the agency's data in Google Maps. </li> <li>The agency reviews the preview data and iterates with Google to resolve any issues.</li> <li>Google and the agency agree to go live with the transit data, and decide how often Google will check the transit agency's web server for feed updates. </li> <li>Transit data from the agency goes live on google.com.</li> <li>Google fetches new files from the agency's web server on a regular basis, and updates Google Maps and other geographic applications at Google with the latest feed. </li>
</ol> <h1><a name="transit?TermDefinitions" id="transit?TermDefinitions"></a>Term Definitions</h1> <p>This section defines terms that are used throughout this document.</p>
<ul> <li><b>Field required</b> - 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.</li> <li> <b>Field optional</b> - 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. </li> <li> <b>Dataset unique</b> - The field contains a value that maps to a single distinct entity within the column. For example, if a route is assigned the ID <b>1A</b>, then no other route may use that route ID. However, you may assign the ID <b>1A</b> to a location because locations are a different type of entity than routes.</li> </ul> <h1><a name="transit?FeedFiles" id="transit?FeedFiles"></a>Requirements </h1> <p>Google accepts transit feeds that contain the following files:</p>
<ul>
<li> <b><a href="#agency_txt___Field_Definitions">agency.txt</a> - Required</b>. This file contains information about one or more transit agencies that provide the data in this feed.</li> <li> <b><a href="#stops_txt___Field_Definitions">stops.txt</a> - Required</b>. This file contains information about individual locations where vehicles pick up or drop off passengers.</li> <li> <b><a href="#routes_txt___Field_Definitions">routes.txt</a> - Required</b>. This file contains information about a transit organization's routes. A route is a group of trips that are displayed to riders as a single service.</li> <li> <b><a href="#trips_txt___Field_Definitions">trips.txt</a> - Required</b>. This file lists all trips and their routes. A trip is a sequence of two or more stops that occurs at specific time.</li> <li> <b><a href="#stop_times_txt___Field_Definitions">stop_times.txt</a> - Required</b>. This file lists the times that a vehicle arrives at and departs from individual stops for each trip.</li> <li> <b><a href="#calendar_txt___Field_Definitions">calendar.txt</a> - Required</b>. This file defines dates for service IDs using a weekly schedule. Specify when service starts and ends, as well as days of the week where service is available. </li> <li> <b><a href="#calendar_dates_txt___Field_Definitions">calendar_dates.txt</a> - Optional</b>. This file lists exceptions for the service IDs defined in the <b>calendar.txt</b> file. If calendar_dates.txt includes ALL dates of service, this file may be specified instead of calendar.txt. </li> <li><strong><a href="#fare_attributes_txt___Field_Definitions">fare_attributes.txt</a> - Optional.</strong> This file defines fare information for a transit organization's routes. </li> <li><strong><a href="#fare_rules_txt___Field_Definitions">fare_rules.txt</a> - Optional.</strong> This file defines the rules for applying fare information for a transit organization's routes.</li> <li> <strong><a href="#shapes_txt___Field_Definitions">shapes.txt</a> - Optional.</strong> This file defines the rules for drawing lines on a map to represent a transit organization's routes.</li> <li> <strong><a href="#frequencies_txt___Field_Definitions">frequencies.txt</a> - Optional.</strong> This file defines the headway (time between trips) for routes with variable frequency of service.</li> <li> <strong><a href="#transfers_txt___Field_Definitions">transfers.txt</a> - Optional.</strong> This file defines the rules for making connections at transfer points between routes. </li>
</ul>
<h2><a name="transit?FileRequirements" id="transit?FileRequirements"></a>File Requirements</h2> <p>The following requirements apply to the format and contents of your files:</p> <ul> <li> All files in a Google Transit Feed Spec (GTFS) feed must be saved as comma-delimited text. Remove any extra spaces between fields. </li> <li> The first line of your feeds must contain field names. Each subsection of the <a href="#Google_Transit_Feed_Field_Definitions"> Field Definitions</a> section corresponds to one of the files in a transit feed and lists the field names you may use in that file.</li> <li> All field names are case-sensitive.</li> <li> Field values may not contain tabs, carriage returns or new lines. </li> <li> Field values that contain quotation marks or commas must be enclosed within quotation marks. In addition, each quotation mark in the field value must be preceded with a quotation mark. This is consistent with the manner in which Microsoft Excel outputs comma-delimited (CSV) files. For more information on the CSV file format, see <a href="http://en.wikipedia.org/wiki/Comma-separated_values">http://en.wikipedia.org/wiki/Comma-separated_values</a>.
<br /> The following example demonstrates how a field value would appear in a comma-delimited file: <ul>
<li><b>Original field value:</b> <code>Contains "quotes", commas and text</code></li> <li><b>Field value in CSV file:</b><code> "Contains ""quotes"", commas and text"</code></li> </ul>
</li> <li>Field values should not contain HTML tags, comments or escape sequences.</li> <li>Files should be encoded in UTF-8 to support all Unicode characters.</li> <li>Name your feed files using the following naming conventions:
<ul>
<li>agency.txt</li> <li>stops.txt</li> <li>routes.txt</li> <li>trips.txt</li> <li>stop_times.txt</li> <li>calendar.txt</li> <li>calendar_dates.txt</li> <li>fare_rules.txt</li> <li>fare_attributes.txt</li> <li>shapes.txt</li> <li>frequencies.txt</li> <li>transfers.txt</li>
</ul>
</li> <li>Zip the files in your feed. Name the zip file <b>google_transit.zip</b>. <a href="#transit?PostingFeeds">Post</a> the zip file in a directory named <b>YYYYMMDD</b>, where YYYYMMDD is the earliest date of valid service included in any of the files. </li> </ul>
<h2><a name="transit?TestingFeeds" id="transit?TestingFeeds"></a>Testing Your Feeds</h2>
<p>Two Open Source tools are available for testing feeds in the GTFS format:</p> <ul>
<li>Use the <a href="http://code.google.com/p/googletransitdatafeed/wiki/FeedValidator">feedvalidator</a> tool to verify that your feed data file matches the specification defined in this document. </li> <li>Use the <a href="http://code.google.com/p/googletransitdatafeed/wiki/ScheduleViewer">schedule_viewer</a> application to see your feed data represented on a map. This is not representative of how your data will look in other applications; it is a basic tool for testing. Examine routes and schedules to ensure that the data feed correctly represents your system. </li> </ul>
<p>Before requesting a preview of your feed in Google Transit, please use both these tools and correct any errors that you find. This helps Google to set up a preview as quickly as possible. </p> <h2><a name="transit?UpdatingFeeds" id="transit?UpdatingFeeds"></a>Updating Your Feeds</h2>
<p>These guidelines apply to feed updates: </p> <ul><li> You may simultaneously post more than one zip file if each zip file contains all of the data for a unique date range. In other words, different zip files cannot contain data for overlapping service dates. <p class="note"><strong>Note: </strong>As described in the previous section, each zip file that you post should reside in a different directory on your server.</p> </li>
<li>
When Google fetches a new file, the data in that file will overwrite all data previously stored for your agency. As a result, please ensure that your files provide complete data for a service date range. As noted in the previous section, you can provide multiple zip files as long as the files do not contain data for overlapping service dates. </li>
</ul>
<h2><a name="transit?PostingFeeds" id="transit?PostingFeeds"></a>Requirements for Posting Your Feeds to Google Maps </h2> <p>These requirements apply to the location of your feeds:</p>
<ul> <li> You will need to provide the URL location of your feed. Google Maps can download feeds using either HTTP or HTTPS. You will also need to provide a login and password if they are needed to retrieve your feed.</li> <li> Your IT/Networking teams should know that Google Maps periodically fetches transit feed data from the location that you specify, so that they do not change file permissions for your feed or otherwise block or break the data fetching process.</li> </ul>
<h1><a name="Google_Transit_Feed_Field_Definitions" id="Google_Transit_Feed_Field_Definitions"></a>Field Definitions</h1> <h2 class="first""><a name="agency_txt___Field_Definitions" id="agency_txt___Field_Definitions"></a>agency.txt </h2> <table>
<tr><th scope="col" abbr="field" width="15%">Field Name</th>
<th scope="col" abbr="details">Details</th>
</tr> <tr>
<td scope="row" class="attr"><a name="agency_id_feed_data" id="agency_id_feed_data"></a>agency_id</td> <td ><p class="first"><b>Optional</b>. The <b>agency_id</b> field is an ID that uniquely identifies a transit agency. A transit feed may represent data from more than one agency. The <b>agency_id</b> is dataset unique. This field is optional for transit feeds that only contain data for a single agency. </p></td>
</tr> <tr>
<td scope="row" class="attr"><a name="agency_name_feed_data" id="agency_name_feed_data"></a>agency_name</td> <td ><p class="first"><b>Required</b>. The <b>agency_name</b> field contains the full name of the transit agency. Google Maps will display this name. </p></td>
</tr>
<tr>
<td scope="row" class="attr"><a name="agency_url_feed_data" id="agency_url_feed_data"></a>agency_url</td> <td ><p class="first"><b>Required</b>. The <b>agency_url</b> field contains the URL of the transit agency. The value must be a fully qualified URL that includes <b>http://</b> or <strong>https://</strong>, and any special characters in the URL must be correctly escaped. See <a href="http://www.w3.org/Addressing/URL/4_URI_Recommentations.html">http://www.w3.org/Addressing/URL/4_URI_Recommentations.html</a> for a description of how to create fully qualified URL values.</p></td>
</tr>
<tr>
<td scope="row" class="attr"><a name="agency_timezone_feed_data" id="agency_timezone_feed_data"></a>agency_timezone</td> <td ><p class="first"><b>Required</b>. The <b>agency_timezone</b> 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 <a href="http://en.wikipedia.org/wiki/List_of_tz_zones">http://en.wikipedia.org/wiki/List_of_tz_zones</a> for a list of valid values.</p></td>
</tr> <tr>
<td scope="row" class="attr"><a name="agency_lang_feed_data" id="agency_lang_feed_data"></a>agency_lang</td> <td ><p class="first"><b>Optional</b>. The <b>agency_lang</b> 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 <a href="http://www.loc.gov/standards/iso639-2/php/code_list.php" title="the ISO 639-2 code list">http://www.loc.gov/standards/iso639-2/php/code_list.php</a> for a list of valid values.</p></td>
</tr> <tr>
<td scope="row" class="attr"><a name="agency_phone_feed_data" id="agency_phone_feed_data"></a>agency_phone</td> <td ><p class="first"><b>Optional</b>. The <b>agency_phone</b> 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. </p></td>
</tr>
</table>
<h2><a name="stops_txt___Field_Definitions" id="stops_txt___Field_Definitions"></a>stops.txt </h2> <table> <tr><th scope="col" abbr="field" width="15%">Field Name</th> <th scope="col" abbr="details">Details</th> </tr>
<tr>
<td scope="row" class="attr"><a name="stop_id_feed_data" id="stop_id_feed_data"></a>stop_id</td> <td ><p class="first"><b>Required</b>. The <b>stop_id</b> field contains an ID that uniquely identifies a stop or station. Multiple routes may use the same stop. The <b>stop_id</b> is dataset unique.</p></td>
</tr> <tr>
<td scope="row" class="attr"><a name="stop_code_ref_feed_data" id="stop_id_ref_feed_data"></a>stop_code</td> <td ><p class="first"><b>Optional</b>. The <b>stop_code</b> 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. </p>
<p class="first"> The stop_code field should only be used for stop codes that are displayed to passengers. For internal codes, use <strong>stop_id</strong>. This field should be left blank for stops without a code.</p></td>
</tr>
<tr>
<td scope="row" class="attr"><a name="stop_name_feed_data" id="stop_name_feed_data"></a>stop_name</td> <td ><p class="first"><b>Required</b>. The <b>stop_name</b> field contains the name of a stop or station. Please use a name that people will understand in the local and tourist vernacular. </p></td>
</tr>
<tr>
<td scope="row" class="attr"><a name="stop_desc_feed_data" id="stop_desc_feed_data"></a>stop_desc</td> <td ><p class="first"><b>Optional</b>. The <b>stop_desc</b> field contains a description of a stop. Please provide useful, quality information. Do not simply duplicate the name of the stop.</p></td>
</tr>
<tr>
<td scope="row" class="attr"><a name="stop_lat_feed_data" id="stop_lat_feed_data"></a>stop_lat</td> <td ><p class="first"><b>Required</b>. The <b>stop_lat</b> field contains the latitude of a stop or station. The field value must be a valid WGS 84 latitude.</p></td>
</tr>
<tr>
<td scope="row" class="attr"><a name="stop_lon_feed_data" id="stop_lon_feed_data"></a>stop_lon</td> <td ><p class="first"><b>Required</b>. The <b>stop_lon</b> field contains the longitude of a stop or station. The field value must be a valid WGS 84 longitude value from -180 to 180.</p></td>
</tr> <tr>
<td scope="row" class="attr"><a name="zone_id_feed_data" id="zone_id_feed_data"></a>zone_id</td> <td ><p class="first"><b>Optional</b>. The <b>zone_id</b> field defines the fare zone for a stop ID. Zone IDs are required if you want to provide fare information using <a href="#fare_rules_txt___Field_Definitions">fare_rules.txt</a>. If this stop ID represents a station, the zone ID is ignored. </p> </td>
</tr>
<tr>
<td scope="row" class="attr"><span class="first"><a name="stop_url_feed_data" id="stop_url_feed_data"></a></span>stop_url</td> <td ><p class="first"><b>Optional</b>. The <b>stop_url</b> field contains the URL of a web page about a particular stop. This should be different from the <strong>agency_url </strong>and the <strong>route_url</strong> fields. <br />
<br />
The value must be a fully qualified URL that includes <b>http://</b> or <strong>https://</strong>, and any special characters in the URL must be correctly escaped. See <a href="http://www.w3.org/Addressing/URL/4_URI_Recommentations.html">http://www.w3.org/Addressing/URL/4_URI_Recommentations.html</a> for a description of how to create fully qualified URL values. </p></td>
</tr>
<tr>
<td scope="row" class="attr"><span class="first"><a name="location_type_feed_data" id="location_type_feed_data"></a></span>location_type</td> <td ><p class="first"><b>Optional</b>. The <b>location_type </b>field identifies whether this stop ID represents a stop or station. 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. </p>
<p class="first">The location type field can have the following values: </p> <li><strong>0 </strong> or blank - Stop. A location where passengers board or disembark from a transit vehicle. </li>
<li><strong>1</strong> - Station. A physical structure or area that contains one or more stop. </li>
</td>
</tr> <tr>
<td scope="row" class="attr"><span class="first"><a name="parent_station_feed_data" id="parent_station_feed_data"></a></span>parent_station</td> <td ><p class="first"><b>Optional</b>. For stops that are physically located inside stations, the <b>parent_station</b> 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.
<table border="1" cellpadding="1" cellspacing="1"><tr align="left">
<th scope="col">This stop ID represents... </th> <th scope="col">This entry's location type...</th> <th scope="col">This entry's parent_station field contains...</th>
</tr>
<tr>
<td scope="row">A stop located inside a station.</td>
<td>0 or blank </td> <td>The stop ID of the station where this stop is located. <br />
The stop referenced by parent_station must have location_type=1.</td>
</tr>
<tr>
<td scope="row">A stop located outside a station. </td>
<td>0 or blank </td> <td>A blank value. The parent_station field doesn't apply to this stop. </td> </tr>
<tr>
<td scope="row">A station.</td>
<td>1</td> <td>A blank value. Stations can't contain other stations. </td> </tr>
</table>
</td>
</tr>
</table> <h2><a name="routes_txt___Field_Definitions" id="routes_txt___Field_Definitions"></a>routes.txt </h2> <table>
<tr><th scope="col" abbr="field" width="15%">Field Name</th>
<th scope="col" abbr="details">Details</th>
</tr>
<tr>
<td scope="row" class="attr"><a name="route_id_feed_data" id="route_id_feed_data"></a>route_id</td> <td ><p class="first"><b>Required</b>. The <b>route_id</b> field contains an ID that uniquely identifies a route. The <b>route_id</b> is dataset unique.</p></td>
</tr> <tr>
<td scope="row" class="attr"><a name="agency_name_ref_feed_data" id="agency_name_ref_feed_data"></a>agency_id</td> <td ><p class="first"><b>Optional</b>. The <b>agency_id</b> field defines an agency for the specified route. This value is referenced from the <a href="#agency_txt___Field_Definitions">agency.txt</a> file. Use this field when you are providing data for routes from more than one agency. </p></td>
</tr>
<tr>
<td scope="row" class="attr"><a name="route_short_name_feed_data" id="route_short_name_feed_data"></a>route_short_name</td> <td ><p class="first"><b>Required</b>. The <b>route_short_name</b> 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. If the route does not have a short name, please specify a <strong>route_long_name</strong> and use an empty string as the value for this field. </p>
<p>See a Google Maps screenshot highlighting the <b><a href="#transit?ShortNameScreenshot">route_short_name</a></b>.</p></td>
</tr>
<tr>
<td scope="row" class="attr"><a name="route_long_name_feed_data" id="route_long_name_feed_data"></a>route_long_name</td> <td ><p class="first"><b>Required</b>. The <b>route_long_name</b> contains the full name of a route. This name is generally more descriptive than the <strong>route_short_name</strong> and will often include the route's destination or stop. If the route does not have a long name, please specify a <strong>route_short_name</strong> and use an empty string as the value for this field.</p>
<p>See a Google Maps screenshot highlighting the <b><a href="#transit?LongNameScreenshot">route_long_name</a></b>.</p></td>
</tr>
<tr>
<td scope="row" class="attr"><a name="route_desc_feed_data" id="route_desc_feed_data"></a>route_desc</td> <td ><p class="first"><b>Optional</b>. The <b>route_desc</b> 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)." </p></td>
</tr>
<tr>
<td scope="row" class="attr"><a name="route_type_feed_data" id="route_type_feed_data"></a>route_type</td> <td ><p class="first"><b>Required</b>. The <b>route_type</b> field describes the type of transportation used on a route. Valid values for this field are:</p>
<ul>
<li><b>0</b> - Tram, Streetcar, Light rail. Any light rail or street level system within a metropolitan area. </li> <li><b>1</b> - Subway, Metro. Any underground rail system within a metropolitan area. </li> <li><b>2</b> - Rail. Used for intercity or long-distance travel. </li> <li><b>3</b> - Bus. Used for short- and long-distance bus routes. </li> <li><b>4</b> - Ferry. Used for short- and long-distance boat service. </li> <li><b>5</b> - Cable car. Used for street-level cable cars where the cable runs beneath the car. </li> <li><b>6</b> - Gondola, Suspended cable car. Typically used for aerial cable cars where the car is suspended from the cable. </li> <li><b>7</b> - Funicular. Any rail system designed for steep inclines. </li>
</ul> <p> See a Google Maps screenshot highlighting the <b><a href="#transit?RouteTypeScreenshot">route_type</a></b>.</p></td>
</tr> <tr>
<td scope="row" class="attr"><a name="route_url_feed_data" id="route_url_feed_data"></a>route_url</td> <td ><p class="first"><b>Optional</b>. The <b>route_url</b> field contains the URL of a web page about that particular route. This should be different from the <strong>agency_url</strong>.<br />
<br />
The value must be a fully qualified URL that includes <b>http://</b> or <strong>https://</strong>, and any special characters in the URL must be correctly escaped. See <a href="http://www.w3.org/Addressing/URL/4_URI_Recommentations.html">http://www.w3.org/Addressing/URL/4_URI_Recommentations.html</a> for a description of how to create fully qualified URL values. </p></td>
</tr> <tr>
<td scope="row" class="attr"><a name="route_color_feed_data" id="route_color_feed_data"></a>route_color</td> <td ><p class="first"><b>Optional</b>. In systems that have colors assigned to routes, the <b>route_color</b> 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).</p>
<p class="first">If the <strong>route_color</strong> makes overlaid text difficult to read, specify a contrasting text color with the <strong>route_text_color</strong> field. </p></td>
</tr> <tr>
<td scope="row" class="attr"><a name="route_text_color_feed_data" id="route_text_color_feed_data"></a>route_text_color</td> <td ><p class="first"><b>Optional</b>. The <b>route_text_color</b> field can be used to specify a legible color to use for text drawn against a background of <strong>route_color</strong>. 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).</p></td>
</tr>
</table>
<h2><a name="trips_txt___Field_Definitions" id="trips_txt___Field_Definitions"></a>trips.txt </h2> <table> <tbody> <tr><th scope="col" abbr="field" width="15%">Field Name</th> <th scope="col" abbr="details">Details</th> </tr>
<tr>
<td scope="row" class="attr"><a name="route_id_ref_feed_data" id="route_id_ref_feed_data"></a>route_id</td> <td ><p class="first"><b>Required</b>. The <b>route_id</b> field contains an ID that uniquely identifies a route. This value is referenced from the <a href="#routes_txt___Field_Definitions">routes.txt</a> file.</p></td>
</tr>
<tr>
<td scope="row" class="attr"><a name="service_id_ref_feed_data" id="service_id_ref_feed_data"></a>service_id</td> <td ><p class="first"><b>Required</b>. The <b>service_id</b> 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 <a href="#calendar_txt___Field_Definitions">calendar.txt</a> or <a href="#calendar_dates_txt___Field_Definitions">calendar_dates.txt</a> file.</p></td>
</tr>
<tr>
<td scope="row" class="attr"><a name="trip_id_feed_data" id="trip_id_feed_data"></a>trip_id</td> <td ><p class="first"><b>Required</b>. The <b>trip_id</b> field contains an ID that identifies a trip. The <b>trip_id</b> is dataset unique. </p></td>
</tr>
<tr>
<td scope="row" class="attr"><a name="trip_headsign_feed_data" id="trip_headsign_feed_data"></a>trip_headsign</td> <td ><p class="first"><b>Optional</b>. The <b>trip_headsign</b> 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 <strong>trip_headsign</strong> by specifying values for the the <a href="#stop_headsign_feed_data">stop_headsign</a> field in <a href="#stop_times_txt___Field_Definitions">stop_times.txt</a> </p>
<p>See a Google Maps screenshot highlighting the <b><a href="#transit?TripHeadsignScreenshot">headsign</a></b>.</p></td>
</tr>
<tr>
<td scope="row" class="attr"><a name="direction_id_feed_data" id="direction_id_feed_data"></a>direction_id</td> <td ><p class="first"><b>Optional</b>. The <b>direction_id</b> 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 <a href="#route_id_feed_data">route_id</a>. 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<strong> trip_headsign</strong> field. </p>
<ul>
<li><b class="first">0</b> - travel in one direction (e.g. outbound travel) </li> <li><b>1</b> - travel in the opposite direction (e.g. inbound travel)
</li>
</ul> <p>For example, you could use the trip_headsign and direction_id fields together to assign a name to travel in each direction on trip "1234", the trips.txt file would contain these rows for use in time tables:<br />
<br />
<code>trip_id, ... ,trip_headsign,direction_id<br />
1234, ... , to Airport,0<br /> 1234, ... , to Downtown,1 </code></p></td>
</tr>
<tr>
<td scope="row" class="attr"><a name="block_id_feed_data" id="block_id_feed_data"></a>block_id</td> <td ><p class="first"><b>Optional</b>. The <b>block_id</b> field identifies the block to which the trip belongs. A block consists of two or more sequential trips made using the same vehicle, where a passenger can transfer from one trip to the next just by staying in the vehicle. The <b>block_id</b> must be referenced by two or more trips in trips.txt. </p></td>
</tr>
<tr>
<td scope="row" class="attr"><a name="shape_id_feed_data" id="shape_id_feed_data"></a>shape_id</td> <td ><p class="first"><b>Optional</b>. The <b>shape_id</b> field contains an ID that defines a shape for the trip. This value is referenced from the <a href="#shapes_txt___Field_Definitions">shapes.txt</a> file. The shapes.txt file allows you to define how a line should be drawn on the map to represent a trip. </p></td>
</tr>
</tbody> </table>
<h2><a name="stop_times_txt___Field_Definitions" id="stop_times_txt___Field_Definitions"></a>stop_times.txt </h2> <table> <tbody> <tr><th scope="col" abbr="field" width="15%">Field Name</th> <th scope="col" abbr="details">Details</th> </tr>
<tr>
<td scope="row" class="attr"><a name="trip_id_ref_feed_data" id="trip_id_ref_feed_data"></a>trip_id</td> <td ><p class="first"><b>Required</b>. The <b>trip_id</b> field contains an ID that identifies a trip. This value is referenced from the <a href="#trips_txt___Field_Definitions">trips.txt</a> file.</p></td>
</tr>
<tr>
<td scope="row" class="attr"><a name="arrival_time_feed_data" id="arrival_time_feed_data"></a>arrival_time</td> <td ><p class="first"><b>Required</b>. The <b>arrival_time</b> specifies the arrival time at a specific stop for a specific trip on a route. The time is measured from midnight at the beginning of the service date. For times occurring after midnight on the service date, enter the time as a value greater than 24:00:00 in 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 <strong>arrival_time</strong> and <strong>departure_time</strong>. </p>
<p>You must specify arrival times for the first and last stops in a trip. <span class="first">If this stop isn't a time point, use an empty string value for the <strong>arrival_time</strong> and <strong>departure_time</strong> fields.</span> Stops without arrival times will be scheduled based on the nearest preceding timed stop. To ensure accurate routing, please provide arrival and departure times for all stops that are time points. Do not interpolate stops.</p> <p>Times must be eight digits in MM:SS format (H: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
<b>arrival_time</b>
field:</p>
<table>
<tr>
<th scope="col">Time</th> <th scope="col">arrival_time value</th>
</tr> <tr>
<td scope="row">08:10:00 A.M.</td> <td>08:10:00 or 8:10:00 </td>
</tr> <tr>
<td scope="row">01:05:00 P.M.</td> <td>13:05:00</td>
</tr> <tr>
<td scope="row">07:40:00 P.M.</td> <td>19:40:00</td>
</tr> <tr>
<td scope="row">01:55:00 A.M.</td> <td>25:55:00</td>
</tr>
</table>
<p class="note"><b>Note:</b> Trips that span multiple dates will have stop times greater than <b>24:00:00</b>. 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 <b>22:30:00</b> and <b>26:15:00</b>. Entering those stop times as <b>22:30:00</b> and <b>02:15:00</b> would not produce the desired results.</p></td>
</tr>
<tr>
<td scope="row" class="attr"><a name="departure_time_feed_data" id="departure_time_feed_data"></a>departure_time</td> <td ><p class="first"><b>Required</b>. The <b>departure_time</b> specifies the departure time from a specific stop for a specific trip on a route. The time is measured from midnight at the beginning of the service date. For times occurring after midnight on the service date, enter the time as a value greater than 24:00:00 in 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 <strong>arrival_time</strong> and <strong>departure_time</strong>. </p>
<p class="first">You must specify departure times for the first and last stops in a trip. If this stop isn't a time point, use an empty string value for the <strong>arrival_time</strong> and <strong>departure_time</strong> fields. Stops without arrival times will be scheduled based on the nearest preceding timed stop. To ensure accurate routing, please provide arrival and departure times for all stops that are time points. Do not interpolate stops.</p> <p class="first">Times must be eight digits in MM:SS format (H: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
<b>departure_time</b> field:</p>
<table>
<tr>
<th width="94" scope="col">Time</th> <th width="173" scope="col">departure_time value</th>
</tr> <tr>
<td scope="row">08:10:00 A.M.</td> <td>08:10:00 or 8:10:00 </td>
</tr> <tr>
<td scope="row">01:05:00 P.M.</td> <td>13:05:00</td>
</tr> <tr>
<td scope="row">07:40:00 P.M.</td> <td>19:40:00</td>
</tr> <tr>
<td scope="row">01:55:00 A.M.</td> <td>25:55:00</td>
</tr>
</table>
<br />
<p class="note"><b>Note:</b> Trips that span multiple dates will have stop times greater than <b>24:00:00</b>. 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 <b>22:30:00</b> and <b>26:15:00</b>. Entering those stop times as <b>22:30:00</b> and <b>02:15:00</b> would not produce the desired results.</p></td>
</tr>
<tr>
<td scope="row" class="attr"><a name="stop_id_ref_feed_data" id="stop_id_ref_feed_data"></a>stop_id</td> <td ><p class="first"><b>Required</b>. The <b>stop_id</b> field contains an ID that uniquely identifies a stop. Multiple routes may use the same stop. The stop_id is referenced from the <a href="#stops_txt___Field_Definitions">stops.txt</a> file. If location_type is used in stops.txt, all stops referenced in stop_times.txt must have location_type of 0. </p>
<p>Where possible, <strong>stop_id</strong> values should remain consistent between feed updates. In other words, stop A with <strong>stop_id</strong> <strong>1</strong> should have <strong>stop_id 1</strong> in all subsequent data updates. If a stop is not a time point, enter blank values for <strong>arrival_time</strong> and <strong>departure_time</strong>. </p></td>
</tr> <tr>
<td scope="row" class="attr"><a name="stop_sequence_feed_data" id="stop_sequence_feed_data"></a>stop_sequence</td> <td ><p class="first"><b>Required</b>. The <b>stop_sequence</b> field identifies the order of the stops for a particular trip. The values for <strong>stop_sequence</strong> must be non-negative integers, and they must increase along the trip. </p>
<p>For example, the first stop on the trip could have a <b>stop_sequence</b> of <b>1</b>, the second stop on the trip could have a <b>stop_sequence</b> of <b>23</b>, the third stop could have a <b>stop_sequence</b> of <b>40</b>, and so on.</p></td>
</tr>
<tr>
<td scope="row" class="attr"><a name="stop_headsign_feed_data" id="stop_headsign_feed_data"></a>stop_headsign</td> <td ><p class="first"><b>Optional</b>. The <b>stop_headsign</b> field contains the text that appears on a sign that identifies the trip's destination to passengers. Use this field to override the default <a href="#trip_headsign_feed_data">trip_headsign</a> when the headsign changes between stops. If this headsign is associated with an entire trip, use <a href="#trip_headsign_feed_data">trip_headsign</a> instead.</p>
<p>See a Google Maps screenshot highlighting the <b><a href="#transit?TripHeadsignScreenshot">headsign</a></b>.</p></td>
</tr> <tr>
<td scope="row" class="attr"><a name="pickup_type_feed_data" id="pickup_type_feed_data"></a>pickup_type</td> <td ><p class="first"><b>Optional</b>. The <b>pickup_type</b> 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:</p>
<ul><li><b>0</b> - Regularly scheduled pickup</li><li><b>1</b> - No pickup available</li><li><b>2</b> - Must phone agency to arrange pickup</li><li><b>3</b> - Must coordinate with driver to arrange pickup</li></ul><p>The default value for this field is <b>0</b>.</p></td>
</tr>
<tr>
<td scope="row" class="attr"><a name="drop_off_type_feed_data" id="drop_off_type_feed_data"></a>drop_off_type</td> <td ><p class="first"><b>Optional</b>. The <b>drop_off_type</b> 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:</p>
<ul><li><b>0</b> - Regularly scheduled drop off</li><li><b>1</b> - No drop off available</li><li><b>2</b> - Must phone agency to arrange drop off</li> <li><b>3</b> - Must coordinate with driver to arrange drop off</li> </ul>
<p>The default value for this field is <b>0</b>.</p></td>
</tr>
<tr>
<td scope="row" class="attr"><a name="shape_dist_traveled_feed_data" id="shape_dist_traveled_feed_data"></a>shape_dist_traveled</td> <td ><p class="first"><b>Optional</b>. When used in the stop_times.txt file, the <b>shape_dist_traveled</b> field positions a stop as a distance from the first shape point. The <strong>shape_dist_traveled</strong> 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 <strong>shape_dist_traveled</strong> 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 <strong>shape_dist_traveled</strong> must increase along with <strong>stop_sequence</strong>: they cannot be used to show reverse travel along a route.<br />
<br /> The units used for <b>shape_dist_traveled</b> in the stop_times.txt file must match the units that are used for this field in the <a href="#shapes_txt___Field_Definitions">shapes.txt</a> file. </p> <p class="first"><br /> </p></td>
</tr>
</tbody> </table>
<h2><a name="calendar_txt___Field_Definitions" id="calendar_txt___Field_Definitions"></a>calendar.txt </h2>
<table>
<tbody> <tr><th scope="col" abbr="field" width="15%">Field Name</th> <th scope="col" abbr="details">Details</th> </tr>
<tr>
<td scope="row" class="attr"><a name="service_id_feed_data" id="service_id_feed_data"></a>service_id</td> <td ><p class="first"><b>Required</b>. The <b>service_id</b> contains an ID that uniquely identifies a set of dates when service is available for one or more routes. This value is dataset unique. It is referenced by the <a href="#trips_txt___Field_Definitions">trips.txt</a> file.</p></td>
</tr>
<tr>
<td scope="row" class="attr"><a name="monday_feed_data" id="monday_feed_data"></a>monday</td> <td ><p class="first"><b>Required</b>. The <b>monday</b> field contains a binary value that indicates whether the service is valid for all Mondays.</p>
<ul><li>A value of <b>1</b> indicates that service is available for all Mondays in the date range. (The date range is specified using the <b><a href="#start_date_feed_data">start_date</a></b> and <b><a href="#end_date_feed_data">end_date</a></b> fields.)</li>
<li>A value of <b>0</b> indicates that service is not available on Mondays in the date range.</li></ul> <p class="note"><b>Note:</b> You may list exceptions for particular dates, such as holidays, in the <a href="#calendar_dates_txt___Field_Definitions">calendar_dates.txt</a> file.</p></td>
</tr>
<tr>
<td scope="row" class="attr"><a name="tuesday_feed_data" id="tuesday_feed_data"></a>tuesday</td> <td ><p class="first"><b>Required</b>. The <b>tuesday</b> field contains a binary value that indicates whether the service is valid for all Tuesdays.</p>
<ul><li>A value of <b>1</b> indicates that service is available for all Tuesdays in the date range. (The date range is specified using the <b><a href="#start_date_feed_data">start_date</a></b> and <b><a href="#end_date_feed_data">end_date</a></b> fields.)</li> <li>A value of <b>0</b> indicates that service is not available on Tuesdays in the date range.</li> </ul>
<p class="note"><b>Note:</b> You may list exceptions for particular dates, such as holidays, in the <a href="#calendar_dates_txt___Field_Definitions">calendar_dates.txt</a> file.</p></td>
</tr>
<tr>
<td scope="row" class="attr"><a name="wednesday_feed_data" id="wednesday_feed_data"></a>wednesday</td> <td ><p class="first"><b>Required</b>. The <b>wednesday</b> field contains a binary value that indicates whether the service is valid for all Wednesdays.</p>
<ul><li>A value of <b>1</b> indicates that service is available for all Wednesdays in the date range. (The date range is specified using the <b> <a href="#start_date_feed_data">start_date</a></b> and <b><a href="#end_date_feed_data">end_date</a></b> fields.)</li>
<li>A value of <b>0</b> indicates that service is not available on Wednesdays in the date range.</li> </ul>
<p class="note"><b>Note:</b> You may list exceptions for particular dates, such as holidays, in the <a href="#calendar_dates_txt___Field_Definitions">calendar_dates.txt</a> file.</p></td>
</tr>
<tr>
<td scope="row" class="attr"><a name="thursday_feed_data" id="thursday_feed_data"></a>thursday</td> <td ><p class="first"><b>Required</b>. The <b>thursday</b> field contains a binary value that indicates whether the service is valid for all Thursdays.</p><ul><li>A value of <b>1</b> indicates that service is available for all Thursdays in the date range. (The date range is specified using the <b><a href="#start_date_feed_data">start_date</a></b> and <b><a href="#end_date_feed_data">end_date</a></b> fields.)</li>
<li>A value of <b>0</b> indicates that service is not available on Thursdays in the date range.</li> </ul>
<p class="note"><b>Note:</b> You may list exceptions for particular dates, such as holidays, in the <a href="#calendar_dates_txt___Field_Definitions">calendar_dates.txt</a> file.</p></td>
</tr>
<tr>
<td scope="row" class="attr"><a name="friday_feed_data" id="friday_feed_data"></a>friday</td> <td ><p class="first"><b>Required</b>. The <b>friday</b> field contains a binary value that indicates whether the service is valid for all Fridays.</p>
<ul><li>A value of <b>1</b> indicates that service is available for all Fridays in the date range. (The date range is specified using the <b><a href="#start_date_feed_data">start_date</a></b> and <b><a href="#end_date_feed_data">end_date</a></b> fields.)</li>
<li>A value of <b>0</b> indicates that service is not available on Fridays in the date range.</li> </ul>
<p class="note"><b>Note:</b> You may list exceptions for particular dates, such as holidays, in the <a href="#calendar_dates_txt___Field_Definitions">calendar_dates.txt</a> file</p></td>
</tr>
<tr>
<td scope="row" class="attr"><a name="saturday_feed_data" id="saturday_feed_data"></a>saturday</td> <td ><p class="first"><b>Required</b>. The <b>saturday</b> field contains a binary value that indicates whether the service is valid for all Saturdays.</p>
<ul><li>A value of <b>1</b> indicates that service is available for all Saturdays in the date range. (The date range is specified using the <b><a href="#start_date_feed_data">start_date</a></b> and <b><a href="#end_date_feed_data">end_date</a></b> fields.)</li>
<li>A value of <b>0</b> indicates that service is not available on Saturdays in the date range.</li> </ul>
<p class="note"><b>Note:</b> You may list exceptions for particular dates, such as holidays, in the <a href="#calendar_dates_txt___Field_Definitions">calendar_dates.txt</a> file.</p> </td>
</tr>
<tr>
<td scope="row" class="attr"><a name="sunday_feed_data" id="sunday_feed_data"></a>sunday</td> <td ><p class="first"><b>Required</b>. The <b>sunday</b> field contains a binary value that indicates whether the service is valid for all Sundays.</p>
<ul><li>A value of <b>1</b> indicates that service is available for all Sundays in the date range. (The date range is specified using the <b> <a href="#start_date_feed_data">start_date</a></b> and <b><a href="#end_date_feed_data">end_date</a></b> fields.)</li>
<li>A value of <b>0</b> indicates that service is not available on Sundays in the date range.</li> </ul>
<p class="note"><b>Note:</b> You may list exceptions for particular dates, such as holidays, in the <a href="#calendar_dates_txt___Field_Definitions">calendar_dates.txt</a> file.</p></td>
</tr>
<tr>
<td scope="row" class="attr"><a name="start_date_feed_data" id="start_date_feed_data"></a>start_date</td> <td ><p class="first"><b>Required</b>. The <b>start_date</b> field contains the start date for the service.</p><p>The <b>start_date</b> field's value should be in YYYYMMDD format.</p></td>
</tr>
<tr>
<td scope="row" class="attr"><a name="end_date_feed_data" id="end_date_feed_data"></a>end_date</td> <td ><p class="first"><b>Required</b>. The <b>end_date</b> field contains the end date for the service. This date is included in the service interval.</p><p>The <b>end_date</b> field's value should be in YYYYMMDD format.</p></td>
</tr>
</tbody> </table>
<h2><a name="calendar_dates_txt___Field_Definitions" id="calendar_dates_txt___Field_Definitions"></a>calendar_dates.txt </h2> <p>This file is optional. The calendar_dates table allows you to explicitly activate or disable service IDs by date. You can use it in two ways.</p> <ul>
<li>Recommended: Use calendar_dates.txt in conjunction with calendar.txt, where calendar_dates.txt defines any exceptions to the default service categories defined in the <b>calendar.txt</b> file. If your service is generally regular, with a few changes on explicit dates (for example, to accomodate special event services, or a school schedule), this is a good approach. </li> <li>Alternate: Omit calendar.txt, 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. </li>
</ul> <table> <tbody> <tr><th scope="col" abbr="field" width="15%">Field Name</th> <th scope="col" abbr="details">Details</th> </tr>
<tr>
<td scope="row" class="attr"><a name="service_id_ref2_feed_data" id="service_id_ref2_feed_data"></a>service_id</td> <td ><p class="first"><b>Required</b>. The <b>service_id</b> contains an ID that uniquely identifies a set of dates when a service exception is available for one or more routes. If the same service_id value appears in both files, the information in calendar_dates.txt modifies the service information specified in <a href="#calendar_txt___Field_Definitions">calendar.txt</a>. This field is referenced by the <a href="#trips_txt___Field_Definitions">trips.txt</a> file.</p></td>
</tr>
<tr>
<td scope="row" class="attr"><a name="date_feed_data" id="date_feed_data"></a>date</td> <td ><p class="first"><b>Required</b>. The <b>date</b> field specifies a particular date when service availability is different than the norm. You can use the <b><a href="#exception_type_feed_data">exception_type</a></b> field to indicate whether service is available on the specified date.</p><p>The <b>date</b> field's value should be in YYYYMMDD format.</p></td>
</tr>
<tr>
<td scope="row" class="attr"><a name="exception_type_feed_data" id="exception_type_feed_data"></a>exception_type</td> <td ><p class="first"><b>Required</b>. The <b>exception_type</b> indicates whether service is available on the date specified in the <b><a href="#date_feed_data">date</a></b> field.</p>
<ul><li>A value of <b>1</b> indicates that service has been added for the specified date.</li> <li>A value of <b>2</b> indicates that service has been removed for the specified date.</li> </ul> <p>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 <b><a href="#service_id_feed_data">service_id</a></b> that corresponds to the regular service schedule and another <b><a href="#service_id_feed_data">service_id</a></b> that corresponds to the holiday schedule. For a particular holiday, you would use the <a href="#calendar_dates_txt___Field_Definitions">calendar_dates</a> file to add the holiday to the holiday <b><a href="#service_id_feed_data">service_id</a></b> and to remove the holiday from the regular <b><a href="#service_id_feed_data">service_id</a></b> schedule.</p></td>
</tr>
</tbody> </table>
<h2><a name="fare_attributes_txt___Field_Definitions" id="fare_attributes_txt___Field_Definitions"></a>fare_attributes.txt </h2> <table>
<tr><th scope="col" abbr="field" width="15%">Field Name</th>
<th scope="col" abbr="details">Details</th>
</tr> <tr>
<td scope="row" class="attr"><a name="fare_id_feed_data" id="fare_id_feed_data"></a>fare_id</td> <td ><p class="first"><b>Required</b>. The <b>fare_id</b> field contains an ID that uniquely identifies a fare class. The <b>fare_id</b> is dataset unique.</p></td>
</tr> <tr>
<td scope="row" class="attr"><a name="price_feed_data" id="price_feed_data"></a>price</td> <td ><p class="first"><b>Required</b>. The <b>price</b> field contains the fare price, in the unit specified by <strong>currency_type</strong>. </p></td>
</tr> <tr>
<td scope="row" class="attr"><a name="currency_type_feed_data" id="currency_type_feed_data"></a>currency_type</td> <td ><p class="first"><b>Required</b>. The <b>currency_type</b> 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: <a href="http://www.iso.org/iso/en/prods-services/popstds/currencycodeslist.html">http://www.iso.org/iso/en/prods-services/popstds/currencycodeslist.html</a>.</p></td>
</tr> <tr>
<td scope="row" class="attr"><a name="payment_method_feed_data" id="payment_method_feed_data"></a>payment_method</td> <td ><p class="first"><b>Required</b>. The <b>payment_method</b> field indicates when the fare must be paid. Valid values for this field are:</p>
<ul>
<li><b>0</b> - Fare is paid on board. </li> <li><b>1</b> - Fare must be paid before boarding. </li>
</ul></td>
</tr> <tr>
<td scope="row" class="attr"><a name="transfers_feed_data" id="transfers_feed_data"></a>transfers</td> <td ><p class="first"><b>Required</b>. The <b>transfers</b> field specifies the number of transfers permitted on this fare. Valid values for this field are:</p>
<ul>
<li><b>0</b> - No transfers permitted on this fare. </li> <li><b>1</b> - Passenger may transfer once. </li> <li><b>2</b> - Passenger may transfer twice. </li> <li><strong>(empty)</strong> - If this field is empty, unlimited transfers are permitted. </li>
</ul></td>
</tr> <tr>
<td scope="row" class="attr"><a name="transfer_duration_data" id="transfer_duration_data"></a>transfer_duration</td> <td ><p class="first"><b>Optional</b>. The <b>transfer_duration</b> field specifies the length of time in seconds before a transfer expires. </p>
<p>When used with a <strong>transfers</strong> value of 0, the <span class="first"><b>transfer_duration</b> field</span> 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, <strong>transfer_duration</strong> should be omitted or empty when <strong>transfers</strong> is set to 0.</p></td>
</tr>
</table> <h2><a name="fare_rules_txt___Field_Definitions" id="fare_rules_txt___Field_Definitions"></a>fare_rules.txt - Field Definitions</h2> <p>This file is optional. The fare_rules table allows you to specify how fares in fare_attributes.txt apply to an itinerary. Most fare structures use some combination of the following rules:</p> <ul>
<li>Fare depends on origin or destination stations. </li> <li>Fare depends on which zones the itinerary passes through. </li> <li>Fare depends on which route the itinerary uses. </li> </ul>
<p>For examples that demonstrate how to specify a fare structure with fare_rules.txt and fare_attributes.txt, see <a href="http://code.google.com/p/googletransitdatafeed/wiki/FareExamples">FareExamples</a> in the ?GoogleTransitDataFeed open source project wiki. </p> <table>
<tr><th scope="col" abbr="field" width="15%">Field Name</th>
<th scope="col" abbr="details">Details</th>
</tr> <tr>
<td scope="row" class="attr"><a name="fare_id_ref_feed_data" id="fare_id_ref_feed_data"></a>fare_id</td> <td ><p class="first"><b>Required</b>. The <b>fare_id</b> field contains an ID that uniquely identifies a fare class. This value is referenced from the <a href="#fare_attributes_txt___Field_Definitions">fare_attributes.txt</a> file.</p></td>
</tr> <tr>
<td scope="row" class="attr"><a name="route_id_ref2_feed_data" id="route_id_ref2_feed_data"></a>route_id</td> <td ><p class="first"><b>Optional</b>. The <b>route_id</b> field associates the fare ID with a route. Route IDs are referenced from the <a href="#routes_txt___Field_Definitions">routes.txt</a> file. If you have several routes with the same fare attributes, create a row in fare_rules.txt for each route. </p>
<p> 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:</p>
<p>
<code>b,TSW</code><br />
<code>b,TSE</code></p></td>
</tr> <tr>
<td scope="row" class="attr"><a name="origin_id_feed_data" id="origin_id_feed_data"></a>origin_id</td> <td ><p class="first"><b>Optional</b>. The <b>origin_id</b> field associates the fare ID with an origin <a href="#zone_id_feed_data">zone ID</a>. Zone IDs are referenced from the <a href="#stops_txt___Field_Definitions">stops.txt</a> file. If you have several origin IDs with the same fare attributes, create a row in fare_rules.txt for each origin ID.</p>
<p>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: </p>
<p><code>b, , 2</code><br />
<code>b, , 8 </code></p></td> </tr> <tr>
<td scope="row" class="attr"><a name="destination_id_data" id="dest_id_data"></a>destination_id</td> <td ><p class="first"><b>Optional</b>. The <b>destination_id</b> field associates the fare ID with a destination <a href="#zone_id_feed_data">zone ID</a>. Zone IDs are referenced from the <a href="#stops_txt___Field_Definitions">stops.txt</a> file. If you have several destination IDs with the same fare attributes, create a row in fare_rules.txt for each destination ID.</p>
<p>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:</p>
<p><code>b, , 3,4</code><br /> <code>b, , 3,5</code></p></td>
</tr> <tr>
<td scope="row" class="attr"><a name="contains_id_data" id="contains_id_data"></a>contains_id</td> <td ><p class="first"><b>Optional</b>. The <b>contains_id</b> field associates the fare ID with a <a href="#zone_id_feed_data">zone ID</a>, referenced from the <a href="#stops_txt___Field_Definitions">stops.txt</a> file. The fare ID is then associated with itineraries that pass through every contains_id zone. </p>
<p>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:<br />
<br /> <code>c,GRT,,,5 <br /> c,GRT,,,6</code><br /> <code>c,GRT,,,7</code></p>
<p>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 <a href="http://code.google.com/p/googletransitdatafeed/wiki/FareExamples">FareExamples</a> in the ?GoogleTransitDataFeed project wiki. </p></td>
</tr>
</table> <h2><a name="shapes_txt___Field_Definitions" id="shapes_txt___Field_Definitions"></a>shapes.txt </h2> <table>
<tr><th scope="col" abbr="field" width="15%">Field Name</th>
<th scope="col" abbr="details">Details</th>
</tr> <tr>
<td scope="row" class="attr"><a name="shape_id_ref_feed_data" id="shape_id_ref_feed_data"></a>shape_id</td> <td ><p class="first"><b>Required</b>. The <b>shape_id</b> field contains an ID that uniquely identifies a shape. </p></td>
</tr> <tr>
<td scope="row" class="attr"><a name="shape_pt_lat_feed_data" id="shape_pt_lat_feed_data"></a>shape_pt_lat</td> <td ><p class="first"><b>Required</b>. The <b>shape_pt_lat</b> 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.</p>
<p>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:</p>
<p><code>A_shp,37.61956,-122.48161,0<br /> A_shp,37.64430,-122.41070,6<br /> A_shp,37.65863,-122.30839,11</code></p></td>
</tr>
<tr>
<td scope="row" class="attr"><a name="shape_pt_lon_feed_data" id="shape_pt_lon_feed_data"></a>shape_pt_lon</td> <td ><p class="first"><b>Required</b>. The <b>shape_pt_lon</b> 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.</p>
<p>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:</p>
<p><code>A_shp,37.61956,-122.48161,0<br /> A_shp,37.64430,-122.41070,6<br /> A_shp,37.65863,-122.30839,11 </code></p></td>
</tr> <tr>
<td scope="row" class="attr"><a name="shape_pt_sequence_feed_data" id="shape_pt_sequence_feed_data"></a>shape_pt_sequence</td> <td ><p class="first"><b>Required</b>. The <b>shape_pt_sequence</b> field associates the latitude and longitude of a shape point with its sequence order along the shape. The values for <strong>shape_pt_sequence</strong> must be non-negative integers, and they must increase along the trip.</p>
<p> 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:</p> <p><code>A_shp,37.61956,-122.48161,0<br />
A_shp,37.64430,-122.41070,6<br /> A_shp,37.65863,-122.30839,11 </code></p></td>
</tr> <tr>
<td scope="row" class="attr"><a name="shape_dist_traveled_shapes_data" id="shape_dist_traveled_shapes_data"></a>shape_dist_traveled</td> <td ><p class="first"><b>Optional</b>. When used in the shapes.txt file, the <b>shape_dist_traveled</b> field positions a shape point as a distance traveled along a shape from the first shape point. The <strong>shape_dist_traveled</strong> 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<strong> shape_dist_traveled</strong> must increase along with <strong>shape_pt_sequence</strong>: they cannot be used to show reverse travel along a route. <br />
<br /> The units used for <b>shape_dist_traveled</b> in the shapes.txt file must match the units that are used for this field in the <a href="#stop_times_txt___Field_Definitions">stop_times.txt</a> file.</p>
<p>For example, if a bus travels along the three points defined above for A_shp, the additional <strong>shape_dist_traveled</strong> values (shown here in kilometers) would look like this: </p> <p><code>A_shp,37.61956,-122.48161,0,0<br />
A_shp,37.64430,-122.41070,6,6.8310<br /> A_shp,37.65863,-122.30839,11,15.8765</code></p>
</td>
</tr>
</table> <h2><a name="frequencies_txt___Field_Definitions" id="frequencies_txt___Field_Definitions"></a>frequencies.txt </h2> <p>The frequencies file is 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 <a href="#arrival_time_feed_data">arrival_time</a> and <a href="#departure_time_feed_data">departure_time</a> fields for those trips in <a href="#stop_times_txt___Field_Definitions">stop_times.txt</a>. Instead, the stop_times table defines the sequence of stops and the time difference between each stop. </p> <table>
<tbody>
<tr><th scope="col" abbr="field" width="15%">Field Name</th>
<th scope="col" abbr="details">Details</th>
</tr> <tr>
<td scope="row" class="attr"><a name="trip_id_ref2_feed_data" id="trip_id_ref2_feed_data"></a>trip_id</td> <td ><p class="first"><b>Required</b>. The <b>trip_id</b> contains an ID that identifies a trip on which the specified frequency of service applies. Trip IDs are referenced from the <a href="#trips_txt___Field_Definitions">trips.txt</a> file. </p></td>
</tr> <tr>
<td scope="row" class="attr"><a name="frequencies_start_time_feed_data" id="headway_start_time_feed_data"></a>start_time</td> <td ><p class="first"><b>Required</b>. The <b>start_time</b> field specifies the time at which service begins with the specified frequency. For times occurring after midnight, enter the time as a value greater than 24:00:00 in MM:SS local time for the day on which the trip schedule begins. E.g. 25:35:00. </p></td>
</tr> <tr>
<td scope="row" class="attr"><a name="frequencies_end_time_feed_data" id="headway_end_time_feed_data"></a>end_time</td> <td ><p class="first"><b>Required</b>. The <b>end_time</b> field indicates the time at which service changes to a different frequency (or ceases) at the first stop in the trip. For times occurring after midnight, enter the time as a value greater than 24:00:00 in MM:SS local time for the day on which the trip schedule begins. E.g. 25:35:00. </p></td>
</tr>
<tr>
<td scope="row" class="attr"><a name="frequencies_secs_feed_data" id="headway_secs_feed_data"></a>headway_secs</td> <td ><p class="first"><b>Required</b>. The <b>headway_secs</b> field indicates the time between departures from the same stop (headway) for this trip type, during the time interval specified by <strong>start_time</strong> and <strong>end_time</strong>. The headway value must be entered in seconds. </p>
<p>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: </p> <p><code>A, 05:00:00, 07:00:00, 600<br />
B, 07:00:00, 12:00:00, 1200 </code></p>
</td>
</tr>
</tbody>
</table> <h2><a name="transfers_txt___Field_Definitions" id="transfers_txt___Field_Definitions"></a>transfers.txt </h2> <p>The transfers file is 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. </p> <table>
<tbody>
<tr>
<th scope="col" abbr="field" width="15%">Field Name</th> <th scope="col" abbr="details">Details</th>
</tr> <tr>
<td scope="row" class="attr"><a name="transfers_from_stop_id_feed_data" id="transfers_from_stop_id_feed_data"></a>from_stop_id</td> <td ><p class="first"><b>Required</b>. The <strong>from_stop_id</strong> field contains a stop ID that identifies a stop or station where a connection between routes begins. Stop IDs are referenced from the <a href="#stops_txt___Field_Definitions">stops.txt</a> file. If the stop ID refers to a station that contains multiple stops, this transfer rule applies to all stops in that station. </p></td>
</tr> <tr>
<td scope="row" class="attr"><a name="transfers_to_stop_id_feed_data" id="transfers_to_stop_id_feed_data"></a>to_stop_id</td> <td ><p class="first"><b>Required</b>. The <strong>to_stop_id</strong> field contains a stop ID that identifies a stop or station where a connection between routes ends. Stop IDs are referenced from the <a href="#stops_txt___Field_Definitions">stops.txt</a> file. If the stop ID refers to a station that contains multiple stops, this transfer rule applies to all stops in that station. </p></td>
</tr> <tr>
<td scope="row" class="attr"><a name="transfers_transfer_type_feed_data" id="transfers_transfer_type_feed_data"></a>transfer_type </td> <td ><p class="first"><b>Required</b>. The <b>transfer_type</b> field specifies the type of connection for the specified (from_stop_id, to_stop_id) pair. Valid values for this field are:</p>
<ul>
<li><b>0</b> or <strong>(empty)</strong> - This is a <span class="first">recommended transfer point between two routes</span>. </li> <li><b>1</b> - This is a<span class="first"> 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 </span></li> <li><b>2</b> - This transfer requires a minimum amount of time between arrival and departure to ensure a connection.
The <span class="first">time required to transfer is specified by <strong>min_transfer_time</strong></span>. </li>
<li><strong>3</strong> - Transfers are not possible between routes at this location. </li> </ul>
</td>
</tr> <tr>
<td scope="row" class="attr"><a name="transfers_min_transfer_time_feed_data" id="transfers_min_transfer_time_feed_data"></a>min_transfer_time</td> <td ><p class="first"><b>Optional</b>. When a connection between routes requires an amount of time between arrival and departure (transfer_type=2), the <strong>min_transfer_time</strong> 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. </p>
<p class="first">The min_transfer_time value must be entered in seconds, and must be a non-negative integer. <code></code></p></td>
</tr>
</tbody>
</table> <h1><a name="transit?FeedSampleData" id="transit?FeedSampleData"></a>Sample Data</h1> <p>This section shows comma-delimited data samples for each file in a transit feed. The sample data files shown here aren't all related to each other.</p> <p><b>agency.txt</b></p> <pre>agency_id, agency_name,agency_url,agency_timezone,agency_phone ?FunBus,The Fun Bus,http://www.thefunbus.org,America/Los_Angeles,(310) 555-0222</pre>
<p><b>stops.txt</b></p> <pre> stop_id,stop_name,stop_desc,stop_lat,stop_lon,stop_url,location_type,parent_station S1,Mission St. & Silver Ave.,The stop is located at the southwest corner of the intersection.,37.728631,-122.431282,, S2,Mission St. & Cortland Ave.,The stop is located 20 feet south of Mission St.,37.74103,-122.422482,, S3,Mission St. & 24th St.,The stop is located at the southwest corner of the intersection.,37.75223,-122.418581,, S4,Mission St. & 21st St.,The stop is located at the northwest corner of the intersection.,37.75713,-122.418982,, S5,Mission St. & 18th St.,The stop is located 25 feet west of 18th St.,37.761829,-122.419382,, S6,Mission St. & 15th St.,The stop is located 10 feet north of Mission St.,37.766629,-122.419782,, S7,24th St. Mission Station,37.752240,-122.418450,,,2 S8,24th St. Mission Station,37.752240,-122.418450,http://www.bart.gov/stations/stationguide/stationoverview_24st.asp,1, </pre>
<p><b>routes.txt</b></p> <pre> route_id,route_short_name,route_long_name,route_desc,route_type A,17,Mission,"The ""A"" route travels from lower Mission to Downtown. The ""A"" route is available for service on weekdays and weekends, but weekend service has limited stops.",3 </pre>
<p><b>trips.txt</b></p> <pre>route_id,service_id,trip_id,trip_headsign,block_id A,WE,AWE1,Downtown,1 A,WE,AWE2,Downtown,2 </pre>
<p><b>stop_times.txt</b></p> <pre> trip_id,arrival_time,departure_time,stop_id,stop_sequence,pickup_type,dropoff_type AWE1,0:06:10,0:06:10,S1,1,0,0,0 AWE1,,,S2,2,0,1,3 AWE1,0:06:20,0:06:30,S3,3,0,0,0 AWE1,,,S5,4,0,0,0 AWE1,0:06:45,0:06:45,S6,5,0,0,0 AWD1,0:06:10,0:06:10,S1,1,0,0,0 AWD1,,,S2,2,0,0,0 AWD1,0:06:20,0:06:20,S3,3,0,0,0 AWD1,,,S4,4,0,0,0 AWD1,,,S5,5,0,0,0 AWD1,0:06:45,0:06:45,S6,6,0,0,0 </pre>
<p><b>calendar.txt</b></p> <pre> service_id,monday,tuesday,wednesday,thursday,friday,saturday,sunday,start_date,end_date WE,0,0,0,0,0,1,1,20060701,20060731 WD,1,1,1,1,1,0,0,20060701,20060731 </pre>
<p><b>calendar_dates.txt</b></p> <p>This example shows service exceptions for the Independence Day holiday in 2006. On Monday July 3, 2006, regular weekday service (service_id=WD) is interrupted (exception_type=2). Instead, weekend service (service_id=WE) runs on that date (exception_type=1). The same change applies on Tuesday July 4, as well. </p> <pre> service_id,date,exception_type WD,20060703,2 WE,20060703,1 WD,20060704,2 WE,20060704,1 </pre>
<p><b>fare_attributes.txt</b></p> <pre>fare_id,price,currency_type,payment_method,transfers,transfer_duration 1,0.00,USD,0,0,0 2,0.50,USD,0,0,0 3,1.50,USD,0,0,0 4,2.00,USD,0,0,0 5,2.50,USD,0,0,0</pre>
<p><b>fare_rules.txt</b></p> <pre>fare_id,route_id,origin_id,destination_id,contains_id a,TSW,1,1, a,TSE,1,1, a,GRT,1,1, a,GRJ,1,1, a,SVJ,1,1, a,JSV,1,1, a,GRT,2,4, a,GRJ,4,2, b,GRT,3,3, c,GRT,,,6</pre>
<p><b>shapes.txt</b></p> <pre>shape_id,shape_pt_lat,shape_pt_lon,shape_pt_sequence,shape_dist_traveled A_shp,37.61956,-122.48161,1,0 A_shp,37.64430,-122.41070,2,6.8310 A_shp,37.65863,-122.30839,3,15.8765 </pre> <p><b>frequencies.txt</b></p> <pre>trip_id,start_time,end_time,headway_secs AWE1,05:30:00,06:30:00,300 AWE1,06:30:00,20:30:00,180 AWE1,20:30:00,28:00:00,420</pre> <p><b>transfers.txt</b></p> <pre>from_stop_id,to_stop_id,transfer_type,min_transfer_time S6,S7,2,300<br />S7,S6,3, S23,S7,1, </pre>
<h1><a name="transit?AgencyExample" id="transit?AgencyExample"></a>Demo Transit Agency Example</h1> <p>The "Demo Transit Agency" is a fictional transit agency that Google created to illustrate a complete transit feed. To see transit data from this fictional agency in Google Maps, <a href="http://www.google.com/transit?ttype=dep&saddr=North+Ave+at+N+A+Ave+Beatty,+NV&daddr=W+Cottonwood+Dr+at+A+Ave+S+Beatty,+NV&ie=UTF8">click here</a>.</p> <p>To view the zip file for this example, download the file <a href="sample-feed.zip">sample-feed.zip</a>. You can also preview the feed contents for the Demo Transit Agency as <a href="http://spreadsheets.google.com/pub?key=puMHBiWYEbXT0UxQGLDpuBA&output=html">an HTML file</a> or <a href="http://spreadsheets.google.com/pub?key=puMHBiWYEbXT0UxQGLDpuBA&output=xls">an XLS file</a>.</p> <h1><a name="transitScreenshots" id="transitScreenshots"></a>Displaying Transit Data to Maps Users</h1> <p>The following screenshots show sample user interfaces displaying transit data in Google Maps. Each screenshot highlights a different field from a transit feed.</p>
<p class="note"><b>Note:</b> The Google Maps user interface for transit is subject to change at Google's discretion. As such, there is no guarantee that the data that you provide will be displayed exactly as shown in the screenshots below.</p>
<a name="transit?ShortNameScreenshot" id="transit?ShortNameScreenshot"></a> <p><b>Figure 1</b>: Highlighting the route's <a href="#route_short_name_feed_data">short name</a> (20)</p> <p><img src="transit_route_short_name.gif" alt="Illustration of short name in the Google Transit User Interface" border="0" /></p>
<a name="transit?LongNameScreenshot" id="transit?LongNameScreenshot"></a> <p><b>Figure 2</b>: Highlighting the route's <a href="#route_long_name_feed_data">long name</a> (Burnside/Stark)</p> <p><img src="transit_route_long_name.gif" alt="Illustration of long name in the Google Transit User Interface" border="0" /></p>
<a name="transit?TripHeadsignScreenshot" id="transit?TripHeadsignScreenshot"></a> <p><b>Figure 3</b>: Highlighting the <a href="#trip_headsign_feed_data">Trip Headsign</a> (Gresham TC)</p> <p><img src="transit_trip_headsign.gif" alt="Illustration of headsign in the Google Transit User Interface" border="0" /></p>
<a name="transit?RouteTypeScreenshot" id="transit?RouteTypeScreenshot"></a> <p><b>Figure 4</b>: Highlighting the <a href="#route_type_feed_data">Route Type</a> (with a bus icon)</p> <p><img src="transit_route_type.gif" alt="Illustration of route type icons in the Google Transit User Interface" border="0" /></p> </div>
</div><!-- end gc-pagecontent -->
</div><!-- end gooey wrapper -->
</div> <!-- end codesite content -->
<div id="gc-footer" dir="ltr">
<div class="text">
<div class="notice"><div id="notice" style="text-align: center; border: 1em 0em 1em 0em">
Except as otherwise <a href="http://code.google.com/policies.html#restrictions">noted</a>, the content of this page is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by/2.5/">Creative Commons Attribution 2.5 License</a>.
<!-- <rdf:RDF xmlns="http://web.resource.org/cc/"
xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<Work rdf:about="">
<license rdf:resource="http://creativecommons.org/licenses/by/2.5/" />
</Work> <License rdf:about="http://creativecommons.org/licenses/by/2.5/">
<permits rdf:resource="http://web.resource.org/cc/Reproduction"/> <permits rdf:resource="http://web.resource.org/cc/Distribution"/> <requires rdf:resource="http://web.resource.org/cc/Notice"/> <requires rdf:resource="http://web.resource.org/cc/Attribution"/> <permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/>
</License>
</rdf:RDF> --> </div> </div>
©2009 Google - <a href="/">Code Home</a> - <a href="http://www.google.com/accounts/TOS">Terms of Service</a> - <a href="http://www.google.com/privacy.html">Privacy Policy</a> - <a href="http://moderator.appspot.com/#e%253Dagltb2RlcmF0b3JyDgsSBlNlcmllcxifggIM%252Bv%253D0">Feedback</a> - <a href="/more/">Site Directory</a> <br /> <br /> Google Code offered in: <a href="/intl/zh-CN/">中文</a> - <a href="/intl/en/">English</a> - <a href="/intl/pt-BR/">Português</a> - <a href="/intl/ru/">Pусский</a> - <a href="/intl/es/">Español</a> - <a href="/intl/ja/">日本語</a>
</div>
</div><!-- end gc-footer -->
</div><!-- end gc-containter -->
<script type="text/javascript">
try {
var transitTracker = _gat._getTracker("UA-1237346-1"); transitTracker._set?AllowAnchor(true); transitTracker._initData(); transitTracker._trackPageview();
} catch(e) {}
</script>
</body>
</html>