Fix service alerts code standards
Fix service alerts code standards

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>)
, 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
and Windows Phone 7 (<a href="http://www.windowsphone.com/en-AU/apps/d840375e-429c-4aa4-a358-80eec6ea9e66">TransHub Canberra by Soul Solutions</a>) 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_timingdeltas,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,INSERT,UPDATE ON TABLE servicealerts_alerts,servicealerts_informed TO transitdata;"
  #psql -d transitdata -c "GRANT USAGE,SELECT ON SEQUENCE servicealerts_alerts_id_seq 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-11 23:16:11 -- 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 1168 (class 2612 OID 11574) -- TOC entry 1168 (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: 6 15 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: 6 21 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 23 22 -- 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;
   
-- --
-- TOC entry 1097 (class 0 OID 0) -- TOC entry 1097 (class 0 OID 0)
-- Name: chip; Type: SHELL TYPE; Schema: public; Owner: postgres -- Name: chip; Type: SHELL TYPE; Schema: public; Owner: postgres
-- --
   
CREATE TYPE chip; CREATE TYPE chip;
   
   
-- --
-- TOC entry 24 (class 1255 OID 18363) -- TOC entry 24 (class 1255 OID 18363)
-- Dependencies: 6 1097 -- Dependencies: 6 1097
-- Name: chip_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres -- Name: chip_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION chip_in(cstring) RETURNS chip CREATE FUNCTION chip_in(cstring) RETURNS chip
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'CHIP_in'; AS '$libdir/postgis-1.5', 'CHIP_in';
   
   
ALTER FUNCTION public.chip_in(cstring) OWNER TO postgres; ALTER FUNCTION public.chip_in(cstring) OWNER TO postgres;
   
-- --
-- TOC entry 25 (class 1255 OID 18364) -- TOC entry 25 (class 1255 OID 18364)
-- Dependencies: 6 1097 -- Dependencies: 6 1097
-- Name: chip_out(chip); Type: FUNCTION; Schema: public; Owner: postgres -- Name: chip_out(chip); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION chip_out(chip) RETURNS cstring CREATE FUNCTION chip_out(chip) RETURNS cstring
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'CHIP_out'; AS '$libdir/postgis-1.5', 'CHIP_out';
   
   
ALTER FUNCTION public.chip_out(chip) OWNER TO postgres; ALTER FUNCTION public.chip_out(chip) OWNER TO postgres;
   
-- --
-- TOC entry 1096 (class 1247 OID 18362) -- TOC entry 1096 (class 1247 OID 18362)
-- Dependencies: 6 25 24 -- Dependencies: 6 25 24
-- Name: chip; Type: TYPE; Schema: public; Owner: postgres -- Name: chip; Type: TYPE; Schema: public; Owner: postgres
-- --
   
CREATE TYPE chip ( CREATE TYPE chip (
INTERNALLENGTH = variable, INTERNALLENGTH = variable,
INPUT = chip_in, INPUT = chip_in,
OUTPUT = chip_out, OUTPUT = chip_out,
ALIGNMENT = double, ALIGNMENT = double,
STORAGE = extended STORAGE = extended
); );
   
   
ALTER TYPE public.chip OWNER TO postgres; ALTER TYPE public.chip OWNER TO postgres;
   
-- --
-- TOC entry 1100 (class 0 OID 0) -- TOC entry 1100 (class 0 OID 0)
-- Name: geography; Type: SHELL TYPE; Schema: public; Owner: postgres -- Name: geography; Type: SHELL TYPE; Schema: public; Owner: postgres
-- --
   
CREATE TYPE geography; CREATE TYPE geography;
   
   
-- --
-- TOC entry 26 (class 1255 OID 18367) -- TOC entry 26 (class 1255 OID 18367)
-- Dependencies: 6 -- Dependencies: 6
-- Name: geography_analyze(internal); Type: FUNCTION; Schema: public; Owner: postgres -- Name: geography_analyze(internal); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION geography_analyze(internal) RETURNS boolean CREATE FUNCTION geography_analyze(internal) RETURNS boolean
LANGUAGE c STRICT LANGUAGE c STRICT
AS '$libdir/postgis-1.5', 'geography_analyze'; AS '$libdir/postgis-1.5', 'geography_analyze';
   
   
ALTER FUNCTION public.geography_analyze(internal) OWNER TO postgres; ALTER FUNCTION public.geography_analyze(internal) OWNER TO postgres;
   
-- --
-- TOC entry 27 (class 1255 OID 18368) -- TOC entry 27 (class 1255 OID 18368)
-- Dependencies: 6 1100 -- Dependencies: 6 1100
-- Name: geography_in(cstring, oid, integer); Type: FUNCTION; Schema: public; Owner: postgres -- Name: geography_in(cstring, oid, integer); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION geography_in(cstring, oid, integer) RETURNS geography CREATE FUNCTION geography_in(cstring, oid, integer) RETURNS geography
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'geography_in'; AS '$libdir/postgis-1.5', 'geography_in';
   
   
ALTER FUNCTION public.geography_in(cstring, oid, integer) OWNER TO postgres; ALTER FUNCTION public.geography_in(cstring, oid, integer) OWNER TO postgres;
   
-- --
-- TOC entry 28 (class 1255 OID 18369) -- TOC entry 28 (class 1255 OID 18369)
-- Dependencies: 6 1100 -- Dependencies: 6 1100
-- Name: geography_out(geography); Type: FUNCTION; Schema: public; Owner: postgres -- Name: geography_out(geography); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION geography_out(geography) RETURNS cstring CREATE FUNCTION geography_out(geography) RETURNS cstring
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'geography_out'; AS '$libdir/postgis-1.5', 'geography_out';
   
   
ALTER FUNCTION public.geography_out(geography) OWNER TO postgres; ALTER FUNCTION public.geography_out(geography) OWNER TO postgres;
   
-- --
-- TOC entry 29 (class 1255 OID 18370) -- TOC entry 29 (class 1255 OID 18370)
-- Dependencies: 6 -- Dependencies: 6
-- Name: geography_typmod_in(cstring[]); Type: FUNCTION; Schema: public; Owner: postgres -- Name: geography_typmod_in(cstring[]); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION geography_typmod_in(cstring[]) RETURNS integer CREATE FUNCTION geography_typmod_in(cstring[]) RETURNS integer
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'geography_typmod_in'; AS '$libdir/postgis-1.5', 'geography_typmod_in';
   
   
ALTER FUNCTION public.geography_typmod_in(cstring[]) OWNER TO postgres; ALTER FUNCTION public.geography_typmod_in(cstring[]) OWNER TO postgres;
   
-- --
-- TOC entry 30 (class 1255 OID 18371) -- TOC entry 30 (class 1255 OID 18371)
-- Dependencies: 6 -- Dependencies: 6
-- Name: geography_typmod_out(integer); Type: FUNCTION; Schema: public; Owner: postgres -- Name: geography_typmod_out(integer); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION geography_typmod_out(integer) RETURNS cstring CREATE FUNCTION geography_typmod_out(integer) RETURNS cstring
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'geography_typmod_out'; AS '$libdir/postgis-1.5', 'geography_typmod_out';
   
   
ALTER FUNCTION public.geography_typmod_out(integer) OWNER TO postgres; ALTER FUNCTION public.geography_typmod_out(integer) OWNER TO postgres;
   
-- --
-- TOC entry 1099 (class 1247 OID 18366) -- TOC entry 1099 (class 1247 OID 18366)
-- Dependencies: 26 6 27 28 29 30 -- Dependencies: 26 6 27 28 29 30
-- Name: geography; Type: TYPE; Schema: public; Owner: postgres -- Name: geography; Type: TYPE; Schema: public; Owner: postgres
-- --
   
CREATE TYPE geography ( CREATE TYPE geography (
INTERNALLENGTH = variable, INTERNALLENGTH = variable,
INPUT = geography_in, INPUT = geography_in,
OUTPUT = geography_out, OUTPUT = geography_out,
TYPMOD_IN = geography_typmod_in, TYPMOD_IN = geography_typmod_in,
TYPMOD_OUT = geography_typmod_out, TYPMOD_OUT = geography_typmod_out,
ANALYZE = geography_analyze, ANALYZE = geography_analyze,
ALIGNMENT = double, ALIGNMENT = double,
STORAGE = main STORAGE = main
); );
   
   
ALTER TYPE public.geography OWNER TO postgres; ALTER TYPE public.geography OWNER TO postgres;
   
-- --
-- TOC entry 1103 (class 0 OID 0) -- TOC entry 1103 (class 0 OID 0)
-- Name: geometry; Type: SHELL TYPE; Schema: public; Owner: postgres -- Name: geometry; Type: SHELL TYPE; Schema: public; Owner: postgres
-- --
   
CREATE TYPE geometry; CREATE TYPE geometry;
   
   
-- --
-- TOC entry 31 (class 1255 OID 18374) -- TOC entry 31 (class 1255 OID 18374)
-- Dependencies: 6 -- Dependencies: 6
-- Name: geometry_analyze(internal); Type: FUNCTION; Schema: public; Owner: postgres -- Name: geometry_analyze(internal); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION geometry_analyze(internal) RETURNS boolean CREATE FUNCTION geometry_analyze(internal) RETURNS boolean
LANGUAGE c STRICT LANGUAGE c STRICT
AS '$libdir/postgis-1.5', 'LWGEOM_analyze'; AS '$libdir/postgis-1.5', 'LWGEOM_analyze';
   
   
ALTER FUNCTION public.geometry_analyze(internal) OWNER TO postgres; ALTER FUNCTION public.geometry_analyze(internal) OWNER TO postgres;
   
-- --
-- TOC entry 32 (class 1255 OID 18375) -- TOC entry 32 (class 1255 OID 18375)
-- Dependencies: 6 1103 -- Dependencies: 6 1103
-- Name: geometry_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres -- Name: geometry_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION geometry_in(cstring) RETURNS geometry CREATE FUNCTION geometry_in(cstring) RETURNS geometry
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'LWGEOM_in'; AS '$libdir/postgis-1.5', 'LWGEOM_in';
   
   
ALTER FUNCTION public.geometry_in(cstring) OWNER TO postgres; ALTER FUNCTION public.geometry_in(cstring) OWNER TO postgres;
   
-- --
-- TOC entry 33 (class 1255 OID 18376) -- TOC entry 33 (class 1255 OID 18376)
-- Dependencies: 6 1103 -- Dependencies: 6 1103
-- Name: geometry_out(geometry); Type: FUNCTION; Schema: public; Owner: postgres -- Name: geometry_out(geometry); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION geometry_out(geometry) RETURNS cstring CREATE FUNCTION geometry_out(geometry) RETURNS cstring
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'LWGEOM_out'; AS '$libdir/postgis-1.5', 'LWGEOM_out';
   
   
ALTER FUNCTION public.geometry_out(geometry) OWNER TO postgres; ALTER FUNCTION public.geometry_out(geometry) OWNER TO postgres;
   
-- --
-- TOC entry 34 (class 1255 OID 18377) -- TOC entry 34 (class 1255 OID 18377)
-- Dependencies: 6 1103 -- Dependencies: 6 1103
-- Name: geometry_recv(internal); Type: FUNCTION; Schema: public; Owner: postgres -- Name: geometry_recv(internal); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION geometry_recv(internal) RETURNS geometry CREATE FUNCTION geometry_recv(internal) RETURNS geometry
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'LWGEOM_recv'; AS '$libdir/postgis-1.5', 'LWGEOM_recv';
   
   
ALTER FUNCTION public.geometry_recv(internal) OWNER TO postgres; ALTER FUNCTION public.geometry_recv(internal) OWNER TO postgres;
   
-- --
-- TOC entry 35 (class 1255 OID 18378) -- TOC entry 35 (class 1255 OID 18378)
-- Dependencies: 6 1103 -- Dependencies: 6 1103
-- Name: geometry_send(geometry); Type: FUNCTION; Schema: public; Owner: postgres -- Name: geometry_send(geometry); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION geometry_send(geometry) RETURNS bytea CREATE FUNCTION geometry_send(geometry) RETURNS bytea
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'LWGEOM_send'; AS '$libdir/postgis-1.5', 'LWGEOM_send';
   
   
ALTER FUNCTION public.geometry_send(geometry) OWNER TO postgres; ALTER FUNCTION public.geometry_send(geometry) OWNER TO postgres;
   
-- --
-- TOC entry 1102 (class 1247 OID 18373) -- TOC entry 1102 (class 1247 OID 18373)
-- Dependencies: 33 34 35 31 6 32 -- Dependencies: 33 34 35 31 6 32
-- Name: geometry; Type: TYPE; Schema: public; Owner: postgres -- Name: geometry; Type: TYPE; Schema: public; Owner: postgres
-- --
   
CREATE TYPE geometry ( CREATE TYPE geometry (
INTERNALLENGTH = variable, INTERNALLENGTH = variable,
INPUT = geometry_in, INPUT = geometry_in,
OUTPUT = geometry_out, OUTPUT = geometry_out,
RECEIVE = geometry_recv, RECEIVE = geometry_recv,
SEND = geometry_send, SEND = geometry_send,
ANALYZE = geometry_analyze, ANALYZE = geometry_analyze,
DELIMITER = ':', DELIMITER = ':',
ALIGNMENT = int4, ALIGNMENT = int4,
STORAGE = main STORAGE = main
); );
   
   
ALTER TYPE public.geometry OWNER TO postgres; ALTER TYPE public.geometry OWNER TO postgres;
   
-- --
-- TOC entry 1105 (class 1247 OID 18382) -- TOC entry 1105 (class 1247 OID 18382)
-- Dependencies: 6 2408 -- Dependencies: 6 2408
-- Name: geometry_dump; Type: TYPE; Schema: public; Owner: postgres -- Name: geometry_dump; Type: TYPE; Schema: public; Owner: postgres
-- --
   
CREATE TYPE geometry_dump AS ( CREATE TYPE geometry_dump AS (
path integer[], path integer[],
geom geometry geom geometry
); );
   
   
ALTER TYPE public.geometry_dump OWNER TO postgres; ALTER TYPE public.geometry_dump OWNER TO postgres;
   
-- --
-- TOC entry 1108 (class 0 OID 0) -- TOC entry 1108 (class 0 OID 0)
-- Name: gidx; Type: SHELL TYPE; Schema: public; Owner: postgres -- Name: gidx; Type: SHELL TYPE; Schema: public; Owner: postgres
-- --
   
CREATE TYPE gidx; CREATE TYPE gidx;
   
   
-- --
-- TOC entry 36 (class 1255 OID 18384) -- TOC entry 36 (class 1255 OID 18384)
-- Dependencies: 6 1108 -- Dependencies: 6 1108
-- Name: gidx_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres -- Name: gidx_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION gidx_in(cstring) RETURNS gidx CREATE FUNCTION gidx_in(cstring) RETURNS gidx
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'gidx_in'; AS '$libdir/postgis-1.5', 'gidx_in';
   
   
ALTER FUNCTION public.gidx_in(cstring) OWNER TO postgres; ALTER FUNCTION public.gidx_in(cstring) OWNER TO postgres;
   
-- --
-- TOC entry 37 (class 1255 OID 18385) -- TOC entry 37 (class 1255 OID 18385)
-- Dependencies: 6 1108 -- Dependencies: 6 1108
-- Name: gidx_out(gidx); Type: FUNCTION; Schema: public; Owner: postgres -- Name: gidx_out(gidx); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION gidx_out(gidx) RETURNS cstring CREATE FUNCTION gidx_out(gidx) RETURNS cstring
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'gidx_out'; AS '$libdir/postgis-1.5', 'gidx_out';
   
   
ALTER FUNCTION public.gidx_out(gidx) OWNER TO postgres; ALTER FUNCTION public.gidx_out(gidx) OWNER TO postgres;
   
-- --
-- TOC entry 1107 (class 1247 OID 18383) -- TOC entry 1107 (class 1247 OID 18383)
-- Dependencies: 37 36 6 -- Dependencies: 37 36 6
-- Name: gidx; Type: TYPE; Schema: public; Owner: postgres -- Name: gidx; Type: TYPE; Schema: public; Owner: postgres
-- --
   
CREATE TYPE gidx ( CREATE TYPE gidx (
INTERNALLENGTH = variable, INTERNALLENGTH = variable,
INPUT = gidx_in, INPUT = gidx_in,
OUTPUT = gidx_out, OUTPUT = gidx_out,
ALIGNMENT = double, ALIGNMENT = double,
STORAGE = plain STORAGE = plain
); );
   
   
ALTER TYPE public.gidx OWNER TO postgres; ALTER TYPE public.gidx OWNER TO postgres;
   
-- --
-- TOC entry 1111 (class 0 OID 0) -- TOC entry 1111 (class 0 OID 0)
-- Name: pgis_abs; Type: SHELL TYPE; Schema: public; Owner: postgres -- Name: pgis_abs; Type: SHELL TYPE; Schema: public; Owner: postgres
-- --
   
CREATE TYPE pgis_abs; CREATE TYPE pgis_abs;
   
   
-- --
-- TOC entry 38 (class 1255 OID 18388) -- TOC entry 38 (class 1255 OID 18388)
-- Dependencies: 6 1111 -- Dependencies: 6 1111
-- Name: pgis_abs_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres -- Name: pgis_abs_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION pgis_abs_in(cstring) RETURNS pgis_abs CREATE FUNCTION pgis_abs_in(cstring) RETURNS pgis_abs
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'pgis_abs_in'; AS '$libdir/postgis-1.5', 'pgis_abs_in';
   
   
ALTER FUNCTION public.pgis_abs_in(cstring) OWNER TO postgres; ALTER FUNCTION public.pgis_abs_in(cstring) OWNER TO postgres;
   
-- --
-- TOC entry 39 (class 1255 OID 18389) -- TOC entry 39 (class 1255 OID 18389)
-- Dependencies: 6 1111 -- Dependencies: 6 1111
-- Name: pgis_abs_out(pgis_abs); Type: FUNCTION; Schema: public; Owner: postgres -- Name: pgis_abs_out(pgis_abs); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION pgis_abs_out(pgis_abs) RETURNS cstring CREATE FUNCTION pgis_abs_out(pgis_abs) RETURNS cstring
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'pgis_abs_out'; AS '$libdir/postgis-1.5', 'pgis_abs_out';
   
   
ALTER FUNCTION public.pgis_abs_out(pgis_abs) OWNER TO postgres; ALTER FUNCTION public.pgis_abs_out(pgis_abs) OWNER TO postgres;
   
-- --
-- TOC entry 1110 (class 1247 OID 18387) -- TOC entry 1110 (class 1247 OID 18387)
-- Dependencies: 38 6 39 -- Dependencies: 38 6 39
-- Name: pgis_abs; Type: TYPE; Schema: public; Owner: postgres -- Name: pgis_abs; Type: TYPE; Schema: public; Owner: postgres
-- --
   
CREATE TYPE pgis_abs ( CREATE TYPE pgis_abs (
INTERNALLENGTH = 8, INTERNALLENGTH = 8,
INPUT = pgis_abs_in, INPUT = pgis_abs_in,
OUTPUT = pgis_abs_out, OUTPUT = pgis_abs_out,
ALIGNMENT = double, ALIGNMENT = double,
STORAGE = plain STORAGE = plain
); );
   
   
ALTER TYPE public.pgis_abs OWNER TO postgres; ALTER TYPE public.pgis_abs OWNER TO postgres;
   
-- --
-- TOC entry 1114 (class 0 OID 0) -- TOC entry 1114 (class 0 OID 0)
-- Name: spheroid; Type: SHELL TYPE; Schema: public; Owner: postgres -- Name: spheroid; Type: SHELL TYPE; Schema: public; Owner: postgres
-- --
   
CREATE TYPE spheroid; CREATE TYPE spheroid;
   
   
-- --
-- TOC entry 40 (class 1255 OID 18392) -- TOC entry 40 (class 1255 OID 18392)
-- Dependencies: 6 1114 -- Dependencies: 6 1114
-- Name: spheroid_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres -- Name: spheroid_in(cstring); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION spheroid_in(cstring) RETURNS spheroid CREATE FUNCTION spheroid_in(cstring) RETURNS spheroid
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'ellipsoid_in'; AS '$libdir/postgis-1.5', 'ellipsoid_in';
   
   
ALTER FUNCTION public.spheroid_in(cstring) OWNER TO postgres; ALTER FUNCTION public.spheroid_in(cstring) OWNER TO postgres;
   
-- --
-- TOC entry 41 (class 1255 OID 18393) -- TOC entry 41 (class 1255 OID 18393)
-- Dependencies: 6 1114 -- Dependencies: 6 1114
-- Name: spheroid_out(spheroid); Type: FUNCTION; Schema: public; Owner: postgres -- Name: spheroid_out(spheroid); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION spheroid_out(spheroid) RETURNS cstring CREATE FUNCTION spheroid_out(spheroid) RETURNS cstring
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'ellipsoid_out'; AS '$libdir/postgis-1.5', 'ellipsoid_out';
   
   
ALTER FUNCTION public.spheroid_out(spheroid) OWNER TO postgres; ALTER FUNCTION public.spheroid_out(spheroid) OWNER TO postgres;
   
-- --
-- TOC entry 1113 (class 1247 OID 18391) -- TOC entry 1113 (class 1247 OID 18391)
-- Dependencies: 41 6 40 -- Dependencies: 41 6 40
-- Name: spheroid; Type: TYPE; Schema: public; Owner: postgres -- Name: spheroid; Type: TYPE; Schema: public; Owner: postgres
-- --
   
CREATE TYPE spheroid ( CREATE TYPE spheroid (
INTERNALLENGTH = 65, INTERNALLENGTH = 65,
INPUT = spheroid_in, INPUT = spheroid_in,
OUTPUT = spheroid_out, OUTPUT = spheroid_out,
ALIGNMENT = double, ALIGNMENT = double,
STORAGE = plain STORAGE = plain
); );
   
   
ALTER TYPE public.spheroid OWNER TO postgres; ALTER TYPE public.spheroid OWNER TO postgres;
   
-- --
-- TOC entry 42 (class 1255 OID 18395) -- TOC entry 42 (class 1255 OID 18395)
-- Dependencies: 6 1102 -- Dependencies: 6 1102
-- Name: _st_asgeojson(integer, geometry, integer, integer); Type: FUNCTION; Schema: public; Owner: postgres -- Name: _st_asgeojson(integer, geometry, integer, integer); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION _st_asgeojson(integer, geometry, integer, integer) RETURNS text CREATE FUNCTION _st_asgeojson(integer, geometry, integer, integer) RETURNS text
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'LWGEOM_asGeoJson'; AS '$libdir/postgis-1.5', 'LWGEOM_asGeoJson';
   
   
ALTER FUNCTION public._st_asgeojson(integer, geometry, integer, integer) OWNER TO postgres; ALTER FUNCTION public._st_asgeojson(integer, geometry, integer, integer) OWNER TO postgres;
   
-- --
-- TOC entry 43 (class 1255 OID 18396) -- TOC entry 43 (class 1255 OID 18396)
-- Dependencies: 6 1099 -- Dependencies: 6 1099
-- Name: _st_asgeojson(integer, geography, integer, integer); Type: FUNCTION; Schema: public; Owner: postgres -- Name: _st_asgeojson(integer, geography, integer, integer); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION _st_asgeojson(integer, geography, integer, integer) RETURNS text CREATE FUNCTION _st_asgeojson(integer, geography, integer, integer) RETURNS text
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'geography_as_geojson'; AS '$libdir/postgis-1.5', 'geography_as_geojson';
   
   
ALTER FUNCTION public._st_asgeojson(integer, geography, integer, integer) OWNER TO postgres; ALTER FUNCTION public._st_asgeojson(integer, geography, integer, integer) OWNER TO postgres;
   
-- --
-- TOC entry 44 (class 1255 OID 18397) -- TOC entry 44 (class 1255 OID 18397)
-- Dependencies: 6 1102 -- Dependencies: 6 1102
-- Name: _st_asgml(integer, geometry, integer, integer); Type: FUNCTION; Schema: public; Owner: postgres -- Name: _st_asgml(integer, geometry, integer, integer); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION _st_asgml(integer, geometry, integer, integer) RETURNS text CREATE FUNCTION _st_asgml(integer, geometry, integer, integer) RETURNS text
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'LWGEOM_asGML'; AS '$libdir/postgis-1.5', 'LWGEOM_asGML';
   
   
ALTER FUNCTION public._st_asgml(integer, geometry, integer, integer) OWNER TO postgres; ALTER FUNCTION public._st_asgml(integer, geometry, integer, integer) OWNER TO postgres;
   
-- --
-- TOC entry 45 (class 1255 OID 18398) -- TOC entry 45 (class 1255 OID 18398)
-- Dependencies: 6 1099 -- Dependencies: 6 1099
-- Name: _st_asgml(integer, geography, integer, integer); Type: FUNCTION; Schema: public; Owner: postgres -- Name: _st_asgml(integer, geography, integer, integer); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION _st_asgml(integer, geography, integer, integer) RETURNS text CREATE FUNCTION _st_asgml(integer, geography, integer, integer) RETURNS text
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'geography_as_gml'; AS '$libdir/postgis-1.5', 'geography_as_gml';
   
   
ALTER FUNCTION public._st_asgml(integer, geography, integer, integer) OWNER TO postgres; ALTER FUNCTION public._st_asgml(integer, geography, integer, integer) OWNER TO postgres;
   
-- --
-- TOC entry 46 (class 1255 OID 18399) -- TOC entry 46 (class 1255 OID 18399)
-- Dependencies: 1102 6 -- Dependencies: 1102 6
-- Name: _st_askml(integer, geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres -- Name: _st_askml(integer, geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION _st_askml(integer, geometry, integer) RETURNS text CREATE FUNCTION _st_askml(integer, geometry, integer) RETURNS text
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'LWGEOM_asKML'; AS '$libdir/postgis-1.5', 'LWGEOM_asKML';
   
   
ALTER FUNCTION public._st_askml(integer, geometry, integer) OWNER TO postgres; ALTER FUNCTION public._st_askml(integer, geometry, integer) OWNER TO postgres;
   
-- --
-- TOC entry 47 (class 1255 OID 18400) -- TOC entry 47 (class 1255 OID 18400)
-- Dependencies: 6 1099 -- Dependencies: 6 1099
-- Name: _st_askml(integer, geography, integer); Type: FUNCTION; Schema: public; Owner: postgres -- Name: _st_askml(integer, geography, integer); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION _st_askml(integer, geography, integer) RETURNS text CREATE FUNCTION _st_askml(integer, geography, integer) RETURNS text
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'geography_as_kml'; AS '$libdir/postgis-1.5', 'geography_as_kml';
   
   
ALTER FUNCTION public._st_askml(integer, geography, integer) OWNER TO postgres; ALTER FUNCTION public._st_askml(integer, geography, integer) OWNER TO postgres;
   
-- --
-- TOC entry 49 (class 1255 OID 18402) -- TOC entry 49 (class 1255 OID 18402)
-- Dependencies: 1099 6 -- Dependencies: 1099 6
-- Name: _st_bestsrid(geography); Type: FUNCTION; Schema: public; Owner: postgres -- Name: _st_bestsrid(geography); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION _st_bestsrid(geography) RETURNS integer CREATE FUNCTION _st_bestsrid(geography) RETURNS integer
LANGUAGE sql IMMUTABLE STRICT LANGUAGE sql IMMUTABLE STRICT
AS $_$SELECT _ST_BestSRID($1,$1)$_$; AS $_$SELECT _ST_BestSRID($1,$1)$_$;
   
   
ALTER FUNCTION public._st_bestsrid(geography) OWNER TO postgres; ALTER FUNCTION public._st_bestsrid(geography) OWNER TO postgres;
   
-- --
-- TOC entry 48 (class 1255 OID 18401) -- TOC entry 48 (class 1255 OID 18401)
-- Dependencies: 6 1099 1099 -- Dependencies: 6 1099 1099
-- Name: _st_bestsrid(geography, geography); Type: FUNCTION; Schema: public; Owner: postgres -- Name: _st_bestsrid(geography, geography); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION _st_bestsrid(geography, geography) RETURNS integer CREATE FUNCTION _st_bestsrid(geography, geography) RETURNS integer
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'geography_bestsrid'; AS '$libdir/postgis-1.5', 'geography_bestsrid';
   
   
ALTER FUNCTION public._st_bestsrid(geography, geography) OWNER TO postgres; ALTER FUNCTION public._st_bestsrid(geography, geography) OWNER TO postgres;
   
-- --
-- TOC entry 50 (class 1255 OID 18403) -- TOC entry 50 (class 1255 OID 18403)
-- Dependencies: 1102 6 1102 -- Dependencies: 1102 6 1102
-- Name: _st_buffer(geometry, double precision, cstring); Type: FUNCTION; Schema: public; Owner: postgres -- Name: _st_buffer(geometry, double precision, cstring); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION _st_buffer(geometry, double precision, cstring) RETURNS geometry CREATE FUNCTION _st_buffer(geometry, double precision, cstring) RETURNS geometry
LANGUAGE c IMMUTABLE STRICT COST 100 LANGUAGE c IMMUTABLE STRICT COST 100
AS '$libdir/postgis-1.5', 'buffer'; AS '$libdir/postgis-1.5', 'buffer';
   
   
ALTER FUNCTION public._st_buffer(geometry, double precision, cstring) OWNER TO postgres; ALTER FUNCTION public._st_buffer(geometry, double precision, cstring) OWNER TO postgres;
   
-- --
-- TOC entry 51 (class 1255 OID 18404) -- TOC entry 51 (class 1255 OID 18404)
-- Dependencies: 6 1102 1102 -- Dependencies: 6 1102 1102
-- Name: _st_contains(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres -- Name: _st_contains(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION _st_contains(geometry, geometry) RETURNS boolean CREATE FUNCTION _st_contains(geometry, geometry) RETURNS boolean
LANGUAGE c IMMUTABLE STRICT COST 100 LANGUAGE c IMMUTABLE STRICT COST 100
AS '$libdir/postgis-1.5', 'contains'; AS '$libdir/postgis-1.5', 'contains';
   
   
ALTER FUNCTION public._st_contains(geometry, geometry) OWNER TO postgres; ALTER FUNCTION public._st_contains(geometry, geometry) OWNER TO postgres;
   
-- --
-- TOC entry 52 (class 1255 OID 18405) -- TOC entry 52 (class 1255 OID 18405)
-- Dependencies: 6 1102 1102 -- Dependencies: 6 1102 1102
-- Name: _st_containsproperly(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres -- Name: _st_containsproperly(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION _st_containsproperly(geometry, geometry) RETURNS boolean CREATE FUNCTION _st_containsproperly(geometry, geometry) RETURNS boolean
LANGUAGE c IMMUTABLE STRICT COST 100 LANGUAGE c IMMUTABLE STRICT COST 100
AS '$libdir/postgis-1.5', 'containsproperly'; AS '$libdir/postgis-1.5', 'containsproperly';
   
   
ALTER FUNCTION public._st_containsproperly(geometry, geometry) OWNER TO postgres; ALTER FUNCTION public._st_containsproperly(geometry, geometry) OWNER TO postgres;
   
-- --
-- TOC entry 53 (class 1255 OID 18406) -- TOC entry 53 (class 1255 OID 18406)
-- Dependencies: 6 1102 1102 -- Dependencies: 6 1102 1102
-- Name: _st_coveredby(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres -- Name: _st_coveredby(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION _st_coveredby(geometry, geometry) RETURNS boolean CREATE FUNCTION _st_coveredby(geometry, geometry) RETURNS boolean
LANGUAGE c IMMUTABLE STRICT COST 100 LANGUAGE c IMMUTABLE STRICT COST 100
AS '$libdir/postgis-1.5', 'coveredby'; AS '$libdir/postgis-1.5', 'coveredby';
   
   
ALTER FUNCTION public._st_coveredby(geometry, geometry) OWNER TO postgres; ALTER FUNCTION public._st_coveredby(geometry, geometry) OWNER TO postgres;
   
-- --
-- TOC entry 54 (class 1255 OID 18407) -- TOC entry 54 (class 1255 OID 18407)
-- Dependencies: 1102 1102 6 -- Dependencies: 1102 1102 6
-- Name: _st_covers(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres -- Name: _st_covers(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION _st_covers(geometry, geometry) RETURNS boolean CREATE FUNCTION _st_covers(geometry, geometry) RETURNS boolean
LANGUAGE c IMMUTABLE STRICT COST 100 LANGUAGE c IMMUTABLE STRICT COST 100
AS '$libdir/postgis-1.5', 'covers'; AS '$libdir/postgis-1.5', 'covers';
   
   
ALTER FUNCTION public._st_covers(geometry, geometry) OWNER TO postgres; ALTER FUNCTION public._st_covers(geometry, geometry) OWNER TO postgres;
   
-- --
-- TOC entry 55 (class 1255 OID 18408) -- TOC entry 55 (class 1255 OID 18408)
-- Dependencies: 1099 1099 6 -- Dependencies: 1099 1099 6
-- Name: _st_covers(geography, geography); Type: FUNCTION; Schema: public; Owner: postgres -- Name: _st_covers(geography, geography); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION _st_covers(geography, geography) RETURNS boolean CREATE FUNCTION _st_covers(geography, geography) RETURNS boolean
LANGUAGE c IMMUTABLE STRICT COST 100 LANGUAGE c IMMUTABLE STRICT COST 100
AS '$libdir/postgis-1.5', 'geography_covers'; AS '$libdir/postgis-1.5', 'geography_covers';
   
   
ALTER FUNCTION public._st_covers(geography, geography) OWNER TO postgres; ALTER FUNCTION public._st_covers(geography, geography) OWNER TO postgres;
   
-- --
-- TOC entry 56 (class 1255 OID 18409) -- TOC entry 56 (class 1255 OID 18409)
-- Dependencies: 1102 1102 6 -- Dependencies: 1102 1102 6
-- Name: _st_crosses(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres -- Name: _st_crosses(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION _st_crosses(geometry, geometry) RETURNS boolean CREATE FUNCTION _st_crosses(geometry, geometry) RETURNS boolean
LANGUAGE c IMMUTABLE STRICT COST 100 LANGUAGE c IMMUTABLE STRICT COST 100
AS '$libdir/postgis-1.5', 'crosses'; AS '$libdir/postgis-1.5', 'crosses';
   
   
ALTER FUNCTION public._st_crosses(geometry, geometry) OWNER TO postgres; ALTER FUNCTION public._st_crosses(geometry, geometry) OWNER TO postgres;
   
-- --
-- TOC entry 57 (class 1255 OID 18410) -- TOC entry 57 (class 1255 OID 18410)
-- Dependencies: 1102 6 1102 -- Dependencies: 1102 6 1102
-- Name: _st_dfullywithin(geometry, geometry, double precision); Type: FUNCTION; Schema: public; Owner: postgres -- Name: _st_dfullywithin(geometry, geometry, double precision); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION _st_dfullywithin(geometry, geometry, double precision) RETURNS boolean CREATE FUNCTION _st_dfullywithin(geometry, geometry, double precision) RETURNS boolean
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'LWGEOM_dfullywithin'; AS '$libdir/postgis-1.5', 'LWGEOM_dfullywithin';
   
   
ALTER FUNCTION public._st_dfullywithin(geometry, geometry, double precision) OWNER TO postgres; ALTER FUNCTION public._st_dfullywithin(geometry, geometry, double precision) OWNER TO postgres;
   
-- --
-- TOC entry 58 (class 1255 OID 18411) -- TOC entry 58 (class 1255 OID 18411)
-- Dependencies: 1099 6 1099 -- Dependencies: 1099 6 1099
-- Name: _st_distance(geography, geography, double precision, boolean); Type: FUNCTION; Schema: public; Owner: postgres -- Name: _st_distance(geography, geography, double precision, boolean); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION _st_distance(geography, geography, double precision, boolean) RETURNS double precision CREATE FUNCTION _st_distance(geography, geography, double precision, boolean) RETURNS double precision
LANGUAGE c IMMUTABLE STRICT COST 100 LANGUAGE c IMMUTABLE STRICT COST 100
AS '$libdir/postgis-1.5', 'geography_distance'; AS '$libdir/postgis-1.5', 'geography_distance';
   
   
ALTER FUNCTION public._st_distance(geography, geography, double precision, boolean) OWNER TO postgres; ALTER FUNCTION public._st_distance(geography, geography, double precision, boolean) OWNER TO postgres;
   
-- --
-- TOC entry 59 (class 1255 OID 18412) -- TOC entry 59 (class 1255 OID 18412)
-- Dependencies: 6 1168 1105 1102 -- Dependencies: 6 1168 1105 1102
-- Name: _st_dumppoints(geometry, integer[]); Type: FUNCTION; Schema: public; Owner: postgres -- Name: _st_dumppoints(geometry, integer[]); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION _st_dumppoints(the_geom geometry, cur_path integer[]) RETURNS SETOF geometry_dump CREATE FUNCTION _st_dumppoints(the_geom geometry, cur_path integer[]) RETURNS SETOF geometry_dump
LANGUAGE plpgsql LANGUAGE plpgsql
AS $$ AS $$
DECLARE DECLARE
tmp geometry_dump; tmp geometry_dump;
tmp2 geometry_dump; tmp2 geometry_dump;
nb_points integer; nb_points integer;
nb_geom integer; nb_geom integer;
i integer; i integer;
j integer; j integer;
g geometry; g geometry;
BEGIN BEGIN
RAISE DEBUG '%,%', cur_path, ST_GeometryType(the_geom); RAISE DEBUG '%,%', cur_path, ST_GeometryType(the_geom);
   
-- Special case (MULTI* OR GEOMETRYCOLLECTION) : iterate and return the DumpPoints of the geometries -- Special case (MULTI* OR GEOMETRYCOLLECTION) : iterate and return the DumpPoints of the geometries
SELECT ST_NumGeometries(the_geom) INTO nb_geom; SELECT ST_NumGeometries(the_geom) INTO nb_geom;
   
IF (nb_geom IS NOT NULL) THEN IF (nb_geom IS NOT NULL) THEN
i = 1; i = 1;
FOR tmp2 IN SELECT (ST_Dump(the_geom)).* LOOP FOR tmp2 IN SELECT (ST_Dump(the_geom)).* LOOP
   
FOR tmp IN SELECT * FROM _ST_DumpPoints(tmp2.geom, cur_path || tmp2.path) LOOP FOR tmp IN SELECT * FROM _ST_DumpPoints(tmp2.geom, cur_path || tmp2.path) LOOP
RETURN NEXT tmp; RETURN NEXT tmp;
END LOOP; END LOOP;
i = i + 1; i = i + 1;
END LOOP; END LOOP;
   
RETURN; RETURN;
END IF; END IF;
   
-- Special case (POLYGON) : return the points of the rings of a polygon -- Special case (POLYGON) : return the points of the rings of a polygon
IF (ST_GeometryType(the_geom) = 'ST_Polygon') THEN IF (ST_GeometryType(the_geom) = 'ST_Polygon') THEN
   
FOR tmp IN SELECT * FROM _ST_DumpPoints(ST_ExteriorRing(the_geom), cur_path || ARRAY[1]) LOOP FOR tmp IN SELECT * FROM _ST_DumpPoints(ST_ExteriorRing(the_geom), cur_path || ARRAY[1]) LOOP
RETURN NEXT tmp; RETURN NEXT tmp;
END LOOP; END LOOP;
j := ST_NumInteriorRings(the_geom); j := ST_NumInteriorRings(the_geom);
FOR i IN 1..j LOOP FOR i IN 1..j LOOP
FOR tmp IN SELECT * FROM _ST_DumpPoints(ST_InteriorRingN(the_geom, i), cur_path || ARRAY[i+1]) LOOP FOR tmp IN SELECT * FROM _ST_DumpPoints(ST_InteriorRingN(the_geom, i), cur_path || ARRAY[i+1]) LOOP
RETURN NEXT tmp; RETURN NEXT tmp;
END LOOP; END LOOP;
END LOOP; END LOOP;
RETURN; RETURN;
END IF; END IF;
   
-- Special case (POINT) : return the point -- Special case (POINT) : return the point
IF (ST_GeometryType(the_geom) = 'ST_Point') THEN IF (ST_GeometryType(the_geom) = 'ST_Point') THEN
   
tmp.path = cur_path || ARRAY[1]; tmp.path = cur_path || ARRAY[1];
tmp.geom = the_geom; tmp.geom = the_geom;
   
RETURN NEXT tmp; RETURN NEXT tmp;
RETURN; RETURN;
   
END IF; END IF;
   
   
-- Use ST_NumPoints rather than ST_NPoints to have a NULL value if the_geom isn't -- Use ST_NumPoints rather than ST_NPoints to have a NULL value if the_geom isn't
-- a LINESTRING or CIRCULARSTRING. -- a LINESTRING or CIRCULARSTRING.
SELECT ST_NumPoints(the_geom) INTO nb_points; SELECT ST_NumPoints(the_geom) INTO nb_points;
   
-- This should never happen -- This should never happen
IF (nb_points IS NULL) THEN IF (nb_points IS NULL) THEN
RAISE EXCEPTION 'Unexpected error while dumping geometry %', ST_AsText(the_geom); RAISE EXCEPTION 'Unexpected error while dumping geometry %', ST_AsText(the_geom);
END IF; END IF;
   
FOR i IN 1..nb_points LOOP FOR i IN 1..nb_points LOOP
tmp.path = cur_path || ARRAY[i]; tmp.path = cur_path || ARRAY[i];
tmp.geom := ST_PointN(the_geom, i); tmp.geom := ST_PointN(the_geom, i);
RETURN NEXT tmp; RETURN NEXT tmp;
END LOOP; END LOOP;
END END
$$; $$;
   
   
ALTER FUNCTION public._st_dumppoints(the_geom geometry, cur_path integer[]) OWNER TO postgres; ALTER FUNCTION public._st_dumppoints(the_geom geometry, cur_path integer[]) OWNER TO postgres;
   
-- --
-- TOC entry 60 (class 1255 OID 18413) -- TOC entry 60 (class 1255 OID 18413)
-- Dependencies: 1102 6 1102 -- Dependencies: 1102 6 1102
-- Name: _st_dwithin(geometry, geometry, double precision); Type: FUNCTION; Schema: public; Owner: postgres -- Name: _st_dwithin(geometry, geometry, double precision); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION _st_dwithin(geometry, geometry, double precision) RETURNS boolean CREATE FUNCTION _st_dwithin(geometry, geometry, double precision) RETURNS boolean
LANGUAGE c IMMUTABLE STRICT COST 100 LANGUAGE c IMMUTABLE STRICT COST 100
AS '$libdir/postgis-1.5', 'LWGEOM_dwithin'; AS '$libdir/postgis-1.5', 'LWGEOM_dwithin';
   
   
ALTER FUNCTION public._st_dwithin(geometry, geometry, double precision) OWNER TO postgres; ALTER FUNCTION public._st_dwithin(geometry, geometry, double precision) OWNER TO postgres;
   
-- --
-- TOC entry 61 (class 1255 OID 18414) -- TOC entry 61 (class 1255 OID 18414)
-- Dependencies: 1099 6 1099 -- Dependencies: 1099 6 1099
-- Name: _st_dwithin(geography, geography, double precision, boolean); Type: FUNCTION; Schema: public; Owner: postgres -- Name: _st_dwithin(geography, geography, double precision, boolean); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION _st_dwithin(geography, geography, double precision, boolean) RETURNS boolean CREATE FUNCTION _st_dwithin(geography, geography, double precision, boolean) RETURNS boolean
LANGUAGE c IMMUTABLE STRICT COST 100 LANGUAGE c IMMUTABLE STRICT COST 100
AS '$libdir/postgis-1.5', 'geography_dwithin'; AS '$libdir/postgis-1.5', 'geography_dwithin';
   
   
ALTER FUNCTION public._st_dwithin(geography, geography, double precision, boolean) OWNER TO postgres; ALTER FUNCTION public._st_dwithin(geography, geography, double precision, boolean) OWNER TO postgres;
   
-- --
-- TOC entry 62 (class 1255 OID 18415) -- TOC entry 62 (class 1255 OID 18415)
-- Dependencies: 1102 6 1102 -- Dependencies: 1102 6 1102
-- Name: _st_equals(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres -- Name: _st_equals(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION _st_equals(geometry, geometry) RETURNS boolean CREATE FUNCTION _st_equals(geometry, geometry) RETURNS boolean
LANGUAGE c IMMUTABLE STRICT COST 100 LANGUAGE c IMMUTABLE STRICT COST 100
AS '$libdir/postgis-1.5', 'geomequals'; AS '$libdir/postgis-1.5', 'geomequals';
   
   
ALTER FUNCTION public._st_equals(geometry, geometry) OWNER TO postgres; ALTER FUNCTION public._st_equals(geometry, geometry) OWNER TO postgres;
   
-- --
-- TOC entry 63 (class 1255 OID 18416) -- TOC entry 63 (class 1255 OID 18416)
-- Dependencies: 1099 1099 6 -- Dependencies: 1099 1099 6
-- Name: _st_expand(geography, double precision); Type: FUNCTION; Schema: public; Owner: postgres -- Name: _st_expand(geography, double precision); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION _st_expand(geography, double precision) RETURNS geography CREATE FUNCTION _st_expand(geography, double precision) RETURNS geography
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'geography_expand'; AS '$libdir/postgis-1.5', 'geography_expand';
   
   
ALTER FUNCTION public._st_expand(geography, double precision) OWNER TO postgres; ALTER FUNCTION public._st_expand(geography, double precision) OWNER TO postgres;
   
-- --
-- TOC entry 64 (class 1255 OID 18417) -- TOC entry 64 (class 1255 OID 18417)
-- Dependencies: 6 1102 1102 -- Dependencies: 6 1102 1102
-- Name: _st_intersects(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres -- Name: _st_intersects(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION _st_intersects(geometry, geometry) RETURNS boolean CREATE FUNCTION _st_intersects(geometry, geometry) RETURNS boolean
LANGUAGE c IMMUTABLE STRICT COST 100 LANGUAGE c IMMUTABLE STRICT COST 100
AS '$libdir/postgis-1.5', 'intersects'; AS '$libdir/postgis-1.5', 'intersects';
   
   
ALTER FUNCTION public._st_intersects(geometry, geometry) OWNER TO postgres; ALTER FUNCTION public._st_intersects(geometry, geometry) OWNER TO postgres;
   
-- --
-- TOC entry 65 (class 1255 OID 18418) -- TOC entry 65 (class 1255 OID 18418)
-- Dependencies: 6 1102 1102 -- Dependencies: 6 1102 1102
-- Name: _st_linecrossingdirection(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres -- Name: _st_linecrossingdirection(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION _st_linecrossingdirection(geometry, geometry) RETURNS integer CREATE FUNCTION _st_linecrossingdirection(geometry, geometry) RETURNS integer
LANGUAGE c IMMUTABLE STRICT COST 100 LANGUAGE c IMMUTABLE STRICT COST 100
AS '$libdir/postgis-1.5', 'ST_LineCrossingDirection'; AS '$libdir/postgis-1.5', 'ST_LineCrossingDirection';
   
   
ALTER FUNCTION public._st_linecrossingdirection(geometry, geometry) OWNER TO postgres; ALTER FUNCTION public._st_linecrossingdirection(geometry, geometry) OWNER TO postgres;
   
-- --
-- TOC entry 66 (class 1255 OID 18419) -- TOC entry 66 (class 1255 OID 18419)
-- Dependencies: 1102 1102 1102 6 -- Dependencies: 1102 1102 1102 6
-- Name: _st_longestline(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres -- Name: _st_longestline(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION _st_longestline(geometry, geometry) RETURNS geometry CREATE FUNCTION _st_longestline(geometry, geometry) RETURNS geometry
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'LWGEOM_longestline2d'; AS '$libdir/postgis-1.5', 'LWGEOM_longestline2d';
   
   
ALTER FUNCTION public._st_longestline(geometry, geometry) OWNER TO postgres; ALTER FUNCTION public._st_longestline(geometry, geometry) OWNER TO postgres;
   
-- --
-- TOC entry 67 (class 1255 OID 18420) -- TOC entry 67 (class 1255 OID 18420)
-- Dependencies: 6 1102 1102 -- Dependencies: 6 1102 1102
-- Name: _st_maxdistance(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres -- Name: _st_maxdistance(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION _st_maxdistance(geometry, geometry) RETURNS double precision CREATE FUNCTION _st_maxdistance(geometry, geometry) RETURNS double precision
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'LWGEOM_maxdistance2d_linestring'; AS '$libdir/postgis-1.5', 'LWGEOM_maxdistance2d_linestring';
   
   
ALTER FUNCTION public._st_maxdistance(geometry, geometry) OWNER TO postgres; ALTER FUNCTION public._st_maxdistance(geometry, geometry) OWNER TO postgres;
   
-- --
-- TOC entry 68 (class 1255 OID 18421) -- TOC entry 68 (class 1255 OID 18421)
-- Dependencies: 6 1102 1102 -- Dependencies: 6 1102 1102
-- Name: _st_orderingequals(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres -- Name: _st_orderingequals(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION _st_orderingequals(geometry, geometry) RETURNS boolean CREATE FUNCTION _st_orderingequals(geometry, geometry) RETURNS boolean
LANGUAGE c IMMUTABLE STRICT COST 100 LANGUAGE c IMMUTABLE STRICT COST 100
AS '$libdir/postgis-1.5', 'LWGEOM_same'; AS '$libdir/postgis-1.5', 'LWGEOM_same';
   
   
ALTER FUNCTION public._st_orderingequals(geometry, geometry) OWNER TO postgres; ALTER FUNCTION public._st_orderingequals(geometry, geometry) OWNER TO postgres;
   
-- --
-- TOC entry 69 (class 1255 OID 18422) -- TOC entry 69 (class 1255 OID 18422)
-- Dependencies: 1102 1102 6 -- Dependencies: 1102 1102 6
-- Name: _st_overlaps(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres -- Name: _st_overlaps(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION _st_overlaps(geometry, geometry) RETURNS boolean CREATE FUNCTION _st_overlaps(geometry, geometry) RETURNS boolean
LANGUAGE c IMMUTABLE STRICT COST 100 LANGUAGE c IMMUTABLE STRICT COST 100
AS '$libdir/postgis-1.5', 'overlaps'; AS '$libdir/postgis-1.5', 'overlaps';
   
   
ALTER FUNCTION public._st_overlaps(geometry, geometry) OWNER TO postgres; ALTER FUNCTION public._st_overlaps(geometry, geometry) OWNER TO postgres;
   
-- --
-- TOC entry 70 (class 1255 OID 18423) -- TOC entry 70 (class 1255 OID 18423)
-- Dependencies: 6 1099 1099 -- Dependencies: 6 1099 1099
-- Name: _st_pointoutside(geography); Type: FUNCTION; Schema: public; Owner: postgres -- Name: _st_pointoutside(geography); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION _st_pointoutside(geography) RETURNS geography CREATE FUNCTION _st_pointoutside(geography) RETURNS geography
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'geography_point_outside'; AS '$libdir/postgis-1.5', 'geography_point_outside';
   
   
ALTER FUNCTION public._st_pointoutside(geography) OWNER TO postgres; ALTER FUNCTION public._st_pointoutside(geography) OWNER TO postgres;
   
-- --
-- TOC entry 71 (class 1255 OID 18424) -- TOC entry 71 (class 1255 OID 18424)
-- Dependencies: 6 1102 1102 -- Dependencies: 6 1102 1102
-- Name: _st_touches(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres -- Name: _st_touches(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION _st_touches(geometry, geometry) RETURNS boolean CREATE FUNCTION _st_touches(geometry, geometry) RETURNS boolean
LANGUAGE c IMMUTABLE STRICT COST 100 LANGUAGE c IMMUTABLE STRICT COST 100
AS '$libdir/postgis-1.5', 'touches'; AS '$libdir/postgis-1.5', 'touches';
   
   
ALTER FUNCTION public._st_touches(geometry, geometry) OWNER TO postgres; ALTER FUNCTION public._st_touches(geometry, geometry) OWNER TO postgres;
   
-- --
-- TOC entry 72 (class 1255 OID 18425) -- TOC entry 72 (class 1255 OID 18425)
-- Dependencies: 6 1102 1102 -- Dependencies: 6 1102 1102
-- Name: _st_within(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres -- Name: _st_within(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION _st_within(geometry, geometry) RETURNS boolean CREATE FUNCTION _st_within(geometry, geometry) RETURNS boolean
LANGUAGE c IMMUTABLE STRICT COST 100 LANGUAGE c IMMUTABLE STRICT COST 100
AS '$libdir/postgis-1.5', 'within'; AS '$libdir/postgis-1.5', 'within';
   
   
ALTER FUNCTION public._st_within(geometry, geometry) OWNER TO postgres; ALTER FUNCTION public._st_within(geometry, geometry) OWNER TO postgres;
   
-- --
-- TOC entry 73 (class 1255 OID 18426) -- TOC entry 73 (class 1255 OID 18426)
-- Dependencies: 6 1168 -- Dependencies: 6 1168
-- Name: addauth(text); Type: FUNCTION; Schema: public; Owner: postgres -- Name: addauth(text); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION addauth(text) RETURNS boolean CREATE FUNCTION addauth(text) RETURNS boolean
LANGUAGE plpgsql LANGUAGE plpgsql
AS $_$ AS $_$
DECLARE DECLARE
lockid alias for $1; lockid alias for $1;
okay boolean; okay boolean;
myrec record; myrec record;
BEGIN BEGIN
-- check to see if table exists -- check to see if table exists
-- if not, CREATE TEMP TABLE mylock (transid xid, lockcode text) -- if not, CREATE TEMP TABLE mylock (transid xid, lockcode text)
okay := 'f'; okay := 'f';
FOR myrec IN SELECT * FROM pg_class WHERE relname = 'temp_lock_have_table' LOOP FOR myrec IN SELECT * FROM pg_class WHERE relname = 'temp_lock_have_table' LOOP
okay := 't'; okay := 't';
END LOOP; END LOOP;
IF (okay <> 't') THEN IF (okay <> 't') THEN
CREATE TEMP TABLE temp_lock_have_table (transid xid, lockcode text); CREATE TEMP TABLE temp_lock_have_table (transid xid, lockcode text);
-- this will only work from pgsql7.4 up -- this will only work from pgsql7.4 up
-- ON COMMIT DELETE ROWS; -- ON COMMIT DELETE ROWS;
END IF; END IF;
   
-- INSERT INTO mylock VALUES ( $1) -- INSERT INTO mylock VALUES ( $1)
-- EXECUTE 'INSERT INTO temp_lock_have_table VALUES ( '|| -- EXECUTE 'INSERT INTO temp_lock_have_table VALUES ( '||
-- quote_literal(getTransactionID()) || ',' || -- quote_literal(getTransactionID()) || ',' ||
-- quote_literal(lockid) ||')'; -- quote_literal(lockid) ||')';
   
INSERT INTO temp_lock_have_table VALUES (getTransactionID(), lockid); INSERT INTO temp_lock_have_table VALUES (getTransactionID(), lockid);
   
RETURN true::boolean; RETURN true::boolean;
END; END;
$_$; $_$;
   
   
ALTER FUNCTION public.addauth(text) OWNER TO postgres; ALTER FUNCTION public.addauth(text) OWNER TO postgres;
   
-- --
-- TOC entry 74 (class 1255 OID 18427) -- TOC entry 74 (class 1255 OID 18427)
-- Dependencies: 6 1102 1102 -- Dependencies: 6 1102 1102
-- Name: addbbox(geometry); Type: FUNCTION; Schema: public; Owner: postgres -- Name: addbbox(geometry); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION addbbox(geometry) RETURNS geometry CREATE FUNCTION addbbox(geometry) RETURNS geometry
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'LWGEOM_addBBOX'; AS '$libdir/postgis-1.5', 'LWGEOM_addBBOX';
   
   
ALTER FUNCTION public.addbbox(geometry) OWNER TO postgres; ALTER FUNCTION public.addbbox(geometry) OWNER TO postgres;
   
-- --
-- TOC entry 79 (class 1255 OID 18430) -- TOC entry 79 (class 1255 OID 18430)
-- Dependencies: 6 1168 -- Dependencies: 6 1168
-- Name: addgeometrycolumn(character varying, character varying, integer, character varying, integer); Type: FUNCTION; Schema: public; Owner: postgres -- Name: addgeometrycolumn(character varying, character varying, integer, character varying, integer); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION addgeometrycolumn(character varying, character varying, integer, character varying, integer) RETURNS text CREATE FUNCTION addgeometrycolumn(character varying, character varying, integer, character varying, integer) RETURNS text
LANGUAGE plpgsql STRICT LANGUAGE plpgsql STRICT
AS $_$ AS $_$
DECLARE DECLARE
ret text; ret text;
BEGIN BEGIN
SELECT AddGeometryColumn('','',$1,$2,$3,$4,$5) into ret; SELECT AddGeometryColumn('','',$1,$2,$3,$4,$5) into ret;
RETURN ret; RETURN ret;
END; END;
$_$; $_$;
   
   
ALTER FUNCTION public.addgeometrycolumn(character varying, character varying, integer, character varying, integer) OWNER TO postgres; ALTER FUNCTION public.addgeometrycolumn(character varying, character varying, integer, character varying, integer) OWNER TO postgres;
   
-- --
-- TOC entry 78 (class 1255 OID 18429) -- TOC entry 78 (class 1255 OID 18429)
-- Dependencies: 6 1168 -- Dependencies: 6 1168
-- Name: addgeometrycolumn(character varying, character varying, character varying, integer, character varying, integer); Type: FUNCTION; Schema: public; Owner: postgres -- Name: addgeometrycolumn(character varying, character varying, character varying, integer, character varying, integer); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION addgeometrycolumn(character varying, character varying, character varying, integer, character varying, integer) RETURNS text CREATE FUNCTION addgeometrycolumn(character varying, character varying, character varying, integer, character varying, integer) RETURNS text
LANGUAGE plpgsql STABLE STRICT LANGUAGE plpgsql STABLE STRICT
AS $_$ AS $_$
DECLARE DECLARE
ret text; ret text;
BEGIN BEGIN
SELECT AddGeometryColumn('',$1,$2,$3,$4,$5,$6) into ret; SELECT AddGeometryColumn('',$1,$2,$3,$4,$5,$6) into ret;
RETURN ret; RETURN ret;
END; END;
$_$; $_$;
   
   
ALTER FUNCTION public.addgeometrycolumn(character varying, character varying, character varying, integer, character varying, integer) OWNER TO postgres; ALTER FUNCTION public.addgeometrycolumn(character varying, character varying, character varying, integer, character varying, integer) OWNER TO postgres;
   
-- --
-- TOC entry 77 (class 1255 OID 18428) -- TOC entry 77 (class 1255 OID 18428)
-- Dependencies: 6 1168 -- Dependencies: 6 1168
-- Name: addgeometrycolumn(character varying, character varying, character varying, character varying, integer, character varying, integer); Type: FUNCTION; Schema: public; Owner: postgres -- Name: addgeometrycolumn(character varying, character varying, character varying, character varying, integer, character varying, integer); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION addgeometrycolumn(character varying, character varying, character varying, character varying, integer, character varying, integer) RETURNS text CREATE FUNCTION addgeometrycolumn(character varying, character varying, character varying, character varying, integer, character varying, integer) RETURNS text
LANGUAGE plpgsql STRICT LANGUAGE plpgsql STRICT
AS $_$ AS $_$
DECLARE DECLARE
catalog_name alias for $1; catalog_name alias for $1;
schema_name alias for $2; schema_name alias for $2;
table_name alias for $3; table_name alias for $3;
column_name alias for $4; column_name alias for $4;
new_srid alias for $5; new_srid alias for $5;
new_type alias for $6; new_type alias for $6;
new_dim alias for $7; new_dim alias for $7;
rec RECORD; rec RECORD;
sr varchar; sr varchar;
real_schema name; real_schema name;
sql text; sql text;
   
BEGIN BEGIN
   
-- Verify geometry type -- Verify geometry type
IF ( NOT ( (new_type = 'GEOMETRY') OR IF ( NOT ( (new_type = 'GEOMETRY') OR
(new_type = 'GEOMETRYCOLLECTION') OR (new_type = 'GEOMETRYCOLLECTION') OR
(new_type = 'POINT') OR (new_type = 'POINT') OR
(new_type = 'MULTIPOINT') OR (new_type = 'MULTIPOINT') OR
(new_type = 'POLYGON') OR (new_type = 'POLYGON') OR
(new_type = 'MULTIPOLYGON') OR (new_type = 'MULTIPOLYGON') OR
(new_type = 'LINESTRING') OR (new_type = 'LINESTRING') OR
(new_type = 'MULTILINESTRING') OR (new_type = 'MULTILINESTRING') OR
(new_type = 'GEOMETRYCOLLECTIONM') OR (new_type = 'GEOMETRYCOLLECTIONM') OR
(new_type = 'POINTM') OR (new_type = 'POINTM') OR
(new_type = 'MULTIPOINTM') OR (new_type = 'MULTIPOINTM') OR
(new_type = 'POLYGONM') OR (new_type = 'POLYGONM') OR
(new_type = 'MULTIPOLYGONM') OR (new_type = 'MULTIPOLYGONM') OR
(new_type = 'LINESTRINGM') OR (new_type = 'LINESTRINGM') OR
(new_type = 'MULTILINESTRINGM') OR (new_type = 'MULTILINESTRINGM') OR
(new_type = 'CIRCULARSTRING') OR (new_type = 'CIRCULARSTRING') OR
(new_type = 'CIRCULARSTRINGM') OR (new_type = 'CIRCULARSTRINGM') OR
(new_type = 'COMPOUNDCURVE') OR (new_type = 'COMPOUNDCURVE') OR
(new_type = 'COMPOUNDCURVEM') OR (new_type = 'COMPOUNDCURVEM') OR
(new_type = 'CURVEPOLYGON') OR (new_type = 'CURVEPOLYGON') OR
(new_type = 'CURVEPOLYGONM') OR (new_type = 'CURVEPOLYGONM') OR
(new_type = 'MULTICURVE') OR (new_type = 'MULTICURVE') OR
(new_type = 'MULTICURVEM') OR (new_type = 'MULTICURVEM') OR
(new_type = 'MULTISURFACE') OR (new_type = 'MULTISURFACE') OR
(new_type = 'MULTISURFACEM')) ) (new_type = 'MULTISURFACEM')) )
THEN THEN
RAISE EXCEPTION 'Invalid type name - valid ones are: RAISE EXCEPTION 'Invalid type name - valid ones are:
POINT, MULTIPOINT, POINT, MULTIPOINT,
LINESTRING, MULTILINESTRING, LINESTRING, MULTILINESTRING,
POLYGON, MULTIPOLYGON, POLYGON, MULTIPOLYGON,
CIRCULARSTRING, COMPOUNDCURVE, MULTICURVE, CIRCULARSTRING, COMPOUNDCURVE, MULTICURVE,
CURVEPOLYGON, MULTISURFACE, CURVEPOLYGON, MULTISURFACE,
GEOMETRY, GEOMETRYCOLLECTION, GEOMETRY, GEOMETRYCOLLECTION,
POINTM, MULTIPOINTM, POINTM, MULTIPOINTM,
LINESTRINGM, MULTILINESTRINGM, LINESTRINGM, MULTILINESTRINGM,
POLYGONM, MULTIPOLYGONM, POLYGONM, MULTIPOLYGONM,
CIRCULARSTRINGM, COMPOUNDCURVEM, MULTICURVEM CIRCULARSTRINGM, COMPOUNDCURVEM, MULTICURVEM
CURVEPOLYGONM, MULTISURFACEM, CURVEPOLYGONM, MULTISURFACEM,
or GEOMETRYCOLLECTIONM'; or GEOMETRYCOLLECTIONM';
RETURN 'fail'; RETURN 'fail';
END IF; END IF;
   
   
-- Verify dimension -- Verify dimension
IF ( (new_dim >4) OR (new_dim <0) ) THEN IF ( (new_dim >4) OR (new_dim <0) ) THEN
RAISE EXCEPTION 'invalid dimension'; RAISE EXCEPTION 'invalid dimension';
RETURN 'fail'; RETURN 'fail';
END IF; END IF;
   
IF ( (new_type LIKE '%M') AND (new_dim!=3) ) THEN IF ( (new_type LIKE '%M') AND (new_dim!=3) ) THEN
RAISE EXCEPTION 'TypeM needs 3 dimensions'; RAISE EXCEPTION 'TypeM needs 3 dimensions';
RETURN 'fail'; RETURN 'fail';
END IF; END IF;
   
   
-- Verify SRID -- Verify SRID
IF ( new_srid != -1 ) THEN IF ( new_srid != -1 ) THEN
SELECT SRID INTO sr FROM spatial_ref_sys WHERE SRID = new_srid; SELECT SRID INTO sr FROM spatial_ref_sys WHERE SRID = new_srid;
IF NOT FOUND THEN IF NOT FOUND THEN
RAISE EXCEPTION 'AddGeometryColumns() - invalid SRID'; RAISE EXCEPTION 'AddGeometryColumns() - invalid SRID';
RETURN 'fail'; RETURN 'fail';
END IF; END IF;
END IF; END IF;
   
   
-- Verify schema -- Verify schema
IF ( schema_name IS NOT NULL AND schema_name != '' ) THEN IF ( schema_name IS NOT NULL AND schema_name != '' ) THEN
sql := 'SELECT nspname FROM pg_namespace ' || sql := 'SELECT nspname FROM pg_namespace ' ||
'WHERE text(nspname) = ' || quote_literal(schema_name) || 'WHERE text(nspname) = ' || quote_literal(schema_name) ||
'LIMIT 1'; 'LIMIT 1';
RAISE DEBUG '%', sql; RAISE DEBUG '%', sql;
EXECUTE sql INTO real_schema; EXECUTE sql INTO real_schema;
   
IF ( real_schema IS NULL ) THEN IF ( real_schema IS NULL ) THEN
RAISE EXCEPTION 'Schema % is not a valid schemaname', quote_literal(schema_name); RAISE EXCEPTION 'Schema % is not a valid schemaname', quote_literal(schema_name);
RETURN 'fail'; RETURN 'fail';
END IF; END IF;
END IF; END IF;
   
IF ( real_schema IS NULL ) THEN IF ( real_schema IS NULL ) THEN
RAISE DEBUG 'Detecting schema'; RAISE DEBUG 'Detecting schema';
sql := 'SELECT n.nspname AS schemaname ' || sql := 'SELECT n.nspname AS schemaname ' ||
'FROM pg_catalog.pg_class c ' || 'FROM pg_catalog.pg_class c ' ||
'JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace ' || 'JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace ' ||
'WHERE c.relkind = ' || quote_literal('r') || 'WHERE c.relkind = ' || quote_literal('r') ||
' AND n.nspname NOT IN (' || quote_literal('pg_catalog') || ', ' || quote_literal('pg_toast') || ')' || ' AND n.nspname NOT IN (' || quote_literal('pg_catalog') || ', ' || quote_literal('pg_toast') || ')' ||
' AND pg_catalog.pg_table_is_visible(c.oid)' || ' AND pg_catalog.pg_table_is_visible(c.oid)' ||
' AND c.relname = ' || quote_literal(table_name); ' AND c.relname = ' || quote_literal(table_name);
RAISE DEBUG '%', sql; RAISE DEBUG '%', sql;
EXECUTE sql INTO real_schema; EXECUTE sql INTO real_schema;
   
IF ( real_schema IS NULL ) THEN IF ( real_schema IS NULL ) THEN
RAISE EXCEPTION 'Table % does not occur in the search_path', quote_literal(table_name); RAISE EXCEPTION 'Table % does not occur in the search_path', quote_literal(table_name);
RETURN 'fail'; RETURN 'fail';
END IF; END IF;
END IF; END IF;
   
   
-- Add geometry column to table -- Add geometry column to table
sql := 'ALTER TABLE ' || sql := 'ALTER TABLE ' ||
quote_ident(real_schema) || '.' || quote_ident(table_name) quote_ident(real_schema) || '.' || quote_ident(table_name)
|| ' ADD COLUMN ' || quote_ident(column_name) || || ' ADD COLUMN ' || quote_ident(column_name) ||
' geometry '; ' geometry ';
RAISE DEBUG '%', sql; RAISE DEBUG '%', sql;
EXECUTE sql; EXECUTE sql;
   
   
-- Delete stale record in geometry_columns (if any) -- Delete stale record in geometry_columns (if any)
sql := 'DELETE FROM geometry_columns WHERE sql := 'DELETE FROM geometry_columns WHERE
f_table_catalog = ' || quote_literal('') || f_table_catalog = ' || quote_literal('') ||
' AND f_table_schema = ' || ' AND f_table_schema = ' ||
quote_literal(real_schema) || quote_literal(real_schema) ||
' AND f_table_name = ' || quote_literal(table_name) || ' AND f_table_name = ' || quote_literal(table_name) ||
' AND f_geometry_column = ' || quote_literal(column_name); ' AND f_geometry_column = ' || quote_literal(column_name);
RAISE DEBUG '%', sql; RAISE DEBUG '%', sql;
EXECUTE sql; EXECUTE sql;
   
   
-- Add record in geometry_columns -- Add record in geometry_columns
sql := 'INSERT INTO geometry_columns (f_table_catalog,f_table_schema,f_table_name,' || sql := 'INSERT INTO geometry_columns (f_table_catalog,f_table_schema,f_table_name,' ||
'f_geometry_column,coord_dimension,srid,type)' || 'f_geometry_column,coord_dimension,srid,type)' ||
' VALUES (' || ' VALUES (' ||
quote_literal('') || ',' || quote_literal('') || ',' ||
quote_literal(real_schema) || ',' || quote_literal(real_schema) || ',' ||
quote_literal(table_name) || ',' || quote_literal(table_name) || ',' ||
quote_literal(column_name) || ',' || quote_literal(column_name) || ',' ||
new_dim::text || ',' || new_dim::text || ',' ||
new_srid::text || ',' || new_srid::text || ',' ||
quote_literal(new_type) || ')'; quote_literal(new_type) || ')';
RAISE DEBUG '%', sql; RAISE DEBUG '%', sql;
EXECUTE sql; EXECUTE sql;
   
   
-- Add table CHECKs -- Add table CHECKs
sql := 'ALTER TABLE ' || sql := 'ALTER TABLE ' ||
quote_ident(real_schema) || '.' || quote_ident(table_name) quote_ident(real_schema) || '.' || quote_ident(table_name)
|| ' ADD CONSTRAINT ' || ' ADD CONSTRAINT '
|| quote_ident('enforce_srid_' || column_name) || quote_ident('enforce_srid_' || column_name)
|| ' CHECK (ST_SRID(' || quote_ident(column_name) || || ' CHECK (ST_SRID(' || quote_ident(column_name) ||
') = ' || new_srid::text || ')' ; ') = ' || new_srid::text || ')' ;
RAISE DEBUG '%', sql; RAISE DEBUG '%', sql;
EXECUTE sql; EXECUTE sql;
   
sql := 'ALTER TABLE ' || sql := 'ALTER TABLE ' ||
quote_ident(real_schema) || '.' || quote_ident(table_name) quote_ident(real_schema) || '.' || quote_ident(table_name)
|| ' ADD CONSTRAINT ' || ' ADD CONSTRAINT '
|| quote_ident('enforce_dims_' || column_name) || quote_ident('enforce_dims_' || column_name)
|| ' CHECK (ST_NDims(' || quote_ident(column_name) || || ' CHECK (ST_NDims(' || quote_ident(column_name) ||
') = ' || new_dim::text || ')' ; ') = ' || new_dim::text || ')' ;
RAISE DEBUG '%', sql; RAISE DEBUG '%', sql;
EXECUTE sql; EXECUTE sql;
   
IF ( NOT (new_type = 'GEOMETRY')) THEN IF ( NOT (new_type = 'GEOMETRY')) THEN
sql := 'ALTER TABLE ' || sql := 'ALTER TABLE ' ||
quote_ident(real_schema) || '.' || quote_ident(table_name) || ' ADD CONSTRAINT ' || quote_ident(real_schema) || '.' || quote_ident(table_name) || ' ADD CONSTRAINT ' ||
quote_ident('enforce_geotype_' || column_name) || quote_ident('enforce_geotype_' || column_name) ||
' CHECK (GeometryType(' || ' CHECK (GeometryType(' ||
quote_ident(column_name) || ')=' || quote_ident(column_name) || ')=' ||
quote_literal(new_type) || ' OR (' || quote_literal(new_type) || ' OR (' ||
quote_ident(column_name) || ') is null)'; quote_ident(column_name) || ') is null)';
RAISE DEBUG '%', sql; RAISE DEBUG '%', sql;
EXECUTE sql; EXECUTE sql;
END IF; END IF;
   
RETURN RETURN
real_schema || '.' || real_schema || '.' ||
table_name || '.' || column_name || table_name || '.' || column_name ||
' SRID:' || new_srid::text || ' SRID:' || new_srid::text ||
' TYPE:' || new_type || ' TYPE:' || new_type ||
' DIMS:' || new_dim::text || ' '; ' DIMS:' || new_dim::text || ' ';
END; END;
$_$; $_$;
   
   
ALTER FUNCTION public.addgeometrycolumn(character varying, character varying, character varying, character varying, integer, character varying, integer) OWNER TO postgres; ALTER FUNCTION public.addgeometrycolumn(character varying, character varying, character varying, character varying, integer, character varying, integer) OWNER TO postgres;
   
-- --
-- TOC entry 80 (class 1255 OID 18431) -- TOC entry 80 (class 1255 OID 18431)
-- Dependencies: 6 1102 1102 1102 -- Dependencies: 6 1102 1102 1102
-- Name: addpoint(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres -- Name: addpoint(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION addpoint(geometry, geometry) RETURNS geometry CREATE FUNCTION addpoint(geometry, geometry) RETURNS geometry
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'LWGEOM_addpoint'; AS '$libdir/postgis-1.5', 'LWGEOM_addpoint';
   
   
ALTER FUNCTION public.addpoint(geometry, geometry) OWNER TO postgres; ALTER FUNCTION public.addpoint(geometry, geometry) OWNER TO postgres;
   
-- --
-- TOC entry 81 (class 1255 OID 18432) -- TOC entry 81 (class 1255 OID 18432)
-- Dependencies: 6 1102 1102 1102 -- Dependencies: 6 1102 1102 1102
-- Name: addpoint(geometry, geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres -- Name: addpoint(geometry, geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION addpoint(geometry, geometry, integer) RETURNS geometry CREATE FUNCTION addpoint(geometry, geometry, integer) RETURNS geometry
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'LWGEOM_addpoint'; AS '$libdir/postgis-1.5', 'LWGEOM_addpoint';
   
   
ALTER FUNCTION public.addpoint(geometry, geometry, integer) OWNER TO postgres; ALTER FUNCTION public.addpoint(geometry, geometry, integer) OWNER TO postgres;
   
-- --
-- TOC entry 83 (class 1255 OID 18434) -- TOC entry 83 (class 1255 OID 18434)
-- Dependencies: 1102 6 1102 -- Dependencies: 1102 6 1102
-- Name: affine(geometry, double precision, double precision, double precision, double precision, double precision, double precision); Type: FUNCTION; Schema: public; Owner: postgres -- Name: affine(geometry, double precision, double precision, double precision, double precision, double precision, double precision); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION affine(geometry, double precision, double precision, double precision, double precision, double precision, double precision) RETURNS geometry CREATE FUNCTION affine(geometry, double precision, double precision, double precision, double precision, double precision, double precision) RETURNS geometry
LANGUAGE sql IMMUTABLE STRICT LANGUAGE sql IMMUTABLE STRICT
AS $_$SELECT affine($1, $2, $3, 0, $4, $5, 0, 0, 0, 1, $6, $7, 0)$_$; AS $_$SELECT affine($1, $2, $3, 0, $4, $5, 0, 0, 0, 1, $6, $7, 0)$_$;
   
   
ALTER FUNCTION public.affine(geometry, double precision, double precision, double precision, double precision, double precision, double precision) OWNER TO postgres; ALTER FUNCTION public.affine(geometry, double precision, double precision, double precision, double precision, double precision, double precision) OWNER TO postgres;
   
-- --
-- TOC entry 82 (class 1255 OID 18433) -- TOC entry 82 (class 1255 OID 18433)
-- Dependencies: 1102 1102 6 -- 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 -- 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
-- --
   
CREATE FUNCTION 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) RETURNS geometry CREATE FUNCTION 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) RETURNS geometry
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'LWGEOM_affine'; AS '$libdir/postgis-1.5', 'LWGEOM_affine';
   
   
ALTER FUNCTION public.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) OWNER TO postgres; ALTER FUNCTION public.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) OWNER TO postgres;
   
-- --
-- TOC entry 84 (class 1255 OID 18435) -- TOC entry 84 (class 1255 OID 18435)
-- Dependencies: 1102 6 -- Dependencies: 1102 6
-- Name: area(geometry); Type: FUNCTION; Schema: public; Owner: postgres -- Name: area(geometry); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION area(geometry) RETURNS double precision CREATE FUNCTION area(geometry) RETURNS double precision
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'LWGEOM_area_polygon'; AS '$libdir/postgis-1.5', 'LWGEOM_area_polygon';
   
   
ALTER FUNCTION public.area(geometry) OWNER TO postgres; ALTER FUNCTION public.area(geometry) OWNER TO postgres;
   
-- --
-- TOC entry 85 (class 1255 OID 18436) -- TOC entry 85 (class 1255 OID 18436)
-- Dependencies: 1102 6 -- Dependencies: 1102 6
-- Name: area2d(geometry); Type: FUNCTION; Schema: public; Owner: postgres -- Name: area2d(geometry); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION area2d(geometry) RETURNS double precision CREATE FUNCTION area2d(geometry) RETURNS double precision
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'LWGEOM_area_polygon'; AS '$libdir/postgis-1.5', 'LWGEOM_area_polygon';
   
   
ALTER FUNCTION public.area2d(geometry) OWNER TO postgres; ALTER FUNCTION public.area2d(geometry) OWNER TO postgres;
   
-- --
-- TOC entry 86 (class 1255 OID 18437) -- TOC entry 86 (class 1255 OID 18437)
-- Dependencies: 1102 6 -- Dependencies: 1102 6
-- Name: asbinary(geometry); Type: FUNCTION; Schema: public; Owner: postgres -- Name: asbinary(geometry); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION asbinary(geometry) RETURNS bytea CREATE FUNCTION asbinary(geometry) RETURNS bytea
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'LWGEOM_asBinary'; AS '$libdir/postgis-1.5', 'LWGEOM_asBinary';
   
   
ALTER FUNCTION public.asbinary(geometry) OWNER TO postgres; ALTER FUNCTION public.asbinary(geometry) OWNER TO postgres;
   
-- --
-- TOC entry 87 (class 1255 OID 18438) -- TOC entry 87 (class 1255 OID 18438)
-- Dependencies: 1102 6 -- Dependencies: 1102 6
-- Name: asbinary(geometry, text); Type: FUNCTION; Schema: public; Owner: postgres -- Name: asbinary(geometry, text); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION asbinary(geometry, text) RETURNS bytea CREATE FUNCTION asbinary(geometry, text) RETURNS bytea
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'LWGEOM_asBinary'; AS '$libdir/postgis-1.5', 'LWGEOM_asBinary';
   
   
ALTER FUNCTION public.asbinary(geometry, text) OWNER TO postgres; ALTER FUNCTION public.asbinary(geometry, text) OWNER TO postgres;
   
-- --
-- TOC entry 88 (class 1255 OID 18439) -- TOC entry 88 (class 1255 OID 18439)
-- Dependencies: 6 1102 -- Dependencies: 6 1102
-- Name: asewkb(geometry); Type: FUNCTION; Schema: public; Owner: postgres -- Name: asewkb(geometry); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION asewkb(geometry) RETURNS bytea CREATE FUNCTION asewkb(geometry) RETURNS bytea
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'WKBFromLWGEOM'; AS '$libdir/postgis-1.5', 'WKBFromLWGEOM';
   
   
ALTER FUNCTION public.asewkb(geometry) OWNER TO postgres; ALTER FUNCTION public.asewkb(geometry) OWNER TO postgres;
   
-- --
-- TOC entry 89 (class 1255 OID 18440) -- TOC entry 89 (class 1255 OID 18440)
-- Dependencies: 1102 6 -- Dependencies: 1102 6
-- Name: asewkb(geometry, text); Type: FUNCTION; Schema: public; Owner: postgres -- Name: asewkb(geometry, text); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION asewkb(geometry, text) RETURNS bytea CREATE FUNCTION asewkb(geometry, text) RETURNS bytea
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'WKBFromLWGEOM'; AS '$libdir/postgis-1.5', 'WKBFromLWGEOM';
   
   
ALTER FUNCTION public.asewkb(geometry, text) OWNER TO postgres; ALTER FUNCTION public.asewkb(geometry, text) OWNER TO postgres;
   
-- --
-- TOC entry 90 (class 1255 OID 18441) -- TOC entry 90 (class 1255 OID 18441)
-- Dependencies: 1102 6 -- Dependencies: 1102 6
-- Name: asewkt(geometry); Type: FUNCTION; Schema: public; Owner: postgres -- Name: asewkt(geometry); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION asewkt(geometry) RETURNS text CREATE FUNCTION asewkt(geometry) RETURNS text
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'LWGEOM_asEWKT'; AS '$libdir/postgis-1.5', 'LWGEOM_asEWKT';
   
   
ALTER FUNCTION public.asewkt(geometry) OWNER TO postgres; ALTER FUNCTION public.asewkt(geometry) OWNER TO postgres;
   
-- --
-- TOC entry 92 (class 1255 OID 18443) -- TOC entry 92 (class 1255 OID 18443)
-- Dependencies: 6 1102 -- Dependencies: 6 1102
-- Name: asgml(geometry); Type: FUNCTION; Schema: public; Owner: postgres -- Name: asgml(geometry); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION asgml(geometry) RETURNS text CREATE FUNCTION asgml(geometry) RETURNS text
LANGUAGE sql IMMUTABLE STRICT LANGUAGE sql IMMUTABLE STRICT
AS $_$SELECT _ST_AsGML(2, $1, 15, 0)$_$; AS $_$SELECT _ST_AsGML(2, $1, 15, 0)$_$;
   
   
ALTER FUNCTION public.asgml(geometry) OWNER TO postgres; ALTER FUNCTION public.asgml(geometry) OWNER TO postgres;
   
-- --
-- TOC entry 91 (class 1255 OID 18442) -- TOC entry 91 (class 1255 OID 18442)
-- Dependencies: 1102 6 -- Dependencies: 1102 6
-- Name: asgml(geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres -- Name: asgml(geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION asgml(geometry, integer) RETURNS text CREATE FUNCTION asgml(geometry, integer) RETURNS text
LANGUAGE sql IMMUTABLE STRICT LANGUAGE sql IMMUTABLE STRICT
AS $_$SELECT _ST_AsGML(2, $1, $2, 0)$_$; AS $_$SELECT _ST_AsGML(2, $1, $2, 0)$_$;
   
   
ALTER FUNCTION public.asgml(geometry, integer) OWNER TO postgres; ALTER FUNCTION public.asgml(geometry, integer) OWNER TO postgres;
   
-- --
-- TOC entry 93 (class 1255 OID 18444) -- TOC entry 93 (class 1255 OID 18444)
-- Dependencies: 6 1102 -- Dependencies: 6 1102
-- Name: ashexewkb(geometry); Type: FUNCTION; Schema: public; Owner: postgres -- Name: ashexewkb(geometry); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION ashexewkb(geometry) RETURNS text CREATE FUNCTION ashexewkb(geometry) RETURNS text
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'LWGEOM_asHEXEWKB'; AS '$libdir/postgis-1.5', 'LWGEOM_asHEXEWKB';
   
   
ALTER FUNCTION public.ashexewkb(geometry) OWNER TO postgres; ALTER FUNCTION public.ashexewkb(geometry) OWNER TO postgres;
   
-- --
-- TOC entry 94 (class 1255 OID 18445) -- TOC entry 94 (class 1255 OID 18445)
-- Dependencies: 1102 6 -- Dependencies: 1102 6
-- Name: ashexewkb(geometry, text); Type: FUNCTION; Schema: public; Owner: postgres -- Name: ashexewkb(geometry, text); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION ashexewkb(geometry, text) RETURNS text CREATE FUNCTION ashexewkb(geometry, text) RETURNS text
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'LWGEOM_asHEXEWKB'; AS '$libdir/postgis-1.5', 'LWGEOM_asHEXEWKB';
   
   
ALTER FUNCTION public.ashexewkb(geometry, text) OWNER TO postgres; ALTER FUNCTION public.ashexewkb(geometry, text) OWNER TO postgres;
   
-- --
-- TOC entry 96 (class 1255 OID 18447) -- TOC entry 96 (class 1255 OID 18447)
-- Dependencies: 1102 6 -- Dependencies: 1102 6
-- Name: askml(geometry); Type: FUNCTION; Schema: public; Owner: postgres -- Name: askml(geometry); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION askml(geometry) RETURNS text CREATE FUNCTION askml(geometry) RETURNS text
LANGUAGE sql IMMUTABLE STRICT LANGUAGE sql IMMUTABLE STRICT
AS $_$SELECT _ST_AsKML(2, transform($1,4326), 15)$_$; AS $_$SELECT _ST_AsKML(2, transform($1,4326), 15)$_$;
   
   
ALTER FUNCTION public.askml(geometry) OWNER TO postgres; ALTER FUNCTION public.askml(geometry) OWNER TO postgres;
   
-- --
-- TOC entry 95 (class 1255 OID 18446) -- TOC entry 95 (class 1255 OID 18446)
-- Dependencies: 1102 6 -- Dependencies: 1102 6
-- Name: askml(geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres -- Name: askml(geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION askml(geometry, integer) RETURNS text CREATE FUNCTION askml(geometry, integer) RETURNS text
LANGUAGE sql IMMUTABLE STRICT LANGUAGE sql IMMUTABLE STRICT
AS $_$SELECT _ST_AsKML(2, transform($1,4326), $2)$_$; AS $_$SELECT _ST_AsKML(2, transform($1,4326), $2)$_$;
   
   
ALTER FUNCTION public.askml(geometry, integer) OWNER TO postgres; ALTER FUNCTION public.askml(geometry, integer) OWNER TO postgres;
   
-- --
-- TOC entry 97 (class 1255 OID 18448) -- TOC entry 97 (class 1255 OID 18448)
-- Dependencies: 6 1102 -- Dependencies: 6 1102
-- Name: askml(integer, geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres -- Name: askml(integer, geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION askml(integer, geometry, integer) RETURNS text CREATE FUNCTION askml(integer, geometry, integer) RETURNS text
LANGUAGE sql IMMUTABLE STRICT LANGUAGE sql IMMUTABLE STRICT
AS $_$SELECT _ST_AsKML($1, transform($2,4326), $3)$_$; AS $_$SELECT _ST_AsKML($1, transform($2,4326), $3)$_$;
   
   
ALTER FUNCTION public.askml(integer, geometry, integer) OWNER TO postgres; ALTER FUNCTION public.askml(integer, geometry, integer) OWNER TO postgres;
   
-- --
-- TOC entry 100 (class 1255 OID 18451) -- TOC entry 100 (class 1255 OID 18451)
-- Dependencies: 6 1102 -- Dependencies: 6 1102
-- Name: assvg(geometry); Type: FUNCTION; Schema: public; Owner: postgres -- Name: assvg(geometry); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION assvg(geometry) RETURNS text CREATE FUNCTION assvg(geometry) RETURNS text
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'assvg_geometry'; AS '$libdir/postgis-1.5', 'assvg_geometry';
   
   
ALTER FUNCTION public.assvg(geometry) OWNER TO postgres; ALTER FUNCTION public.assvg(geometry) OWNER TO postgres;
   
-- --
-- TOC entry 99 (class 1255 OID 18450) -- TOC entry 99 (class 1255 OID 18450)
-- Dependencies: 6 1102 -- Dependencies: 6 1102
-- Name: assvg(geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres -- Name: assvg(geometry, integer); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION assvg(geometry, integer) RETURNS text CREATE FUNCTION assvg(geometry, integer) RETURNS text
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'assvg_geometry'; AS '$libdir/postgis-1.5', 'assvg_geometry';
   
   
ALTER FUNCTION public.assvg(geometry, integer) OWNER TO postgres; ALTER FUNCTION public.assvg(geometry, integer) OWNER TO postgres;
   
-- --
-- TOC entry 98 (class 1255 OID 18449) -- TOC entry 98 (class 1255 OID 18449)
-- Dependencies: 6 1102 -- Dependencies: 6 1102
-- Name: assvg(geometry, integer, integer); Type: FUNCTION; Schema: public; Owner: postgres -- Name: assvg(geometry, integer, integer); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION assvg(geometry, integer, integer) RETURNS text CREATE FUNCTION assvg(geometry, integer, integer) RETURNS text
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'assvg_geometry'; AS '$libdir/postgis-1.5', 'assvg_geometry';
   
   
ALTER FUNCTION public.assvg(geometry, integer, integer) OWNER TO postgres; ALTER FUNCTION public.assvg(geometry, integer, integer) OWNER TO postgres;
   
-- --
-- TOC entry 101 (class 1255 OID 18452) -- TOC entry 101 (class 1255 OID 18452)
-- Dependencies: 1102 6 -- Dependencies: 1102 6
-- Name: astext(geometry); Type: FUNCTION; Schema: public; Owner: postgres -- Name: astext(geometry); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION astext(geometry) RETURNS text CREATE FUNCTION astext(geometry) RETURNS text
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'LWGEOM_asText'; AS '$libdir/postgis-1.5', 'LWGEOM_asText';
   
   
ALTER FUNCTION public.astext(geometry) OWNER TO postgres; ALTER FUNCTION public.astext(geometry) OWNER TO postgres;
   
-- --
-- TOC entry 102 (class 1255 OID 18453) -- TOC entry 102 (class 1255 OID 18453)
-- Dependencies: 6 1102 1102 -- Dependencies: 6 1102 1102
-- Name: azimuth(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres -- Name: azimuth(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION azimuth(geometry, geometry) RETURNS double precision CREATE FUNCTION azimuth(geometry, geometry) RETURNS double precision
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'LWGEOM_azimuth'; AS '$libdir/postgis-1.5', 'LWGEOM_azimuth';
   
   
ALTER FUNCTION public.azimuth(geometry, geometry) OWNER TO postgres; ALTER FUNCTION public.azimuth(geometry, geometry) OWNER TO postgres;
   
-- --
-- TOC entry 103 (class 1255 OID 18454) -- TOC entry 103 (class 1255 OID 18454)
-- Dependencies: 1102 1168 6 -- Dependencies: 1102 1168 6
-- Name: bdmpolyfromtext(text, integer); Type: FUNCTION; Schema: public; Owner: postgres -- Name: bdmpolyfromtext(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION bdmpolyfromtext(text, integer) RETURNS geometry CREATE FUNCTION bdmpolyfromtext(text, integer) RETURNS geometry
LANGUAGE plpgsql IMMUTABLE STRICT LANGUAGE plpgsql IMMUTABLE STRICT
AS $_$ AS $_$
DECLARE DECLARE
geomtext alias for $1; geomtext alias for $1;
srid alias for $2; srid alias for $2;
mline geometry; mline geometry;
geom geometry; geom geometry;
BEGIN BEGIN
mline := MultiLineStringFromText(geomtext, srid); mline := MultiLineStringFromText(geomtext, srid);
   
IF mline IS NULL IF mline IS NULL
THEN THEN
RAISE EXCEPTION 'Input is not a MultiLinestring'; RAISE EXCEPTION 'Input is not a MultiLinestring';
END IF; END IF;
   
geom := multi(BuildArea(mline)); geom := multi(BuildArea(mline));
   
RETURN geom; RETURN geom;
END; END;
$_$; $_$;
   
   
ALTER FUNCTION public.bdmpolyfromtext(text, integer) OWNER TO postgres; ALTER FUNCTION public.bdmpolyfromtext(text, integer) OWNER TO postgres;
   
-- --
-- TOC entry 75 (class 1255 OID 18455) -- TOC entry 75 (class 1255 OID 18455)
-- Dependencies: 6 1168 1102 -- Dependencies: 6 1168 1102
-- Name: bdpolyfromtext(text, integer); Type: FUNCTION; Schema: public; Owner: postgres -- Name: bdpolyfromtext(text, integer); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION bdpolyfromtext(text, integer) RETURNS geometry CREATE FUNCTION bdpolyfromtext(text, integer) RETURNS geometry
LANGUAGE plpgsql IMMUTABLE STRICT LANGUAGE plpgsql IMMUTABLE STRICT
AS $_$ AS $_$
DECLARE DECLARE
geomtext alias for $1; geomtext alias for $1;
srid alias for $2; srid alias for $2;
mline geometry; mline geometry;
geom geometry; geom geometry;
BEGIN BEGIN
mline := MultiLineStringFromText(geomtext, srid); mline := MultiLineStringFromText(geomtext, srid);
   
IF mline IS NULL IF mline IS NULL
THEN THEN
RAISE EXCEPTION 'Input is not a MultiLinestring'; RAISE EXCEPTION 'Input is not a MultiLinestring';
END IF; END IF;
   
geom := BuildArea(mline); geom := BuildArea(mline);
   
IF GeometryType(geom) != 'POLYGON' IF GeometryType(geom) != 'POLYGON'
THEN THEN
RAISE EXCEPTION 'Input returns more then a single polygon, try using BdMPolyFromText instead'; RAISE EXCEPTION 'Input returns more then a single polygon, try using BdMPolyFromText instead';
END IF; END IF;
   
RETURN geom; RETURN geom;
END; END;
$_$; $_$;
   
   
ALTER FUNCTION public.bdpolyfromtext(text, integer) OWNER TO postgres; ALTER FUNCTION public.bdpolyfromtext(text, integer) OWNER TO postgres;
   
-- --
-- TOC entry 76 (class 1255 OID 18456) -- TOC entry 76 (class 1255 OID 18456)
-- Dependencies: 6 1102 1102 -- Dependencies: 6 1102 1102
-- Name: boundary(geometry); Type: FUNCTION; Schema: public; Owner: postgres -- Name: boundary(geometry); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION boundary(geometry) RETURNS geometry CREATE FUNCTION boundary(geometry) RETURNS geometry
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'boundary'; AS '$libdir/postgis-1.5', 'boundary';
   
   
ALTER FUNCTION public.boundary(geometry) OWNER TO postgres; ALTER FUNCTION public.boundary(geometry) OWNER TO postgres;
   
-- --
-- TOC entry 104 (class 1255 OID 18457) -- TOC entry 104 (class 1255 OID 18457)
-- Dependencies: 6 1102 -- Dependencies: 6 1102
-- Name: box(geometry); Type: FUNCTION; Schema: public; Owner: postgres -- Name: box(geometry); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION box(geometry) RETURNS box CREATE FUNCTION box(geometry) RETURNS box
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'LWGEOM_to_BOX'; AS '$libdir/postgis-1.5', 'LWGEOM_to_BOX';
   
   
ALTER FUNCTION public.box(geometry) OWNER TO postgres; ALTER FUNCTION public.box(geometry) OWNER TO postgres;
   
-- --
-- TOC entry 105 (class 1255 OID 18458) -- TOC entry 105 (class 1255 OID 18458)
-- Dependencies: 6 1090 -- Dependencies: 6 1090
-- Name: box(box3d); Type: FUNCTION; Schema: public; Owner: postgres -- Name: box(box3d); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION box(box3d) RETURNS box CREATE FUNCTION box(box3d) RETURNS box
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'BOX3D_to_BOX'; AS '$libdir/postgis-1.5', 'BOX3D_to_BOX';
   
   
ALTER FUNCTION public.box(box3d) OWNER TO postgres; ALTER FUNCTION public.box(box3d) OWNER TO postgres;
   
-- --
-- TOC entry 106 (class 1255 OID 18459) -- TOC entry 106 (class 1255 OID 18459)
-- Dependencies: 6 1087 1093 -- Dependencies: 6 1087 1093
-- Name: box2d(box3d_extent); Type: FUNCTION; Schema: public; Owner: postgres -- Name: box2d(box3d_extent); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION box2d(box3d_extent) RETURNS box2d CREATE FUNCTION box2d(box3d_extent) RETURNS box2d
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'BOX3D_to_BOX2DFLOAT4'; AS '$libdir/postgis-1.5', 'BOX3D_to_BOX2DFLOAT4';
   
   
ALTER FUNCTION public.box2d(box3d_extent) OWNER TO postgres; ALTER FUNCTION public.box2d(box3d_extent) OWNER TO postgres;
   
-- --
-- TOC entry 107 (class 1255 OID 18460) -- TOC entry 107 (class 1255 OID 18460)
-- Dependencies: 6 1087 1102 -- Dependencies: 6 1087 1102
-- Name: box2d(geometry); Type: FUNCTION; Schema: public; Owner: postgres -- Name: box2d(geometry); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION box2d(geometry) RETURNS box2d CREATE FUNCTION box2d(geometry) RETURNS box2d
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'LWGEOM_to_BOX2DFLOAT4'; AS '$libdir/postgis-1.5', 'LWGEOM_to_BOX2DFLOAT4';
   
   
ALTER FUNCTION public.box2d(geometry) OWNER TO postgres; ALTER FUNCTION public.box2d(geometry) OWNER TO postgres;
   
-- --
-- TOC entry 108 (class 1255 OID 18461) -- TOC entry 108 (class 1255 OID 18461)
-- Dependencies: 1087 1090 6 -- Dependencies: 1087 1090 6
-- Name: box2d(box3d); Type: FUNCTION; Schema: public; Owner: postgres -- Name: box2d(box3d); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION box2d(box3d) RETURNS box2d CREATE FUNCTION box2d(box3d) RETURNS box2d
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'BOX3D_to_BOX2DFLOAT4'; AS '$libdir/postgis-1.5', 'BOX3D_to_BOX2DFLOAT4';
   
   
ALTER FUNCTION public.box2d(box3d) OWNER TO postgres; ALTER FUNCTION public.box2d(box3d) OWNER TO postgres;
   
-- --
-- TOC entry 109 (class 1255 OID 18462) -- TOC entry 109 (class 1255 OID 18462)
-- Dependencies: 6 1090 1102 -- Dependencies: 6 1090 1102
-- Name: box3d(geometry); Type: FUNCTION; Schema: public; Owner: postgres -- Name: box3d(geometry); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION box3d(geometry) RETURNS box3d CREATE FUNCTION box3d(geometry) RETURNS box3d
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'LWGEOM_to_BOX3D'; AS '$libdir/postgis-1.5', 'LWGEOM_to_BOX3D';
   
   
ALTER FUNCTION public.box3d(geometry) OWNER TO postgres; ALTER FUNCTION public.box3d(geometry) OWNER TO postgres;
   
-- --
-- TOC entry 110 (class 1255 OID 18463) -- TOC entry 110 (class 1255 OID 18463)
-- Dependencies: 6 1090 1087 -- Dependencies: 6 1090 1087
-- Name: box3d(box2d); Type: FUNCTION; Schema: public; Owner: postgres -- Name: box3d(box2d); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION box3d(box2d) RETURNS box3d CREATE FUNCTION box3d(box2d) RETURNS box3d
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'BOX2DFLOAT4_to_BOX3D'; AS '$libdir/postgis-1.5', 'BOX2DFLOAT4_to_BOX3D';
   
   
ALTER FUNCTION public.box3d(box2d) OWNER TO postgres; ALTER FUNCTION public.box3d(box2d) OWNER TO postgres;
   
-- --
-- TOC entry 111 (class 1255 OID 18464) -- TOC entry 111 (class 1255 OID 18464)
-- Dependencies: 6 1090 1093 -- Dependencies: 6 1090 1093
-- Name: box3d_extent(box3d_extent); Type: FUNCTION; Schema: public; Owner: postgres -- Name: box3d_extent(box3d_extent); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION box3d_extent(box3d_extent) RETURNS box3d CREATE FUNCTION box3d_extent(box3d_extent) RETURNS box3d
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'BOX3D_extent_to_BOX3D'; AS '$libdir/postgis-1.5', 'BOX3D_extent_to_BOX3D';
   
   
ALTER FUNCTION public.box3d_extent(box3d_extent) OWNER TO postgres; ALTER FUNCTION public.box3d_extent(box3d_extent) OWNER TO postgres;
   
-- --
-- TOC entry 112 (class 1255 OID 18465) -- TOC entry 112 (class 1255 OID 18465)
-- Dependencies: 6 1090 -- Dependencies: 6 1090
-- Name: box3dtobox(box3d); Type: FUNCTION; Schema: public; Owner: postgres -- Name: box3dtobox(box3d); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION box3dtobox(box3d) RETURNS box CREATE FUNCTION box3dtobox(box3d) RETURNS box
LANGUAGE sql IMMUTABLE STRICT LANGUAGE sql IMMUTABLE STRICT
AS $_$SELECT box($1)$_$; AS $_$SELECT box($1)$_$;
   
   
ALTER FUNCTION public.box3dtobox(box3d) OWNER TO postgres; ALTER FUNCTION public.box3dtobox(box3d) OWNER TO postgres;
   
-- --
-- TOC entry 113 (class 1255 OID 18466) -- TOC entry 113 (class 1255 OID 18466)
-- Dependencies: 6 1102 1102 -- Dependencies: 6 1102 1102
-- Name: buffer(geometry, double precision); Type: FUNCTION; Schema: public; Owner: postgres -- Name: buffer(geometry, double precision); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION buffer(geometry, double precision) RETURNS geometry CREATE FUNCTION buffer(geometry, double precision) RETURNS geometry
LANGUAGE c IMMUTABLE STRICT COST 100 LANGUAGE c IMMUTABLE STRICT COST 100
AS '$libdir/postgis-1.5', 'buffer'; AS '$libdir/postgis-1.5', 'buffer';
   
   
ALTER FUNCTION public.buffer(geometry, double precision) OWNER TO postgres; ALTER FUNCTION public.buffer(geometry, double precision) OWNER TO postgres;
   
-- --
-- TOC entry 114 (class 1255 OID 18467) -- TOC entry 114 (class 1255 OID 18467)
-- Dependencies: 6 1102 1102 -- Dependencies: 6 1102 1102
-- Name: buffer(geometry, double precision, integer); Type: FUNCTION; Schema: public; Owner: postgres -- Name: buffer(geometry, double precision, integer); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION buffer(geometry, double precision, integer) RETURNS geometry CREATE FUNCTION buffer(geometry, double precision, integer) RETURNS geometry
LANGUAGE sql IMMUTABLE STRICT LANGUAGE sql IMMUTABLE STRICT
AS $_$SELECT ST_Buffer($1, $2, $3)$_$; AS $_$SELECT ST_Buffer($1, $2, $3)$_$;
   
   
ALTER FUNCTION public.buffer(geometry, double precision, integer) OWNER TO postgres; ALTER FUNCTION public.buffer(geometry, double precision, integer) OWNER TO postgres;
   
-- --
-- TOC entry 115 (class 1255 OID 18468) -- TOC entry 115 (class 1255 OID 18468)
-- Dependencies: 6 1102 1102 -- Dependencies: 6 1102 1102
-- Name: buildarea(geometry); Type: FUNCTION; Schema: public; Owner: postgres -- Name: buildarea(geometry); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION buildarea(geometry) RETURNS geometry CREATE FUNCTION buildarea(geometry) RETURNS geometry
LANGUAGE c IMMUTABLE STRICT COST 100 LANGUAGE c IMMUTABLE STRICT COST 100
AS '$libdir/postgis-1.5', 'LWGEOM_buildarea'; AS '$libdir/postgis-1.5', 'LWGEOM_buildarea';
   
   
ALTER FUNCTION public.buildarea(geometry) OWNER TO postgres; ALTER FUNCTION public.buildarea(geometry) OWNER TO postgres;
   
-- --
-- TOC entry 116 (class 1255 OID 18469) -- TOC entry 116 (class 1255 OID 18469)
-- Dependencies: 6 1102 -- Dependencies: 6 1102
-- Name: bytea(geometry); Type: FUNCTION; Schema: public; Owner: postgres -- Name: bytea(geometry); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION bytea(geometry) RETURNS bytea CREATE FUNCTION bytea(geometry) RETURNS bytea
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'LWGEOM_to_bytea'; AS '$libdir/postgis-1.5', 'LWGEOM_to_bytea';
   
   
ALTER FUNCTION public.bytea(geometry) OWNER TO postgres; ALTER FUNCTION public.bytea(geometry) OWNER TO postgres;
   
-- --
-- TOC entry 117 (class 1255 OID 18470) -- TOC entry 117 (class 1255 OID 18470)
-- Dependencies: 6 1102 1102 -- Dependencies: 6 1102 1102
-- Name: centroid(geometry); Type: FUNCTION; Schema: public; Owner: postgres -- Name: centroid(geometry); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION centroid(geometry) RETURNS geometry CREATE FUNCTION centroid(geometry) RETURNS geometry
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'centroid'; AS '$libdir/postgis-1.5', 'centroid';
   
   
ALTER FUNCTION public.centroid(geometry) OWNER TO postgres; ALTER FUNCTION public.centroid(geometry) OWNER TO postgres;
   
-- --
-- TOC entry 119 (class 1255 OID 18472) -- TOC entry 119 (class 1255 OID 18472)
-- Dependencies: 6 -- Dependencies: 6
-- Name: checkauth(text, text); Type: FUNCTION; Schema: public; Owner: postgres -- Name: checkauth(text, text); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION checkauth(text, text) RETURNS integer CREATE FUNCTION checkauth(text, text) RETURNS integer
LANGUAGE sql LANGUAGE sql
AS $_$ SELECT CheckAuth('', $1, $2) $_$; AS $_$ SELECT CheckAuth('', $1, $2) $_$;
   
   
ALTER FUNCTION public.checkauth(text, text) OWNER TO postgres; ALTER FUNCTION public.checkauth(text, text) OWNER TO postgres;
   
-- --
-- TOC entry 118 (class 1255 OID 18471) -- TOC entry 118 (class 1255 OID 18471)
-- Dependencies: 6 1168 -- Dependencies: 6 1168
-- Name: checkauth(text, text, text); Type: FUNCTION; Schema: public; Owner: postgres -- Name: checkauth(text, text, text); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION checkauth(text, text, text) RETURNS integer CREATE FUNCTION checkauth(text, text, text) RETURNS integer
LANGUAGE plpgsql LANGUAGE plpgsql
AS $_$ AS $_$
DECLARE DECLARE
schema text; schema text;
BEGIN BEGIN
IF NOT LongTransactionsEnabled() THEN IF NOT LongTransactionsEnabled() THEN
RAISE EXCEPTION 'Long transaction support disabled, use EnableLongTransaction() to enable.'; RAISE EXCEPTION 'Long transaction support disabled, use EnableLongTransaction() to enable.';
END IF; END IF;
   
if ( $1 != '' ) THEN if ( $1 != '' ) THEN
schema = $1; schema = $1;
ELSE ELSE
SELECT current_schema() into schema; SELECT current_schema() into schema;
END IF; END IF;
   
-- TODO: check for an already existing trigger ? -- TODO: check for an already existing trigger ?
   
EXECUTE 'CREATE TRIGGER check_auth BEFORE UPDATE OR DELETE ON ' EXECUTE 'CREATE TRIGGER check_auth BEFORE UPDATE OR DELETE ON '
|| quote_ident(schema) || '.' || quote_ident($2) || quote_ident(schema) || '.' || quote_ident($2)
||' FOR EACH ROW EXECUTE PROCEDURE CheckAuthTrigger(' ||' FOR EACH ROW EXECUTE PROCEDURE CheckAuthTrigger('
|| quote_literal($3) || ')'; || quote_literal($3) || ')';
   
RETURN 0; RETURN 0;
END; END;
$_$; $_$;
   
   
ALTER FUNCTION public.checkauth(text, text, text) OWNER TO postgres; ALTER FUNCTION public.checkauth(text, text, text) OWNER TO postgres;
   
-- --
-- TOC entry 120 (class 1255 OID 18473) -- TOC entry 120 (class 1255 OID 18473)
-- Dependencies: 6 -- Dependencies: 6
-- Name: checkauthtrigger(); Type: FUNCTION; Schema: public; Owner: postgres -- Name: checkauthtrigger(); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION checkauthtrigger() RETURNS trigger CREATE FUNCTION checkauthtrigger() RETURNS trigger
LANGUAGE c LANGUAGE c
AS '$libdir/postgis-1.5', 'check_authorization'; AS '$libdir/postgis-1.5', 'check_authorization';
   
   
ALTER FUNCTION public.checkauthtrigger() OWNER TO postgres; ALTER FUNCTION public.checkauthtrigger() OWNER TO postgres;
   
-- --
-- TOC entry 121 (class 1255 OID 18474) -- TOC entry 121 (class 1255 OID 18474)
-- Dependencies: 6 1102 1102 1102 -- Dependencies: 6 1102 1102 1102
-- Name: collect(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres -- Name: collect(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION collect(geometry, geometry) RETURNS geometry CREATE FUNCTION collect(geometry, geometry) RETURNS geometry
LANGUAGE c IMMUTABLE LANGUAGE c IMMUTABLE
AS '$libdir/postgis-1.5', 'LWGEOM_collect'; AS '$libdir/postgis-1.5', 'LWGEOM_collect';
   
   
ALTER FUNCTION public.collect(geometry, geometry) OWNER TO postgres; ALTER FUNCTION public.collect(geometry, geometry) OWNER TO postgres;
   
-- --
-- TOC entry 122 (class 1255 OID 18475) -- TOC entry 122 (class 1255 OID 18475)
-- Dependencies: 6 1087 1087 1102 -- Dependencies: 6 1087 1087 1102
-- Name: combine_bbox(box2d, geometry); Type: FUNCTION; Schema: public; Owner: postgres -- Name: combine_bbox(box2d, geometry); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION combine_bbox(box2d, geometry) RETURNS box2d CREATE FUNCTION combine_bbox(box2d, geometry) RETURNS box2d
LANGUAGE c IMMUTABLE LANGUAGE c IMMUTABLE
AS '$libdir/postgis-1.5', 'BOX2DFLOAT4_combine'; AS '$libdir/postgis-1.5', 'BOX2DFLOAT4_combine';
   
   
ALTER FUNCTION public.combine_bbox(box2d, geometry) OWNER TO postgres; ALTER FUNCTION public.combine_bbox(box2d, geometry) OWNER TO postgres;
   
-- --
-- TOC entry 123 (class 1255 OID 18476) -- TOC entry 123 (class 1255 OID 18476)
-- Dependencies: 6 1093 1093 1102 -- Dependencies: 6 1093 1093 1102
-- Name: combine_bbox(box3d_extent, geometry); Type: FUNCTION; Schema: public; Owner: postgres -- Name: combine_bbox(box3d_extent, geometry); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION combine_bbox(box3d_extent, geometry) RETURNS box3d_extent CREATE FUNCTION combine_bbox(box3d_extent, geometry) RETURNS box3d_extent
LANGUAGE c IMMUTABLE LANGUAGE c IMMUTABLE
AS '$libdir/postgis-1.5', 'BOX3D_combine'; AS '$libdir/postgis-1.5', 'BOX3D_combine';
   
   
ALTER FUNCTION public.combine_bbox(box3d_extent, geometry) OWNER TO postgres; ALTER FUNCTION public.combine_bbox(box3d_extent, geometry) OWNER TO postgres;
   
-- --
-- TOC entry 124 (class 1255 OID 18477) -- TOC entry 124 (class 1255 OID 18477)
-- Dependencies: 6 1090 1090 1102 -- Dependencies: 6 1090 1090 1102
-- Name: combine_bbox(box3d, geometry); Type: FUNCTION; Schema: public; Owner: postgres -- Name: combine_bbox(box3d, geometry); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION combine_bbox(box3d, geometry) RETURNS box3d CREATE FUNCTION combine_bbox(box3d, geometry) RETURNS box3d
LANGUAGE c IMMUTABLE LANGUAGE c IMMUTABLE
AS '$libdir/postgis-1.5', 'BOX3D_combine'; AS '$libdir/postgis-1.5', 'BOX3D_combine';
   
   
ALTER FUNCTION public.combine_bbox(box3d, geometry) OWNER TO postgres; ALTER FUNCTION public.combine_bbox(box3d, geometry) OWNER TO postgres;
   
-- --
-- TOC entry 125 (class 1255 OID 18478) -- TOC entry 125 (class 1255 OID 18478)
-- Dependencies: 6 1096 -- Dependencies: 6 1096
-- Name: compression(chip); Type: FUNCTION; Schema: public; Owner: postgres -- Name: compression(chip); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION compression(chip) RETURNS integer CREATE FUNCTION compression(chip) RETURNS integer
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'CHIP_getCompression'; AS '$libdir/postgis-1.5', 'CHIP_getCompression';
   
   
ALTER FUNCTION public.compression(chip) OWNER TO postgres; ALTER FUNCTION public.compression(chip) OWNER TO postgres;
   
-- --
-- TOC entry 126 (class 1255 OID 18479) -- TOC entry 126 (class 1255 OID 18479)
-- Dependencies: 6 1102 1102 -- Dependencies: 6 1102 1102
-- Name: contains(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres -- Name: contains(geometry, geometry); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION contains(geometry, geometry) RETURNS boolean CREATE FUNCTION contains(geometry, geometry) RETURNS boolean
LANGUAGE c IMMUTABLE STRICT LANGUAGE c IMMUTABLE STRICT
AS '$libdir/postgis-1.5', 'contains'; AS '$libdir/postgis-1.5', 'contains';
   
   
ALTER FUNCTION public.contains(geometry, geometry) OWNER TO postgres; ALTER FUNCTION public.contains(geometry, geometry) OWNER TO postgres;
   
-- --
-- TOC entry 127 (class 1255 OID 18480) -- TOC entry 127 (class 1255 OID 18480)
-- Dependencies: 6 1102 1102 -- Dependencies: 6 1102 1102
-- Name: convexhull(geometry); Type: FUNCTION; Schema: public; Owner: postgres -- Name: convexhull(geometry); Type: FUNCTION; Schema: public; Owner: postgres
-- --
   
CREATE FUNCTION convexhull(geometry) RETURNS geometry CREATE FUNCTION convexhull(geometry) RETURNS geometry
LANGUAGE c IMMUTABLE STRICT COST 100 LANGUAGE c IMMUTABLE STRICT COST 100