Fix search routes by final destination
Fix search routes by final destination

file:a/.box (deleted)
shared_writable_dirs:  
- /labs/tiles  
- /lib/staticmaplite/cache  
php_extensions: [pgsql, pdo, pdo_pgsql, curl]  
 
file:b/Boxfile (new)
  web1:
  php_extensions:
  - pgsql
  - pdo
  - pdo_pgsql
  - curl
 
file:a/about.php -> file:b/about.php
<?php <?php
/* /*
* Copyright 2010,2011 Alexander Sadleir * Copyright 2010,2011 Alexander Sadleir
   
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
   
http://www.apache.org/licenses/LICENSE-2.0 http://www.apache.org/licenses/LICENSE-2.0
   
Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
include ('include/common.inc.php'); include ('include/common.inc.php');
include_header("About", "about") include_header("About", "about")
?> ?>
<p> <p>
Busness Time - An ACT bus timetable webapp<br /> Busness Time - An ACT bus timetable webapp<br />
Based on the maxious-canberra-transit-feed (<a Based on the maxious-canberra-transit-feed (<a
href="http://s3-ap-southeast-1.amazonaws.com/busresources/cbrfeed.zip">download</a>, href="http://s3-ap-southeast-1.amazonaws.com/busresources/cbrfeed.zip">download</a>,
last updated <?php echo date("F d Y.", @filemtime('cbrfeed.zip')); ?>)<br /> last updated <?php echo date("F d Y.", @filemtime('cbrfeed.zip')); ?>)<br />
Source code for the <a Source code for the <a
href="https://github.com/maxious/ACTBus-data">transit href="https://github.com/maxious/ACTBus-data">transit
feed</a> and <a href="https://github.com/maxious/ACTBus-ui">this feed</a> and <a href="https://github.com/maxious/ACTBus-ui">this
site</a> available from github.<br /> site</a> available from github.<br />
Uses jQuery Mobile, PHP, PostgreSQL, OpenTripPlanner, OpenLayers, OpenStreetMap, Cloudmade Geocoder and Tile Service<br /> Uses jQuery Mobile, PHP, PostgreSQL, OpenTripPlanner, OpenLayers, OpenStreetMap, Cloudmade Geocoder and Tile Service<br />
Suburb Geocoding Based on <A href="http://www.abs.gov.au/AUSSTATS/abs@.nsf/Lookup/1270.0.55.003Main+Features1July%202011?OpenDocument">Australian Bureau of Statistics data.</a><br /> Suburb Geocoding Based on <A href="http://www.abs.gov.au/AUSSTATS/abs@.nsf/Lookup/1270.0.55.003Main+Features1July%202011?OpenDocument">Australian Bureau of Statistics data.</a><br />
Street geocoding based on work by OpenStreetMap contributors<br> Street geocoding based on work by OpenStreetMap contributors<br>
<br /> <br />
Feedback encouraged; contact maxious@lambdacomplex.org<br /> Feedback encouraged; contact maxious@lambdacomplex.org<br />
<br /> <br />
Some icons by Joseph Wain / glyphish.com<br /> Some icons by Joseph Wain / glyphish.com<br />
Native clients also available for iPhone(<a href="http://itunes.apple.com/au/app/cbrtimetable/id444287349?mt=8">cbrTimetable by Sandor Kolotenko</a> Native clients also available for iPhone(<a href="http://itunes.apple.com/au/app/cbrtimetable/id444287349?mt=8">cbrTimetable by Sandor Kolotenko</a>
, <a href="http://itunes.apple.com/au/app/act-buses/id376634797?mt=8">ACT Buses by David Sullivan</a>) , <a href="http://itunes.apple.com/au/app/act-buses/id376634797?mt=8">ACT Buses by David Sullivan</a>, <a href="http://itunes.apple.com/app/bus-trips-act/id489146525?mt=8">Bus Trips ACT by Molson Chengalath</a>)
and Android (<a href="https://market.android.com/details?id=com.action">MyBus 2.0 by Imagine Team</a>) , Android (<a href="https://market.android.com/details?id=com.action">MyBus 2.0 by Imagine Team</a>, <A href="https://market.android.com/details?id=GetMe2CanberraFree.source">GetMe2 Canberra by
  Colin Thompson </a>)
  and Windows Phone 7 (<a href="http://www.windowsphone.com/en-AU/apps/d840375e-429c-4aa4-a358-80eec6ea9e66">TransHub Canberra by Soul Solutions</a>) Other web clients include <a href="http://canberra.itranzit.com/option.html">iTranzit</a>.
<br /> <br />
GTFS-realtime API: GTFS-realtime API:
Alerts and Trip Updates (but only Cancelled or Stop Skipped) Alerts and Trip Updates (but only Cancelled or Stop Skipped)
Default format binary Protocol Buffer but can get JSON by adding ?ascii=yes Default format binary Protocol Buffer but can get JSON by adding ?ascii=yes
<br /> <br />
<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. <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, 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 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. "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, 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 change, modify, add or remove portions of the Site and to restrict or terminate the use and accessibility of the Site
without prior notice. </small> without prior notice. </small>
<?php <?php
include_footer(); include_footer();
?> ?>
   
createdb transitdata createdb transitdata
createlang -d transitdata plpgsql createlang -d transitdata plpgsql
psql -d transitdata -f /var/www/lib/postgis.sql psql -d transitdata -f /var/www/lib/postgis.sql
# curl https://github.com/maxious/ACTBus-ui/raw/master/transitdata.cbrfeed.sql.gz -o transitdata.cbrfeed.sql.gz # curl https://github.com/maxious/ACTBus-ui/raw/master/transitdata.cbrfeed.sql.gz -o transitdata.cbrfeed.sql.gz
#made with pg_dump transitdata | gzip -c > transitdata.cbrfeed.sql.gz #made with pg_dump transitdata | gzip -c > transitdata.cbrfeed.sql.gz
gunzip /var/www/transitdata.cbrfeed.sql.gz gunzip /var/www/transitdata.cbrfeed.sql.gz
psql -d transitdata -f /var/www/transitdata.cbrfeed.sql psql -d transitdata -f /var/www/transitdata.cbrfeed.sql
#createuser transitdata -SDRP #createuser transitdata -SDRP
#password transitdata #password transitdata
#psql -d transitdata -c "GRANT SELECT ON TABLE agency,calendar,calendar_dates,routes,stop_times,stops,trips TO transitdata;" #psql -d transitdata -c "GRANT SELECT ON TABLE agency,calendar,calendar_dates,routes,stop_times,stops,trips TO transitdata;"
#psql -d transitdata -c "GRANT SELECT,INSERT ON TABLE myway_observations,myway_routes,myway_stops,myway_timingdeltas TO transitdata;" #psql -d transitdata -c "GRANT SELECT,INSERT ON TABLE myway_observations,myway_routes,myway_stops,myway_timingdeltas TO transitdata;"
#psql -d transitdata -c "GRANT SELECT,INSERT,UPDATE ON TABLE myway_routes,myway_stops TO transitdata;" #psql -d transitdata -c "GRANT SELECT,INSERT,UPDATE ON TABLE myway_routes,myway_stops TO transitdata;"
##psql -d transitdata -c "GRANT SELECT ON ALL TABLES IN SCHEMA public TO transitdata;" ##psql -d transitdata -c "GRANT SELECT ON ALL TABLES IN SCHEMA public TO transitdata;"
  ## INSERT INTO geometry_columns(f_table_catalog, f_table_schema, f_table_name, f_geometry_column, coord_dimension, srid, "type")
  ##SELECT '', 'public', 'shapes', 'shape_pt', ST_CoordDim(shape_pt), ST_SRID(shape_pt), GeometryType(shape_pt)
  ##FROM shapes LIMIT 1;
php /var/www/updatedb.php php /var/www/updatedb.php
-- --
-- PostgreSQL database dump -- PostgreSQL database dump
-- --
   
-- Dumped from database version 9.0.4 -- Dumped from database version 9.0.4
-- Dumped by pg_dump version 9.0.4 -- Dumped by pg_dump version 9.0.4
-- Started on 2011-10-07 22:30:10 -- Started on 2011-10-11 23:16:11
   
SET statement_timeout = 0; SET statement_timeout = 0;
SET client_encoding = 'UTF8'; SET client_encoding = 'UTF8';
SET standard_conforming_strings = off; SET standard_conforming_strings = off;
SET check_function_bodies = false; SET check_function_bodies = false;
SET client_min_messages = warning; SET client_min_messages = warning;
SET escape_string_warning = off; SET escape_string_warning = off;
   
-- --
-- TOC entry 2772 (class 1262 OID 18349) -- TOC entry 1168 (class 2612 OID 11574)
-- Name: transitdata; Type: DATABASE; Schema: -; Owner: postgres  
--  
   
CREATE DATABASE transitdata WITH TEMPLATE = template0 ENCODING = 'UTF8' LC_COLLATE = 'English_Australia.1252' LC_CTYPE = 'English_Australia.1252';  
   
   
ALTER DATABASE transitdata OWNER TO postgres;  
   
\connect transitdata  
   
SET statement_timeout = 0;  
SET client_encoding = 'UTF8';  
SET standard_conforming_strings = off;  
SET check_function_bodies = false;  
SET client_min_messages = warning;  
SET escape_string_warning = off;  
   
--  
-- TOC entry 1170 (class 2612 OID 11574)  
-- Name: plpgsql; Type: PROCEDURAL LANGUAGE; Schema: -; Owner: postgres -- Name: plpgsql; Type: PROCEDURAL LANGUAGE; Schema: -; Owner: postgres
-- --
   
CREATE OR REPLACE PROCEDURAL LANGUAGE plpgsql; CREATE OR REPLACE PROCEDURAL LANGUAGE plpgsql;
   
   
ALTER PROCEDURAL LANGUAGE plpgsql OWNER TO postgres; ALTER PROCEDURAL LANGUAGE plpgsql OWNER TO postgres;
   
SET search_path = public, pg_catalog; SET search_path = public, pg_catalog;
   
-- --
-- TOC entry 1088 (class 0 OID 0) -- TOC entry 1088 (class 0 OID 0)
-- Name: box2d; Type: SHELL TYPE; Schema: public; Owner: postgres -- Name: box2d; Type: SHELL TYPE; Schema: public; Owner: postgres
-- --
   
CREATE TYPE box2d; CREATE TYPE box2d;
   
   
-- --
-- TOC entry 15 (class 1255 OID 18351) -- TOC entry 15 (class 1255 OID 18351)
-- Dependencies: 6 1088 -- Dependencies: 6 1088
-- Name: box2d_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres -- Name: box2d_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION box2d_in(cstring) RETURNS box2d CREATE FUNCTION box2d_in(cstring) RETURNS box2d
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'BOX2DFLOAT4_in'; AS '$libdir/postgis-1.5', 'BOX2DFLOAT4_in';
   
   
ALTER FUNCTION public.box2d_in(cstring) OWNER TO postgres; ALTER FUNCTION public.box2d_in(cstring) OWNER TO postgres;
   
-- --
-- TOC entry 19 (class 1255 OID 18352) -- TOC entry 19 (class 1255 OID 18352)
-- Dependencies: 6 1088 -- Dependencies: 6 1088
-- Name: box2d_out(box2d); Type: FUNCTION; Schema: public; Owner: postgres -- Name: box2d_out(box2d); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION box2d_out(box2d) RETURNS cstring CREATE FUNCTION box2d_out(box2d) RETURNS cstring
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'BOX2DFLOAT4_out'; AS '$libdir/postgis-1.5', 'BOX2DFLOAT4_out';
   
   
ALTER FUNCTION public.box2d_out(box2d) OWNER TO postgres; ALTER FUNCTION public.box2d_out(box2d) OWNER TO postgres;
   
-- --
-- TOC entry 1087 (class 1247 OID 18350) -- TOC entry 1087 (class 1247 OID 18350)
-- Dependencies: 15 6 19 -- Dependencies: 6 15 19
-- Name: box2d; Type: TYPE; Schema: public; Owner: postgres -- Name: box2d; Type: TYPE; Schema: public; Owner: postgres
-- --
   
CREATE TYPE box2d ( CREATE TYPE box2d (
INTERNALLENGTH = 16, INTERNALLENGTH = 16,
INPUT = box2d_in, INPUT = box2d_in,
OUTPUT = box2d_out, OUTPUT = box2d_out,
ALIGNMENT = int4, ALIGNMENT = int4,
STORAGE = plain STORAGE = plain
); );
   
   
ALTER TYPE public.box2d OWNER TO postgres; ALTER TYPE public.box2d OWNER TO postgres;
   
-- --
-- TOC entry 1091 (class 0 OID 0) -- TOC entry 1091 (class 0 OID 0)
-- Name: box3d; Type: SHELL TYPE; Schema: public; Owner: postgres -- Name: box3d; Type: SHELL TYPE; Schema: public; Owner: postgres
-- --
   
CREATE TYPE box3d; CREATE TYPE box3d;
   
   
-- --
-- TOC entry 20 (class 1255 OID 18355) -- TOC entry 20 (class 1255 OID 18355)
-- Dependencies: 6 1091 -- Dependencies: 6 1091
-- Name: box3d_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres -- Name: box3d_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION box3d_in(cstring) RETURNS box3d CREATE FUNCTION box3d_in(cstring) RETURNS box3d
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'BOX3D_in'; AS '$libdir/postgis-1.5', 'BOX3D_in';
   
   
ALTER FUNCTION public.box3d_in(cstring) OWNER TO postgres; ALTER FUNCTION public.box3d_in(cstring) OWNER TO postgres;
   
-- --
-- TOC entry 21 (class 1255 OID 18356) -- TOC entry 21 (class 1255 OID 18356)
-- Dependencies: 6 1091 -- Dependencies: 6 1091
-- Name: box3d_out(box3d); Type: FUNCTION; Schema: public; Owner: postgres -- Name: box3d_out(box3d); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION box3d_out(box3d) RETURNS cstring CREATE FUNCTION box3d_out(box3d) RETURNS cstring
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'BOX3D_out'; AS '$libdir/postgis-1.5', 'BOX3D_out';
   
   
ALTER FUNCTION public.box3d_out(box3d) OWNER TO postgres; ALTER FUNCTION public.box3d_out(box3d) OWNER TO postgres;
   
-- --
-- TOC entry 1090 (class 1247 OID 18354) -- TOC entry 1090 (class 1247 OID 18354)
-- Dependencies: 21 6 20 -- Dependencies: 6 21 20
-- Name: box3d; Type: TYPE; Schema: public; Owner: postgres -- Name: box3d; Type: TYPE; Schema: public; Owner: postgres
-- --
   
CREATE TYPE box3d ( CREATE TYPE box3d (
INTERNALLENGTH = 48, INTERNALLENGTH = 48,
INPUT = box3d_in, INPUT = box3d_in,
OUTPUT = box3d_out, OUTPUT = box3d_out,
ALIGNMENT = double, ALIGNMENT = double,
STORAGE = plain STORAGE = plain
); );
   
   
ALTER TYPE public.box3d OWNER TO postgres; ALTER TYPE public.box3d OWNER TO postgres;
   
-- --
-- TOC entry 1094 (class 0 OID 0) -- TOC entry 1094 (class 0 OID 0)
-- Name: box3d_extent; Type: SHELL TYPE; Schema: public; Owner: postgres -- Name: box3d_extent; Type: SHELL TYPE; Schema: public; Owner: postgres
-- --
   
CREATE TYPE box3d_extent; CREATE TYPE box3d_extent;
   
   
-- --
-- TOC entry 22 (class 1255 OID 18359) -- TOC entry 22 (class 1255 OID 18359)
-- Dependencies: 6 1094 -- Dependencies: 6 1094
-- Name: box3d_extent_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres -- Name: box3d_extent_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION box3d_extent_in(cstring) RETURNS box3d_extent CREATE FUNCTION box3d_extent_in(cstring) RETURNS box3d_extent
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'BOX3D_in'; AS '$libdir/postgis-1.5', 'BOX3D_in';
   
   
ALTER FUNCTION public.box3d_extent_in(cstring) OWNER TO postgres; ALTER FUNCTION public.box3d_extent_in(cstring) OWNER TO postgres;
   
-- --
-- TOC entry 23 (class 1255 OID 18360) -- TOC entry 23 (class 1255 OID 18360)
-- Dependencies: 6 1094 -- Dependencies: 6 1094
-- Name: box3d_extent_out(box3d_extent); Type: FUNCTION; Schema: public; Owner: postgres -- Name: box3d_extent_out(box3d_extent); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION box3d_extent_out(box3d_extent) RETURNS cstring CREATE FUNCTION box3d_extent_out(box3d_extent) RETURNS cstring
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'BOX3D_extent_out'; AS '$libdir/postgis-1.5', 'BOX3D_extent_out';
   
   
ALTER FUNCTION public.box3d_extent_out(box3d_extent) OWNER TO postgres; ALTER FUNCTION public.box3d_extent_out(box3d_extent) OWNER TO postgres;
   
-- --
-- TOC entry 1093 (class 1247 OID 18358) -- TOC entry 1093 (class 1247 OID 18358)
-- Dependencies: 6 22 23 -- Dependencies: 6 23 22
-- Name: box3d_extent; Type: TYPE; Schema: public; Owner: postgres -- Name: box3d_extent; Type: TYPE; Schema: public; Owner: postgres
-- --
   
CREATE TYPE box3d_extent ( CREATE TYPE box3d_extent (
INTERNALLENGTH = 48, INTERNALLENGTH = 48,
INPUT = box3d_extent_in, INPUT = box3d_extent_in,
OUTPUT = box3d_extent_out, OUTPUT = box3d_extent_out,
ALIGNMENT = double, ALIGNMENT = double,
STORAGE = plain STORAGE = plain
); );
   
   
ALTER TYPE public.box3d_extent OWNER TO postgres; ALTER TYPE public.box3d_extent OWNER TO postgres;
   
--