Upgrade database schema to new official GTFS format
Upgrade database schema to new official GTFS format

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 />
  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>)
and Android (<a href="https://market.android.com/details?id=com.action">MyBus 2.0 by Imagine Team</a>) and Android (<a href="https://market.android.com/details?id=com.action">MyBus 2.0 by Imagine Team</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 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();
?> ?>
   
  --
  -- PostgreSQL database dump
  --
 
  -- Dumped from database version 9.0.4
  -- Dumped by pg_dump version 9.0.4
  -- Started on 2011-10-10 16:28:13
 
  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 2766 (class 1262 OID 18349)
  -- 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 1167 (class 2612 OID 11574)
  -- Name: plpgsql; Type: PROCEDURAL LANGUAGE; Schema: -; Owner: postgres
  --
 
  CREATE OR REPLACE PROCEDURAL LANGUAGE plpgsql;
 
 
  ALTER PROCEDURAL LANGUAGE plpgsql OWNER TO postgres;
 
  SET search_path = public, pg_catalog;
 
  --
  -- TOC entry 1088 (class 0 OID 0)
  -- Name: box2d; Type: SHELL TYPE; Schema: public; Owner: postgres
  --
 
  CREATE TYPE box2d;
 
 
  --
  -- TOC entry 15 (class 1255 OID 18351)
  -- Dependencies: 6 1088
  -- Name: box2d_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
  --
 
  CREATE FUNCTION box2d_in(cstring) RETURNS box2d
  LANGUAGE c IMMUTABLE STRICT
  AS '$libdir/postgis-1.5', 'BOX2DFLOAT4_in';
 
 
  ALTER FUNCTION public.box2d_in(cstring) OWNER TO postgres;
 
  --
  -- TOC entry 19 (class 1255 OID 18352)
  -- Dependencies: 6 1088
  -- Name: box2d_out(box2d); Type: FUNCTION; Schema: public; Owner: postgres
  --
 
  CREATE FUNCTION box2d_out(box2d) RETURNS cstring
  LANGUAGE c IMMUTABLE STRICT
  AS '$libdir/postgis-1.5', 'BOX2DFLOAT4_out';
 
 
  ALTER FUNCTION public.box2d_out(box2d) OWNER TO postgres;
 
  --
  -- TOC entry 1087 (class 1247 OID 18350)
  -- Dependencies: 19 6 15
  -- Name: box2d; Type: TYPE; Schema: public; Owner: postgres
  --
 
  CREATE TYPE box2d (
  INTERNALLENGTH = 16,
  INPUT = box2d_in,
  OUTPUT = box2d_out,
  ALIGNMENT = int4,
  STORAGE = plain
  );
 
 
  ALTER TYPE public.box2d OWNER TO postgres;
 
  --
  -- TOC entry 1091 (class 0 OID 0)
  -- Name: box3d; Type: SHELL TYPE; Schema: public; Owner: postgres
  --
 
  CREATE TYPE box3d;
 
 
  --
  -- TOC entry 20 (class 1255 OID 18355)
  -- Dependencies: 6 1091
  -- Name: box3d_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
  --
 
  CREATE FUNCTION box3d_in(cstring) RETURNS box3d
  LANGUAGE c IMMUTABLE STRICT
  AS '$libdir/postgis-1.5', 'BOX3D_in';
 
 
  ALTER FUNCTION public.box3d_in(cstring) OWNER TO postgres;
 
  --
  -- TOC entry 21 (class 1255 OID 18356)
  -- Dependencies: 6 1091
  -- Name: box3d_out(box3d); Type: FUNCTION; Schema: public; Owner: postgres
  --
 
  CREATE FUNCTION box3d_out(box3d) RETURNS cstring
  LANGUAGE c IMMUTABLE STRICT
  AS '$libdir/postgis-1.5', 'BOX3D_out';
 
 
  ALTER FUNCTION public.box3d_out(box3d) OWNER TO postgres;
 
  --
  -- TOC entry 1090 (class 1247 OID 18354)
  -- Dependencies: 20 6 21
  -- Name: box3d; Type: TYPE; Schema: public; Owner: postgres
  --
 
  CREATE TYPE box3d (
  INTERNALLENGTH = 48,
  INPUT = box3d_in,
  OUTPUT = box3d_out,
  ALIGNMENT = double,
  STORAGE = plain
  );
 
 
  ALTER TYPE public.box3d OWNER TO postgres;
 
  --
  -- TOC entry 1094 (class 0 OID 0)
  -- Name: box3d_extent; Type: SHELL TYPE; Schema: public; Owner: postgres
  --
 
  CREATE TYPE box3d_extent;
 
 
  --
  -- TOC entry 22 (class 1255 OID 18359)
  -- Dependencies: 6 1094
  -- Name: box3d_extent_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
  --
 
  CREATE FUNCTION box3d_extent_in(cstring) RETURNS box3d_extent
  LANGUAGE c IMMUTABLE STRICT
  AS '$libdir/postgis-1.5', 'BOX3D_in';
 
 
  ALTER FUNCTION public.box3d_extent_in(cstring) OWNER TO postgres;
 
  --
  -- TOC entry 23 (class 1255 OID 18360)
  -- Dependencies: 6 1094
  -- Name: box3d_extent_out(box3d_extent); Type: FUNCTION; Schema: public; Owner: postgres
  --
 
  CREATE FUNCTION box3d_extent_out(box3d_extent) RETURNS cstring
  LANGUAGE c IMMUTABLE STRICT
  AS '$libdir/postgis-1.5', 'BOX3D_extent_out';
 
 
  ALTER FUNCTION public.box3d_extent_out(box3d_extent) OWNER TO postgres;
 
  --
  -- TOC entry 1093 (class 1247 OID 18358)
  -- Dependencies: 6 22 23
  -- Name: box3d_extent; Type: TYPE; Schema: public; Owner: postgres
  --
 
  CREATE TYPE box3d_extent (
  INTERNALLENGTH = 48,
  INPUT = box3d_extent_in,
  OUTPUT = box3d_extent_out,
  ALIGNMENT = double,
  STORAGE = plain
  );
 
 
  ALTER TYPE public.box3d_extent OWNER TO postgres;
 
  --
  -- TOC entry 1097 (class 0 OID 0)
  -- Name: chip; Type: SHELL TYPE; Schema: public; Owner: postgres
  --
 
  CREATE TYPE chip;
 
 
  --
  -- TOC entry 24 (class 1255 OID 18363)
  -- Dependencies: 6 1097
  -- Name: chip_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
  --
 
  CREATE FUNCTION chip_in(cstring) RETURNS chip
  LANGUAGE c IMMUTABLE STRICT
  AS '$libdir/postgis-1.5', 'CHIP_in';
 
 
  ALTER FUNCTION public.chip_in(cstring) OWNER TO postgres;
 
  --
  -- TOC entry 25 (class 1255 OID 18364)
  -- Dependencies: 6 1097
  -- Name: chip_out(chip); Type: FUNCTION; Schema: public; Owner: postgres
  --
 
  CREATE FUNCTION chip_out(chip) RETURNS cstring
  LANGUAGE c IMMUTABLE STRICT
  AS '$libdir/postgis-1.5', 'CHIP_out';
 
 
  ALTER FUNCTION public.chip_out(chip) OWNER TO postgres;
 
  --
  -- TOC entry 1096 (class 1247 OID 18362)
  -- Dependencies: 6 25 24
  -- Name: chip; Type: TYPE; Schema: public; Owner: postgres
  --
 
  CREATE TYPE chip (
  INTERNALLENGTH = variable,
  INPUT = chip_in,
  OUTPUT = chip_out,
  ALIGNMENT = double,
  STORAGE = extended
  );
 
 
  ALTER TYPE public.chip OWNER TO postgres;
 
  --
  -- TOC entry 1100 (class 0 OID 0)
  -- Name: geography; Type: SHELL TYPE; Schema: public; Owner: postgres
  --
 
  CREATE TYPE geography;
 
 
  --
  -- TOC entry 26 (class 1255 OID 18367)
  -- Dependencies: 6
  -- Name: geography_analyze(internal); Type: FUNCTION; Schema: public; Owner: postgres
  --
 
  CREATE FUNCTION geography_analyze(internal) RETURNS boolean
  LANGUAGE c STRICT
  AS '$libdir/postgis-1.5', 'geography_analyze';
 
 
  ALTER FUNCTION public.geography_analyze(internal) OWNER TO postgres;
 
  --
  -- TOC entry 27 (class 1255 OID 18368)
  -- Dependencies: 6 1100
  -- Name: geography_in(cstring, oid, integer); Type: FUNCTION; Schema: public; Owner: postgres
  --
 
  CREATE FUNCTION geography_in(cstring, oid, integer) RETURNS geography
  LANGUAGE c IMMUTABLE STRICT
  AS '$libdir/postgis-1.5', 'geography_in';
 
 
  ALTER FUNCTION public.geography_in(cstring, oid, integer) OWNER TO postgres;
 
  --
  -- TOC entry 28 (class 1255 OID 18369)
  -- Dependencies: 6 1100
  -- Name: geography_out(geography); Type: FUNCTION; Schema: public; Owner: postgres
  --
 
  CREATE FUNCTION geography_out(geography) RETURNS cstring
  LANGUAGE c IMMUTABLE STRICT
  AS '$libdir/postgis-1.5', 'geography_out';
 
 
  ALTER FUNCTION public.geography_out(geography) OWNER TO postgres;
 
  --
  -- TOC entry 29 (class 1255 OID 18370)
  -- Dependencies: 6
  -- Name: geography_typmod_in(cstring[]); Type: FUNCTION; Schema: public; Owner: postgres
  --
 
  CREATE FUNCTION geography_typmod_in(cstring[]) RETURNS integer
  LANGUAGE c IMMUTABLE STRICT
  AS '$libdir/postgis-1.5', 'geography_typmod_in';
 
 
  ALTER FUNCTION public.geography_typmod_in(cstring[]) OWNER TO postgres;
 
  --
  -- TOC entry 30 (class 1255 OID 18371)
  -- Dependencies: 6
  -- Name: geography_typmod_out(integer); Type: FUNCTION; Schema: public; Owner: postgres
  --
 
  CREATE FUNCTION geography_typmod_out(integer) RETURNS cstring
  LANGUAGE c IMMUTABLE STRICT
  AS '$libdir/postgis-1.5', 'geography_typmod_out';
 
 
  ALTER FUNCTION public.geography_typmod_out(integer) OWNER TO postgres;
 
  --
  -- TOC entry 1099 (class 1247 OID 18366)
  -- Dependencies: 30 29 26 6 27 28
  -- Name: geography; Type: TYPE; Schema: public; Owner: postgres
  --
 
  CREATE TYPE geography (
  INTERNALLENGTH = variable,
  INPUT = geography_in,
  OUTPUT = geography_out,
  TYPMOD_IN = geography_typmod_in,
  TYPMOD_OUT = geography_typmod_out,
  ANALYZE = geography_analyze,
  ALIGNMENT = double,
  STORAGE = main
  );
 
 
  ALTER TYPE public.geography OWNER TO postgres;
 
  --
  -- TOC entry 1103 (class 0 OID 0)
  -- Name: geometry; Type: SHELL TYPE; Schema: public; Owner: postgres
  --
 
  CREATE TYPE geometry;
 
 
  --
  -- TOC entry 31 (class 1255 OID 18374)
  -- Dependencies: 6
  -- Name: geometry_analyze(internal); Type: FUNCTION; Schema: public; Owner: postgres
  --
 
  CREATE FUNCTION geometry_analyze(internal) RETURNS boolean
  LANGUAGE c STRICT
  AS '$libdir/postgis-1.5', 'LWGEOM_analyze';
 
 
  ALTER FUNCTION public.geometry_analyze(internal) OWNER TO postgres;
 
  --
  -- TOC entry 32 (class 1255 OID 18375)
  -- Dependencies: 6 1103
  -- Name: geometry_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
  --