Questions tagged [gtfs]

The General Transit Feed Specification (GTFS) defines a common format for public transportation schedules and associated geographic information.

The General Transit Feed Specification (GTFS) defines a common format for public transportation schedules and associated geographic information. GTFS "feeds" allow public transit agencies to publish their transit data and developers to write applications that consume that data in an interoperable way. GTFS-realtime is an extension to GTFS that allows public transportation agencies to provide realtime updates about their fleet to application developers.

273 questions
0
votes
2 answers

Using Google GTFS to get unique routes

I am trying to get the paths part of a transit service from a set of GTFS files. The trips.txt file actually presents the paths multiplied for the timetables so that many lines for each path as documented in the GTFS documentation. How may I get…
Fabrizio Bartolomucci
  • 4,948
  • 8
  • 43
  • 75
0
votes
1 answer

Multiple trip headsigns for a route?

So I just noticed this in my application, but when I get a list of routes that services a stop, I get multiple trip_headsigns for a specific route, but they all run the same route when I get all the stops and the route shape. Am I missing something…
Masterofawesome
  • 69
  • 1
  • 11
0
votes
2 answers

GTFS Database - SQL Queries for "Revenue Mileage" and "Revenue Hours"

I'm trying to find the number of revenue miles/kilometers of a "Route" by: day, month, and year; by querying a GTFS database that has the structure described here: https://developers.google.com/transit/gtfs/reference And see here for a very clear…
FirstFraktal
  • 358
  • 4
  • 6
0
votes
1 answer

Find nearest transit station / stopover (bus, train etc) in Google Maps

Is it possible to find the nearest bus, train, or other public transit? The 'nearest' is a separate case, but is it just possible to find them? They are tagged, but I want to know how to access/find them.
cV2
  • 5,229
  • 3
  • 43
  • 53
0
votes
1 answer

Vehicle usage optimization using GTFS

I have a GTFS feed defined for my fleet. This tells the routes, trips and timings. Now using this GTFS feed, is it possible to optimize the utilization of my fleet's vehicles? Can I schedule the vehicles such that once it completes a trip, it can be…
Yash
  • 946
  • 1
  • 13
  • 28
0
votes
1 answer

GTFS Shape Extraneous Data Points

I am working on an iOS application which uses GTFS data. The data is provided by the local transit authority. When plotting the route overlays onto a map, I have found a number of outlying data points as seen in the image below: Screen Shot…
mgeno
  • 191
  • 3
  • 13
0
votes
1 answer

Having problems using the python code generated from the google protocol buffer

I am getting the following error when I try to run gtfs_realtime_pb2.py (the python code generated from running the gtfs-realtime.proto through google's protocol buffer): Traceback (most recent call last): File "", line 1, in
Tom
  • 925
  • 3
  • 10
  • 24
0
votes
1 answer

Trouble matching and setting values from multiple dataframes

I am trying to match the stop_id in stop_times.csv to the stop_id in stops.csv in order to copy over the stop_lat and stop_lon to their respective columns in stop_times.csv. Gist files: stops.csv LINK stop_times.csv LINK Here's my code: import…
user2676336
0
votes
1 answer

How to find routes near a point

I have a lat and lon coordinates of a spot and the radius in which I want to search for a stop, I then execute a function from google-maps to query my GTFS database with those variables but I don't know how the query should look. Can I select the…
artembus
  • 427
  • 1
  • 6
  • 13
0
votes
1 answer

Is it possible to integrate Google Maps with the directions and the Transit layer into an iPhone app?

Sorry if this question is obvious for some of you. I know we can link to the existing Goggle Maps app, but I would like to have an app that does not exit and provides the direction within. I intend using GTFS for public transit. On the other hand,…
user326109
0
votes
1 answer

How to get all connections from one GTFS route?

I'm using the data from Rennes (2nd zip file from that page), and this tables schema. Here's my first query, it lists the stops from a route (from the first trip of that route): select first_trip_of_route.trip_id, st.stop_id, …
Benoit Duffez
  • 11,839
  • 12
  • 77
  • 125
0
votes
1 answer

How can I include in schedules today's departures after midnight using GTFS?

I began with GTFS and offhand ran into big problem with my SQL query: SELECT *, ( some columns AS shortcuts ) FROM stop_times LEFT JOIN trips ON stop_times.trip_id = trips.trip_id WHERE trips.max_sequence != stop_times.stop_sequence AND stop_id IN(…
Anette D.
  • 25
  • 4
0
votes
1 answer

How can I list a stop's directly connected neighbors using GTFS?

Lets say that these statemates are included in GTFS data: 1. stop A is connected with stop B and stop C 2. stop B is connected with stop D and stop E 3. stop C is connected with Stop F and stop G Now I want to query all stops, that are directly…
Slevin
  • 4,268
  • 12
  • 40
  • 90
0
votes
2 answers

Data in view is being outputted to console instead of webpage (flask - python)

I'm trying to grab a hold of some data from a GTFS feed. I haven't gotten very far yet and I'm still trying to figure out how to open up and save the contents locally. Right now I have a flask application with the following: def mta(): data =…
user2989731
  • 1,299
  • 3
  • 17
  • 33
0
votes
1 answer

Add count/instance no. column to table (SQL Developer)

I have a table with the columns car_id, stop_location, arrive_time and leave_time. I'd like to add a column stop_sequence, which would start at 1 and increment by 1 for each row with the same car_id and then start again at 1 for the next car_id…
Pete Ludlow
  • 121
  • 1
  • 1
  • 8