Open Source Tool for update and produce GTFS

1,907 views
Skip to first unread message

Nitai Silva

unread,
Sep 23, 2012, 9:28:02 PM9/23/12
to OpenTripPlanner Users
Hi,

I'm new here and newby in GTFS issues.
I live in Brazil, and I'm attempting to engage the people working in
the public transport agencie to embrace the open data movement,
publishing GTFS feed.

My question: What are the open source tools for manipulate and
generate GFTS files?

I want to advocate for the release of this data here in my city.
Thanks for the answers.

[]s
Nitai

Nitai Silva

unread,
Oct 1, 2012, 8:46:48 AM10/1/12
to OpenTripPlanner Users
Someone? Anyone?

Or simply, no?!

MikeN

unread,
Oct 1, 2012, 5:34:58 PM10/1/12
to opentrippl...@googlegroups.com
I was not able to find such an open tool either.   This is as close as I could find about possible demand this tool:

Colin

unread,
Oct 1, 2012, 8:14:42 PM10/1/12
to opentrippl...@googlegroups.com
Looks like that tool was a bit before its time and the developer has lost interest when interest is heating up!

Out of curiosity what sort of interface would you see the tool using? I've done a lot of GTFS work and have a good understanding of the format, I work in Java so if I experimented designing such an application it'd be an application you open in Windows, and possibly Mac OS and Linux. Probably not web based.

I'm willing to mess around and come up with a concept, however I'd probably charge a small fee for the software. Obviously if you're interested in trialing this we could come to a special arrangement. GTFS planning software is pretty rare and understanding the concept is something I've gotten to know over time so I wouldn't do it for nothing but I wouldn't be milking the money either.

What sort of features do you see as being important? Unfortunately I don't have much of an understanding of driver scheduling but if I got a basic GTFS designer up and running we could go from there? Let me know if you're interested.

MikeN

unread,
Oct 2, 2012, 11:30:55 AM10/2/12
to opentrippl...@googlegroups.com
On the one hand, I've never used a proper GTFS editor, but one key item is being able to designate and create route paths.   Assuming the road network is good, the user could build route paths by snapping to the nearest road in OSM data.  Also many routes retrace paths, so you'd need to handle this and let the user pick the route apart when it is modified.

  Other than that, I have no insight. 

Colin

unread,
Oct 2, 2012, 7:52:29 PM10/2/12
to opentrippl...@googlegroups.com
I've had a look into making a GTFS builder and it seems relatively straight forward so far. I'm able to use open street maps which would avoid Google licence issues, and I can create points, link them with lines and get the lat/lon from each point.

Reusing various components I've created in the past I've created a very basic app that accepts a gtfs zip then reads the routes and stops to a database. Once loaded it displays the routes and plots all stops on a map. I've tried it with Sydney too which has the most stops of any open data city and the map is still usable when displaying all stops.

I may investigate this further and move it onto a working prototype alllowing gtfs input to a database, read/modification of data then writing to a gtfs file. Its a Java based desktop app which should allow cross platform usage (I'm guessing some transit agencies are Mac based).

It'd be good to know interest in this style of application in the present day where more agencies are opening their data. I'll have to check out what commercial software is usually used as I'm guessing I could do it at a fraction of the cost. The main problem I can see so far is snapping routes to the road network, though I haven't investigated this yet. The back end is MySQL.

ma...@mobilibus.com.br

unread,
Mar 2, 2013, 11:08:39 PM3/2/13
to opentrippl...@googlegroups.com
Olá

Você pode utilizar a ferramenta Mobilibus. www.mobilibus.com.br

Att
Marco

Tim Bender

unread,
Mar 11, 2013, 10:03:18 AM3/11/13
to opentrippl...@googlegroups.com
At least here in America most (if not all) of the major vendors of transit scheduling software have a GTFS export utility that allows transit agencies to quickly build a feed.  From an advocacy standpoint, i would start here.  See if the agencies in your region have access to something like this but just aren't using it.  Maybe there is another standard in Brazil that can be translated over to the GTFS schema.  

I think the reason you don't see a lot of open-source GTFS editors/builders is because of the complexity of the data and access to paid software that does the same.  

Creating a feed by hand isn't out of the question it's just time consuming.  Here's a hypothetical example:

Assume you have 1 agency (A1) that runs 1 route (R1).  The route has 1 trip (T1) and stops at 3 stops (S1,S2,S3).

Begin building stop_times.txt and work backwards from there.  stop_times is a list of every time a bus stops at a stop.  The file would look something like this:

stop_times.txt
trip_id,arrival_time,departure_time,stop_id,stop_sequence
T1,07:00:00,07:00:00,S1,1
T1,,,S2,2
T1,07:15:00,07:15:00,S2,3

Save time by only including the required fields at first.  It's not worth the effort to go beyond this point if doing it by hand.  
At this point you just need to manually build the following tables:

agency.txt
agency_name,agency_url,agency_timezone
A1,Agency A1,{url},{timezone}

stops.txt
stop_id,stop_name,stop_lat,stop_lon
S1,Stop 1,{latitude},{longitude}
S2,Stop 2,{latitude},{longitude}
S3,Stop 3,{latitude},{longitude}

routes.txt
route_id,route_short_name,route_long_name,route_type
R1,RT1,Route 1,3

trips.txt
route_id,service_id,trip_id
R1,Weekday,T1

calendar.txt
service_id,monday,tuesday,wednesday,thursday,friday,saturday,sunday,start_date,end_date
Weekday,1,1,1,1,1,0,0,20130101,20131212

Only add the required fields, and like I said build backwards from stop_times.txt.  You could do this in a reasonable amount of time for a small to medium sized agency in a spreadsheet that would allow the process to be repeatable easily in the future.  

Luke Crouch

unread,
Mar 12, 2013, 12:13:32 PM3/12/13
to opentrippl...@googlegroups.com
On Monday, March 11, 2013 9:03:18 AM UTC-5, Tim Bender wrote:
At least here in America most (if not all) of the major vendors of transit scheduling software have a GTFS export utility that allows transit agencies to quickly build a feed.  From an advocacy standpoint, i would start here.  See if the agencies in your region have access to something like this but just aren't using it.

This is/was the case here in Tulsa. But our transit agency told us that Trapeze (their vendor) "wouldn't give them the GTFS export utility." Does anyone else on this list have experience with Trapeze? I'd like to know if that's true or not.

FWIW, one of the Code for Tulsa developers wrote code to convert a Trapeze data export into GTFS [1] and another tool to store, manage, and combine GTFS feeds [2].

-L

[1] https://github.com/tulsawebdevs/tulsa-transit-google
[2] https://github.com/tulsawebdevs/django-multi-gtfs

Tim Bender

unread,
Mar 17, 2013, 1:29:14 PM3/17/13
to opentrippl...@googlegroups.com
Trapeze will do anything Tulsa needs them to do, but it's likely there is a disagreement over money here. Its stupid, but Tulsa probably didn't spec the utility and trapeze probably wont give things away for free. Trapeze makes great products but they have a reputation for forcing customers into their "walled garden" and many people resent that mindset, especially when we're used to sharing so much valuable data freely.

Nobody does transport as good as trapeze, but you really pay a price for getting in the door. Once you're in, it gets hard to get out.

James Kuhr

unread,
Jul 25, 2017, 12:25:24 PM7/25/17
to OpenTripPlanner Users
I tried to put something together! Its rudimentary, but maybe its a start for some real coders to help out

https://github.com/jamesku/cowboyGTFS

Nikhil VJ

unread,
Aug 10, 2017, 12:14:22 AM8/10/17
to OpenTripPlanner Users
Hi friends,

Just came across this forum. I too was searching for something like this since I got acquainted with GTFS. I've made this design doc and am starting to work on it with some interns. Not a proper coder myself but I think I understand what has to be done and can break it down to tell a coder what to do.

(static GTFS only for now)

I've designed it based on the simpler data we have in my city for the local bus system : fixed routes that never change their sequences, fixed timetables. 

It takes three tables of primary human-made data, and works on them to generate the GTFS output. 

There are single values too that make the agency.txt etc files. I'm going to work right now at the backend / db level (take a pre-made spreadsheet and generate the feed), but once that is achieved I want to follow up with another project to make a GUI operate it. I think the CowboyGTFS project has made great inroads in map-based route formation.

Do check it out and let me know your thoughts! 

Note that what I'm working on is for creating a GTFS feed where none previously existed; not for visualizing/analysing existing feeds or for providing commuter with transit guidance etc. (previously everywhere I asked for the former, people replied with the latter so at some point I'd given up on finding others)

Andrew Byrd

unread,
Aug 10, 2017, 3:04:02 AM8/10/17
to Nikhil VJ, OpenTripPlanner Users
Hello,

There are already a large number of open source projects that create GTFS data. I’m surprised you had difficulty tracking them down, as a quick web search should reveal many such projects, as well as free and commercial web-based services, and articles / Q&A posts listing such tools with commentary. For example: https://gis.stackexchange.com/questions/91220/choosing-gtfs-editor-for-creating-and-exporting-routes

If you have special needs, want to import from an existing database, etc. you should still gain a lot by reusing components or building upon one of these existing projects. It would be quite costly and/or time consuming to recreate all the user interface elements, data model, interfaces with databases etc. that others have already built.

Andrew

--
You received this message because you are subscribed to the Google Groups "OpenTripPlanner Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opentripplanner-...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages