Improve myway timeliness based on new GTFS feed accuracy
Improve myway timeliness based on new GTFS feed accuracy

file:a/.box (deleted)
--- a/.box
+++ /dev/null
@@ -1,5 +1,1 @@
-shared_writable_dirs:
-    - /labs/tiles
-    - /lib/staticmaplite/cache
-php_extensions: [pgsql, pdo, pdo_pgsql, curl]
 

file:b/.gitignore (new)
--- /dev/null
+++ b/.gitignore
@@ -1,1 +1,9 @@
 
+/labs/tiles/12
+/labs/tiles/13
+/labs/tiles/14
+/labs/tiles/15
+/labs/tiles/16
+/labs/tiles/17
+/labs/tiles/19
+/nbproject/private/

file:b/Boxfile (new)
--- /dev/null
+++ b/Boxfile
@@ -1,1 +1,7 @@
+web1: 
+  php_extensions: 
+    - pgsql
+    - pdo
+    - pdo_pgsql
+    - curl
 

file:a/about.php -> file:b/about.php
--- a/about.php
+++ b/about.php
@@ -1,35 +1,56 @@
 <?php
+/*
+ *    Copyright 2010,2011 Alexander Sadleir 
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+ */
 include ('include/common.inc.php');
 include_header("About", "about")
 ?>
 <p>
-Busness Time - An ACT bus timetable webapp<br />
-Based on the maxious-canberra-transit-feed (<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 />
-Source code for the <a 
-href="https://github.com/maxious/ACTBus-data">transit 
-feed</a> and <a href="https://github.com/maxious/ACTBus-ui">this 
-site</a> available from github.<br />
-Uses jQuery Mobile, PHP, PostgreSQL, OpenTripPlanner, OpenLayers, OpenStreetMap, Cloudmade Geocoder and Tile Service<br />
-<br />
-Feedback encouraged; contact maxious@lambdacomplex.org<br />
+    Busness Time - An ACT bus timetable webapp<br />
+    Based on the maxious-canberra-transit-feed (<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 />
+    Source code for the <a 
+        href="https://github.com/maxious/ACTBus-data">transit 
+        feed</a> and <a href="https://github.com/maxious/ACTBus-ui">this 
+        site</a> available from github.<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 />
-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>
-, <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>)
-<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. </small>
-<?php
-include_footer();
-?>
+    Feedback encouraged; contact maxious@lambdacomplex.org<br />
+    <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>
+    , <a href="http://itunes.apple.com/au/app/act-buses/id376634797?mt=8">ACT Buses by David Sullivan</a>) 
+    , Android (<a href="https://market.android.com/details?id=com.action">MyBus 2.0 by Imagine Team</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>)
+    <br />
+    GTFS-realtime API:
+    Alerts and Trip Updates (but only Cancelled or Stop Skipped)
+    Default format binary Protocol Buffer but can get JSON by adding ?ascii=yes
+    <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. </small>
+    <?php
+    include_footer();
+    ?>
 

--- a/aws/busuiphp.sh
+++ b/aws/busuiphp.sh
@@ -1,10 +1,12 @@
 cp /root/aws.php /tmp/
-mkdir /var/www/lib/staticmaplite/cache 
+chmod  777 /var/cache/lighttpd/compress/
+
 chcon -h system_u:object_r:httpd_sys_content_t /var/www
 chcon -R -h root:object_r:httpd_sys_content_t /var/www/*
-chcon -R -t httpd_sys_content_rw_t /var/www/lib/staticmaplite/cache
-chmod -R 777 /var/www/lib/staticmaplite/cache 
+
 chcon -R -t httpd_sys_content_rw_t /var/www/labs/tiles
 chmod -R 777 /var/www/labs/tiles
+
 wget http://s3-ap-southeast-1.amazonaws.com/busresources/cbrfeed.zip \
 -O /var/www/cbrfeed.zip
+

--- /dev/null
+++ b/aws/transitdata.sql
@@ -1,1 +1,13722 @@
-
+--
+-- PostgreSQL database dump
+--
+
+-- Dumped from database version 9.0.4
+-- Dumped by pg_dump version 9.0.4
+-- Started on 2011-10-11 23:16:11
+
+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 1168 (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: 6 15 19
+-- 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: 6 21 20
+-- 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 23 22
+-- 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: 26 6 27 28 29 30
+-- 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
+--
+
+CREATE FUNCTION geometry_in(cstring) RETURNS geometry
+    LANGUAGE c IMMUTABLE STRICT
+    AS '$libdir/postgis-1.5', 'LWGEOM_in';
+
+
+ALTER FUNCTION public.geometry_in(cstring) OWNER TO postgres;
+
+--
+-- TOC entry 33 (class 1255 OID 18376)
+-- Dependencies: 6 1103
+-- Name: geometry_out(geometry); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION geometry_out(geometry) RETURNS cstring
+    LANGUAGE c IMMUTABLE STRICT
+    AS '$libdir/postgis-1.5', 'LWGEOM_out';
+
+
+ALTER FUNCTION public.geometry_out(geometry) OWNER TO postgres;
+
+--
+-- TOC entry 34 (class 1255 OID 18377)
+-- Dependencies: 6 1103
+-- Name: geometry_recv(internal); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION geometry_recv(internal) RETURNS geometry
+    LANGUAGE c IMMUTABLE STRICT
+    AS '$libdir/postgis-1.5', 'LWGEOM_recv';
+
+
+ALTER FUNCTION public.geometry_recv(internal) OWNER TO postgres;
+
+--
+-- TOC entry 35 (class 1255 OID 18378)
+-- Dependencies: 6 1103
+-- Name: geometry_send(geometry); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION geometry_send(geometry) RETURNS bytea
+    LANGUAGE c IMMUTABLE STRICT
+    AS '$libdir/postgis-1.5', 'LWGEOM_send';
+
+
+ALTER FUNCTION public.geometry_send(geometry) OWNER TO postgres;
+
+--
+-- TOC entry 1102 (class 1247 OID 18373)
+-- Dependencies: 33 34 35 31 6 32
+-- Name: geometry; Type: TYPE; Schema: public; Owner: postgres
+--
+
+CREATE TYPE geometry (
+    INTERNALLENGTH = variable,
+    INPUT = geometry_in,
+    OUTPUT = geometry_out,
+    RECEIVE = geometry_recv,
+    SEND = geometry_send,
+    ANALYZE = geometry_analyze,
+    DELIMITER = ':',
+    ALIGNMENT = int4,
+    STORAGE = main
+);
+
+
+ALTER TYPE public.geometry OWNER TO postgres;
+
+--
+-- TOC entry 1105 (class 1247 OID 18382)
+-- Dependencies: 6 2408
+-- Name: geometry_dump; Type: TYPE; Schema: public; Owner: postgres
+--
+
+CREATE TYPE geometry_dump AS (
+	path integer[],
+	geom geometry
+);
+
+
+ALTER TYPE public.geometry_dump OWNER TO postgres;
+
+--
+-- TOC entry 1108 (class 0 OID 0)
+-- Name: gidx; Type: SHELL TYPE; Schema: public; Owner: postgres
+--
+
+CREATE TYPE gidx;
+
+
+--
+-- TOC entry 36 (class 1255 OID 18384)
+-- Dependencies: 6 1108
+-- Name: gidx_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION gidx_in(cstring) RETURNS gidx
+    LANGUAGE c IMMUTABLE STRICT
+    AS '$libdir/postgis-1.5', 'gidx_in';
+
+
+ALTER FUNCTION public.gidx_in(cstring) OWNER TO postgres;
+
+--
+-- TOC entry 37 (class 1255 OID 18385)
+-- Dependencies: 6 1108
+-- Name: gidx_out(gidx); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION gidx_out(gidx) RETURNS cstring
+    LANGUAGE c IMMUTABLE STRICT
+    AS '$libdir/postgis-1.5', 'gidx_out';
+
+
+ALTER FUNCTION public.gidx_out(gidx) OWNER TO postgres;
+
+--
+-- TOC entry 1107 (class 1247 OID 18383)
+-- Dependencies: 37 36 6
+-- Name: gidx; Type: TYPE; Schema: public; Owner: postgres
+--
+
+CREATE TYPE gidx (
+    INTERNALLENGTH = variable,
+    INPUT = gidx_in,
+    OUTPUT = gidx_out,
+    ALIGNMENT = double,
+    STORAGE = plain
+);
+
+
+ALTER TYPE public.gidx OWNER TO postgres;
+
+--
+-- TOC entry 1111 (class 0 OID 0)
+-- Name: pgis_abs; Type: SHELL TYPE; Schema: public; Owner: postgres
+--
+
+CREATE TYPE pgis_abs;
+
+
+--
+-- TOC entry 38 (class 1255 OID 18388)
+-- Dependencies: 6 1111
+-- Name: pgis_abs_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION pgis_abs_in(cstring) RETURNS pgis_abs
+    LANGUAGE c IMMUTABLE STRICT
+    AS '$libdir/postgis-1.5', 'pgis_abs_in';
+
+
+ALTER FUNCTION public.pgis_abs_in(cstring) OWNER TO postgres;
+
+--
+-- TOC entry 39 (class 1255 OID 18389)
+-- Dependencies: 6 1111
+-- Name: pgis_abs_out(pgis_abs); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION pgis_abs_out(pgis_abs) RETURNS cstring
+    LANGUAGE c IMMUTABLE STRICT
+    AS '$libdir/postgis-1.5', 'pgis_abs_out';
+
+
+ALTER FUNCTION public.pgis_abs_out(pgis_abs) OWNER TO postgres;
+
+--
+-- TOC entry 1110 (class 1247 OID 18387)
+-- Dependencies: 38 6 39
+-- Name: pgis_abs; Type: TYPE; Schema: public; Owner: postgres
+--
+
+CREATE TYPE pgis_abs (
+    INTERNALLENGTH = 8,
+    INPUT = pgis_abs_in,
+    OUTPUT = pgis_abs_out,
+    ALIGNMENT = double,
+    STORAGE = plain
+);
+
+
+ALTER TYPE public.pgis_abs OWNER TO postgres;
+
+--
+-- TOC entry 1114 (class 0 OID 0)
+-- Name: spheroid; Type: SHELL TYPE; Schema: public; Owner: postgres
+--
+
+CREATE TYPE spheroid;
+
+
+--
+-- TOC entry 40 (class 1255 OID 18392)
+-- Dependencies: 6 1114
+-- Name: spheroid_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION spheroid_in(cstring) RETURNS spheroid
+    LANGUAGE c IMMUTABLE STRICT
+    AS '$libdir/postgis-1.5', 'ellipsoid_in';
+
+
+ALTER FUNCTION public.spheroid_in(cstring) OWNER TO postgres;
+
+--
+-- TOC entry 41 (class 1255 OID 18393)
+-- Dependencies: 6 1114
+-- Name: spheroid_out(spheroid); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION spheroid_out(spheroid) RETURNS cstring
+    LANGUAGE c IMMUTABLE STRICT
+    AS '$libdir/postgis-1.5', 'ellipsoid_out';
+
+
+ALTER FUNCTION public.spheroid_out(spheroid) OWNER TO postgres;
+
+--
+-- TOC entry 1113 (class 1247 OID 18391)
+-- Dependencies: 41 6 40
+-- Name: spheroid; Type: TYPE; Schema: public; Owner: postgres
+--
+
+CREATE TYPE spheroid (
+    INTERNALLENGTH = 65,
+    INPUT = spheroid_in,
+    OUTPUT = spheroid_out,
+    ALIGNMENT = double,
+    STORAGE = plain
+);
+
+
+ALTER TYPE public.spheroid OWNER TO postgres;
+
+--
+-- TOC entry 42 (class 1255 OID 18395)
+-- Dependencies: 6 1102
+-- Name: _st_asgeojson(integer, geometry, integer, integer); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION _st_asgeojson(integer, geometry, integer, integer) RETURNS text
+    LANGUAGE c IMMUTABLE STRICT
+    AS '$libdir/postgis-1.5', 'LWGEOM_asGeoJson';
+
+
+ALTER FUNCTION public._st_asgeojson(integer, geometry, integer, integer) OWNER TO postgres;
+
+--
+-- TOC entry 43 (class 1255 OID 18396)
+-- Dependencies: 6 1099
+-- Name: _st_asgeojson(integer, geography, integer, integer); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION _st_asgeojson(integer, geography, integer, integer) RETURNS text
+    LANGUAGE c IMMUTABLE STRICT
+    AS '$libdir/postgis-1.5', 'geography_as_geojson';
+
+
+ALTER FUNCTION public._st_asgeojson(integer, geography, integer, integer) OWNER TO postgres;
+
+--
+-- TOC entry 44 (class 1255 OID 18397)
+-- Dependencies: 6 1102
+-- Name: _st_asgml(integer, geometry, integer, integer); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION _st_asgml(integer, geometry, integer, integer) RETURNS text
+    LANGUAGE c IMMUTABLE STRICT
+    AS '$libdir/postgis-1.5', 'LWGEOM_asGML';
+
+
+ALTER FUNCTION public._st_asgml(integer, geometry, integer, integer) OWNER TO postgres;
+
+--
+-- TOC entry 45 (class 1255 OID 18398)
+-- Dependencies: 6 1099
+-- Name: _st_asgml(integer, geography, integer, integer); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION _st_asgml(integer, geography, integer, integer) RETURNS text
+    LANGUAGE c IMMUTABLE STRICT
+    AS '$libdir/postgis-1.5', 'geography_as_gml';
+
+
+ALTER FUNCTION public._st_asgml(integer, geography, integer, integer) OWNER TO postgres;
+
+--
+-- TOC entry 46 (class 1255 OID 18399)
+-- Dependencies: 1102 6
+-- Name: _st_askml(integer, geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION _st_askml(integer, geometry, integer) RETURNS text
+    LANGUAGE c IMMUTABLE STRICT
+    AS '$libdir/postgis-1.5', 'LWGEOM_asKML';
+
+
+ALTER FUNCTION public._st_askml(integer, geometry, integer) OWNER TO postgres;
+
+--
+-- TOC entry 47 (class 1255 OID 18400)
+-- Dependencies: 6 1099
+-- Name: _st_askml(integer, geography, integer); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION _st_askml(integer, geography, integer) RETURNS text
+    LANGUAGE c IMMUTABLE STRICT
+    AS '$libdir/postgis-1.5', 'geography_as_kml';
+
+
+ALTER FUNCTION public._st_askml(integer, geography, integer) OWNER TO postgres;
+
+--
+-- TOC entry 49 (class 1255 OID 18402)
+-- Dependencies: 1099 6
+-- Name: _st_bestsrid(geography); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION _st_bestsrid(geography) RETURNS integer
+    LANGUAGE sql IMMUTABLE STRICT
+    AS $_$SELECT _ST_BestSRID($1,$1)$_$;
+
+
+ALTER FUNCTION public._st_bestsrid(geography) OWNER TO postgres;
+
+--
+-- TOC entry 48 (class 1255 OID 18401)
+-- Dependencies: 6 1099 1099
+-- Name: _st_bestsrid(geography, geography); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION _st_bestsrid(geography, geography) RETURNS integer
+    LANGUAGE c IMMUTABLE STRICT
+    AS '$libdir/postgis-1.5', 'geography_bestsrid';
+
+
+ALTER FUNCTION public._st_bestsrid(geography, geography) OWNER TO postgres;
+
+--
+-- TOC entry 50 (class 1255 OID 18403)
+-- Dependencies: 1102 6 1102
+-- Name: _st_buffer(geometry, double precision, cstring); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION _st_buffer(geometry, double precision, cstring) RETURNS geometry
+    LANGUAGE c IMMUTABLE STRICT COST 100
+    AS '$libdir/postgis-1.5', 'buffer';
+
+
+ALTER FUNCTION public._st_buffer(geometry, double precision, cstring) OWNER TO postgres;
+
+--
+-- TOC entry 51 (class 1255 OID 18404)
+-- Dependencies: 6 1102 1102
+-- Name: _st_contains(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION _st_contains(geometry, geometry) RETURNS boolean
+    LANGUAGE c IMMUTABLE STRICT COST 100
+    AS '$libdir/postgis-1.5', 'contains';
+
+
+ALTER FUNCTION public._st_contains(geometry, geometry) OWNER TO postgres;
+
+--
+-- TOC entry 52 (class 1255 OID 18405)
+-- Dependencies: 6 1102 1102
+-- Name: _st_containsproperly(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION _st_containsproperly(geometry, geometry) RETURNS boolean
+    LANGUAGE c IMMUTABLE STRICT COST 100
+    AS '$libdir/postgis-1.5', 'containsproperly';
+
+
+ALTER FUNCTION public._st_containsproperly(geometry, geometry) OWNER TO postgres;
+
+--
+-- TOC entry 53 (class 1255 OID 18406)
+-- Dependencies: 6 1102 1102
+-- Name: _st_coveredby(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION _st_coveredby(geometry, geometry) RETURNS boolean
+    LANGUAGE c IMMUTABLE STRICT COST 100
+    AS '$libdir/postgis-1.5', 'coveredby';
+
+
+ALTER FUNCTION public._st_coveredby(geometry, geometry) OWNER TO postgres;
+
+--
+-- TOC entry 54 (class 1255 OID 18407)
+-- Dependencies: 1102 1102 6
+-- Name: _st_covers(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION _st_covers(geometry, geometry) RETURNS boolean
+    LANGUAGE c IMMUTABLE STRICT COST 100
+    AS '$libdir/postgis-1.5', 'covers';
+
+
+ALTER FUNCTION public._st_covers(geometry, geometry) OWNER TO postgres;
+
+--
+-- TOC entry 55 (class 1255 OID 18408)
+-- Dependencies: 1099 1099 6
+-- Name: _st_covers(geography, geography); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION _st_covers(geography, geography) RETURNS boolean
+    LANGUAGE c IMMUTABLE STRICT COST 100
+    AS '$libdir/postgis-1.5', 'geography_covers';
+
+
+ALTER FUNCTION public._st_covers(geography, geography) OWNER TO postgres;
+
+--
+-- TOC entry 56 (class 1255 OID 18409)
+-- Dependencies: 1102 1102 6
+-- Name: _st_crosses(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION _st_crosses(geometry, geometry) RETURNS boolean
+    LANGUAGE c IMMUTABLE STRICT COST 100
+    AS '$libdir/postgis-1.5', 'crosses';
+
+
+ALTER FUNCTION public._st_crosses(geometry, geometry) OWNER TO postgres;
+
+--
+-- TOC entry 57 (class 1255 OID 18410)
+-- Dependencies: 1102 6 1102
+-- Name: _st_dfullywithin(geometry, geometry, double precision); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION _st_dfullywithin(geometry, geometry, double precision) RETURNS boolean
+    LANGUAGE c IMMUTABLE STRICT
+    AS '$libdir/postgis-1.5', 'LWGEOM_dfullywithin';
+
+
+ALTER FUNCTION public._st_dfullywithin(geometry, geometry, double precision) OWNER TO postgres;
+
+--
+-- TOC entry 58 (class 1255 OID 18411)
+-- Dependencies: 1099 6 1099
+-- Name: _st_distance(geography, geography, double precision, boolean); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION _st_distance(geography, geography, d