Pārlūkot izejas kodu

OTP Elevation post

Thomas Dy 11 gadi atpakaļ
vecāks
revīzija
12da6deb01

BIN
galleries/transit/otpelevation.png


+ 2 - 1
output/2013/index.html

@@ -36,7 +36,8 @@
         <!--Body content-->
         <div class="postbox">
         <h1>Posts for year 2013</h1>
-        <ul class="unstyled"><li><a href="../posts/graphserver.html">[2013-07-23 14:48] GraphServer</a>
+        <ul class="unstyled"><li><a href="../posts/elevation-data-in-otp.html">[2013-07-23 18:23] Elevation Data in OTP</a>
+            </li><li><a href="../posts/graphserver.html">[2013-07-23 14:48] GraphServer</a>
             </li><li><a href="../posts/transit-wand.html">[2013-07-15 22:45] Transit Wand</a>
             </li><li><a href="../posts/fare-data.html">[2013-07-13 21:15] Fare Data</a>
             </li><li><a href="../posts/gtfs-editor.html">[2013-07-10 11:30] GTFS Editor</a>

+ 1 - 1
output/assets/js/tag_cloud_data.json

@@ -1 +1 @@
-{"programming": [8, "/categories/programming.html"], "lets-debug": [1, "/categories/lets-debug.html"], "philippine-transit-app": [8, "/categories/philippine-transit-app.html"]}
+{"programming": [9, "/categories/programming.html"], "lets-debug": [1, "/categories/lets-debug.html"], "philippine-transit-app": [9, "/categories/philippine-transit-app.html"]}

+ 1 - 1
output/categories/lets-debug.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<rss version="2.0"><channel><title>Pleasant Programmer (lets-debug)</title><link>http://pleasantprogrammer.com</link><description></description><lastBuildDate>Tue, 23 Jul 2013 15:34:46 GMT</lastBuildDate><generator>nikola</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>GTFS Editor</title><link>http://pleasantprogrammer.com/posts/gtfs-editor.html</link><description>&lt;html&gt;&lt;body&gt;&lt;p&gt;Link: &lt;a href="https://github.com/conveyal/gtfs-editor"&gt;https://github.com/conveyal/gtfs-editor&lt;/a&gt;&lt;/p&gt;
+<rss version="2.0"><channel><title>Pleasant Programmer (lets-debug)</title><link>http://pleasantprogrammer.com</link><description></description><lastBuildDate>Tue, 23 Jul 2013 18:24:35 GMT</lastBuildDate><generator>nikola</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>GTFS Editor</title><link>http://pleasantprogrammer.com/posts/gtfs-editor.html</link><description>&lt;html&gt;&lt;body&gt;&lt;p&gt;Link: &lt;a href="https://github.com/conveyal/gtfs-editor"&gt;https://github.com/conveyal/gtfs-editor&lt;/a&gt;&lt;/p&gt;
 &lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt; they really meant under development&lt;/p&gt;
 &lt;p&gt;When I first saw the source of GTFS Editor, I was ecstatic. They used &lt;a href="http://playframework.com/"&gt;Play framework&lt;/a&gt;!!! Not only that, they're targeting PostgreSQL as the main database. Those are our favorite tools for building webapps at By Implication. I was a bit sad though, when I saw it was on the 1.x release of Play though. I did have some experience with that release, but not as much compared to 2.x.&lt;/p&gt;
 &lt;p&gt;Getting it to actually run though, wasn't very pleasant. The initial setup was easy enough. Get &lt;a href="http://www.playframework.com/download"&gt;Play 1.2.5&lt;/a&gt;, install Postgres with PostGIS, clone the repo and create backing database in Postgres. Some minor additional steps you need are to create the PostGIS extension on the database. The schema is automatically generated and applied by Play so that should be all that's necessary. Wonderful. Then, run play, open a browser, go to &lt;a href="http://localhost:9000"&gt;http://localhost:9000&lt;/a&gt;, compilation error. Fantastic.&lt;/p&gt;

+ 2 - 1
output/categories/philippine-transit-app.html

@@ -37,7 +37,8 @@
         <div class="postbox">
         <h1>Posts about philippine-transit-app</h1>
             <a href="philippine-transit-app.xml">RSS</a>
-        <br><ul class="unstyled"><li><a href="../posts/graphserver.html">[2013-07-23 14:48] GraphServer</a>
+        <br><ul class="unstyled"><li><a href="../posts/elevation-data-in-otp.html">[2013-07-23 18:23] Elevation Data in OTP</a>
+            </li><li><a href="../posts/graphserver.html">[2013-07-23 14:48] GraphServer</a>
             </li><li><a href="../posts/transit-wand.html">[2013-07-15 22:45] Transit Wand</a>
             </li><li><a href="../posts/fare-data.html">[2013-07-13 21:15] Fare Data</a>
             </li><li><a href="../posts/gtfs-editor.html">[2013-07-10 11:30] GTFS Editor</a>

+ 10 - 1
output/categories/philippine-transit-app.xml

@@ -1,5 +1,14 @@
 <?xml version="1.0" encoding="utf-8"?>
-<rss version="2.0"><channel><title>Pleasant Programmer (philippine-transit-app)</title><link>http://pleasantprogrammer.com</link><description></description><lastBuildDate>Tue, 23 Jul 2013 15:34:46 GMT</lastBuildDate><generator>nikola</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>GraphServer</title><link>http://pleasantprogrammer.com/posts/graphserver.html</link><description>&lt;html&gt;&lt;body&gt;&lt;p&gt;Link: &lt;a href="http://graphserver.github.io/graphserver/"&gt;http://graphserver.github.io/graphserver/&lt;/a&gt;&lt;/p&gt;
+<rss version="2.0"><channel><title>Pleasant Programmer (philippine-transit-app)</title><link>http://pleasantprogrammer.com</link><description></description><lastBuildDate>Tue, 23 Jul 2013 18:24:35 GMT</lastBuildDate><generator>nikola</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Elevation Data in OTP</title><link>http://pleasantprogrammer.com/posts/elevation-data-in-otp.html</link><description>&lt;html&gt;&lt;body&gt;&lt;p&gt;&lt;img alt="OpenTripPlanner showing elevation data" src="/galleries/transit/otpelevation.png"&gt;&lt;/p&gt;
+&lt;p&gt;One thing I hadn't tested out last time was OTP's support for elevation data. It makes use of this by showing the elevation you have to traverse while walking along the suggested route. It can also take it into account when suggesting bike routes.&lt;/p&gt;
+&lt;p&gt;The &lt;a href="https://github.com/openplans/OpenTripPlanner/wiki/FiveMinutes"&gt;5 minute tutorial&lt;/a&gt; actually discusses the elevation data briefly, but a more in-depth thing you can look at is the &lt;a href="https://github.com/openplans/OpenTripPlanner/wiki/GraphBuilder#elevation-data"&gt;GraphBuilder documentation&lt;/a&gt;. It suggests using the ASTER dataset which is free but requires registration. I just opted to use the SRTM data available from the &lt;a href="http://www.philgis.org/freegisdata.htm"&gt;PhilGIS website&lt;/a&gt;.&lt;/p&gt;
+&lt;p&gt;I don't know about the ASTER dataset, but the PhilGIS data was in the ERDAS img format. OTP only supports GeoTIFF so there was a need to convert it beforehand. You can use &lt;a href="http://www.gdal.org/"&gt;GDAL&lt;/a&gt; for this. You'd just then run,&lt;/p&gt;
+&lt;div class="code"&gt;&lt;pre&gt; &lt;span class="n"&gt;gdal_translate&lt;/span&gt; &lt;span class="n"&gt;srtm41_90m_phl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;img&lt;/span&gt; &lt;span class="n"&gt;phil&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tiff&lt;/span&gt;
+&lt;/pre&gt;&lt;/div&gt;
+
+
+&lt;p&gt;Afterwards, it's just a matter of following the OTP instructions on using a local elevation dataset. The process actually doubled the size of the generated Graph.obj so it might not be ideal if you're running on limited RAM.&lt;/p&gt;
+&lt;p&gt;I've actually hosted a &lt;a href="http://maps.pleasantprogrammer.com"&gt;working example&lt;/a&gt;. It's pretty much at the limits of the RAM so it might be slow and unreliable, but you can test it out just for fun. Please don't abuse it though.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</description><guid>http://pleasantprogrammer.com/posts/elevation-data-in-otp.html</guid><pubDate>Tue, 23 Jul 2013 10:23:00 GMT</pubDate></item><item><title>GraphServer</title><link>http://pleasantprogrammer.com/posts/graphserver.html</link><description>&lt;html&gt;&lt;body&gt;&lt;p&gt;Link: &lt;a href="http://graphserver.github.io/graphserver/"&gt;http://graphserver.github.io/graphserver/&lt;/a&gt;&lt;/p&gt;
 &lt;p&gt;One other routing webapp I saw was GraphServer. It's actually more of a general purpose Graph library which supports GTFS and OSM data than an actual dedicated routing software like OpenTripPlanner. It's also based off python and C instead of Java, so it feels a lot less heavy.&lt;/p&gt;
 &lt;p&gt;The instructions on the website are already pretty good. There are just some minor errors with it. Where it says &lt;code&gt;gs_gtfsdb_build&lt;/code&gt;, you should actually use &lt;code&gt;gs_gtfsdb_compile&lt;/code&gt;. Also, when running &lt;code&gt;gs_osmdb_compile&lt;/code&gt; you might need to use &lt;code&gt;-t&lt;/code&gt; for tolerant in case you follow the instructions on chopping up the original OSM data.&lt;/p&gt;
 &lt;p&gt;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't support 64-bit ids. The &lt;a href="http://wiki.openstreetmap.org/wiki/Osmosis"&gt;latest version of Osmosis&lt;/a&gt; easily did the job though.&lt;/p&gt;

+ 2 - 1
output/categories/programming.html

@@ -37,7 +37,8 @@
         <div class="postbox">
         <h1>Posts about programming</h1>
             <a href="programming.xml">RSS</a>
-        <br><ul class="unstyled"><li><a href="../posts/graphserver.html">[2013-07-23 14:48] GraphServer</a>
+        <br><ul class="unstyled"><li><a href="../posts/elevation-data-in-otp.html">[2013-07-23 18:23] Elevation Data in OTP</a>
+            </li><li><a href="../posts/graphserver.html">[2013-07-23 14:48] GraphServer</a>
             </li><li><a href="../posts/transit-wand.html">[2013-07-15 22:45] Transit Wand</a>
             </li><li><a href="../posts/fare-data.html">[2013-07-13 21:15] Fare Data</a>
             </li><li><a href="../posts/gtfs-editor.html">[2013-07-10 11:30] GTFS Editor</a>

+ 10 - 1
output/categories/programming.xml

@@ -1,5 +1,14 @@
 <?xml version="1.0" encoding="utf-8"?>
-<rss version="2.0"><channel><title>Pleasant Programmer (programming)</title><link>http://pleasantprogrammer.com</link><description></description><lastBuildDate>Tue, 23 Jul 2013 15:34:46 GMT</lastBuildDate><generator>nikola</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>GraphServer</title><link>http://pleasantprogrammer.com/posts/graphserver.html</link><description>&lt;html&gt;&lt;body&gt;&lt;p&gt;Link: &lt;a href="http://graphserver.github.io/graphserver/"&gt;http://graphserver.github.io/graphserver/&lt;/a&gt;&lt;/p&gt;
+<rss version="2.0"><channel><title>Pleasant Programmer (programming)</title><link>http://pleasantprogrammer.com</link><description></description><lastBuildDate>Tue, 23 Jul 2013 18:24:35 GMT</lastBuildDate><generator>nikola</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Elevation Data in OTP</title><link>http://pleasantprogrammer.com/posts/elevation-data-in-otp.html</link><description>&lt;html&gt;&lt;body&gt;&lt;p&gt;&lt;img alt="OpenTripPlanner showing elevation data" src="/galleries/transit/otpelevation.png"&gt;&lt;/p&gt;
+&lt;p&gt;One thing I hadn't tested out last time was OTP's support for elevation data. It makes use of this by showing the elevation you have to traverse while walking along the suggested route. It can also take it into account when suggesting bike routes.&lt;/p&gt;
+&lt;p&gt;The &lt;a href="https://github.com/openplans/OpenTripPlanner/wiki/FiveMinutes"&gt;5 minute tutorial&lt;/a&gt; actually discusses the elevation data briefly, but a more in-depth thing you can look at is the &lt;a href="https://github.com/openplans/OpenTripPlanner/wiki/GraphBuilder#elevation-data"&gt;GraphBuilder documentation&lt;/a&gt;. It suggests using the ASTER dataset which is free but requires registration. I just opted to use the SRTM data available from the &lt;a href="http://www.philgis.org/freegisdata.htm"&gt;PhilGIS website&lt;/a&gt;.&lt;/p&gt;
+&lt;p&gt;I don't know about the ASTER dataset, but the PhilGIS data was in the ERDAS img format. OTP only supports GeoTIFF so there was a need to convert it beforehand. You can use &lt;a href="http://www.gdal.org/"&gt;GDAL&lt;/a&gt; for this. You'd just then run,&lt;/p&gt;
+&lt;div class="code"&gt;&lt;pre&gt; &lt;span class="n"&gt;gdal_translate&lt;/span&gt; &lt;span class="n"&gt;srtm41_90m_phl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;img&lt;/span&gt; &lt;span class="n"&gt;phil&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tiff&lt;/span&gt;
+&lt;/pre&gt;&lt;/div&gt;
+
+
+&lt;p&gt;Afterwards, it's just a matter of following the OTP instructions on using a local elevation dataset. The process actually doubled the size of the generated Graph.obj so it might not be ideal if you're running on limited RAM.&lt;/p&gt;
+&lt;p&gt;I've actually hosted a &lt;a href="http://maps.pleasantprogrammer.com"&gt;working example&lt;/a&gt;. It's pretty much at the limits of the RAM so it might be slow and unreliable, but you can test it out just for fun. Please don't abuse it though.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</description><guid>http://pleasantprogrammer.com/posts/elevation-data-in-otp.html</guid><pubDate>Tue, 23 Jul 2013 10:23:00 GMT</pubDate></item><item><title>GraphServer</title><link>http://pleasantprogrammer.com/posts/graphserver.html</link><description>&lt;html&gt;&lt;body&gt;&lt;p&gt;Link: &lt;a href="http://graphserver.github.io/graphserver/"&gt;http://graphserver.github.io/graphserver/&lt;/a&gt;&lt;/p&gt;
 &lt;p&gt;One other routing webapp I saw was GraphServer. It's actually more of a general purpose Graph library which supports GTFS and OSM data than an actual dedicated routing software like OpenTripPlanner. It's also based off python and C instead of Java, so it feels a lot less heavy.&lt;/p&gt;
 &lt;p&gt;The instructions on the website are already pretty good. There are just some minor errors with it. Where it says &lt;code&gt;gs_gtfsdb_build&lt;/code&gt;, you should actually use &lt;code&gt;gs_gtfsdb_compile&lt;/code&gt;. Also, when running &lt;code&gt;gs_osmdb_compile&lt;/code&gt; you might need to use &lt;code&gt;-t&lt;/code&gt; for tolerant in case you follow the instructions on chopping up the original OSM data.&lt;/p&gt;
 &lt;p&gt;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't support 64-bit ids. The &lt;a href="http://wiki.openstreetmap.org/wiki/Osmosis"&gt;latest version of Osmosis&lt;/a&gt; easily did the job though.&lt;/p&gt;

+ 2 - 0
output/galleries/transit/index.html

@@ -49,6 +49,8 @@
                 <img src="otp1.thumbnail.png"></a>
             </li><li><a href="otp2.png" class="thumbnail image-reference" id="otp2" alt="otp2" title="Otp2">
                 <img src="otp2.thumbnail.png"></a>
+            </li><li><a href="otpelevation.png" class="thumbnail image-reference" id="otpelevation" alt="otpelevation" title="Otpelevation">
+                <img src="otpelevation.thumbnail.png"></a>
     </li></ul></div>
     </div>
     <!--End of body content-->

BIN
output/galleries/transit/otpelevation.png


BIN
output/galleries/transit/otpelevation.thumbnail.png


+ 19 - 0
output/index.html

@@ -33,6 +33,25 @@
     <div class="span2"></div>
     <div class="span8">
     
+        <div class="postbox">
+        <h1><a href="posts/elevation-data-in-otp.html">Elevation Data in OTP</a>
+        <small>  
+             Posted: <time class="published" datetime="2013-07-23T18:23:00+08:00">2013-07-23 18:23</time></small></h1>
+        <hr><p><img alt="OpenTripPlanner showing elevation data" src="galleries/transit/otpelevation.png"></p>
+<p>One thing I hadn't tested out last time was OTP's support for elevation data. It makes use of this by showing the elevation you have to traverse while walking along the suggested route. It can also take it into account when suggesting bike routes.</p>
+<p>The <a href="https://github.com/openplans/OpenTripPlanner/wiki/FiveMinutes">5 minute tutorial</a> actually discusses the elevation data briefly, but a more in-depth thing you can look at is the <a href="https://github.com/openplans/OpenTripPlanner/wiki/GraphBuilder#elevation-data">GraphBuilder documentation</a>. It suggests using the ASTER dataset which is free but requires registration. I just opted to use the SRTM data available from the <a href="http://www.philgis.org/freegisdata.htm">PhilGIS website</a>.</p>
+<p>I don't know about the ASTER dataset, but the PhilGIS data was in the ERDAS img format. OTP only supports GeoTIFF so there was a need to convert it beforehand. You can use <a href="http://www.gdal.org/">GDAL</a> for this. You'd just then run,</p>
+<div class="code"><pre> <span class="n">gdal_translate</span> <span class="n">srtm41_90m_phl</span><span class="p">.</span><span class="n">img</span> <span class="n">phil</span><span class="p">.</span><span class="n">tiff</span>
+</pre></div>
+
+
+<p>Afterwards, it's just a matter of following the OTP instructions on using a local elevation dataset. The process actually doubled the size of the generated Graph.obj so it might not be ideal if you're running on limited RAM.</p>
+<p>I've actually hosted a <a href="http://maps.pleasantprogrammer.com">working example</a>. It's pretty much at the limits of the RAM so it might be slow and unreliable, but you can test it out just for fun. Please don't abuse it though.</p>
+            
+    <p>
+        <a href="posts/elevation-data-in-otp.html#disqus_thread" data-disqus-identifier="cache/posts/elevation-data-in-otp.html">Comments</a>
+
+        </p></div>
         <div class="postbox">
         <h1><a href="posts/graphserver.html">GraphServer</a>
         <small>  

+ 98 - 0
output/posts/elevation-data-in-otp.html

@@ -0,0 +1,98 @@
+<!DOCTYPE html><html lang="en"><head><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta charset="utf-8"><meta name="description" content=""><meta name="author" content="Thomas Dy"><title>Elevation Data in OTP | Pleasant Programmer</title><link href="../assets/css/bootstrap.min.css" rel="stylesheet" type="text/css"><link href="../assets/css/bootstrap-responsive.min.css" rel="stylesheet" type="text/css"><link href="../assets/css/rst.css" rel="stylesheet" type="text/css"><link href="../assets/css/code.css" rel="stylesheet" type="text/css"><link href="../assets/css/colorbox.css" rel="stylesheet" type="text/css"><link href="../assets/css/theme.css" rel="stylesheet" type="text/css"><link href="../assets/css/custom.css" rel="stylesheet" type="text/css"><!--[if lt IE 9]>
+      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
+    <![endif]--><link rel="alternate" type="application/rss+xml" title="RSS" href="../rss.xml"></head><body>
+<!-- Menubar -->
+<div class="navbar navbar-fixed-top">
+    <div class="navbar-inner">
+        <div class="container">
+
+        <!-- .btn-navbar is used as the toggle for collapsed navbar content -->
+        <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
+            <span class="icon-bar"></span>
+            <span class="icon-bar"></span>
+            <span class="icon-bar"></span>
+        </a>
+
+            <a class="brand" href="../">
+            Pleasant Programmer
+            </a>
+            <!-- Everything you want hidden at 940px or less, place within here -->
+            <div class="nav-collapse collapse">
+                <ul class="nav"><li><a href="../archive.html">Archives</a>
+            </li><li><a href="../categories/index.html">Tags</a>
+            </li><li><a href="../rss.xml">RSS</a>
+
+                </li></ul><ul class="nav pull-right"><li>
+    <a href="elevation-data-in-otp.md" id="sourcelink">Source</a>
+    </li>
+
+                </ul></div>
+        </div>
+    </div>
+</div>
+<!-- End of Menubar -->
+<div class="container-fluid" id="container-fluid">
+    <!--Body content-->
+    <div class="row-fluid">
+    <div class="span2"></div>
+    <div class="span8">
+    
+    <div class="postbox">
+    
+    <h1>Elevation Data in OTP</h1>
+
+    <hr><small>
+        Posted: <time class="published" datetime="2013-07-23T18:23:00+08:00">2013-07-23 18:23</time>
+        
+
+        
+          |  More posts about
+            <a class="tag" href="../categories/philippine-transit-app.html"><span class="badge badge-info">philippine-transit-app</span></a>
+            <a class="tag" href="../categories/programming.html"><span class="badge badge-info">programming</span></a>
+
+    </small>
+    <hr><p><img alt="OpenTripPlanner showing elevation data" src="../galleries/transit/otpelevation.png"></p>
+<p>One thing I hadn't tested out last time was OTP's support for elevation data. It makes use of this by showing the elevation you have to traverse while walking along the suggested route. It can also take it into account when suggesting bike routes.</p>
+<p>The <a href="https://github.com/openplans/OpenTripPlanner/wiki/FiveMinutes">5 minute tutorial</a> actually discusses the elevation data briefly, but a more in-depth thing you can look at is the <a href="https://github.com/openplans/OpenTripPlanner/wiki/GraphBuilder#elevation-data">GraphBuilder documentation</a>. It suggests using the ASTER dataset which is free but requires registration. I just opted to use the SRTM data available from the <a href="http://www.philgis.org/freegisdata.htm">PhilGIS website</a>.</p>
+<p>I don't know about the ASTER dataset, but the PhilGIS data was in the ERDAS img format. OTP only supports GeoTIFF so there was a need to convert it beforehand. You can use <a href="http://www.gdal.org/">GDAL</a> for this. You'd just then run,</p>
+<div class="code"><pre> <span class="n">gdal_translate</span> <span class="n">srtm41_90m_phl</span><span class="p">.</span><span class="n">img</span> <span class="n">phil</span><span class="p">.</span><span class="n">tiff</span>
+</pre></div>
+
+
+<p>Afterwards, it's just a matter of following the OTP instructions on using a local elevation dataset. The process actually doubled the size of the generated Graph.obj so it might not be ideal if you're running on limited RAM.</p>
+<p>I've actually hosted a <a href="http://maps.pleasantprogrammer.com">working example</a>. It's pretty much at the limits of the RAM so it might be slow and unreliable, but you can test it out just for fun. Please don't abuse it though.</p>
+    
+    <ul class="pager"><li class="previous">
+            <a href="graphserver.html">← Previous post</a>
+        </li>
+    </ul><div id="disqus_thread"></div>
+        <script type="text/javascript">
+        var disqus_shortname ="pleasantprog";
+            var disqus_url="http://pleasantprogrammer.com/posts/elevation-data-in-otp.html";
+        var disqus_title="Elevation Data in OTP";
+        var disqus_identifier="cache/posts/elevation-data-in-otp.html";
+        var disqus_config = function () {
+            this.language = "en";
+        };
+        (function() {
+            var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+            dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
+            (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+        })();
+    </script><noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
+
+    
+
+    </div>
+
+    </div>
+    </div>
+    <!--End of body content-->
+</div>
+<div class="footerbox">
+    <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/deed.en_US"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-sa/3.0/80x15.png"></a> © 2013 Thomas Dy - Powered by <a href="http://nikola.ralsina.com.ar">Nikola</a>
+</div>
+
+
+
+            <script src="../assets/js/jquery-1.7.2.min.js" type="text/javascript"></script><script src="../assets/js/bootstrap.min.js" type="text/javascript"></script><script src="../assets/js/jquery.colorbox-min.js" type="text/javascript"></script><script type="text/javascript">jQuery("a.image-reference").colorbox({rel:"gal",maxWidth:"80%",maxHeight:"80%",scalePhotos:true});</script></body></html>

+ 22 - 0
output/posts/elevation-data-in-otp.md

@@ -0,0 +1,22 @@
+<!-- 
+.. link: 
+.. description: 
+.. tags: philippine-transit-app, programming
+.. date: 2013/07/23 18:23:00
+.. title: Elevation Data in OTP
+.. slug: elevation-data-in-otp
+-->
+
+![OpenTripPlanner showing elevation data](../galleries/transit/otpelevation.png)
+
+One thing I hadn't tested out last time was OTP's support for elevation data. It makes use of this by showing the elevation you have to traverse while walking along the suggested route. It can also take it into account when suggesting bike routes.
+
+The [5 minute tutorial](https://github.com/openplans/OpenTripPlanner/wiki/FiveMinutes) actually discusses the elevation data briefly, but a more in-depth thing you can look at is the [GraphBuilder documentation](https://github.com/openplans/OpenTripPlanner/wiki/GraphBuilder#elevation-data). It suggests using the ASTER dataset which is free but requires registration. I just opted to use the SRTM data available from the [PhilGIS website](http://www.philgis.org/freegisdata.htm).
+
+I don't know about the ASTER dataset, but the PhilGIS data was in the ERDAS img format. OTP only supports GeoTIFF so there was a need to convert it beforehand. You can use [GDAL](http://www.gdal.org/) for this. You'd just then run,
+
+     gdal_translate srtm41_90m_phl.img phil.tiff
+
+Afterwards, it's just a matter of following the OTP instructions on using a local elevation dataset. The process actually doubled the size of the generated Graph.obj so it might not be ideal if you're running on limited RAM.
+
+I've actually hosted a [working example](http://maps.pleasantprogrammer.com). It's pretty much at the limits of the RAM so it might be slow and unreliable, but you can test it out just for fun. Please don't abuse it though.

+ 3 - 0
output/posts/graphserver.html

@@ -61,6 +61,9 @@
     <ul class="pager"><li class="previous">
             <a href="transit-wand.html">← Previous post</a>
         </li>
+        <li class="next">
+            <a href="elevation-data-in-otp.html">Next post →</a>
+        </li>
     </ul><div id="disqus_thread"></div>
         <script type="text/javascript">
         var disqus_shortname ="pleasantprog";

+ 10 - 1
output/rss.xml

@@ -1,5 +1,14 @@
 <?xml version="1.0" encoding="utf-8"?>
-<rss version="2.0"><channel><title>Pleasant Programmer</title><link>http://pleasantprogrammer.com</link><description></description><lastBuildDate>Tue, 23 Jul 2013 15:34:46 GMT</lastBuildDate><generator>nikola</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>GraphServer</title><link>http://pleasantprogrammer.com/posts/graphserver.html</link><description>&lt;html&gt;&lt;body&gt;&lt;p&gt;Link: &lt;a href="http://graphserver.github.io/graphserver/"&gt;http://graphserver.github.io/graphserver/&lt;/a&gt;&lt;/p&gt;
+<rss version="2.0"><channel><title>Pleasant Programmer</title><link>http://pleasantprogrammer.com</link><description></description><lastBuildDate>Tue, 23 Jul 2013 18:24:35 GMT</lastBuildDate><generator>nikola</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Elevation Data in OTP</title><link>http://pleasantprogrammer.com/posts/elevation-data-in-otp.html</link><description>&lt;html&gt;&lt;body&gt;&lt;p&gt;&lt;img alt="OpenTripPlanner showing elevation data" src="/galleries/transit/otpelevation.png"&gt;&lt;/p&gt;
+&lt;p&gt;One thing I hadn't tested out last time was OTP's support for elevation data. It makes use of this by showing the elevation you have to traverse while walking along the suggested route. It can also take it into account when suggesting bike routes.&lt;/p&gt;
+&lt;p&gt;The &lt;a href="https://github.com/openplans/OpenTripPlanner/wiki/FiveMinutes"&gt;5 minute tutorial&lt;/a&gt; actually discusses the elevation data briefly, but a more in-depth thing you can look at is the &lt;a href="https://github.com/openplans/OpenTripPlanner/wiki/GraphBuilder#elevation-data"&gt;GraphBuilder documentation&lt;/a&gt;. It suggests using the ASTER dataset which is free but requires registration. I just opted to use the SRTM data available from the &lt;a href="http://www.philgis.org/freegisdata.htm"&gt;PhilGIS website&lt;/a&gt;.&lt;/p&gt;
+&lt;p&gt;I don't know about the ASTER dataset, but the PhilGIS data was in the ERDAS img format. OTP only supports GeoTIFF so there was a need to convert it beforehand. You can use &lt;a href="http://www.gdal.org/"&gt;GDAL&lt;/a&gt; for this. You'd just then run,&lt;/p&gt;
+&lt;div class="code"&gt;&lt;pre&gt; &lt;span class="n"&gt;gdal_translate&lt;/span&gt; &lt;span class="n"&gt;srtm41_90m_phl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;img&lt;/span&gt; &lt;span class="n"&gt;phil&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tiff&lt;/span&gt;
+&lt;/pre&gt;&lt;/div&gt;
+
+
+&lt;p&gt;Afterwards, it's just a matter of following the OTP instructions on using a local elevation dataset. The process actually doubled the size of the generated Graph.obj so it might not be ideal if you're running on limited RAM.&lt;/p&gt;
+&lt;p&gt;I've actually hosted a &lt;a href="http://maps.pleasantprogrammer.com"&gt;working example&lt;/a&gt;. It's pretty much at the limits of the RAM so it might be slow and unreliable, but you can test it out just for fun. Please don't abuse it though.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</description><guid>http://pleasantprogrammer.com/posts/elevation-data-in-otp.html</guid><pubDate>Tue, 23 Jul 2013 10:23:00 GMT</pubDate></item><item><title>GraphServer</title><link>http://pleasantprogrammer.com/posts/graphserver.html</link><description>&lt;html&gt;&lt;body&gt;&lt;p&gt;Link: &lt;a href="http://graphserver.github.io/graphserver/"&gt;http://graphserver.github.io/graphserver/&lt;/a&gt;&lt;/p&gt;
 &lt;p&gt;One other routing webapp I saw was GraphServer. It's actually more of a general purpose Graph library which supports GTFS and OSM data than an actual dedicated routing software like OpenTripPlanner. It's also based off python and C instead of Java, so it feels a lot less heavy.&lt;/p&gt;
 &lt;p&gt;The instructions on the website are already pretty good. There are just some minor errors with it. Where it says &lt;code&gt;gs_gtfsdb_build&lt;/code&gt;, you should actually use &lt;code&gt;gs_gtfsdb_compile&lt;/code&gt;. Also, when running &lt;code&gt;gs_osmdb_compile&lt;/code&gt; you might need to use &lt;code&gt;-t&lt;/code&gt; for tolerant in case you follow the instructions on chopping up the original OSM data.&lt;/p&gt;
 &lt;p&gt;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't support 64-bit ids. The &lt;a href="http://wiki.openstreetmap.org/wiki/Osmosis"&gt;latest version of Osmosis&lt;/a&gt; easily did the job though.&lt;/p&gt;

+ 22 - 0
posts/elevation-data-in-otp.md

@@ -0,0 +1,22 @@
+<!-- 
+.. link: 
+.. description: 
+.. tags: philippine-transit-app, programming
+.. date: 2013/07/23 18:23:00
+.. title: Elevation Data in OTP
+.. slug: elevation-data-in-otp
+-->
+
+![OpenTripPlanner showing elevation data](../galleries/transit/otpelevation.png)
+
+One thing I hadn't tested out last time was OTP's support for elevation data. It makes use of this by showing the elevation you have to traverse while walking along the suggested route. It can also take it into account when suggesting bike routes.
+
+The [5 minute tutorial](https://github.com/openplans/OpenTripPlanner/wiki/FiveMinutes) actually discusses the elevation data briefly, but a more in-depth thing you can look at is the [GraphBuilder documentation](https://github.com/openplans/OpenTripPlanner/wiki/GraphBuilder#elevation-data). It suggests using the ASTER dataset which is free but requires registration. I just opted to use the SRTM data available from the [PhilGIS website](http://www.philgis.org/freegisdata.htm).
+
+I don't know about the ASTER dataset, but the PhilGIS data was in the ERDAS img format. OTP only supports GeoTIFF so there was a need to convert it beforehand. You can use [GDAL](http://www.gdal.org/) for this. You'd just then run,
+
+     gdal_translate srtm41_90m_phl.img phil.tiff
+
+Afterwards, it's just a matter of following the OTP instructions on using a local elevation dataset. The process actually doubled the size of the generated Graph.obj so it might not be ideal if you're running on limited RAM.
+
+I've actually hosted a [working example](http://maps.pleasantprogrammer.com). It's pretty much at the limits of the RAM so it might be slow and unreliable, but you can test it out just for fun. Please don't abuse it though.