background preloader


Facebook Twitter

CUTR-at-USF/gtfs-osm-sync · GitHub. Accessing GTFS Data in QGIS—Indicatrix. By mattwigway on July 25, 2011 When you load GTFS data into PostGIS using gtfsdb, you can’t access that data in QGIS because the tables don’t have a primary key in int4 format (the primary key is in text format).

Accessing GTFS Data in QGIS—Indicatrix

If your transit system uses numeric ids in text format, an easy fix is running this against each of your tables: ALTER TABLE stops ADD COLUMN gid int;UPDATE stops SET gid = stop_id::int;ALTER TABLE stops ALTER COLUMN gid SET NOT NULL;ALTER TABLE stops ADD CONSTRAINT stops_gid_uniq UNIQUE(gid); What this does is creates an integer ID field, populates it with the stop_id (or shape_id, &c.) cast to an integer, then adds NOT NULL and UNIQUE constraints to the column.

You can’t add the constraints beforehand, because the column is initialized to NULL values. Displaying Transit Data to Users - Transit. GTFS Transit Data. We make transit stop and schedule data available to you in the General Transit Feed Specification (GTFS) format.

GTFS Transit Data

For our legal protection, you'll need to agree to the SFMTA Transit Data License Agreement in order to use it. This is not real-time data, only scheduled service. SFMTA Transit Data License Agreement The San Francisco Municipal Transportation Agency ("SFMTA" or "Muni"), a department of the City and County of San Francisco (the "City"), hereby grants to the Licensee a non-exclusive, limited and revocable right to use, reproduce, and redistribute SFMTA Transit Data ("the Data"), subject to the following Terms: TransitTimes+ Blog, Making GTFS Shape Data Manageable. yTransit - GTFS Manager. OtherGTFSTools - googletransitdatafeed - A list of other software that read and write GTFS files - GoogleTransitDataFeed.

Data model diagrams for GTFS. Recently I've been doing some work with the General Transit Feed Specification (GTFS).

Data model diagrams for GTFS

This is a simple data model initiated by Google, in order to allow transit organizations to publish their schedules for routing and visualization purposes. As usual, Google has nice, succinct documentation for the GTFS format (which is a set of CSV files embodying an implicit data model). But I was surprised to find that they don't provide any kind of data model diagram showing the relationships between the various entities (files) in the model. General Transit Feed Specification Reference - Transit. Steffen Martinsen. I had some time off, and found the process of importing GTFS (General Transit Feed Specification – which basically is tables of public transfer information) to a MySQL database quite difficult – even through the py-gtfs-mysql repo.

Steffen Martinsen

So I wrote my own in PHP which should be really easy to use with its WordPress-like setup interface. If you’re not familiar with GTFS I’d suggest you read a bit about it over at Google. To make a long story short – its information about public transfer (busses, metros++) freely available for you to use (well, quite a lot of them has some disclaimers, and you’d might have to register to gain access). Anyway, the reason I got involved and all was because of the GTFS feed from Kolumbus (public transfer in Stavanger – my hometown). So I screwed around a bit, trying to add the data to a MySQL database with the least amount of energy. OtherGTFSTools - googletransitdatafeed - A list of other software that read and write GTFS files - GoogleTransitDataFeed.

Capital District Transportation Authority. Developer Tools and Resources: GTFS. Capital District Transportation Authority. Developer Tools and Resources: Transit Applications. The OpenPlans Guide to GTFS Data. Data formatted using the General Transit Feed Specification (GTFS) runs practically every transit app out there.

The OpenPlans Guide to GTFS Data

It fuels all kinds of products in our space from trip planners to transit-oriented apartment searches. The folks at City-Go-Round tell the story of open transit data pretty well – open transit data enables the transit apps that help people get around. But here's the next question: what else can we do with that data? We mentioned a few weeks ago that it turns out that almost 85 percent of the transit miles traveled in the U.S. are done so on transit systems with open data. So let's talk about the tools that we could build to help out those transit agencies. Bmander/gtfs. GTFS brings open data to public transit: A developer's first look at the spec. Google and a group of developers spearheaded GTFS, a format for public transportation schedules and geographic data.

GTFS brings open data to public transit: A developer's first look at the spec

Here's what developers need to know to start using the data standard. The local government in Louisville, KY is sponsoring a contest for applications that best utilize TARC General Transit Feed Specification (GTFS) data. (TARC is the metro area's public transportation system.) The contest piqued my interest in GTFS, so I dove into the specification with many ideas on how to put the data to use. Introduction - Transit Partners Help. The goal of Google’s quality requirements is to create the best possible user experience with your data.

Introduction - Transit Partners Help

Your feed should be compliant with these quality requirements before it is launched to the general public. There are some general rules that apply to all user facing content, including route names, trip headsigns, trip short names, stop names, stop headsigns and agency names: Keep the naming consistent with the naming you use in your own materials and signage. Use the local language. Names should not contain strange characters or strange spacing. Introduction - Transit Partners Help. GTFS Data Exchange. GTFS SQL Importer.

This is a small utility for quickly and easily importing GTFS data into a SQL (i.e. relational) database.

GTFS SQL Importer

It is released under the MIT license. Using GTFS SQL Importer The code below shows how to import some data from a bash prompt. PostgreSQL cat gtfs_tables.sql \ <(python path/to/gtfs/data/directory) \ gtfs_tables_makeindexes.sql \ vacuumer.sql \ | psql mydbname myusername SQLite cat gtfs_tables.sqlite \ <(python path/to/gtfs/data/directory nocopy) \ | sqlite3 ANewDatabase.db SQLite compatibility contributed by Justin Jones. Other Non-PostgreSQL If you don't have PostgreSQL, then the python line should be as follows: Gtfsdb - GTFS Database. Blog. TL;DR version: I wrote a proof of concept GTFS data manager. Blog

I suck at sales or something. Small/medium transit companies don’t care about GTFS? Maps Programme de partenariat – Partenaires – Google Maps. TransitTimes Blog. We’ve just released TransitTimes+ 2.1, and this version shows fare calculations for trips, based on the data specified in the fare_attributes.txt and fare_rules.txt file in agencies’ GTFS feeds.

TransitTimes Blog

(Fares are shown in footer of the trip description, if made available by the transit agency. In this case, TriMet of Portland supply this data) Rather than describing the structure of these files, you can read the specification and then read some detailed examples. If you read these examples, you’ll see that it can be quite complex to calculate a fare, especially when one or more transfers are involved. Here’s how we’ve done it in TransitTimes+: Find qualifying fares for each segment of a trip, disregarding transfer optionsCreate every combination of fares possibleFind the cheapest total, this time accounting for transfers 1.

To determine a qualifying fare for a trip, you must typically know its start and finish stop. 2. 3. When calculating the price, you must account for transfers. Conclusion. Pace Bus - Route Timetable Data Services. GTFS/Scheduled Service Data. The General Transit Feed Specification—or GTFS—is an open format for packaging scheduled service data. GTFS data is produced by hundreds of transit agencies (including us) around the world to deliver content for inclusion in maps and directions-giving services, including Google Maps. Note: GTFS was recently renamed from "Google Transit Feed Specification. " Learn more about the General Transit Feed Specification on Google Code. A GTFS feed is typically presented as a series of text files with comma-separated values that conform to the specification.

Each file is essentially a table in the relational database that is the whole package. On this page... Documentation. TransitFeedDistribution - googletransitdatafeed - A Distribution of python tools - GoogleTransitDataFeed. The TransitFeedDistribution contains several parts, each with its own instructions TransitFeed - a Python package for reading, writing, and validating feeds FeedValidator - a command line tool that checks a Google Transit Feed for problems ScheduleViewer - an application for exploring a feed on a map KMLWriter - an application for plotting a feed's stops in a KML file for viewing in Google Earth Merge - combines two GTFS files into one GoogleRandomQueries - an example program. generates random queries for Google Maps trip planner. UnusualTripFilter - sets the trip_type depending on how often a pattern is used You may download the transitfeed distribution as Windows executables, a source tar ball or directly from our Subversion repository.

Windows Executable. Gares et Horaires : le Blog. General Transit Feed Specification Reference - Transit. Making GTFS query more convenient. I have been spending a lot of time parsing the GTFS database. On the surface it is just a simple CSV files. But to extract useful information from GTFS is often unexpected difficult. For example, find the stops from a bus line in sequential order might sounds like basic thing to do. But it is actually non-trivial with GTFS. TransitTimes+ Blog, Making GTFS Shape Data Manageable.