Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get google transit data by api

Tags:

gtfs

I'm working on a thesis project in order to do an "integrated indoor / outdoor" navigation system for mobile devices (Especially Iphone).

I need information about public transport, until a few days ago I used this service: http://www.google.com/m/directions

but it doesn't work anymore for some reason.

I saw that there are Google APIs directions but they only work in walking, bycicle, driving travel mode and they don't work for "transit mode".

Then I saw that there are no public API for Google Transit service .

I was wondering if there is an "API" or a "way" to extract data from public transportation?

like image 925
user1388070 Avatar asked May 10 '12 20:05

user1388070


People also ask

How do I access GTFS data?

You can search for the transit agency of your choice at http://www.gtfs-data-exchange.com/ or look for them at https://code.google.com/p/googletransitdatafeed/wiki/PublicFeeds. You can find out more about GTFS at https://developers.google.com/transit/gtfs/reference.

What is transit API?

Transit gathers raw data for trains, buses, bikes (and more) across 300 cities in 16 countries. Our algorithms transform millions of data points into accurate real-time departure times and intuitive trip plans. Now you have access to the same high-grade multimodal mobility fuel that powers Transit.

How does Google Maps get transit data?

How it works. When participating transit agencies share their static transit data (e.g. routes, stops, and schedules) with Google Transit, that information is integrated with Google Maps and accessible to Google users.


1 Answers

Many public transit agencies make their route information available in General Transit Feed Specification (GTFS) format. In fact, this is the format that is used by public transit agencies to submit their information to Google.

You can search for the transit agency of your choice at http://www.gtfs-data-exchange.com/ or look for them at https://code.google.com/p/googletransitdatafeed/wiki/PublicFeeds. You can find out more about GTFS at https://developers.google.com/transit/gtfs/reference.

Of course, you'll have to write your own code to parse the data, probably store it in a database, and determine the best route from point A to point B. But you also don't have to worry about someone else's service suddenly stopping working on you. (The worst thing that can happen is http://www.gtfs-data-exchange.com/ goes away, in which case you need to find another way to keep your data up to date.)

like image 133
Trott Avatar answered Sep 28 '22 09:09

Trott