Merge branch 'master' of ssh://apples.lambdacomplex.org/git/bus
Merge branch 'master' of ssh://apples.lambdacomplex.org/git/bus

--- a/busui/about.php
+++ b/busui/about.php
@@ -1,23 +1,24 @@
 <?php
 include('common.inc.php');
+include_header("About")
 ?>
 <p>
-    Busness Time - An ACT bus timetable webapp
-Based on the maxious-canberra-transit-feed
-Uses jQuery Mobile, PHP, Ruby, Python, Google Transit Feed Specification tools, OpenTripPlanner, OpenLayers, OpenStreetMap, Cloudmade Geocoder and Tile Service
-
-Feedback encouraged; contact maxious@lambdacomplex.org
-    
-Some icons by Joseph Wain / glyphish.com
-
-
-Disclaimer: The content of this website is of a general and informative nature. Please check with printed timetables or those available on http://action.act.gov.au before your trip.
+Busness Time - An ACT bus timetable webapp<br />
+Based on the maxious-canberra-transit-feed (<a href="cbrfeed.zip">download</a>, last updated <?php echo date("F d Y.", @filemtime('cbrfeed.zip')); ?>)<br />
+Source code for the transit feed and this site @ <a href="http://maxious.lambdacomplex.org/git">http://maxious.lambdacomplex.org/git</a><br />
+Uses jQuery Mobile, PHP, Ruby, Python, Google Transit Feed Specification tools, OpenTripPlanner, OpenLayers, OpenStreetMap, Cloudmade Geocoder and Tile Service<br />
+<br />
+Feedback encouraged; contact maxious@lambdacomplex.org<br />
+    <br />
+Some icons by Joseph Wain / glyphish.com<br />
+<br />
+<small>Disclaimer: The content of this website is of a general and informative nature. Please check with printed timetables or those available on http://action.act.gov.au before your trip.
 Whilst every effort has been made to ensure the high quality and accuracy of the Site, the Author makes no warranty, 
 express or implied concerning the topicality, correctness, completeness or quality of the information, which is provided 
 "as is". The Author expressly disclaims all warranties, including but not limited to warranties of fitness for a particular purpose and warranties of merchantability. 
 All offers are not binding and without obligation. The Author expressly reserves the right, in his discretion, to suspend, 
 change, modify, add or remove portions of the Site and to restrict or terminate the use and accessibility of the Site 
-without prior notice. 
+without prior notice. </small>
 <?
 include_footer();
 ?>

--- a/busui/common.inc.php
+++ b/busui/common.inc.php
@@ -30,10 +30,17 @@
     return $_SERVER['SERVER_NAME'] == "10.0.1.154" || $_SERVER['SERVER_NAME'] == "localhost" || $_SERVER['SERVER_NAME'] == "127.0.0.1" || !$_SERVER['SERVER_NAME'];
 }
 
+function isMetricsOn()
+{
+    return true;
+}
+
 function debug($msg) {
     if (isDebug()) echo "<!-- $msg -->";
 }
 function isFastDevice() {
+    $fastDevices = Array("Mozilla/5.0 (X11;", "Mozilla/5.0 (Windows;", "Mozilla/5.0 (iP", "Mozilla/5.0 (Linux; U; Android", "Mozilla/4.0 (compatible; MSIE");
+    $slowDevices = Array("J2ME","MIDP","Opera/","Mozilla/2.0 (compatible;","Mozilla/3.0 (compatible;");
     return true;
 }
 
@@ -42,8 +49,7 @@
 <!DOCTYPE html> 
 <html> 
 	<head> 
-	<title>busness time - '.$pageTitle.'</title> 
-	';
+	<title>'.$pageTitle.'</title>';
          if (isDebug()) echo '<link rel="stylesheet"  href="css/jquery-mobile-1.0a3.css" />
          <script type="text/javascript" src="js/jquery-1.5.js"></script>
         <script type="text/javascript" src="js/jquery-mobile-1.0a3.js"></script>';
@@ -73,6 +79,13 @@
     .ui-listview-filter {
         margin: 0 !important;
      }
+    #footer {
+        text-size: 0.75em;
+        text-align: center;
+    }
+    body {
+        background-color: #F0F0F0;
+    }
 </style>
 <meta name="apple-mobile-web-app-capable" content="yes" />
  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
@@ -97,12 +110,18 @@
 
 </script> ";
  }
-echo '</head> 
-<body> 
+echo '</head>
+<body>
+
  ';
 if ($opendiv)  {
     echo '<div data-role="page"> 
- 
+ <script>
+$(document).ready(function ()
+{
+    document.title = "'.$pageTitle.'";
+});
+</script>
 	<div data-role="header"> 
 		<h1>'.$pageTitle.'</h1>
 	</div><!-- /header -->
@@ -118,7 +137,8 @@
 $('#here').show();
 </script>";
     }
-     echo '</div>';
+    echo '<div id="footer"><a href="about.php">About/Contact Us</a>&nbsp;<a href="feedback.php">Feedback/Bug Report</a></a>';
+    echo '</div>';
 }
 
 $service_periods = Array ('sunday','saturday','weekday');

 Binary files /dev/null and b/busui/css/images/ajax-loader.png differ
 Binary files /dev/null and b/busui/css/images/form-check-off.png differ
 Binary files /dev/null and b/busui/css/images/form-check-on.png differ
 Binary files /dev/null and b/busui/css/images/form-radio-off.png differ
 Binary files /dev/null and b/busui/css/images/form-radio-on.png differ
 Binary files /dev/null and b/busui/css/images/icon-search-black.png differ
 Binary files /dev/null and b/busui/css/images/icons-18-black.png differ
 Binary files /dev/null and b/busui/css/images/icons-18-white.png differ
 Binary files /dev/null and b/busui/css/images/icons-36-black.png differ
 Binary files /dev/null and b/busui/css/images/icons-36-white.png differ
--- /dev/null
+++ b/busui/feedback.php
@@ -1,1 +1,18 @@
+<?php
+include('common.inc.php');
+include_header("Feedback")
+?>
+<h3>Add/Move/Delete a Bus Stop Location</h3>
+StopID:
+or StopCode:
 
+Suggested Stop Location (lat/long or words):
+
+<h3>Bug Report/Feedback</h3>
+<textarea id="extrainfo">
+    Referrer URL
+    User Agent
+    User host/IP
+    Current date/time
+    Dump of $_SESSION
+</textarea>

--- a/busui/index.php
+++ b/busui/index.php
@@ -21,9 +21,8 @@
 		<li><a href="routeList.php?bynumber=yes">Routes By Number</a></li>
 		<li><a class="nearby" href="routeList.php?nearby=yes">Nearby Routes</a></li>
             </ul>
-<?php echo timePlaceSettings();?>
+<?php
+echo timePlaceSettings();
+include_footer(true)
+?>
         
-   </div>
- </body>
-</html>
-

--- /dev/null
+++ b/busui/layar_api.php
@@ -1,1 +1,58 @@
+<?php
+include('common.inc.php');
+$output = Array();
+$output['hotspots'] = Array();
+$output['layer'] = "canberrabusstops";
 
+$max_page = 10;
+$max_results = 50;
+$page_start = 0+$_REQUEST['pageKey'];
+$page_end = $max_page+$_REQUEST['pageKey'];
+
+$url = $APIurl."/json/neareststops?lat={$_REQUEST['lat']}&lon={$_REQUEST['lon']}&limit=50";
+$contents = json_decode(getPage($url));
+debug(print_r($contents,true));
+$stopNum = 0;
+foreach ($contents as $row)
+{
+    $stopNum++;
+    if ($stopNum > $page_start && $stopNum <= $page_end) {
+        $hotspot = Array();
+        $hotspot['id'] = $row[0];
+        $hotspot['title'] = $row[1];
+        $hotspot['type'] = 0;
+        $hotspot['lat'] = floor($row[2]*1000000);
+        $hotspot['lon'] = floor($row[3]*1000000);
+        $hotspot['distance'] = distance($row[2], $row[3], $_REQUEST['lat'], $_REQUEST['lon']);
+        if (!isset($_REQUEST['radius']) || $hotspot['distance'] < $_REQUEST['radius']) {
+            $hotspot['actions'] = Array(Array("label" => 'View more trips/information', 'uri' => 'http://bus.lambdacomplex.org/'.'stop.php?stopid='.$row[0]));
+            $url = $APIurl."/json/stoptrips?stop=".$row[0]."&time=".midnight_seconds()."&service_period=".service_period();
+            $trips = json_decode(getPage($url));
+            debug(print_r($trips,true));
+            foreach ($trips as $key => $row)
+            {
+                if ($key < 3) {
+                    $hotspot['line'.strval($key+2)]= $row[1][1] .' @ ' .midnight_seconds_to_time($row[0]);
+                }
+            }
+            if (sizeof($trips) == 0) $hotspot['line2'] = 'No trips in the near future.';
+            $output['hotspots'][] = $hotspot;
+        }
+    }
+}
+if (sizeof($hotspot) > 0) {
+    $output['errorString'] = 'ok';
+    $output['errorCode'] = 0;
+    } else {
+    $output['errorString'] = 'no results, try increasing range';
+    $output['errorCode'] = 21;
+}
+if ($page_end >= $max_results || sizeof($hotspot) < $max_page) {
+ $output["morePages"] = false;
+ $output["nextPageKey"] = null;
+} else {
+ $output["morePages"] = true;
+ $output["nextPageKey"] = $page_end;    
+}
+echo json_encode($output);
+?>

--- a/origin-src/graphserver.html
+++ /dev/null
@@ -1,233 +1,1 @@
-<html> 
-  <head> 
-    <link rel="stylesheet" href="main.css" type="text/css"> 
-    <title>Graphserver - The Open-Source Multi-Modal Trip Planner</title> 
-  </head> 
- 
-<body> 
-<div id='container'> 
-<a href="gallery.html"><img src="img/graphbanner.png"></a> 
-<h1>Graphserver</h1> 
-The open-source multi-modal trip planner.
- 
-<h2>Code Repository</h2> 
-<a href="http://github.com/bmander/graphserver/tree/master">http://github.com/bmander/graphserver/tree/master</a> 
- 
-<h2>Mailing List</h2> 
- 
-Direct questions and comments to the <a href="http://groups.google.com/group/graphserver">Graphserver Google Group</a>.
- 
-<h2>Download</h2> 
- 
-<pre style="background-color:#F5F5F5"> $ wget http://github.com/bmander/graphserver/zipball/08132009</pre> 
- 
-Or, for the stout of heart, get a copy of the current working branch
- 
-<pre style="background-color:#F5F5F5"> $ git clone git://github.com/bmander/graphserver.git </pre>
- 
-<h2>Install</h2>
 
-<h3>Cold Start</h3>
-<p>You'll need a computer running linux. The following setup was tested and checked on <a href="http://aws.amazon.com/console/">Amazon EC2</a> small instance running Fedora, built from an image with id "ami-48aa4921", at a cost of $0.20/hour.<p>
-<p>You'll need to get git:</p>
-<p>On Ubuntu:</p>
-<pre style="background-color:#F5F5F5"> $ sudo apt-get install git-core </pre>
-<p>On Fedora:</p>
-<pre style="background-color:#F5F5F5"> $ yum install git-core</pre>
- 
-<h3>Get The Prerequisites</h3>
-
-<p>You're about to compile C code against python development libraries. You need to prepare for that.</p>
-
-On Ubuntu:
-<pre style="background-color:#F5F5F5">$ sudo apt-get install python-setuptools
-$ sudo apt-get install build-essential
-$ sudo apt-get install python-dev
-</pre>
-
-On Fedora:
-<pre style="background-color:#F5F5F5">
-$ yum install python-setuptools-devel
-$ yum install gcc
-$ yum install gcc-c++
-$ yum install python-devel
-$ easy_install simplejson
-</pre>
- 
-<h3>One-step Install</h3>
-<p>Get a copy of Graphserver</p>
-<pre style="background-color:#F5F5F5">$ git clone git://github.com/bmander/graphserver.git</pre> 
-
-This will download and compile the core, download and install package dependencies, and install the python wrappers in one go.
-
-<pre style="background-color:#F5F5F5">$ cd graphserver/pygs
-$ sudo python setup.py install
-</pre> 
- 
-<h3>Install RTree</h3>
-<p>If you want to load OSM Data (and you probably do), you have to laboriously install RTree</p>
-<pre style="background-color:#F5F5F5"> $ wget http://download.osgeo.org/libspatialindex/spatialindex-1.4.0.tar.gz
- $ gunzip spatialindex-1.4.0.tar.gz
- $ tar -xvf spatialindex-1.4.0.tar
- $ cd spatialindex-1.4.0
- $ ./configure --prefix=/usr
- $ make
- $ make install
- $ easy_install RTree
- $ cp /usr/lib/python2.5/site-packages/Rtree-0.5.0-py2.5-linux-i686.egg/libsidx.so /usr/lib
-</pre>
- 
-<h2>A Quick Tour of the Basics</h2> 
- 
-<pre style="background-color:#F5F5F5"> 
-$ python
-&gt;&gt;&gt; from graphserver.core import Graph, Street, State
-&gt;&gt;&gt; gg = Graph()
-&gt;&gt;&gt; gg.add_vertex("A")
-<span class="computeroutput">&lt;graphserver.core.Vertex object at 0xb7d9608c&gt;</span> 
-&gt;&gt;&gt; gg.add_vertex("B")
-<span class="computeroutput">&lt;graphserver.core.Vertex object at 0xb7c397cc&gt;</span> 
-&gt;&gt;&gt; gg.add_edge( "A", "B", Street("1", 100) )
-<span class="computeroutput">&lt;graphserver.core.Edge object at 0xb7c4a92c&gt;</span> 
-&gt;&gt;&gt; gg.add_edge( "A", "B", Street("2", 50 ) )
-<span class="computeroutput">&lt;graphserver.core.Edge object at 0xb7da708c&gt;</span> 
-&gt;&gt;&gt; gg.size   #the graph is quite small
-<span class="computeroutput">2</span> 
-&gt;&gt;&gt; gg.get_vertex("A").outgoing                      <span class="pycomment"># the graph is directional</span> 
-<span class="computeroutput">[&lt;graphserver.core.Edge object at 0xb7b9accc&gt;, &lt;graphserver.core.Edge object at 0xb7b9acac&gt;]</span> 
-&gt;&gt;&gt; gg.get_vertex("A").incoming
-<span class="computeroutput">[]</span> 
-&gt;&gt;&gt; spt = gg.shortest_path_tree( "A", "B", State(1,0) )
-&gt;&gt;&gt; spt
-<span class="computeroutput">&lt;graphserver.core.ShortestPathTree object at 0xb7c45b8c&gt;</span> 
-&gt;&gt;&gt; spt.get_vertex("A")                              <span class="pycomment"># the shortest path tree is a partial copy of the graph</span> 
-<span class="computeroutput">&lt;graphserver.core.Vertex object at 0xb7c4a92c&gt;</span> 
-&gt;&gt;&gt; spt.get_vertex("A").outgoing                     <span class="pycomment"># which only contains the shortest paths to all points closer than 'B' </span> 
-<span class="computeroutput">[&lt;graphserver.core.Edge object at 0xb7b9adec&gt;]</span> 
-&gt;&gt;&gt; vertices, edges = spt.path("B")                  <span class="pycomment"># you can get the path 'A' to 'B' from the shortest path tree</span> 
-&gt;&gt;&gt; vertices                                         <span class="pycomment"># a list of references to the SPT vertices along the shortest path</span> 
-<span class="computeroutput">[&lt;graphserver.core.Vertex object at 0xb7b9ae4c&gt;, &lt;graphserver.core.Vertex object at 0xb7b9adec&gt;]</span> 
-&gt;&gt;&gt; edges                                            <span class="pycomment"># a list of references to the SPT edges along the shortest path</span> 
-<span class="computeroutput">[&lt;graphserver.core.Edge object at 0xb7b9accc&gt;]</span> 
-&gt;&gt;&gt; edges[0].payload                                 <span class="pycomment"># the edge payload contains information about the edge</span>
-<span class="computeroutput">&lt;Street name='2' length=50.000000 rise=0.000000 fall=0.000000 way=0&gt;</span> 
-&gt;&gt;&gt; vertices[-1].payload                             <span class="pycomment"># the payload of the final vertex has useful information</span> 
-<span class="computeroutput">&lt;graphserver.core.State object at 0xb7c4a92c&gt;</span> 
-&gt;&gt;&gt; vertices[-1].payload.time                        <span class="pycomment"># it takes 58 seconds to get from "A" to "B"</span> 
-<span class="computeroutput">58</span> 
-&gt;&gt;&gt; spt.destroy()                                    <span class="pycomment"># these functions are thin wrappers around C functions</span> 
-&gt;&gt;&gt; gg.destroy()                                     <span class="pycomment"># so we have to perform garbage collection explicitly</span> 
-&gt;&gt;&gt; exit()
-</pre>
-<h2>Compiling Graphs</h2>
-<h3>Loading OpenStreetMap Data</h3>
-
-Grab some OSM data. Here, we download an area around of Redding, CA, US from the OpenStreetMap HTTP API.
-<pre style="background-color:#F5F5F5"> $ wget http://api.openstreetmap.org/api/0.6/map?bbox=-122.4624,40.5505,-122.2876,40.6334 -O map.osm
-</pre>
-<p>Compile the OSM file into an OSMDB file, and then load that OSMDB file into a graph.</p>
-<pre style="background-color:#F5F5F5"> $ gs_osmdb_compile map.osm map.osmdb
- $ gs_import_osm map.gdb map.osmdb
-</pre>
-<p>Take a look at your new graph. This prints every vertex label in the graph:</p>
-<pre style="background-color:#F5F5F5"> $ gs_gdb_inspect map.gdb</pre>
-<p>Pick one and see all edges outgoing from that vertex:</p>
-<pre style="background-color:#F5F5F5"> $ gs_gdb_inspect map.gdb osm-92080455</pre>
-Prints:
-<pre style="background-color:#F5F5F5">osm-92080455 -> osm-91938757
-	&lt;Street name='10585937-1' length=136.119463 rise=0.000000 fall=0.000000 way=849&gt;
-osm-92080455 -> osm-92080457
-	&lt;Street name='10585937-2' length=139.452776 rise=0.000000 fall=0.000000 way=849&gt;
-osm-92080455 -> osm-92601143
-	&lt;Street name='10596654-0' length=126.551782 rise=0.000000 fall=0.000000 way=1809&gt;
-osm-92080455 -> osm-92080381
-	&lt;Street name='10596654-1' length=6.382770 rise=0.000000 fall=0.000000 way=1809&gt;</pre>
-
-<h3>Loading Public Transit Data</h3> 
-
-Grab the GTFS file for your favorite transit agency. Here, we grab the GTFS for the transit system in Redding, CA:
-<pre style="background-color:#F5F5F5"> $ wget http://trilliumtransit.com/transit_feeds/redding/google_transit.zip -O redding_gtfs.zip</pre>
-<p>Compile the GTFS into a GTFSDB, and then compile that GTFSDB into a graph<p>
-<pre style="background-color:#F5F5F5"> $ gs_gtfsdb_build redding_gtfs.zip redding.gtfsdb
- $ gs_import_gtfs redding.gdb redding.gtfsdb</pre>
-<p>Use gs_gdb_inspect to check that your new transit graph is in good shape</p>
-<pre style="background-color:#F5F5F5"> $ gs_gdb_inspect redding.gdb sta-3622</pre>
-should print
-<pre style="background-color:#F5F5F5">sta-3622 -> psv-0-000-004
-	&lt;TripBoard int_sid=0 sid=105A166 agency=0 calendar=165157760 timezone=164034504 boardings=[('1572A105B166', 23964), ('1598A105B166', 27564), ('1602A105B166', 31164), ('1607A105B166', 34764), ('1600A105B166', 38364), ('1605A105B166', 41964), ('1603A105B166', 45564), ('1608A105B166', 49164), ('1601A105B166', 52764), ('1606A105B166', 56364), ('1599A105B166', 59964), ('1604A105B166', 63564), ('1609A105B166', 67164)]&gt;
-sta-3622 -> psv-0-000-004
-	&lt;TripBoard int_sid=1 sid=106A166 agency=0 calendar=165157760 timezone=164034504 boardings=[('2459A106B166', 34764), ('1635A106B166', 38364), ('1640A106B166', 41964), ('1638A106B166', 45564), ('1643A106B166', 49164), ('1636A106B166', 52764), ('1641A106B166', 56364), ('1634A106B166', 59964), ('1639A106B166', 63564), ('1637A106B166', 67164)]&gt;
-</pre>
-
-<h3>Intermingling Public Transit and Street Data</h3> 
-<p>You can load both OSM and GTFS data into the same graph, then run a command to link them.</p>
-<pre style="background-color:#F5F5F5"> $ gs_import_gtfs redding_all.gdb redding.gtfsdb
- $ gs_import_osm redding_all.gdb map.osmdb
- $ gs_link_osm_gtfs redding_all.gdb map.osmdb redding.gtfsdb</pre>
-<p>Inspect:</p>
-<pre style="background-color:#F5F5F5"> $ gs_gdb_inspect redding.gdb sta-3622</pre>
-<p>prints:</p>
-<pre style="background-color:#F5F5F5">sta-3622 -> osm-92366549
-	&lt;graphserver.core.Link object at 0x9a0b20c&gt;
-sta-3622 -> psv-0-000-004
-	&lt;TripBoard int_sid=0 sid=105A166 agency=0 calendar=163855912 timezone=161122808 boardings=[('1572A105B166', 23964), ('1598A105B166', 27564), ('1602A105B166', 31164), ('1607A105B166', 34764), ('1600A105B166', 38364), ('1605A105B166', 41964), ('1603A105B166', 45564), ('1608A105B166', 49164), ('1601A105B166', 52764), ('1606A105B166', 56364), ('1599A105B166', 59964), ('1604A105B166', 63564), ('1609A105B166', 67164)]&gt;
-sta-3622 -> psv-0-000-004
-	&lt;TripBoard int_sid=1 sid=106A166 agency=0 calendar=163855912 timezone=161122808 boardings=[('2459A106B166', 34764), ('1635A106B166', 38364), ('1640A106B166', 41964), ('1638A106B166', 45564), ('1643A106B166', 49164), ('1636A106B166', 52764), ('1641A106B166', 56364), ('1634A106B166', 59964), ('1639A106B166', 63564), ('1637A106B166', 67164)]&gt;</pre>
-
-<h3>Inspecting the graph with gs_crawl</h3>
-<p>Start gs_crawl, a little graph inspection web service</p>
-<pre style="background-color:#F5F5F5"> $ gs_crawl redding.gdb 80</pre>
-<p>Then steer your web browser to the appropriate location.<p>
-<p>If you're using Amazon EC2, using your own public DNS:</p>
-<pre style="background-color:#F5F5F5">http://YOUR-EC2-ADDRESS.compute-1.amazonaws.com/</pre>
-<p>Or if you're simply running on your local machine:</p>
-<pre style="background-color:#F5F5F5">http://localhost:80/</pre>
- 
-<h3 id="routeserver">Getting routes with gs_routeserver</h3>
-<p>First, you'll need PyYAML</p>
-<pre style="background-color:#F5F5F5"> $ sudo easy_install pyyaml</pre>
-<p>The routeserver finds a path, and then uses a series of "handlers" to convert that path into a human-readable format. Those handlers are enumearted and set up by a configuration file called handlers.yaml. Graphserver comes with an example handlers.yaml which you can use to get started</p>
-<pre style="background-color:#F5F5F5"> $ cp /path/to/graphserver/pygs/graphserver/ext/routeserver/handlers.yaml .</pre>
-<p>This handlers.yaml file is filled with "CHANGEME" stubs. Replace every "CHANGEME.gtfsdb" with "redding.gtfsdb" and every "CHANGEME.osmdb" with "redding.osmdb"</p>
-<p>Fire up a routeserver on the compiled graph</p>
-<pre style="background-color:#F5F5F5"> $ gs_routeserver redding.gdb handlers.yaml -p 80</pre>
-<p>Get a list of all vertices in the system</p>
-<pre style="background-color:#F5F5F5">http://YOUR_DOMAIN_NAME/vertices</pre>
-<p>Get a route narrative</p>
-<pre style="background-color:#F5F5F5">http://YOUR_DOMAIN_NAME/path?origin="osm-92011649"&amp;dest="sta-3803"&amp;currtime=1260839444</pre>
-<p>or</p>
-<pre style="background-color:#F5F5F5">http://YOUR_DOMAIN_NAME/path_raw?origin="osm-92011649"&amp;dest="sta-3803"&amp;currtime=1260839444</pre>
-
-<h3>What about a really big city?</h3>
-<p>First, get Java 1.6. Or Java6. I think they're the same thing. Get the JDK, but not the JVM, the JRE, SDK, SDN, or the JCE. Note Java SE comes with Jave EE, which is apparently at version 5, and may or may not have anything to do with J2EE. I don't know what those have to do with anything. Google it or something. I don't know. They don't make it particularly easy for you. It's like, they've got more money than god and nothing pleases them better than pouring all that expertise into baffling the hell out of you. Honestly, I can't stand Java, but you need it to run Osmosis.</p>
-<p>Then, get Osmosis</p>
-<pre style="background-color:#F5F5F5"> $ wget http://gweb.bretth.com/osmosis-latest.zip
- $ unzip osmosis-latest.zip
- $ chmod a+x ./osmosis-0.30/bin/osmosis</pre>
-<p>Download a biggie GTFS file. Here's the one for the Seattle area:</p>
-<pre style="background-color:#F5F5F5"> $ wget http://www.gtfs-data-exchange.com/gtfs/badhill_20091208_1910.zip</pre>
-<p>Compile it into a GTFSDB. This will take a few minutes</p>
-<pre style="background-color:#F5F5F5"> $ gs_gtfsdb_build badhill_20091208_1910.zip kingco.gtfsdb</pre>
-<p>Check the bounds of the GTFSDB</p>
-<pre style="background-color:#F5F5F5"> $ sqlite3 kingco.gtfsdb "select min(stop_lon),min(stop_lat),max(stop_lon),max(stop_lat) from stops"</pre>
-returns:
-<pre style="background-color:#F5F5F5">-122.506729|47.1553345|-121.78244|47.9323654</pre>
-This will come in handy soon.
-<p>Get a huge chunk of OSM data from the CloudMade state files. Here's Washington State:</p>
-<pre style="background-color:#F5F5F5"> $ wget http://downloads.cloudmade.com/north_america/united_states/washington/washington.osm.highway.bz2
- $ bunzip2 washington.osm.highway.bz2</pre>
-<p>Then, use the bounding box coordinates we just got to cut down the OSM file to the area surrounding the agency. Check it:<p>
-<pre style="background-color:#F5F5F5"> $ /path/to/osmosis-0.30/bin/osmosis --read-xml washington.osm.highway --bounding-box left=-122.506729 bottom=47.1553345 right=-121.78244 top=47.9323654 --write-xml kingco.osm</pre>
-<p>Then, compile and set it up like normal. It's a trip-planning bonanza.</p>
-
-<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> 
-</script> 
-<script type="text/javascript"> 
-_uacct = "UA-1815162-1";
-urchinTracker();
-</script> 
-</body> 
- 
- 
-</html> 
- 

file:a/origin-src/hbus.ca.html (deleted)
--- a/origin-src/hbus.ca.html
+++ /dev/null
@@ -1,199 +1,1 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">
 
-<head profile="http://gmpg.org/xfn/11">
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-
-<title> hbus.ca: Blog</title>
-
-  <link rel="icon" type="image/png" href="http://hbus.ca/site_media/images/favico_bus.png"/>.
-  <link href="http://hbus.ca/site_media/stylesheets/scaffold.css" rel="stylesheet" type="text/css" />
-  <link href="http://hbus.ca/site_media/stylesheets/style.css" rel="stylesheet" type="text/css" />
-<link rel="stylesheet" href="http://hbus.ca/blog/wp-content/themes/hbus/style.css" type="text/css" media="screen" />
-	
-	  <script type="text/javascript" src="http://yui.yahooapis.com/2.6.0/build/yahoo/yahoo-min.js"></script> 
-	  <script type="text/javascript" src="http://yui.yahooapis.com/2.6.0/build/yahoo-dom-event/yahoo-dom-event.js"></script> 
-	  <script type="text/javascript" src="http://yui.yahooapis.com/2.6.0/build/element/element-beta-min.js"></script> 
-	  <script type="text/javascript" src="http://yui.yahooapis.com/2.6.0/build/layout/layout-min.js"></script>
-	
-	  <script type="text/javascript" src="http://yui.yahooapis.com/2.6.0/build/event/event-min.js"></script> 
-
-
-<link rel="alternate" type="application/rss+xml" title="hbus.ca: Blog RSS Feed" href="http://hbus.ca/blog/?feed=rss2" />
-<link rel="alternate" type="application/atom+xml" title="hbus.ca: Blog Atom Feed" href="http://hbus.ca/blog/?feed=atom" />
-<link rel="pingback" href="http://hbus.ca/blog/xmlrpc.php" />
-
-
-<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://hbus.ca/blog/xmlrpc.php?rsd" />
-<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://hbus.ca/blog/wp-includes/wlwmanifest.xml" /> 
-<meta name="generator" content="WordPress 2.7.1" />
-
-</head>
-<body id="nav_blog">
-  <div id="header">
-  <h1><a href="/">hbus<span>.ca</span></a>&nbsp;<span class="beta">beta</span></h1>
-
-  <p>Plan trips on Halifax Metro Transit</p>
-  <ul class="nav">
-    <li class="nav_home"><a href="http://hbus.ca/">Home</a></li>
-    <li class="nav_about"><a href="http://hbus.ca/about">About</a></li>
-    <li class="nav_help"><a href="http://hbus.ca/help">Help</a></li>
-    <li class="nav_blog"><a href="http://hbus.ca/blog">Blog</a></li>
-    <li class="nav_privacy"><a href="http://hbus.ca/privacy">Privacy</a></li>
-  <ul>
-</div>
-
-<div class="container" id="content">
-
-   <div class="container">
-   	<div id="sidebar">
-		<ul>
-			
-			<!-- Author information is disabled per default. Uncomment and fill in your details if you want to use it.
-			<li><h2>Author</h2>
-			<p>A little something about you, the author. Nothing lengthy, just an overview.</p>
-			</li>
-			-->
-
-			
-			<li><h2>Archives</h2>
-				<ul>
-					<li><a href='http://hbus.ca/blog/?m=200904' title='April 2009'>April 2009</a></li>
-				</ul>
-			</li>
-<!--
-			<li class="categories"><h2>Categories</h2><ul>	<li class="cat-item cat-item-1"><a href="http://hbus.ca/blog/?cat=1" title="View all posts filed under Uncategorized">Uncategorized</a> (1)
-</li>
-</ul></li>-->
-							<li id="linkcat-3" class="linkcat"><h2>Contributors</h2>
-	<ul class='xoxo blogroll'>
-<li><a href="http://masalalabs.ca">Ginger Tea and Channa Masala » hbus</a></li>
-
-	</ul>
-</li>
-<li id="linkcat-5" class="linkcat"><h2>Friends</h2>
-	<ul class='xoxo blogroll'>
-<li><a href="http://carsharehfx.ca" title="Car sharing for Halifax">Car Share Halifax</a></li>
-<li><a href="http://thehubhalifax.ca" title="Coworking space in Halifax">The Hub Halifax</a></li>
-
-	</ul>
-</li>
-<li id="linkcat-4" class="linkcat"><h2>Sponsors</h2>
-	<ul class='xoxo blogroll'>
-<li><a href="http://navarra.ca" title="The Navarra Group">The Navarra Group</a></li>
-
-	</ul>
-</li>
-
-				<li><h2>Meta</h2>
-				<ul>
-										<li><a href="http://hbus.ca/blog/wp-login.php">Log in</a></li>
-					<li><a href="http://validator.w3.org/check/referer" title="This page validates as XHTML 1.0 Transitional">Valid <abbr title="eXtensible HyperText Markup Language">XHTML</abbr></a></li>
-					<li><a href="http://gmpg.org/xfn/"><abbr title="XHTML Friends Network">XFN</abbr></a></li>
-					<li><a href="http://wordpress.org/" title="Powered by WordPress, state-of-the-art semantic personal publishing platform.">WordPress</a></li>
-									</ul>
-				</li>
-			
-					</ul>
-	</div>
-
-
-   <div id="posts">
-	
-		
-			<div class="post hentry category-uncategorized" id="post-9">
-				<h2><a href="http://hbus.ca/blog/?p=9" rel="bookmark" title="Permanent Link to Creating a google transit feed for fun and profit">Creating a google transit feed for fun and profit</a></h2>