Archive for the ‘GTFS’ Category

yTransit and GTFS revisited

July 8th, 2011

It’s been a long time since I last looked at GTFS. Since then, I’ve gotten tons of emails and comments on the blog post about my failed little yTransit project. A Google engineer in the Czech Republic working on their transit team even contacted me, but still nothing from actual transit companies.

However, it’s been a little while and I think there may be a glimmer of hope for this project yet. I’m guessing (hoping) that since smartphones have become increasingly popular, more people in the industry are getting a bit more interested in the technology. I called the Summit County, Colorado transit system (Summit Stage Transit) this morning and talked to the dispatcher.

I told him that I was interested in getting their transit schedule into Google Maps and he didn’t just say “uuhhhh… what?” He actually said “I think we’d be very interested in that.” He told me the person I needed to speak with wasn’t in the office at that moment, but he’ll be in later today and that I should leave a voicemail.

Now remember, I had originally contacted Summit Stage Transit way back in 2009 and they weren’t interested and didn’t return my calls. So at least this time around, I actually got a favorable response. That is huge progress!

We’ll see if this goes anywhere, but if they’re able to help me get some requirements built, I might actually be able to make this happen.

So officially, the project is still dead pending resuscitation by John at Summit Stage Transit who is supposed to return my call this afternoon.

Update: I spoke with John and I have a meeting scheduled for the July 20th to discuss their needs and requirements. This thing might happen after all.

Google APIs, GTFS

Got a PS3? Want Hulu Back? Easy enough…

June 29th, 2009

Update Jan 6, 2010: Some users are reporting that they’re getting an error telling them they need to update Flash. I imagine we’re going to have to wait for Sony to update the PS3 firmware with a new Flash version.

Over the weekend Hulu stopped working for PS3 users. How did they block the PS3 users? With the dumbest method they could find. They test the User-Agent string in the HTTP request. Well, luckily, we can use a proxy server and just rewrite it. Windows users may want to look here

1. Install squid (“sudo apt-get install squid” for ubuntu users…. for Windows users, google for: squid windows)

2. Edit squid’s default config (/etc/squid/squid.conf on ubuntu) with these changes (or download my configuration: squid-hulu.conf):

Search for “acl localnet src” and set it to your internal network. You can remove the other localnet definitions if you’re not using them as shown here:

#acl localnet src
#acl localnet src
acl localnet src

Note: For 99.9999% of you, the correct line will be “acl localnet src″

After the “acl localnet src” line, add this:

acl hulu url_regex -i ^http://.**

Search for “http_access allow localhost” and add “http_access allow localnet” as such:

http_access allow localnet
http_access allow localhost

Add the following two lines pretty much anywhere in the file (the end of the file works just fine):

header_access User-Agent deny hulu
header_replace User-Agent Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/2009060215 Firefox/3.0.11 (.NET CLR 3.5.30729)

3. Start squid (sudo /etc/init.d/squid start)

4. Go to PS3 Internet settings. Do manual configure. Go through the settings as normal (the defaults should be fine) until you get to proxy server. Set it to be your PC’s IP address port 3128.

Your PS3 is now a Windows machine running Firefox (as far as Hulu is concerned) and you can use Hulu again. What a dumb method of restricting access.

UPDATE – Jul 30 2009: To all of you guys out there saying “Why don’t you just use PlayOn or TVersity?” My response is:

from eric to MediaMall Support
date Mon, Jun 29, 2009 at 10:00 AM

I assume you're saying that there's no plan for a Linux version then?

from MediaMall Support to eric
date Mon, Jun 29, 2009 at 10:03 AM


That was the response I received. TVersity is quite obviously intertwined with Windows and there is no hope there either. The users that support the invasive DRM (by using it) are responsible for open protocols not being available. If you want to know why DRM is successful, you need only look in the mirror.

UPDATED – Aug 10 2009: As requested in the comments, the instructions now make it so that only hulu will get the header replaced. Also, the comments section has tips and hints for Windows users and squid version 3.0+. See:

Some more Windows Info

Squid 3.0+ Info

General, GTFS, PHP, PlayStation3 , , ,

An App To Manage Bus/Rail Routes in GTFS Format — that no one wanted

June 8th, 2009

TL;DR version: I wrote a proof of concept GTFS data manager. I suck at sales or something. Small/medium transit companies don’t care about GTFS? The link to the app is at the bottom of this post.

The full version:

So before I actually started learning ExtJS (and the whole reason I started in the first place), I had this grand idea that there was a market for software that managed GTFS data for small and medium sized public transit organizations. The thought was that these transit companies didn’t use the incredibly powerful — and incredibly expensive — route scheduling apps. To go along with that, their IT departments are probably really small and underfunded.

For example, my local transit agency is using to submit feedback and their website has that wonderful tag that defines low tech:

<meta name=”GENERATOR” content=”Microsoft FrontPage 6.0″>

And the link to their formmail form is also 9 grades of pure awesome:

It's 1994 all over again!

Anyway, I threw together a little ExtJS application as a proof of concept and started reading and learning how ExtJS actually works (because my code for the proof of concept was horrible). I then started reaching out to some small transit companies around the country targeting the ones that actually had halfway decent maps of their routes and stops. By the way, Amarillo, TX has the most detail online including pretty much everything you would need to create the GTFS data feed.

I figured for a relatively small monthly fee somewhere around $50 to $75 a month or so, we could give them an application that lets them manage their routes, trips, stops, and publish a GTFS feed for them with their data. Or perhaps you could charge based on the size of the transit company… like $x for y number of routes. Anyway, it’s actually not an incredibly difficult program to write. At $50 bucks a month you’d never be a millionaire, but it would be some nice extra side income if you could get a bunch of these small agencies signed up.

I figured a good way to get started would be to offer it for free to whichever company I could find to accept it first. Amarillo was an obvious first target. Summit County, Colorado had quite a bit of data as well. My local transit agency was missing GPS locations of their stops, but it wouldn’t be too hard to collect that. Probably $100 bucks in gas or so driving around collecting GPS coordinates. There were a good number that had pretty much all of the data online already, they just needed the format. That would have been perfect, because I could format the data for them semi-manually while I was writing the app at the same time. This would give me a perfect test case and they’d get free service.

After a number of email inquiries and some phone calls, I got absolutely nowhere. One must really suck at sales when you can’t even give away a product to someone. Either that, or there is simply no interest. I didn’t get a single return phone call or email from anyone, and I was offering it for FREE. Not even a nibble. Nada. Nothing. Either these companies don’t understand the benefit of pushing their GTFS data to Google or they just don’t care. (Judy Phelps @ City of Amarillo, I’m still waiting to hear from you!)

So the next question was how could you provide the service for free to transit company and somehow monetize the content. Well, these types of questions are certainly not my forte either, but we kicked around a few ideas and ultimately decided that there’s really just no good way to do it and make any halfway decent amount of money. I don’t think you could even cover the costs of the hosting. You could write your own web portal type thing to host their agency website for them, which isn’t a bad idea… but again, the cost would ultimately fall on the transit agency and that was a black hole for my attempts at contacts.

So, after lots of reading and learning ExtJS, figuring out the GTFS format, the Google Maps API, learning JavaScript again (I hadn’t touched it since Netscape 4.x or so.. it’s a bit different now), and crunching some numbers to make the costs work, I’ve decided to give up… for now.

The proof of concept app works OK as a GTFS data browser (it’s buggy), but I never implemented any modification methods. I did make a shape editor to generate GTFS shapes, but you can’t actually save it. The data that you would need to generate the shape in GTFS format is stored in memory though. The data currently in there was imported from a good number of public GTFS feeds. There’s about 15 or so feeds included I think. Anyway, you can mess around with it here:

I figure I’ll probably end up finishing it (read: rewrite from scratch) at some point anyway, because it was fun to work on and it’ll help me learn ExtJS. Then I’ll just open source the code. Don’t hold your breath. Without any monetary incentive, this is low priority.

If you have any comments or questions about it, don’t hesitate to leave a comment below.

ExtJS, General, Google APIs, GTFS ,

Plotting GTFS Bus Routes and Stops on Google Maps

March 25th, 2009

I recently started playing with the public GTFS feeds (Google Transit). I’ve imported everything into MySQL and I’m working on some fairly cool applications for dealing with this data. Using some ExtJS components mixed with some Google Maps API pieces, you can create some pretty cool applications.
Read more…

ExtJS, Google APIs, GTFS , ,