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

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/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
@@ -34,8 +34,10 @@
     <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>)
+    , <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>) 
+    , 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 />
     GTFS-realtime API:
     Alerts and Trip Updates (but only Cancelled or Stop Skipped)

--- a/aws/busuidb.sh
+++ b/aws/busuidb.sh
@@ -11,4 +11,7 @@
 #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 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

--- a/aws/transitdata.sql
+++ b/aws/transitdata.sql
@@ -4,7 +4,7 @@
 
 -- Dumped from database 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 client_encoding = 'UTF8';
@@ -14,26 +14,7 @@
 SET escape_string_warning = off;
 
 --
--- TOC entry 2772 (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 1170 (class 2612 OID 11574)
+-- TOC entry 1168 (class 2612 OID 11574)
 -- Name: plpgsql; Type: PROCEDURAL LANGUAGE; Schema: -; Owner: postgres
 --
 
@@ -80,7 +61,7 @@
 
 --
 -- TOC entry 1087 (class 1247 OID 18350)
--- Dependencies: 15 6 19
+-- Dependencies: 6 15 19
 -- Name: box2d; Type: TYPE; Schema: public; Owner: postgres
 --
 
@@ -131,7 +112,7 @@
 
 --
 -- TOC entry 1090 (class 1247 OID 18354)
--- Dependencies: 21 6 20
+-- Dependencies: 6 21 20
 -- Name: box3d; Type: TYPE; Schema: public; Owner: postgres
 --
 
@@ -182,7 +163,7 @@
 
 --
 -- TOC entry 1093 (class 1247 OID 18358)
--- Dependencies: 6 22 23
+-- Dependencies: 6 23 22
 -- Name: box3d_extent; Type: TYPE; Schema: public; Owner: postgres
 --
 
@@ -323,7 +304,7 @@
 
 --
 -- TOC entry 1099 (class 1247 OID 18366)
--- Dependencies: 29 30 26 6 27 28
+-- Dependencies: 26 6 27 28 29 30
 -- Name: geography; Type: TYPE; Schema: public; Owner: postgres
 --
 
@@ -416,7 +397,7 @@
 
 --
 -- TOC entry 1102 (class 1247 OID 18373)
--- Dependencies: 35 31 32 6 33 34
+-- Dependencies: 33 34 35 31 6 32
 -- Name: geometry; Type: TYPE; Schema: public; Owner: postgres
 --
 
@@ -437,7 +418,7 @@
 
 --
 -- TOC entry 1105 (class 1247 OID 18382)
--- Dependencies: 6 2410
+-- Dependencies: 6 2408
 -- Name: geometry_dump; Type: TYPE; Schema: public; Owner: postgres
 --
 
@@ -485,7 +466,7 @@
 
 --
 -- TOC entry 1107 (class 1247 OID 18383)
--- Dependencies: 36 6 37
+-- Dependencies: 37 36 6
 -- Name: gidx; Type: TYPE; Schema: public; Owner: postgres
 --
 
@@ -536,7 +517,7 @@
 
 --
 -- TOC entry 1110 (class 1247 OID 18387)
--- Dependencies: 39 6 38
+-- Dependencies: 38 6 39
 -- Name: pgis_abs; Type: TYPE; Schema: public; Owner: postgres
 --
 
@@ -587,7 +568,7 @@
 
 --
 -- TOC entry 1113 (class 1247 OID 18391)
--- Dependencies: 6 41 40
+-- Dependencies: 41 6 40
 -- Name: spheroid; Type: TYPE; Schema: public; Owner: postgres
 --
 
@@ -617,72 +598,72 @@
 
 --
 -- 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_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: 1102 6
--- 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: 1099 6
--- 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: 6 1102
--- 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: 1099 6
--- 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: 6 1099
 -- Name: _st_bestsrid(geography); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -695,7 +676,7 @@
 
 --
 -- TOC entry 48 (class 1255 OID 18401)
--- Dependencies: 1099 6 1099
+-- Dependencies: 6 1099 1099
 -- Name: _st_bestsrid(geography, geography); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -760,7 +741,7 @@
 
 --
 -- TOC entry 54 (class 1255 OID 18407)
--- Dependencies: 1102 6 1102
+-- Dependencies: 1102 1102 6
 -- Name: _st_covers(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -773,7 +754,7 @@
 
 --
 -- TOC entry 55 (class 1255 OID 18408)
--- Dependencies: 1099 6 1099
+-- Dependencies: 1099 1099 6
 -- Name: _st_covers(geography, geography); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -786,7 +767,7 @@
 
 --
 -- TOC entry 56 (class 1255 OID 18409)
--- Dependencies: 1102 6 1102
+-- Dependencies: 1102 1102 6
 -- Name: _st_crosses(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -812,7 +793,7 @@
 
 --
 -- TOC entry 58 (class 1255 OID 18411)
--- Dependencies: 1099 1099 6
+-- Dependencies: 1099 6 1099
 -- Name: _st_distance(geography, geography, double precision, boolean); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -825,7 +806,7 @@
 
 --
 -- TOC entry 59 (class 1255 OID 18412)
--- Dependencies: 1105 1170 6 1102
+-- Dependencies: 6 1168 1105 1102
 -- Name: _st_dumppoints(geometry, integer[]); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -956,7 +937,7 @@
 
 --
 -- TOC entry 63 (class 1255 OID 18416)
--- Dependencies: 1099 6 1099
+-- Dependencies: 1099 1099 6
 -- Name: _st_expand(geography, double precision); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -969,7 +950,7 @@
 
 --
 -- TOC entry 64 (class 1255 OID 18417)
--- Dependencies: 1102 6 1102
+-- Dependencies: 6 1102 1102
 -- Name: _st_intersects(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -982,7 +963,7 @@
 
 --
 -- TOC entry 65 (class 1255 OID 18418)
--- Dependencies: 1102 6 1102
+-- Dependencies: 6 1102 1102
 -- Name: _st_linecrossingdirection(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -995,7 +976,7 @@
 
 --
 -- TOC entry 66 (class 1255 OID 18419)
--- Dependencies: 1102 6 1102 1102
+-- Dependencies: 1102 1102 1102 6
 -- Name: _st_longestline(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -1008,7 +989,7 @@
 
 --
 -- TOC entry 67 (class 1255 OID 18420)
--- Dependencies: 1102 6 1102
+-- Dependencies: 6 1102 1102
 -- Name: _st_maxdistance(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -1034,7 +1015,7 @@
 
 --
 -- TOC entry 69 (class 1255 OID 18422)
--- Dependencies: 1102 6 1102
+-- Dependencies: 1102 1102 6
 -- Name: _st_overlaps(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -1047,7 +1028,7 @@
 
 --
 -- TOC entry 70 (class 1255 OID 18423)
--- Dependencies: 1099 6 1099
+-- Dependencies: 6 1099 1099
 -- Name: _st_pointoutside(geography); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -1060,7 +1041,7 @@
 
 --
 -- TOC entry 71 (class 1255 OID 18424)
--- Dependencies: 1102 6 1102
+-- Dependencies: 6 1102 1102
 -- Name: _st_touches(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -1073,7 +1054,7 @@
 
 --
 -- TOC entry 72 (class 1255 OID 18425)
--- Dependencies: 1102 6 1102
+-- Dependencies: 6 1102 1102
 -- Name: _st_within(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -1086,7 +1067,7 @@
 
 --
 -- TOC entry 73 (class 1255 OID 18426)
--- Dependencies: 6 1170
+-- Dependencies: 6 1168
 -- Name: addauth(text); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -1126,7 +1107,7 @@
 
 --
 -- TOC entry 74 (class 1255 OID 18427)
--- Dependencies: 1102 6 1102
+-- Dependencies: 6 1102 1102
 -- Name: addbbox(geometry); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -1139,7 +1120,7 @@
 
 --
 -- TOC entry 79 (class 1255 OID 18430)
--- Dependencies: 6 1170
+-- Dependencies: 6 1168
 -- Name: addgeometrycolumn(character varying, character varying, integer, character varying, integer); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -1159,7 +1140,7 @@
 
 --
 -- TOC entry 78 (class 1255 OID 18429)
--- Dependencies: 6 1170
+-- Dependencies: 6 1168
 -- Name: addgeometrycolumn(character varying, character varying, character varying, integer, character varying, integer); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -1179,7 +1160,7 @@
 
 --
 -- TOC entry 77 (class 1255 OID 18428)
--- Dependencies: 6 1170
+-- Dependencies: 6 1168
 -- Name: addgeometrycolumn(character varying, character varying, character varying, character varying, integer, character varying, integer); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -1380,7 +1361,7 @@
 
 --
 -- TOC entry 80 (class 1255 OID 18431)
--- Dependencies: 1102 6 1102 1102
+-- Dependencies: 6 1102 1102 1102
 -- Name: addpoint(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -1393,7 +1374,7 @@
 
 --
 -- TOC entry 81 (class 1255 OID 18432)
--- Dependencies: 1102 6 1102 1102
+-- Dependencies: 6 1102 1102 1102
 -- Name: addpoint(geometry, geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -1419,7 +1400,7 @@
 
 --
 -- TOC entry 82 (class 1255 OID 18433)
--- Dependencies: 6 1102 1102
+-- Dependencies: 1102 1102 6
 -- Name: affine(geometry, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision, double precision); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -1432,7 +1413,7 @@
 
 --
 -- TOC entry 84 (class 1255 OID 18435)
--- Dependencies: 6 1102
+-- Dependencies: 1102 6
 -- Name: area(geometry); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -1445,7 +1426,7 @@
 
 --
 -- TOC entry 85 (class 1255 OID 18436)
--- Dependencies: 6 1102
+-- Dependencies: 1102 6
 -- Name: area2d(geometry); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -1471,7 +1452,7 @@
 
 --
 -- TOC entry 87 (class 1255 OID 18438)
--- Dependencies: 6 1102
+-- Dependencies: 1102 6
 -- Name: asbinary(geometry, text); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -1484,20 +1465,20 @@
 
 --
 -- TOC entry 88 (class 1255 OID 18439)
+-- Dependencies: 6 1102
+-- Name: asewkb(geometry); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION asewkb(geometry) RETURNS bytea
+    LANGUAGE c IMMUTABLE STRICT
+    AS '$libdir/postgis-1.5', 'WKBFromLWGEOM';
+
+
+ALTER FUNCTION public.asewkb(geometry) OWNER TO postgres;
+
+--
+-- TOC entry 89 (class 1255 OID 18440)
 -- Dependencies: 1102 6
--- Name: asewkb(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION asewkb(geometry) RETURNS bytea
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'WKBFromLWGEOM';
-
-
-ALTER FUNCTION public.asewkb(geometry) OWNER TO postgres;
-
---
--- TOC entry 89 (class 1255 OID 18440)
--- Dependencies: 6 1102
 -- Name: asewkb(geometry, text); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -1549,33 +1530,33 @@
 
 --
 -- TOC entry 93 (class 1255 OID 18444)
+-- Dependencies: 6 1102
+-- Name: ashexewkb(geometry); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION ashexewkb(geometry) RETURNS text
+    LANGUAGE c IMMUTABLE STRICT
+    AS '$libdir/postgis-1.5', 'LWGEOM_asHEXEWKB';
+
+
+ALTER FUNCTION public.ashexewkb(geometry) OWNER TO postgres;
+
+--
+-- TOC entry 94 (class 1255 OID 18445)
 -- Dependencies: 1102 6
--- Name: ashexewkb(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION ashexewkb(geometry) RETURNS text
+-- Name: ashexewkb(geometry, text); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION ashexewkb(geometry, text) RETURNS text
     LANGUAGE c IMMUTABLE STRICT
     AS '$libdir/postgis-1.5', 'LWGEOM_asHEXEWKB';
 
 
-ALTER FUNCTION public.ashexewkb(geometry) OWNER TO postgres;
-
---
--- TOC entry 94 (class 1255 OID 18445)
--- Dependencies: 6 1102
--- Name: ashexewkb(geometry, text); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION ashexewkb(geometry, text) RETURNS text
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'LWGEOM_asHEXEWKB';
-
-
 ALTER FUNCTION public.ashexewkb(geometry, text) OWNER TO postgres;
 
 --
 -- TOC entry 96 (class 1255 OID 18447)
--- Dependencies: 6 1102
+-- Dependencies: 1102 6
 -- Name: askml(geometry); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -1588,7 +1569,7 @@
 
 --
 -- TOC entry 95 (class 1255 OID 18446)
--- Dependencies: 6 1102
+-- Dependencies: 1102 6
 -- Name: askml(geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -1601,59 +1582,59 @@
 
 --
 -- TOC entry 97 (class 1255 OID 18448)
+-- Dependencies: 6 1102
+-- Name: askml(integer, geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION askml(integer, geometry, integer) RETURNS text
+    LANGUAGE sql IMMUTABLE STRICT
+    AS $_$SELECT _ST_AsKML($1, transform($2,4326), $3)$_$;
+
+
+ALTER FUNCTION public.askml(integer, geometry, integer) OWNER TO postgres;
+
+--
+-- TOC entry 100 (class 1255 OID 18451)
+-- Dependencies: 6 1102
+-- Name: assvg(geometry); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION assvg(geometry) RETURNS text
+    LANGUAGE c IMMUTABLE STRICT
+    AS '$libdir/postgis-1.5', 'assvg_geometry';
+
+
+ALTER FUNCTION public.assvg(geometry) OWNER TO postgres;
+
+--
+-- TOC entry 99 (class 1255 OID 18450)
+-- Dependencies: 6 1102
+-- Name: assvg(geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION assvg(geometry, integer) RETURNS text
+    LANGUAGE c IMMUTABLE STRICT
+    AS '$libdir/postgis-1.5', 'assvg_geometry';
+
+
+ALTER FUNCTION public.assvg(geometry, integer) OWNER TO postgres;
+
+--
+-- TOC entry 98 (class 1255 OID 18449)
+-- Dependencies: 6 1102
+-- Name: assvg(geometry, integer, integer); Type: FUNCTION; Schema: public; Owner: postgres
+--
+
+CREATE FUNCTION assvg(geometry, integer, integer) RETURNS text
+    LANGUAGE c IMMUTABLE STRICT
+    AS '$libdir/postgis-1.5', 'assvg_geometry';
+
+
+ALTER FUNCTION public.assvg(geometry, integer, integer) OWNER TO postgres;
+
+--
+-- TOC entry 101 (class 1255 OID 18452)
 -- Dependencies: 1102 6
--- Name: askml(integer, geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION askml(integer, geometry, integer) RETURNS text
-    LANGUAGE sql IMMUTABLE STRICT
-    AS $_$SELECT _ST_AsKML($1, transform($2,4326), $3)$_$;
-
-
-ALTER FUNCTION public.askml(integer, geometry, integer) OWNER TO postgres;
-
---
--- TOC entry 100 (class 1255 OID 18451)
--- Dependencies: 1102 6
--- Name: assvg(geometry); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION assvg(geometry) RETURNS text
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'assvg_geometry';
-
-
-ALTER FUNCTION public.assvg(geometry) OWNER TO postgres;
-
---
--- TOC entry 99 (class 1255 OID 18450)
--- Dependencies: 6 1102
--- Name: assvg(geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION assvg(geometry, integer) RETURNS text
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'assvg_geometry';
-
-
-ALTER FUNCTION public.assvg(geometry, integer) OWNER TO postgres;
-
---
--- TOC entry 98 (class 1255 OID 18449)
--- Dependencies: 6 1102
--- Name: assvg(geometry, integer, integer); Type: FUNCTION; Schema: public; Owner: postgres
---
-
-CREATE FUNCTION assvg(geometry, integer, integer) RETURNS text
-    LANGUAGE c IMMUTABLE STRICT
-    AS '$libdir/postgis-1.5', 'assvg_geometry';
-
-
-ALTER FUNCTION public.assvg(geometry, integer, integer) OWNER TO postgres;
-
---
--- TOC entry 101 (class 1255 OID 18452)
--- Dependencies: 6 1102
 -- Name: astext(geometry); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -1679,7 +1660,7 @@
 
 --
 -- TOC entry 103 (class 1255 OID 18454)
--- Dependencies: 1170 1102 6
+-- Dependencies: 1102 1168 6
 -- Name: bdmpolyfromtext(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -1710,7 +1691,7 @@
 
 --
 -- TOC entry 75 (class 1255 OID 18455)
--- Dependencies: 1170 1102 6
+-- Dependencies: 6 1168 1102
 -- Name: bdpolyfromtext(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -1746,7 +1727,7 @@
 
 --
 -- TOC entry 76 (class 1255 OID 18456)
--- Dependencies: 1102 6 1102
+-- Dependencies: 6 1102 1102
 -- Name: boundary(geometry); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -1759,7 +1740,7 @@
 
 --
 -- TOC entry 104 (class 1255 OID 18457)
--- Dependencies: 1102 6
+-- Dependencies: 6 1102
 -- Name: box(geometry); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -1772,7 +1753,7 @@
 
 --
 -- TOC entry 105 (class 1255 OID 18458)
--- Dependencies: 1090 6
+-- Dependencies: 6 1090
 -- Name: box(box3d); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -1785,7 +1766,7 @@
 
 --
 -- TOC entry 106 (class 1255 OID 18459)
--- Dependencies: 1093 1087 6
+-- Dependencies: 6 1087 1093
 -- Name: box2d(box3d_extent); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -1798,7 +1779,7 @@
 
 --
 -- TOC entry 107 (class 1255 OID 18460)
--- Dependencies: 1102 1087 6
+-- Dependencies: 6 1087 1102
 -- Name: box2d(geometry); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -1837,7 +1818,7 @@
 
 --
 -- TOC entry 110 (class 1255 OID 18463)
--- Dependencies: 1087 6 1090
+-- Dependencies: 6 1090 1087
 -- Name: box3d(box2d); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -1850,7 +1831,7 @@
 
 --
 -- TOC entry 111 (class 1255 OID 18464)
--- Dependencies: 1090 6 1093
+-- Dependencies: 6 1090 1093
 -- Name: box3d_extent(box3d_extent); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -1876,7 +1857,7 @@
 
 --
 -- TOC entry 113 (class 1255 OID 18466)
--- Dependencies: 1102 6 1102
+-- Dependencies: 6 1102 1102
 -- Name: buffer(geometry, double precision); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -1889,7 +1870,7 @@
 
 --
 -- TOC entry 114 (class 1255 OID 18467)
--- Dependencies: 1102 6 1102
+-- Dependencies: 6 1102 1102
 -- Name: buffer(geometry, double precision, integer); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -1902,7 +1883,7 @@
 
 --
 -- TOC entry 115 (class 1255 OID 18468)
--- Dependencies: 1102 6 1102
+-- Dependencies: 6 1102 1102
 -- Name: buildarea(geometry); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -1954,7 +1935,7 @@
 
 --
 -- TOC entry 118 (class 1255 OID 18471)
--- Dependencies: 1170 6
+-- Dependencies: 6 1168
 -- Name: checkauth(text, text, text); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -2003,7 +1984,7 @@
 
 --
 -- TOC entry 121 (class 1255 OID 18474)
--- Dependencies: 1102 1102 6 1102
+-- Dependencies: 6 1102 1102 1102
 -- Name: collect(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -2016,7 +1997,7 @@
 
 --
 -- TOC entry 122 (class 1255 OID 18475)
--- Dependencies: 1102 1087 1087 6
+-- Dependencies: 6 1087 1087 1102
 -- Name: combine_bbox(box2d, geometry); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -2029,7 +2010,7 @@
 
 --
 -- TOC entry 123 (class 1255 OID 18476)
--- Dependencies: 6 1093 1102 1093
+-- Dependencies: 6 1093 1093 1102
 -- Name: combine_bbox(box3d_extent, geometry); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -2042,7 +2023,7 @@
 
 --
 -- TOC entry 124 (class 1255 OID 18477)
--- Dependencies: 6 1102 1090 1090
+-- Dependencies: 6 1090 1090 1102
 -- Name: combine_bbox(box3d, geometry); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -2055,7 +2036,7 @@
 
 --
 -- TOC entry 125 (class 1255 OID 18478)
--- Dependencies: 1096 6
+-- Dependencies: 6 1096
 -- Name: compression(chip); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -2068,7 +2049,7 @@
 
 --
 -- TOC entry 126 (class 1255 OID 18479)
--- Dependencies: 1102 1102 6
+-- Dependencies: 6 1102 1102
 -- Name: contains(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -2081,7 +2062,7 @@
 
 --
 -- TOC entry 127 (class 1255 OID 18480)
--- Dependencies: 1102 1102 6
+-- Dependencies: 6 1102 1102
 -- Name: convexhull(geometry); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -2120,7 +2101,7 @@
 
 --
 -- TOC entry 130 (class 1255 OID 18483)
--- Dependencies: 1102 1102 6 1102
+-- Dependencies: 6 1102 1102 1102
 -- Name: difference(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -2133,7 +2114,7 @@
 
 --
 -- TOC entry 131 (class 1255 OID 18484)
--- Dependencies: 1102 6
+-- Dependencies: 6 1102
 -- Name: dimension(geometry); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -2146,7 +2127,7 @@
 
 --
 -- TOC entry 132 (class 1255 OID 18485)
--- Dependencies: 1170 6
+-- Dependencies: 6 1168
 -- Name: disablelongtransactions(); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -2192,7 +2173,7 @@
 
 --
 -- TOC entry 133 (class 1255 OID 18486)
--- Dependencies: 1102 6 1102
+-- Dependencies: 6 1102 1102
 -- Name: disjoint(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -2205,7 +2186,7 @@
 
 --
 -- TOC entry 134 (class 1255 OID 18487)
--- Dependencies: 1102 6 1102
+-- Dependencies: 6 1102 1102
 -- Name: distance(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -2218,7 +2199,7 @@
 
 --
 -- TOC entry 135 (class 1255 OID 18488)
--- Dependencies: 1102 6 1102
+-- Dependencies: 6 1102 1102
 -- Name: distance_sphere(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -2244,7 +2225,7 @@
 
 --
 -- TOC entry 137 (class 1255 OID 18490)
--- Dependencies: 1102 6 1102
+-- Dependencies: 6 1102 1102
 -- Name: dropbbox(geometry); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -2257,7 +2238,7 @@
 
 --
 -- TOC entry 140 (class 1255 OID 18493)
--- Dependencies: 6 1170
+-- Dependencies: 6 1168
 -- Name: dropgeometrycolumn(character varying, character varying); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -2277,7 +2258,7 @@
 
 --
 -- TOC entry 139 (class 1255 OID 18492)
--- Dependencies: 6 1170
+-- Dependencies: 6 1168
 -- Name: dropgeometrycolumn(character varying, character varying, character varying); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -2297,7 +2278,7 @@
 
 --
 -- TOC entry 138 (class 1255 OID 18491)
--- Dependencies: 6 1170
+-- Dependencies: 6 1168
 -- Name: dropgeometrycolumn(character varying, character varying, character varying, character varying); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -2391,7 +2372,7 @@
 
 --
 -- TOC entry 141 (class 1255 OID 18494)
--- Dependencies: 1170 6
+-- Dependencies: 6 1168
 -- Name: dropgeometrytable(character varying, character varying, character varying); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -2435,7 +2416,7 @@
 
 --
 -- TOC entry 144 (class 1255 OID 18497)
--- Dependencies: 6 1102 1105
+-- Dependencies: 6 1105 1102
 -- Name: dump(geometry); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -2448,7 +2429,7 @@
 
 --
 -- TOC entry 145 (class 1255 OID 18498)
--- Dependencies: 1105 6 1102
+-- Dependencies: 6 1105 1102
 -- Name: dumprings(geometry); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -2461,7 +2442,7 @@
 
 --
 -- TOC entry 146 (class 1255 OID 18499)
--- Dependencies: 1170 6
+-- Dependencies: 6 1168
 -- Name: enablelongtransactions(); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -2535,7 +2516,7 @@
 
 --
 -- TOC entry 148 (class 1255 OID 18501)
--- Dependencies: 1102 6 1102
+-- Dependencies: 6 1102 1102
 -- Name: envelope(geometry); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -2574,7 +2555,7 @@
 
 --
 -- TOC entry 150 (class 1255 OID 18503)
--- Dependencies: 1087 6
+-- Dependencies: 6 1087
 -- Name: estimated_extent(text, text, text); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -2587,7 +2568,7 @@
 
 --
 -- TOC entry 152 (class 1255 OID 18505)
--- Dependencies: 1090 6 1090
+-- Dependencies: 6 1090 1090
 -- Name: expand(box3d, double precision); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -2600,7 +2581,7 @@
 
 --
 -- TOC entry 153 (class 1255 OID 18506)
--- Dependencies: 1087 1087 6
+-- Dependencies: 6 1087 1087
 -- Name: expand(box2d, double precision); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -2639,7 +2620,7 @@
 
 --
 -- TOC entry 156 (class 1255 OID 18509)
--- Dependencies: 1096 6
+-- Dependencies: 6 1096
 -- Name: factor(chip); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -2652,7 +2633,7 @@
 
 --
 -- TOC entry 158 (class 1255 OID 18511)
--- Dependencies: 1087 6 1170
+-- Dependencies: 6 1168 1087
 -- Name: find_extent(text, text); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -2676,7 +2657,7 @@
 
 --
 -- TOC entry 157 (class 1255 OID 18510)
--- Dependencies: 6 1170 1087
+-- Dependencies: 6 1168 1087
 -- Name: find_extent(text, text, text); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -2701,7 +2682,7 @@
 
 --
 -- TOC entry 159 (class 1255 OID 18512)
--- Dependencies: 1170 6
+-- Dependencies: 6 1168
 -- Name: find_srid(character varying, character varying, character varying); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -2747,7 +2728,7 @@
 
 --
 -- TOC entry 160 (class 1255 OID 18513)
--- Dependencies: 1170 6
+-- Dependencies: 6 1168
 -- Name: fix_geometry_columns(); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -2813,7 +2794,7 @@
 
 --
 -- TOC entry 161 (class 1255 OID 18514)
--- Dependencies: 1102 1102 6
+-- Dependencies: 6 1102 1102
 -- Name: force_2d(geometry); Type: FUNCTION; Schema: public; Owner: postgres
 --
 
@@ -2826,7 +2807,7 @@
 
 --
 -- TOC entry 162 (class 1255 OID 18515)
--- Dependencies: 1102 6 1102
+-- Dependencies: 6 1102 1102
 -- Name: forc