123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187 |
- <!DOCTYPE html>
- <html lang="en-us">
- <head>
- <meta charset="utf-8">
- <meta name="generator" content="Hugo 0.92.0" />
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="stylesheet" href="/assets/css/theme.css">
- <link rel="alternate" href="/rss.xml" type="application/rss+xml" title="Pleasant Programmer">
- <script type="text/javascript" src="//use.typekit.net/iwm5axp.js"></script>
- <script type="text/javascript">try{Typekit.load();}catch(e){}</script>
- <title>Pleasant Programmer</title>
- </head>
- <body>
- <header id="header" role="banner">
- <div id="thomas">
- <img src="/assets/img/thomas.gif" alt="DJ THOMAS IN DA HAUS">
- <img src="/assets/img/thomas.png" alt="Pleasant Programmer">
- </div>
- <h1 class="site-title"><a href="/">Pleasant Programmer</a></h1>
- <nav id="menu" role="navigation">
- <ul>
- <li><a href="/pages/projects.html">projects</a></li>
- <li><a href="/posts.html">archives</a></li>
- <li><a href="/tags.html">tags</a></li>
- <li><a href="/rss.xml">rss</a></li>
- </ul>
- </nav>
- </header>
- <div id="container">
- <main id="content" role="main">
- <div class="postindex">
-
- <article class="h-entry post-text" itemscope itemtype="http://schema.org/Blog">
- <header>
- <h1 class="p-name entry-title" itemprop="headline">
- <a href="/posts/one-bus-or-maybe-jeep-away.html" class="u-url">One Bus (or maybe Jeep) Away</a>
- </h1>
- </header>
- <div class="e-content entry-content">
- <p>Link: <a href="http://onebusaway.org/">http://onebusaway.org/</a></p>
- <p><strong>TL;DR</strong> no routing; useless in Philippines</p>
- <p>OneBusAway is a transit information app. It provides data on what bus stops are near you, which buses pass by. You can also get schedules and the route of a particular bus given the number. It can also provide realtime updates like how many minutes until the next bus arrives. It does not, however, provide routing. There is no support for providing directions to get from point A to point B.</p>
- <p>It’s comparable to what you get in some bus stops abroad. You’d get a vicinity map and a list of buses passing through the stop. You might also get the times when the next buses will pass. It’s useful for locals who already know how to get around, and want to avoid waiting for the bus. But it’s not particularly good for people who want to know how to get around the city.</p>
- <p>OneBusAway is quite comprehensive in its platform support though. There is a webapp, apps for iOS, Android and Windows Phone, as well as SMS and Voice support. This would all be nice but we don’t have the necessary infrastructure yet in the Philippines. We don’t have bus or jeepney stops. We also wouldn’t have realtime data to make the app particularly useful.</p>
- <p>You can try it out for yourself by following their <a href="https://github.com/OneBusAway/onebusaway-application-modules/wiki/OneBusAway-Quickstart-Guide">Quickstart Guide</a>. One caveat is you will have to add <code>-P tripEntriesFactory.throwExceptionOnInvalidStopToShapeMappingException=false</code> when building the bundle. This has to do with the OneBusAway having difficulty matching the <a href="https://github.com/OneBusAway/onebusaway-application-modules/wiki/Stop-to-Shape-Matching">stops to the shape data</a>.</p>
- <p>Here’s some screenshots of the app with the Philippine data. Notice how you only see the stops but there isn’t a line for the route. This is a problem with our GTFS data. Also, at some points it’s hard to tell where the jeep is going to pass since there isn’t any indication of order either. This is more of a OneBusAway problem. It usually expects there to be shape data available.</p>
- <p><a href="../galleries/transit/onebusaway1.png"><img src="../galleries/transit/onebusaway1.png" alt="OneBusAway" title="All the stops along Katipunan Avenue are named Katipunan Avenue."></a></p>
- <p>It doesn’t really handle too many routes passing through a stop. The list just overflows past the bubble. You can still actually read it by panning the map. It’s just a bit weird though.</p>
- <p>If you also noticed, there are usually 2 of each route. This is how the jeepney data was modeled as jeep routes might be different going one way and going back. This isn’t the case for all jeeps though, so it might also be an implementation issue with the GTFS editor.</p>
- <p><a href="../galleries/transit/onebusaway2.png"><img src="../galleries/transit/onebusaway2.png" alt="OneBusAway"></a></p>
- <p><a href="../galleries/transit/onebusaway3.png"><img src="../galleries/transit/onebusaway3.png" alt="OneBusAway"></a></p>
- </div>
- <small class="dateline">Posted: <time class="published dt-published" itemprop="datePublished" datetime="2013-07-09">2013-07-09</time></small>
- | <small class="commentline"><a href="/posts/one-bus-or-maybe-jeep-away.html#isso-thread">Comments</a></small>
- </article>
- </article>
-
- <article class="h-entry post-text" itemscope itemtype="http://schema.org/Blog">
- <header>
- <h1 class="p-name entry-title" itemprop="headline">
- <a href="/posts/open-trip-planner.html" class="u-url">Open Trip Planner</a>
- </h1>
- </header>
- <div class="e-content entry-content">
- <p>Link: <a href="http://www.opentripplanner.org">http://www.opentripplanner.org</a></p>
- <p><strong>TL;DR</strong> routes pretty well; data might cause weird issues</p>
- <p>OpenTripPlanner, as the name implies, is a routing app. Given point A and point B, it can provide possible routes by taking transit, riding a bike, or a mix of both. You can also specify options on how much walking you’re willing to do or if you prefer fewer transfers over trip time. It could be a good competitor to the transit directions of Google Maps.</p>
- <p>It’s actually in general use by the <a href="http://maps.trimet.org/">Trimet</a>, Portland’s public transit system. I think a good reason why they deployed OpenTripPlanner is that Portland is a very bike friendly area. OpenTripPlanner’s support for multi-modal (bike + transit) routing is one thing that even Google Maps doesn’t have. This actually just screams <a href="http://philippine-transit.hackathome.com/prizes/">Inclusive Technology Award</a>.</p>
- <h3 id="setup">Setup</h3>
- <p>Getting OpenTripPlanner up and running involves a bit more downloading than OneBusAway. I’d suggest going through the <a href="https://github.com/openplans/OpenTripPlanner/wiki/FiveMinutes">5-minute introduction</a> if you want to actually work with the Philippine data. You will also need to download the <a href="http://download.geofabrik.de/asia/philippines.html">Philippine data dump</a> from OSM. You will want the <code>osm.bz2</code> one (WARNING: 900MB unzipped).</p>
- <p>Once you get the webapp running, you’ll notice the map tiles won’t load correctly. This is because the default tileset used is from Mapbox which doesn’t provide publicly free tilesets anymore. To actually see things on the map, you should click the + on the upper-right of the map and change the base layer to something like Open Street Map or OSM Mapquest. This has been fixed in their latest sources.</p>
- <h3 id="issues">Issues</h3>
- <p>The next thing you’ll notice is that you can’t search for a place. You can only just pick points on the map and route between those. I’m still not exactly sure if it’s supposed to have it, since the Trimet one has it. But even then adding it by using the Google Maps or MapQuest APIs shouldn’t be too difficult.</p>
- <p>Another missing thing compared to the Trimet planner is being able to look at the routes akin to OneBusAway. And even then, Trimet’s implementation isn’t as good for exploring as OneBusAway is. Seeing the schedule or seeing which routes pass through a stop are left to an external site to do.</p>
- <p>There have been some weird issues with the routing though. A common occurence is the steps are somewhat disconnected (see image below). The left half shows OpenTripPlanner, it shows that you get off at a “stop” in EDSA and you should magically teleport to Arguilla street and start walking. To be fair, Google Maps (right half) shows that there is a street from the “stop” to Arguilla.</p>
- <p><img src="../galleries/transit/otp1.png" alt="OpenTripPlanner disconnected route"></p>
- <p>I can’t say this isn’t a bug. After all, OpenTripPlanner couldn’t have magically known there really was a street there. If it did, it wouldn’t just teleport you to the corner. I’m more inclined to think though that this is a result of not having any shape data. As a result, OpenTripPlanner might try to assume the stop could mean places within a certain radius of where it was defined.</p>
- <p>Another weird issue that pops up sometimes is where it tells you to ride a jeep past the stop you want and then after a while, get off and ride a jeep back to your stop. A more general issue is that sometimes it won’t give you the best route because it thinks you have to loop around to get to where you want to be. I don’t really know how common this issue pops up though. It’s highly dependent on where you put the marker. If you just move the marker down a little bit, it actually does give the correct route.</p>
- <p><img src="../galleries/transit/otp2.png" alt="OpenTripPlanner loopy route"></p>
- <p>Much like the earlier problem, I can’t tell if this is a bug or it’s a result of the bad data. Once again though, I think the issue is more of bad data. If you look at the plotted UP-Katipunan route, the stops aren’t even on the road. This probably makes it more difficult for OpenTripPlanner to actually tell if the stop and road are connected.</p>
- <p><img src="../galleries/transit/upkatipunan.jpg" alt="UP Katipunan Route"></p>
- <p>From what they said during the launch, most of the route data was collected by getting a person to ride a jeep with a smartphone. That would explain why the coordinates aren’t that exact. Even then, it would have been nice if they at least cleaned up the data by moving the stops to the road. They would have had to go over them to name the stops anyway.</p>
- <h3 id="conclusion">Conclusion</h3>
- <p>Overall though, I really like OpenTripPlanner. It handles most of the hard parts of the challenge. It provides a REST API for doing routing with the GTFS + OSM data. There’s also a lot of potential for additional open source work. A lot can be done to improve the default webapp. Adding a default location searcher would greatly improve usability. Adding in the route viewing features of OneBusAway would also be nice. Alternatively, you could even write your own client that just interfaces with the API.</p>
- </div>
- <small class="dateline">Posted: <time class="published dt-published" itemprop="datePublished" datetime="2013-07-09">2013-07-09</time></small>
- | <small class="commentline"><a href="/posts/open-trip-planner.html#isso-thread">Comments</a></small>
- </article>
- </article>
-
- <article class="h-entry post-text" itemscope itemtype="http://schema.org/Blog">
- <header>
- <h1 class="p-name entry-title" itemprop="headline">
- <a href="/posts/jeepney-and-bus-routes.html" class="u-url">Jeepney and Bus Routes</a>
- </h1>
- </header>
- <div class="e-content entry-content">
- <p>In the <a href="philippine-transit-app-challenge.html">last post</a>, I talked about how we now have data about jeepney and bus routes in the Philippines. The data is actually in the <a href="https://developers.google.com/transit/gtfs/">GTFS format</a>, which is the format the Google Maps consumes transit data. Apparently, the government will be submitting the GTFS data later this year. Transit directions for Metro Manila in Google Maps would be wonderful. That said, it definitely raises the bar for the app challenge people.</p>
- <p>In the last post, I mentioned the quality of the data isn’t quite good. Even before seeing the data, I was already a bit unsure of it. The key problem is how you model the routes. The GTFS format was inherently designed for more well developed and organized transit agencies which isn’t exactly what we have in the Philippines now.</p>
- <p>One potential problem is the nature of the jeeps and buses. GTFS routes are a collection of trips which are a sequence of stops. However, we don’t have jeepney stops, and even if we did they still just stop anywhere. There are also times where jeeps will take a shortcut if no passengers need to get dropped off along their normal route.</p>
- <p>From what I’ve seen of the data, they handled the first problem well enough. Stops are defined as where people typically get on the jeep or bus. This is good, but they didn’t define a shape for the routes. There is no information as to which exact roads they pass through. All we have to go by are the stops to show the route on a map.</p>
- <p><img src="http://i.imgur.com/NSVlryE.jpg" alt="sample route"></p>
- <p>The problem isn’t that bad though. The agencies could still add the shapes later on. Or maybe an app challenge participant could make an app around fixing the routes via crowd-sourcing or similar. The shape itself isn’t that important for a rudimentary directions app, but if we want better apps, we will need better data.</p>
- <p>There were also some minor issues with the data itself. Some of the files had extra columns. This normally isn’t an issue, but it caused problems for <a href="https://github.com/harrisony/gtfs_SQL_importer">GTFS SQL importer</a>. There were also problems with matching the shape data with the stops when I tried it with <a href="http://onebusaway.org">OneBusAway</a>. They could probably be <a href="https://github.com/OneBusAway/onebusaway-application-modules/wiki/Stop-to-Shape-Matching">fixed</a> but that’s for another day.</p>
- </div>
- <small class="dateline">Posted: <time class="published dt-published" itemprop="datePublished" datetime="2013-07-07">2013-07-07</time></small>
- | <small class="commentline"><a href="/posts/jeepney-and-bus-routes.html#isso-thread">Comments</a></small>
- </article>
- </article>
-
- <article class="h-entry post-text" itemscope itemtype="http://schema.org/Blog">
- <header>
- <h1 class="p-name entry-title" itemprop="headline">
- <a href="/posts/philippine-transit-app-challenge.html" class="u-url">Philippine Transit App Challenge</a>
- </h1>
- </header>
- <div class="e-content entry-content">
- <p>Last week, the DOTC launched the <a href="http://philippine-transit.hackathome.com">Philippine Transit App Challenge</a>. It’s a competition to build something great using the newly available 1) jeepney/bus/rail routes and 2) traffic incident data in Metro Manila and Cebu.</p>
- <p>I’m actually quite excited about this as it’s not everyday our government does wonderful things. Many people have been waiting for this kind of data to be available. Before, the only way to figure out which jeeps to ride to get from A to B is by asking other people. The website of the LTFRB used to just have a list of jeepney routes, but nothing else, no maps or list of stops.</p>
- <p>During the launch, they also presented how CITOM (the Cebu MMDA) is pilot-testing a <a href="http://cebutraffic.org/">traffic tracking system</a>. What they did was supply Android phones to taxi drivers. The phones send GPS data which can then be aggregated to see what the average speeds along streets are. This also benefits the taxi company as it provides easy tracking of their taxis compared to their old telephone/radio with pen-and-paper process.</p>
- <p>The <a href="http://philippine-transit.hackathome.com/dataset-philippines-transit-information-service-gtfs/">route data</a> are already available, as well as the <a href="http://philippine-transit.hackathome.com/dataset-citom-traffic-alert-platform/">Cebu</a> and <a href="http://philippine-transit.hackathome.com/dataset-mmda-traffic-alert-platform/">Metro Manila</a> incident data. You do have to register to access them though. Right now, they’re just one-off dumps of the data but the various agencies have promised to provide consistently updated data. This will be provided via ASTI later in the year.</p>
- <p>I’ve just started looking at the route data and playing around with it. The quality could be better, but I’m glad we at least have something to work with.</p>
- </div>
- <small class="dateline">Posted: <time class="published dt-published" itemprop="datePublished" datetime="2013-07-07">2013-07-07</time></small>
- | <small class="commentline"><a href="/posts/philippine-transit-app-challenge.html#isso-thread">Comments</a></small>
- </article>
- </article>
-
- </div>
- <nav class="postindexpager">
- <ul class="pager clearfix">
-
- <li class="previous">
- <a href="/page/4.html">← Newer posts</a>
- </li>
-
-
- </ul>
- </nav>
- </main>
- <footer id="footer" role="contentinfo">
- <p>
- <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/deed.en_US">
- <img alt="CC-BY-SA" style="border-width:0" src="https://licensebuttons.net/l/by-sa/3.0/80x15.png">
- </a> © 2022 Thomas Dy - Powered by <a href="http://gohugo.io">Hugo</a></p>
- </footer>
- </div>
- <script src="/assets/js/konami.js"></script>
- <script>
- var easter_egg = new Konami();
- easter_egg.code = function() {
- var el = document.getElementById('thomas');
- if(el.className == "whoa") {
- el.className = "";
- }
- else {
- el.className = "whoa";
- }
- document.body.scrollTop = document.documentElement.scrollTop = 0;
- }
- easter_egg.load();
- </script>
- <script
- data-isso="https://isso.pleasantprogrammer.com/"
- src="https://isso.pleasantprogrammer.com/js/count.min.js">
- </script>
- </body>
- </html>
|