graphserver.html 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <!DOCTYPE html>
  2. <html lang="en-us">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="generator" content="Hugo 0.92.0" />
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <link rel="stylesheet" href="/assets/css/theme.css">
  8. <link rel="alternate" href="/rss.xml" type="application/rss+xml" title="Pleasant Programmer">
  9. <script type="text/javascript" src="//use.typekit.net/iwm5axp.js"></script>
  10. <script type="text/javascript">try{Typekit.load();}catch(e){}</script>
  11. <title>GraphServer - Pleasant Programmer</title>
  12. </head>
  13. <body>
  14. <header id="header" role="banner">
  15. <div id="thomas">
  16. <img src="/assets/img/thomas.gif" alt="DJ THOMAS IN DA HAUS">
  17. <img src="/assets/img/thomas.png" alt="Pleasant Programmer">
  18. </div>
  19. <h1 class="site-title"><a href="/">Pleasant Programmer</a></h1>
  20. <nav id="menu" role="navigation">
  21. <ul>
  22. <li><a href="/pages/projects.html">projects</a></li>
  23. <li><a href="/posts.html">archives</a></li>
  24. <li><a href="/tags.html">tags</a></li>
  25. <li><a href="/rss.xml">rss</a></li>
  26. </ul>
  27. </nav>
  28. </header>
  29. <div id="container">
  30. <main id="content" role="main">
  31. <article itemscope itemtype="http://schema.org/BlogPosting">
  32. <h1 class="p-name entry-title" itemprop="headline name">
  33. <a href="/posts/graphserver.html">GraphServer</a></h1>
  34. <small>
  35. <span class="dateline">Posted: <time itemprop="datePublished" datetime="2013-07-23">2013-07-23</time></span>
  36. | More posts about
  37. <a class="tag p-category" href="/tags/philippine-transit-app.html" rel="tag">
  38. philippine-transit-app
  39. </a>
  40. <a class="tag p-category" href="/tags/programming.html" rel="tag">
  41. programming
  42. </a>
  43. </small>
  44. <div class="e-content entry-content" itemprop="entry-text">
  45. <p>Link: <a href="http://graphserver.github.io/graphserver/">http://graphserver.github.io/graphserver/</a></p>
  46. <p>One other routing webapp I saw was GraphServer. It&rsquo;s actually more of a general purpose Graph library which supports GTFS and OSM data than an actual dedicated routing software like OpenTripPlanner. It&rsquo;s also based off python and C instead of Java, so it feels a lot less heavy.</p>
  47. <p>The instructions on the website are already pretty good. There are just some minor errors with it. Where it says <code>gs_gtfsdb_build</code>, you should actually use <code>gs_gtfsdb_compile</code>. Also, when running <code>gs_osmdb_compile</code> you might need to use <code>-t</code> for tolerant in case you follow the instructions on chopping up the original OSM data.</p>
  48. <p>A nice suggestion from the GraphServer instructions was to crop the OSM data to minimize the graph size. This is actually quite helpful if you downloaded the entire Philippine OSM dump. It reduced the original 900MB file to 135MB which was a lot more workable. I did hit a problem with their instructions though. The linked version of osmosis is an old one, which doesn&rsquo;t support 64-bit ids. The <a href="http://wiki.openstreetmap.org/wiki/Osmosis">latest version of Osmosis</a> easily did the job though.</p>
  49. <p>The actual routing though, was not exactly good. I only tried one route which should normally take 1-2 transfers, it suggested a route which involved 4+ transfers. It also didn&rsquo;t provide any alternate routes aside from that one. I&rsquo;m not sure if it&rsquo;s a limitation of the provided routeserver, but I didn&rsquo;t bother checking if it supported parameters which might provide better routes.</p>
  50. <p>I think graphserver could be useful, but it seems more involved than say OpenTripPlanner. There do seem to be people who use graphserver for their routing apps, but for the bounds of the contest, or just as a side project, it might require too much effort.</p>
  51. </div>
  52. <aside class="postpromonav">
  53. <nav>
  54. <ul class="pager clearfix">
  55. <li class="previous">
  56. <a href="/posts/transit-wand.html" rel="prev" title="Transit Wand">&larr; Previous post</a>
  57. </li>
  58. <li class="next">
  59. <a href="/posts/elevation-data-in-otp.html" rel="next" title="Elevation Data in OTP">Next post &rarr;</a>
  60. </li>
  61. </ul>
  62. </nav>
  63. </aside>
  64. <section class="comments">
  65. <script
  66. data-isso="https://isso.pleasantprogrammer.com/"
  67. data-isso-require-author="true"
  68. data-isso-vote="false"
  69. src="https://isso.pleasantprogrammer.com/js/embed.min.js">
  70. </script>
  71. <section id="isso-thread"></section>
  72. </section>
  73. </article>
  74. </main>
  75. <footer id="footer" role="contentinfo">
  76. <p>
  77. <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/deed.en_US">
  78. <img alt="CC-BY-SA" style="border-width:0" src="https://licensebuttons.net/l/by-sa/3.0/80x15.png">
  79. </a> &copy; 2022 Thomas Dy - Powered by <a href="http://gohugo.io">Hugo</a></p>
  80. </footer>
  81. </div>
  82. <script src="/assets/js/konami.js"></script>
  83. <script>
  84. var easter_egg = new Konami();
  85. easter_egg.code = function() {
  86. var el = document.getElementById('thomas');
  87. if(el.className == "whoa") {
  88. el.className = "";
  89. }
  90. else {
  91. el.className = "whoa";
  92. }
  93. document.body.scrollTop = document.documentElement.scrollTop = 0;
  94. }
  95. easter_egg.load();
  96. </script>
  97. </body>
  98. </html>