Misplaced Pages

GTFS

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.

A text file (sometimes spelled textfile ; an old alternative name is flat file ) is a kind of computer file that is structured as a sequence of lines of electronic text . A text file exists stored as data within a computer file system .

#470529

60-591: GTFS or the General Transit Feed Specification defines a common data format for public transportation schedules and associated geographic information. GTFS contains only static or scheduled information about public transport services, and is sometimes known as GTFS Static or GTFS Schedule to distinguish it from the GTFS Realtime extension, which defines how information on the realtime status of services can be shared. What

120-544: A .zip file. Preferred character encoding is UTF-8 . Together, the related CSV tables describe a transit system's scheduled operations as visible to riders. The specification is designed to be sufficient to provide trip planning functionality, but is also useful for other applications such as analysis of service levels and some general performance measures. In contrast to European transit industry exchange standards such as Transmodel or VDV -45X, GTFS only includes scheduled operations that are meant to be distributed to riders. It

180-522: A compendium of the schedules of major European railway services, has been in publication since 1873 (appearing monthly since 1883). Originally, and for most of its history, it was published by Thomas Cook & Son and included Thomas Cook or Cook's in its title. Although Thomas Cook Group plc ceased publication in 2013, the Thomas Cook European Rail Timetable was revived by a new company in early 2014 as simply

240-489: A CSV file called 'agency.txt' would be included in a valid GTFS feed. The agency table provides information about the transit agency as such, including name, website and contact information. Required fields: The routes table identifies distinct routes. This is to be distinguished from distinct routings (or paths), several of which may belong to a single route. Required fields: Required fields: Optional fields: Required fields: Note that dwell time may be modelled by

300-445: A GTFS feed is available. Due to the wide use of the format, the "Google" part of the original name was seen as a misnomer "that makes some potential users shy away from adopting GTFS". As a consequence, it was proposed to change the name of the specification to General Transit Feed Specification in 2009. GTFS is typically used to supply data on public transit for use in multi-modal journey planner applications. In most cases, GTFS

360-629: A book was published to mark the 1000th edition of the JTB timetable, containing reproductions of all one thousand covers, selected timetables and maps, and articles on the way the timetable is produced. There are also many searchable online timetables covering all forms of transport, for example http://www.hyperdia.com/ . Timetables for PDAs, mobile phones and PCs are readily available. Published every month and covers all trains, highway bus, ferry and domestic air services. Every year, in December and June,

420-428: A central place and list the next few departures for each line, or all departures in the next hour. Displays on platforms usually just show the next departure (or perhaps the next few) from that platform. Timetables may be printed as books, booklets, folded or plain cards or paper, posters , or hand-written on posters or blackboards , shown on back-lit displays, or published on-line or as SMS or text messages. With

480-405: A limited subset of human languages. Unicode is an attempt to create a common standard for representing all known languages, and most known character sets are subsets of the very large Unicode character set. Although there are multiple character encodings available for Unicode, the most common is UTF-8 , which has the advantage of being backwards-compatible with ASCII; that is, every ASCII text file

540-402: A one-time special event will be defined in the calendar_dates table. Required fields: Calendar dates is an optional table which adds exceptions to the calendar.txt file. This can be adding additional days or removing days, such as for holiday service. The file only contains three columns, the service id, date, and exception type (either added or removed). A service id does not have to be inside

600-495: A particular category and is valid for a specified period. The latter could take the form of a book, leaflet, billboard, or a (set of) computer file(s), and makes it much easier to find out, for example, whether a transport service at a particular time is offered every day at that time, and if not, on which days; with a journey planner one may have to check every day of the year separately for this. Many timetables comprise tables with services shown in columns, and stations or stops on

660-460: A record-length value in the record header. "Text file" refers to a type of container, while plain text refers to a type of content. At a generic level of description, there are two kinds of computer files: text files and binary files . Because of their simplicity, text files are commonly used for storage of information. They avoid some of the problems encountered with other file formats, such as endianness , padding bytes, or differences in

SECTION 10

#1732783360471

720-456: A richer character set must be used. In many systems, this is chosen based on the default locale setting on the computer it is read on. Prior to UTF-8, this was traditionally single-byte encodings (such as ISO-8859-1 through ISO-8859-16 ) for European languages and wide character encodings for Asian languages. Because encodings necessarily have only a limited repertoire of characters, often very small, many are only usable to represent text in

780-428: A terminating newline character, normally LF. Additionally, POSIX defines a printable file as a text file whose characters are printable or space or backspace according to regional rules. This excludes most control characters, which are not printable. Prior to the advent of macOS , the classic Mac OS system regarded the content of a file (the data fork) to be a text file when its resource fork indicated that

840-408: A text editor, human-readable content is presented to the user. This often consists of the file's plain text visible to the user. Depending on the application, control codes may be rendered either as literal instructions acted upon by the editor, or as visible escape characters that can be edited as plain text. Though there may be plain text in a text file, control characters within the file (especially

900-670: A timetable is unnecessary. In some cases public transport operators do not publish public timetables for busy times of day, or they may simply state "services run every 3–5 minutes" (or words to that effect), which is the norm for buses in some cities such as Hong Kong even during off-peak hours. A monthly timetable book of major trains, some bus and ferry services in Europe. A bi-monthly timetable book of major trains, and some bus and ferry services outside Europe, ceased December 2010. A monthly air timetable book published by OAG (Official Airline Guide), and covers all airlines and airports in

960-724: A very thick timetable book, was published but its contents are now available on the Deutsche Bahn website and CD ROM. Covers most trains. See Timetables for the Netherlands . In Switzerland timetables change happens only once a year in December all over Switzerland for any kind of public transportation means; major changes even happens only every second year on odd years. A large annual publication consisting of all Swiss railways, funiculairs, most lake and river boats, cableways, Swiss PostBus, and all other country buses timetables. All online timetables provide information for

1020-679: A year in English and Hindi. The first regularly published timetable ( Japanese : 時刻表 , Hepburn : jikokuhyō ) appeared in 1894, published by a private company. By the time of the nationalization of Japanese railways in 1906, three competing timetables were being published and it was decided that only one official timetable should be offered to the public. Five thousand copies of the first official timetable were published in January 1915. In 2010, two printed national timetables were available; one published by JTB Corporation and one published by

1080-609: Is also a UTF-8 text file with identical meaning. UTF-8 also has the advantage that it is easily auto-detectable . Thus, a common operating mode of UTF-8 capable software, when opening files of unknown encoding, is to try UTF-8 first and fall back to a locale dependent legacy encoding when it definitely is not UTF-8. On most operating systems, the name text file refers to a file format that allows only plain text content with very little formatting (e.g., no bold or italic types). Such files can be viewed and edited on text terminals or in simple text editors . Text files usually have

1140-422: Is also limited to scheduled information and does not include real-time information. However, real-time information can be related to GTFS schedules according to the related GTFS Realtime specification. Following are descriptions of the tables required for a valid GTFS data feed. Each table is literally a text CSV file whose filename is the name of the table, suffixed by '.txt'. So for the 'agency' table below,

1200-403: Is available under a Creative Commons Attribution 3.0 unported license. Public transport timetable A public transport timetable (also timetable and North American English schedule ) is a document setting out information on public transport service times. Both public timetables to assist passengers with planning a trip and internal timetables to inform employees exist. Typically,

1260-471: Is combined with a detailed representation of the street/pedestrian network to allow routing to take place from point to point rather than just between stops. This data is often extended using GTFS-Realtime to factor delays, cancellations, and modified trips into realtime journey planning queries. OpenTripPlanner is open-source software that can do journey planning with a combination of GTFS and OpenStreetMap data. Other general purpose applications exist such as

SECTION 20

#1732783360471

1320-934: The ArcMap Network Analyst extension which can incorporate GTFS for transit routing. GTFS was originally designed for use in Google Transit , an online multi-modal journey planning application. GTFS is often used in research on transit accessibility where it is typically used to estimate travel times by transit from one point to many other points at different times of day. Studies however have called such applications into question due to their reliance on schedules alone without accounting for reliability issues and regular schedule non-adherence. GTFS has been used to measure changes in accessibility due to changes in transit service provision, either actual or proposed. Analysis of changes in service over time can be accomplished by simply comparing published GTFS data for

1380-575: The European Rail Timetable . From 1981 to 2010, Cook also produced a similar bi-monthly Overseas volume covering the rest of the world, and some of that content was moved into the European Timetable in 2011. A timetable can be produced dynamically, on request, for a particular journey on a particular day around a particular time (see journey planner , below), or in a timetable that gives an overview of all services in

1440-474: The MIME type text/plain , usually with additional information indicating an encoding. DOS and Microsoft Windows use a common text file format, with each line of text separated by a two-character combination: carriage return (CR) and line feed (LF). It is common for the last line of text not to be terminated with a CR-LF marker, and many text editors (including Notepad ) do not automatically insert one on

1500-529: The Rail Delivery Group . It closely resembles Network Rail's former timetable book, which ceased publication in 2007, but PDF timetable files are on its website. It appears twice per year: Until 1974 each region of British Rail published its own timetable. The first Great Britain timetable started on 4 May 1974. Prior to that the only joint publication between regions had been a publication of 30 principal passenger services from 1962, following

1560-810: The Transportation News Company/Kotsu Shimbunsha , itself owned by all constituent companies of the Japan Railways Group (barring the RTRI ) and SoftBank . These thick books - the February 2009 edition of the JTB timetable, for example, contains 1152 pages - are published every month and cover all stations and trains of JR and private railways, as well as long-distance bus, ferry and air services. For frequent JR urban lines, subway trains, private railways and urban buses, only summary timetables are shown. In 2009,

1620-482: The United States , there had not been any standard for public transit timetables prior to the advent of GTFS, not even a de facto standard . According to long-time BART website manager Timothy Moore, before the advent of GTFS, BART had to provide different data consumers with different formats, making a standardized transit format very desirable. The publicly and freely available format specification, as well as

1680-608: The European train timetables are amended. There are seldom major changes to important routes, but the change allows for alterations to international services and for seasonal variation. Currently the dates for the European train timetable changes are usually the Sunday of the second weekend in June and in December. In the months leading up to the changeover date booking will be restricted as some railway operators are sometimes late loading in

1740-443: The addition of "am/A" or "pm/P" or with pm times in bold , is more often used). If services run at the same minutes past each hour for part of the day, the legend "and at the same minutes past each hour" or similar wording may be shown instead of individual timings. Other information may be shown, often at the tops of the columns, such as day(s) of operation, validity of tickets for each service, whether seat reservations are required,

1800-409: The availability of GTFS schedules, quickly made developers base their transit-related software on the format. This resulted in "hundreds of useful and popular transit applications" as well as catalogues listing available GTFS feeds. Due to the common data format those applications adhere to, solutions do not need to be custom-tailored to one transit operator, but can easily be extended to any region where

1860-425: The calendar.txt file to be added to this table. Rules for drawing lines on a map to represent a transit organization's routes. This table specifies headway (time between trips) for routes with variable frequency of service. Rules for making connections at transfer points between routes. An optional feed start date and optional feed expiration date can be set. Agencies may publish feeds that are several days into

GTFS - Misplaced Pages Continue

1920-481: The convenience that the computer program looks at all timetables so the traveller doesn't need to. A "timetable" may also refer to the same information in abstract form, not specifically published, e.g. "A new timetable has been introduced". The first compilation of railway timetables in the United Kingdom was produced in 1839 by George Bradshaw . Greater speeds and the need for more accurate timings led to

1980-773: The demise of Bradshaw in 1961. The final printed all-line timetable was produced by Network Rail in 2007, after which versions were published both by the Stationery Office and Middleton Press. Subsequently, The Stationery Office version has been discontinued and for the summer of 2016 Middleton Press only published a reprint of the UK pages of the European Rail Timetable, although a limited two-volume comprehensive version belatedly appeared in August. Text file#.TXT In operating systems such as CP/M , where

2040-519: The development of the internet and electronic systems, conventional thick paper timetables are gradually being replaced by website searching or CD-ROM style timetables, and the publication of comprehensive printed timetables is generally decreasing. Transport schedule data itself is increasingly being made available to the public digitally, as specified in the General Transit Feed Specification (GTFS) format. In many modern public transport systems, timetables and rostering are generated by computer, with

2100-493: The difference between the arrival and departure times. However, many agencies do not seem to model dwell time for most stops. The stops table defines the geographic locations of each and every actual stop or station in the transit system as well as, and optionally, some of the amenities associated with those stops. Required fields: The calendar table defines service patterns that operate recurrently such as, for example, every weekday. Service patterns that don't repeat such as for

2160-502: The endianness of the file content. Although UTF-8 does not suffer from endianness problems, many Microsoft Windows programs (i.e. Notepad) prepend the contents of UTF-8-encoded files with BOM, to differentiate UTF-8 encoding from other 8-bit encodings. On Unix-like operating systems, text files format is precisely described: POSIX defines a text file as a file that contains characters organized into zero or more lines, where lines are sequences of zero or more non-newline characters plus

2220-456: The file size in bytes. Some operating systems, such as Multics , Unix-like systems, CP/M, DOS, the classic Mac OS , and Windows, store text files as a sequence of bytes, with an end-of-line delimiter at the end of each line. Other operating systems, such as OpenVMS and OS/360 and its successors , have record-oriented filesystems , in which text files are stored as a sequence either of fixed-length records or of variable-length records with

2280-484: The future. Thus, journey planning software applications keep multiple feed versions and the correct feed for a particular day or time. translations The translations table consists of the columns table_name, field_name, field_value,record_id,record_sub_id,language,translation. Translations are broken down into their respective tables, and any text field or URL may be translated. Translations in GTFS use two types of keys in

2340-586: The introduction of standard railway time in Great Western Railway timetables in 1840, when all their trains were scheduled to "London time", i.e. Greenwich Mean Time (GMT), which replaced solar time . Until railway time was introduced, local times for London, Birmingham , Bristol and Manchester could differ by as much as 16 to 20 minutes; in India and North America these differences could be 60 minutes or more. The European Rail Timetable ,

2400-484: The key-value table. Record_id uses ID for the field like stop_id or trip_id, while field_value is a matching value to the field_name's original contents. Tables using a two value tuple , such as stop_times, use record_id and record_sub_id to represent the tuple. The translation column is the output. [REDACTED] This article contains excerpts from "Opening Public Transit Data in Germany" by Stefan Kaufmann, which

2460-400: The last line. On Microsoft Windows operating systems, a file is regarded as a text file if the suffix of the name of the file (the " filename extension ") is .txt . However, many other suffixes are used for text files with specific purposes. For example, source code for computer programs is usually kept in text files that have file name suffixes indicating the programming language in which

GTFS - Misplaced Pages Continue

2520-639: The new data (between several weeks and a few days before the change). However, in Switzerland timetable changes only happen once a year in December. In Switzerland major changes happen only in odd years. One of the most comprehensive European-wide timetable information is provided by the electronic timetable search engine of German Railways Deutsche Bahn (information is also available in Danish, Dutch, French, Italian, Polish, Spanish and Turkish). The same information, but differently presented, one also find on

2580-435: The number of bytes in a machine word . Further, when data corruption occurs in a text file, it is often easier to recover and continue processing the remaining contents. A disadvantage of text files is that they usually have a low entropy , meaning that the information occupies more storage than is strictly necessary. A simple text file may need no additional metadata (other than knowledge of its character set ) to assist

2640-635: The online timetables by the Swiss Federal Railways (in English, German, French, and Italian) and the timetable by the Czech Ministry of Transport (in Czech, and - however not to every detail - in English and German). This is a free timetable leaflet distributed in express train and has information about the departure, arrival time of the train and connecting services. For many years the “Kursbuch Gesamtausgabe” ("complete timetable"),

2700-434: The operating system does not keep track of the file size in bytes, the end of a text file is denoted by placing one or more special characters, known as an end-of-file (EOF) marker, as padding after the last line in a text file. In modern operating systems such as DOS , Microsoft Windows and Unix-like systems, text files do not contain any special EOF character, because file systems on those operating systems keep track of

2760-489: The operators specifying the required operating span, minimum frequencies, route length/time and other such factors. Design of the schedule may aim to make times memorable for passengers, through the use of clock-face scheduling — services departing at regular intervals, at the same times every hour. This is less likely to apply at peak times, when the priority is optimum utilisation of available vehicles and staff. In large cities services may be so frequent that consulting

2820-467: The reader in interpretation. A text file may contain no data at all, which is a case of zero-byte file . The ASCII character set is the most common compatible subset of character sets for English-language text files, and is generally assumed to be the default file format in many situations. It covers American English, but for the British pound sign , the euro sign , or characters used outside English,

2880-464: The rows of the table. There will often be separate tables for each direction of travel, and often separate (pairs of) tables for working days, weekends and holidays. Generally the times shown against each station or stop will be the departure time, except for the last stop of the service which will be the arrival time. The left hand column will list the stations in route order, and the other columns are arranged from left to right in chronological order. If

2940-406: The same agency from different time periods. For comparison of existing service with proposed infrastructure or service changes, a future GTFS must often be constructed by hand based on proposed service characteristics. Public GTFS feeds have been aggregated in a variety of feed registries: A GTFS feed is a collection of at least six, and up to 13 CSV files (with extension .txt ) contained within

3000-561: The same timetable as the printed Official Timetable plus all Swiss city transit systems and networks as well as most railways in Europe . The user interface as well as all Swiss railways stations, and bus, boat, cable car stops are transparently available in German, French, Italian, and English spelling. Published by The Stationery Office (the official UK Government publishers), and contains information, according to its title page, "with permission of Network Rail and obtained under licence

3060-484: The service is scheduled to wait, both arrival and departure times might be shown on consecutive rows. If a slow service is overtaken by a fast service, the slow service will often occupy more than one column, to keep the times in order. There may be additional rows showing connecting services. In most parts of the world times are shown using the 24-hour clock (although in the United States the 12-hour clock, with

SECTION 50

#1732783360471

3120-644: The source is written. Most Microsoft Windows text files use ANSI, OEM, Unicode or UTF-8 encoding. What Microsoft Windows terminology calls "ANSI encodings" are usually single-byte ISO/IEC 8859 encodings (i.e. ANSI in the Microsoft Notepad menus is really "System Code Page", non-Unicode, legacy encoding), except for in locales such as Chinese, Japanese and Korean that require double-byte character sets. ANSI encodings were traditionally used as default system locales within Microsoft Windows, before

3180-601: The time. Bibiana and Tim McHugh eventually got into contact with Google and provided the company with CSV exports of TriMet's schedule data. In December 2005, Portland became the first city to be featured in the first version of Google's "Transit Trip Planner". In September 2006, five more US cities were added to the Google Transit Trip Planner, and the data format released as the Google Transit Feed Specification . In

3240-536: The times that services depart from that location, sometimes with other information such as destinations and stopping conditions. Again, there may be separate lists for different days of the week. There may be a separate list for each line/direction, or a combined chronological list (as in the picture). In parts of mainland Europe train departures are listed on a yellow poster, and arrivals on a white poster. These posters are placed at entrances to stations and on platforms. Dynamic electronic displays in stations may be at

3300-513: The timetable will list the times when a service is scheduled to arrive at and depart from specified locations. It may show all movements at a particular location or all movements on a particular route or for a particular stop. Traditionally this information was provided in printed form, for example as a leaflet or poster. It is now also often available in a variety of electronic formats. In the 2000s, public transport route planners / intermodal journey planners have proliferated and offer traveller

3360-577: The transition to Unicode. By contrast, OEM encodings, also known as DOS code pages , were defined by IBM for use in the original IBM PC text mode display system. They typically include graphical and line-drawing characters common in DOS applications. "Unicode"-encoded Microsoft Windows text files contain text in UTF-16 Unicode Transformation Format. Such files normally begin with byte order mark (BOM), which communicates

3420-523: The type of the file was "TEXT". Lines of classic Mac OS text files are terminated with CR characters. Being a Unix-like system, macOS uses Unix format for text files. Uniform Type Identifier (UTI) used for text files in macOS is "public.plain-text"; additional, more specific UTIs are: "public.utf8-plain-text" for utf-8-encoded text, "public.utf16-external-plain-text" and "public.utf16-plain-text" for utf-16-encoded text and "com.apple.traditional-mac-plain-text" for classic Mac OS text files. When opened by

3480-427: The type of vehicle used (e.g. for heritage railways and airline timetables ), the availability of on-board facilities such as refreshments, availability of classes, and a service number. Timetables with services arranged in rows of tables and stops or stations in columns are less common but otherwise similar to timetables with services in columns. Some timetables, particularly at railway stations and bus stops , list

3540-561: The world. The official timetable book, published twice a year. Published twice a year by China Railway Publishing, in Chinese . The former timetable includes all trains, the latter fast express trains only. Published irregularly (last January 2015) by Duncan Peattie, in English. It includes all trains shown in the Chinese Railway Passenger Train Timetable, but not all stations. Published once

3600-472: Was to become GTFS started out as a side project of Google employee Chris Harrelson in 2005, who "monkeyed around with ways to incorporate transit data into Google Maps when he heard from Tim and Bibiana McHugh, married IT managers at TriMet , the transit agency for Portland , Oregon". McHugh is cited with being frustrated about finding transit directions in unfamiliar cities, while popular mapping services were already offering easy-to-use driving directions at

#470529