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
46
votes
4 answers

Detect the nearest transit stop from the given location

I need to get all the nearby public transit information within certain distance from a given location. The type of public transit can be either bus, train, etc.. Here is what I meant: If I use Google Map to query "Transit Stop near a Location…
Yeo
  • 11,416
  • 6
  • 63
  • 90
27
votes
1 answer

Pathfinding (routing, trip planning, ...) algorithms on graphs with time restrictions

I have a database of bus/train/... stops and the arrival/departure times on each date and so on. I'm looking for a way to do a search for the fastest(shortest/cheapest/least transitions) trip between two locations. I would like to have arbitrary…
lacop
  • 2,024
  • 4
  • 22
  • 36
22
votes
7 answers

Bus public transport algorithm

I am working on an offline C# application that can find bus routes. I can extract the timetable/bus/route data. I am searching for the most simple solution that will work with basic data. What algorithm can be used to find a route from bus stop…
Daniel Novak
  • 2,746
  • 3
  • 28
  • 37
20
votes
6 answers

How can I list all the stops associated with a route using GTFS?

I'm working with some GTFS data and would like to be able to create a list of all stops associated served by a route. I don't really understand how to do with with GTFS data. Trips.txt comes in a format like this:…
Cam Saul
  • 1,706
  • 1
  • 16
  • 24
12
votes
3 answers

How to get google transit data by api

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:…
user1388070
  • 171
  • 1
  • 2
  • 6
10
votes
1 answer

Add timezone to timestamp in PostgreSQL (not convert to this timezone)

I have 3 separate fields of types VARCHAR (contains timezone, for example 'Europe/Rome'), DATE and INTERVAL. And I want to combine them in query so that I get TIMESTAMP WITH TIME ZONE. The rule of making this value is: Noon of specified date in…
Fly
  • 173
  • 1
  • 1
  • 7
9
votes
1 answer

How to create an interactive plot of GTFS data in R using Leaflet?

I would like to create an interactive map showing the public transport lines of a city. I am trying to do this using Leaflet in R (but I'm open to alternatives, suggestions?) Data: The data of the transport system is in GTFS format, organized in…
rafa.pereira
  • 13,251
  • 6
  • 71
  • 109
9
votes
3 answers

How to generate coordinates in between two known points

Background: I'm working with transport routes and Google provides Route points far apart enough to create 'shapes'. These are the bus/train routes you see in Google Maps. My Requirement: Google's points are far enough to create straight lines.…
andy
  • 8,775
  • 13
  • 77
  • 122
8
votes
2 answers

How do I create a table with self-referencing fields in MySQL?

In GTFS, the field parent_station is either from stop_id (self-reference) or NULL. For instance (note that parent_station might be NULL), SELECT stop_id, stop_name, parent_station FROM stops where stop_id='1970324837184617' OR…
SparkAndShine
  • 17,001
  • 22
  • 90
  • 134
8
votes
4 answers

How to read GTFS protocol buffer in PHP?

I have a GTFS protocol buffer message (VehiclePosition.pb), and the corresponding protocol format (gtfs-realtime.proto), I would like to read the message in PHP alone (is that even possible?). I looked at Google's python tutorial…
SkyNT
  • 718
  • 1
  • 8
  • 19
7
votes
2 answers

Running this GTFS sample code

I am having trouble finding an API that will allow me to read in GTFS data. After much searching I was able to find and run This code, but there is not really much of an explanation. I am ultimately having trouble trying to figure out how to get…
The Tokenizer
  • 1,564
  • 3
  • 29
  • 46
6
votes
1 answer

SQLite Update Syntax for Correlated Subquery with Condition

I'm working with GTFS data in a SQLite database. I have a StopTimes table with columns trip_id, stop_sequence, and departure_time (among others). I want to null the last departure_time (in the tuple with the largest stop_sequence) for each trip. The…
Impatient Dev
  • 683
  • 1
  • 7
  • 10
5
votes
2 answers

Read gtfs google transitFeed python

I´m trying to do a reading from a gtfs, is a zip. the google repository tells that this library can read, but, I don´t find any about how to read a gtfs with transitfeed library. Do you know, how I can do for read an get the structure of the gtfs? I…
ernesto petit
  • 1,436
  • 1
  • 14
  • 19
5
votes
1 answer

GTFS based Transit Planning using PGRouting

I have followed below tutorial for setting-up OpenTripPlanner by importing GTFS data and it worked. http://docs.opentripplanner.org/en/latest/Basic-Tutorial/ But I have to integrate the trip planning on an existing GIS implementation which uses…
MobDev
  • 1,489
  • 1
  • 17
  • 26
5
votes
2 answers

Reading GTFS-realtime files using R?

I want to analyze GTFS-realtime files using R, compared to the static GTFS, these files are compiled and reading them is trickier. Googling around, I have only found this package to deal with GTFS https://github.com/ropenscilabs/gtfsr But again,…
Xavier Prudent
  • 1,570
  • 3
  • 25
  • 54
1
2 3
18 19