Formatting: remove trailing whitespace from .sql files.
authorDarafei Praliaskouski <me@komzpa.net>
Wed, 17 Jan 2018 20:39:03 +0000 (20:39 +0000)
committerDarafei Praliaskouski <me@komzpa.net>
Wed, 17 Jan 2018 20:39:03 +0000 (20:39 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@16327 b70326c6-7e19-0410-871a-916f4a2858ee

181 files changed:
doc/html/image_src/st_azimuthmath.sql
extensions/address_standardizer/address_standardizer_types.sql.in
extensions/address_standardizer/test-init-extensions.sql.in
extensions/address_standardizer/test-parseaddress.sql.in
extensions/address_standardizer/us_lex.sql
extensions/address_standardizer/us_rules.sql
extensions/make_unpackaged.sql
extensions/postgis_tiger_geocoder/sql_bits/add_search_path.sql.in
extensions/postgis_tiger_geocoder/sql_bits/norm_addy_create.sql.in
extensions/postgis_tiger_geocoder/sql_bits/norm_addy_upgrade.sql.in
extensions/postgis_tiger_geocoder/sql_bits/remove_from_extension.sql.in
extensions/postgis_tiger_geocoder/sql_bits/upgrade_before.sql.in
extensions/postgis_topology/sql_bits/remove_from_extension.sql.in
extras/WFS_locks/WFS_locks.sql.in
extras/WFS_locks/test.sql
extras/history_table/history_table.sql
extras/ogc_test_suite/1_schema.sql
extras/ogc_test_suite/2_queries.sql
extras/tiger_geocoder/geocode/geocode.sql
extras/tiger_geocoder/geocode/geocode_address.sql
extras/tiger_geocoder/geocode/geocode_intersection.sql
extras/tiger_geocoder/geocode/interpolate_from_address.sql
extras/tiger_geocoder/geocode/other_helper_functions.sql
extras/tiger_geocoder/geocode_settings.sql
extras/tiger_geocoder/normalize/normalize_address.sql
extras/tiger_geocoder/normalize/pprint_addy.sql
extras/tiger_geocoder/pagc_normalize/pagc_tables.sql
extras/tiger_geocoder/regress/geocode_regress.sql
extras/tiger_geocoder/tables/lookup_tables_2011.sql
extras/tiger_geocoder/tiger_loader_2011.sql
extras/tiger_geocoder/tiger_loader_2012.sql
extras/tiger_geocoder/tiger_loader_2013.sql
extras/tiger_geocoder/tiger_loader_2014.sql
extras/tiger_geocoder/tiger_loader_2015.sql
extras/tiger_geocoder/tiger_loader_2016.sql
extras/tiger_geocoder/tiger_loader_2017.sql
extras/tiger_geocoder/topology/tiger_topology_loader.sql
extras/tiger_geocoder/upgrade_geocode.sql
extras/tiger_geocoder/utility/standardize_tiger_data.sql
postgis/geography.sql.in
postgis/geography_brin.sql.in
postgis/legacy.sql.in
postgis/legacy_gist.sql.in
postgis/legacy_minimal.sql.in
postgis/long_xact.sql.in
postgis/postgis.sql.in
postgis/postgis_brin.sql.in
postgis/postgis_drop_after.sql
postgis/sfcgal.sql.in
postgis/uninstall_geography.sql.in
postgis/uninstall_long_xact.sql.in
postgis/uninstall_sfcgal.sql.in
postgis/uninstall_sqlmm.sql.in
raster/rt_pg/rtpostgis.sql.in
raster/rt_pg/rtpostgis_drop.sql.in
raster/rt_pg/rtpostgis_upgrade_cleanup.sql.in
raster/scripts/plpgsql/_MapAlgebraParts.sql
raster/scripts/plpgsql/st_areaweightedsummarystats.sql
raster/scripts/plpgsql/st_deleteband.sql
raster/scripts/plpgsql/st_geomextent2rastercoord.sql
raster/scripts/plpgsql/st_mapalgebra.sql
raster/scripts/plpgsql/st_mapalgebra_optimized.sql
raster/scripts/plpgsql/st_setarray.sql
raster/scripts/plpgsql/st_setvalues.sql
raster/scripts/plpgsql/st_tile.sql
raster/scripts/plpgsql/st_union.sql
raster/test/regress/check_raster_columns.sql
raster/test/regress/check_raster_overviews.sql
raster/test/regress/rt_4ma.sql
raster/test/regress/rt_addband.sql
raster/test/regress/rt_band_properties.sql
raster/test/regress/rt_createoverview.sql
raster/test/regress/rt_dumpvalues.sql
raster/test/regress/rt_elevation_functions.sql
raster/test/regress/rt_georeference.sql
raster/test/regress/rt_geos_relationships.sql
raster/test/regress/rt_gist_relationships.sql
raster/test/regress/rt_intersection.sql
raster/test/regress/rt_intersects.sql
raster/test/regress/rt_invdistweight4ma.sql
raster/test/regress/rt_mapalgebra_expr.sql
raster/test/regress/rt_mapalgebra_mask.sql
raster/test/regress/rt_mapalgebraexpr_2raster.sql
raster/test/regress/rt_mapalgebrafctngb.sql
raster/test/regress/rt_mapalgebrafctngb_userfunc.sql
raster/test/regress/rt_nearestvalue.sql
raster/test/regress/rt_pixelofvalue.sql
raster/test/regress/rt_set_properties.sql
raster/test/regress/rt_utility.sql
regress/clean.sql
regress/concave_hull.sql
regress/curvetoline.sql
regress/empty.sql
regress/estimatedextent.sql
regress/frechet.sql
regress/geography_covers.sql
regress/in_gml.sql
regress/in_kml.sql
regress/interrupt.sql
regress/interrupt_buffer.sql
regress/interrupt_relate.sql
regress/iscollection.sql
regress/isvaliddetail.sql
regress/knn.sql
regress/knn_recheck.sql
regress/loader/ReprojectPts-pre.sql
regress/loader/ReprojectPtsGeog-pre.sql
regress/loader/mfile.select.sql
regress/long_xact.sql
regress/lwgeom_regress.sql
regress/measures.sql
regress/mvt.sql
regress/operators.sql
regress/orientation.sql
regress/out_geography.sql
regress/out_geometry.sql
regress/polyhedralsurface.sql
regress/regress.sql
regress/regress_index_nulls.sql
regress/regress_lots_of_points.sql
regress/regress_lrs.sql
regress/regress_ogc_prep.sql
regress/regress_selectivity.sql
regress/remove_repeated_points.sql
regress/removepoint.sql
regress/sfcgal/concave_hull.sql
regress/sfcgal/empty.sql
regress/sfcgal/geography.sql
regress/sfcgal/measures.sql
regress/sfcgal/regress.sql
regress/sfcgal/regress_ogc_prep.sql
regress/sfcgal/tickets.sql
regress/sql-mm-serialize.sql
regress/subdivide.sql
regress/temporal.sql
regress/tickets.sql
regress/twkb.sql
regress/typmod.sql
regress/wkt.sql
topology/sql/export/TopoJSON.sql.in
topology/sql/export/gml.sql.in
topology/sql/populate.sql.in
topology/sql/predicates.sql.in
topology/sql/query/getfacebypoint.sql.in
topology/sql/sqlmm.sql.in
topology/sql/topogeometry/cleartopogeom.sql.in
topology/sql/topogeometry/simplify.sql.in
topology/sql/topogeometry/totopogeom.sql.in
topology/test/cache_geometries.sql
topology/test/load_features.sql
topology/test/load_topology.sql.in
topology/test/more_features.sql
topology/test/predicates.sql.in
topology/test/query_features.sql
topology/test/regress/addface.sql
topology/test/regress/addnode.sql
topology/test/regress/getedgebypoint.sql
topology/test/regress/getfacebypoint.sql
topology/test/regress/getnodebypoint.sql
topology/test/regress/gml.sql
topology/test/regress/sqlmm.sql
topology/test/regress/st_addedgemodface.sql
topology/test/regress/st_addedgenewfaces.sql
topology/test/regress/st_addisoedge.sql
topology/test/regress/st_addisonode.sql
topology/test/regress/st_changeedgegeom.sql
topology/test/regress/st_createtopogeo.sql
topology/test/regress/st_modedgesplit.sql
topology/test/regress/st_newedgeheal.sql
topology/test/regress/st_newedgessplit.sql
topology/test/regress/st_remedgemodface.sql
topology/test/regress/st_remedgenewface.sql
topology/test/regress/topogeo_addlinestring.sql
topology/test/regress/topogeo_addpolygon.sql
topology/test/regress/topogeom_edit.sql
topology/test/regress/totopogeom.sql
topology/topology.sql.in
topology/topology_drop_after.sql.in
topology/topology_drop_before.sql.in
utils/create_undef.pl
utils/create_unpackaged.pl

index a3e00ba5cd5aef19190616717c7ee15b0d112623..2246ac16e06e653c940f9e3ad747149447ab0181 100644 (file)
@@ -5,7 +5,7 @@ SELECT ST_AsText(
        ST_MakeLine(
                ST_Point(25,45), ST_Point(25 + ST_Length('LINESTRING(25 45,75 100)'::Geometry) ,45))
        ); -- horizontal -- LINESTRING(25 45,99.33034 45)
-       
+
 -- control point
 SELECT ST_AsText(
        ST_SnapToGrid(
@@ -23,7 +23,7 @@ SELECT ST_AsText(
        ST_MakeLine(
                ST_Point(75,100), ST_Point(75 + ST_Length('LINESTRING(25 45,75 100)'::Geometry) ,100))
        ); -- horizontal -- LINESTRING(75 100,149.33034 100)
-       
+
 -- control point
 SELECT ST_AsText(
        ST_SnapToGrid(
@@ -34,4 +34,3 @@ SELECT ST_AsText(
 -- LINESTRING(149.33034 100,148.97241 107.28565,147.90209 114.50113,146.12969 121.57695,143.67226 128.44498,140.55349 135.03907,136.8034 141.29571,132.4581 147.15465,127.55946 152.55946,122.15464 157.4581,116.29569 161.80338,110.03905 165.55347,103.44496 168.67223,96.57693 171.12965,89.5011 172.90205,82.28562 173.97236,74.99997 174.33027,67.71433 173.97235,60.49885 172.90203,53.42302 171.12962,46.55499 168.6722,39.96091 165.55342,33.70427 161.80333,27.84533 157.45804,22.44051 152.55939,17.54187 147.15457,13.19659 141.29563,9.44651 135.03898,6.32774 128.44489,3.87032 121.57686,2.09792 114.50103,1.02761 107.28555,0.6697 99.99991,1.02762 92.71426,2.09794 85.49878,3.87035 78.42295,6.32777 71.55493,9.44655 64.96084,13.19664 58.7042,17.54193 52.84526,22.44058 47.44045,25 45)
 SELECT ST_AsText(ST_SnapToGrid(ST_CurveToLine('CIRCULARSTRING(149.33034 100, 136.8034 141.2957,25 45)',16),0.00001));
 
-
index 15de26d68f59b195e320f0d9261e26a050c25d37..66490d446ae38982ea9f043d892da1aed08d93e0 100644 (file)
@@ -1,23 +1,23 @@
----------------------------------------------------------------------\r
--- Core types to access the PAGC address standardizer\r
--- Author: Stephen Woodbridge <woodbri@imaptools.com>\r
----------------------------------------------------------------------\r
-\r
-CREATE TYPE stdaddr AS (\r
-    building text,\r
-    house_num text,\r
-    predir text,\r
-    qual text,\r
-    pretype text,\r
-    name text,\r
-    suftype text,\r
-    sufdir text,\r
-    ruralroute text,\r
-    extra text,\r
-    city text,\r
-    state text,\r
-    country text,\r
-    postcode text,\r
-    box text,\r
-    unit text\r
-);\r
+---------------------------------------------------------------------
+-- Core types to access the PAGC address standardizer
+-- Author: Stephen Woodbridge <woodbri@imaptools.com>
+---------------------------------------------------------------------
+
+CREATE TYPE stdaddr AS (
+    building text,
+    house_num text,
+    predir text,
+    qual text,
+    pretype text,
+    name text,
+    suftype text,
+    sufdir text,
+    ruralroute text,
+    extra text,
+    city text,
+    state text,
+    country text,
+    postcode text,
+    box text,
+    unit text
+);
index 388c44a80b1313a9622b9d63811faae1a3d0b02c..32019d0c8afd9ab35358071b894cedf696f1de7b 100644 (file)
@@ -1,2 +1,2 @@
-CREATE EXTENSION address_standardizer;\r
+CREATE EXTENSION address_standardizer;
 CREATE EXTENSION address_standardizer_data_us;
\ No newline at end of file
index ed402bb547bf834685ca3655c7f49025d43b4770..aceb51f6d77a1e0f527fcef6da3a33a0ad609b2f 100644 (file)
@@ -7,64 +7,64 @@ create table test_parse_address (
     outstring text
 );
 copy test_parse_address (instring, outstring) from stdin;
-@@ sttype dirs dirs words$     
+@@ sttype dirs dirs words$
 123 oak ln e n mycity ny       (123,"oak ln e",,"123 oak ln e","n mycity",NY,,,US)
 123 oak lane east n mycity ny  (123,"oak lane east",,"123 oak lane east","n mycity",NY,,,US)
 123 oak ln e north mycity ny   (123,"oak ln e",,"123 oak ln e","north mycity",NY,,,US)
-@@ sttype dirs dirs saint words$       
+@@ sttype dirs dirs saint words$
 123 oak ln e n st marie ny     (123,"oak ln e",,"123 oak ln e","n st marie",NY,,,US)
 123 oak lane east n st marie ny        (123,"oak lane east",,"123 oak lane east","n st marie",NY,,,US)
 123 oak ln e north st marie ny (123,"oak ln e",,"123 oak ln e","north st marie",NY,,,US)
 123 oak ln e n saint marie ny  (123,"oak ln e",,"123 oak ln e","n saint marie",NY,,,US)
 123 oak lane east n saint marie ny     (123,"oak lane east",,"123 oak lane east","n saint marie",NY,,,US)
 123 oak ln e north saint marie ny      (123,"oak ln e",,"123 oak ln e","north saint marie",NY,,,US)
-@@ sttype dirs saint words$    
+@@ sttype dirs saint words$
 123 oak ln e st marie ny       (123,"oak ln",,"123 oak ln","e st marie",NY,,,US)
 123 oak lane east st marie ny  (123,"oak lane",,"123 oak lane","east st marie",NY,,,US)
 123 oak ln e st marie ny       (123,"oak ln",,"123 oak ln","e st marie",NY,,,US)
 123 oak ln e saint marie ny    (123,"oak ln",,"123 oak ln","e saint marie",NY,,,US)
 123 oak lane east saint marie ny       (123,"oak lane",,"123 oak lane","east saint marie",NY,,,US)
 123 oak ln e saint marie ny    (123,"oak ln",,"123 oak ln","e saint marie",NY,,,US)
-@@ sttype saint words$ 
+@@ sttype saint words$
 123 oak ln st marie ny (123,"oak ln",,"123 oak ln","st marie",NY,,,US)
 123 oak lane st marie ny       (123,"oak lane",,"123 oak lane","st marie",NY,,,US)
 123 oak ln st marie ny (123,"oak ln",,"123 oak ln","st marie",NY,,,US)
 123 oak ln saint marie ny      (123,"oak ln",,"123 oak ln","saint marie",NY,,,US)
 123 oak lane saint marie ny    (123,"oak lane",,"123 oak lane","saint marie",NY,,,US)
 123 oak ln saint marie ny      (123,"oak ln",,"123 oak ln","saint marie",NY,,,US)
-@@ sttype words$       
+@@ sttype words$
 123 oak ln marie ny    (123,"oak ln",,"123 oak ln",marie,NY,,,US)
 123 oak ln new marie ny        (123,"oak ln",,"123 oak ln","new marie",NY,,,US)
-@@ === same as above but with commas ===       
-@@ sttype dirs dirs words$     
+@@ === same as above but with commas ===
+@@ sttype dirs dirs words$
 123 oak ln e, n mycity ny      (123,"oak ln e",,"123 oak ln e","n mycity",NY,,,US)
 123 oak lane east, n mycity ny (123,"oak lane east",,"123 oak lane east","n mycity",NY,,,US)
 123 oak ln e, north mycity ny  (123,"oak ln e",,"123 oak ln e","north mycity",NY,,,US)
 123 oak ln e n, mycity ny      (123,"oak ln e n",,"123 oak ln e n",mycity,NY,,,US)
 123 oak lane east n, mycity ny (123,"oak lane east n",,"123 oak lane east n",mycity,NY,,,US)
 123 oak ln e north, mycity ny  (123,"oak ln e north",,"123 oak ln e north",mycity,NY,,,US)
-@@ sttype dirs dirs saint words$       
+@@ sttype dirs dirs saint words$
 123 oak ln e, n st marie ny    (123,"oak ln e",,"123 oak ln e","n st marie",NY,,,US)
 123 oak lane east, n st marie ny       (123,"oak lane east",,"123 oak lane east","n st marie",NY,,,US)
 123 oak ln e, north st marie ny        (123,"oak ln e",,"123 oak ln e","north st marie",NY,,,US)
 123 oak ln e, n saint marie ny (123,"oak ln e",,"123 oak ln e","n saint marie",NY,,,US)
 123 oak lane east, n saint marie ny    (123,"oak lane east",,"123 oak lane east","n saint marie",NY,,,US)
 123 oak ln e, north saint marie ny     (123,"oak ln e",,"123 oak ln e","north saint marie",NY,,,US)
-@@ sttype dirs saint words$    
+@@ sttype dirs saint words$
 123 oak ln e, st marie ny      (123,"oak ln e",,"123 oak ln e","st marie",NY,,,US)
 123 oak lane east, st marie ny (123,"oak lane east",,"123 oak lane east","st marie",NY,,,US)
 123 oak ln e, st marie ny      (123,"oak ln e",,"123 oak ln e","st marie",NY,,,US)
 123 oak ln e, saint marie ny   (123,"oak ln e",,"123 oak ln e","saint marie",NY,,,US)
 123 oak lane east, saint marie ny      (123,"oak lane east",,"123 oak lane east","saint marie",NY,,,US)
 123 oak ln e, saint marie ny   (123,"oak ln e",,"123 oak ln e","saint marie",NY,,,US)
-@@ sttype saint words$ 
+@@ sttype saint words$
 123 oak ln, st marie ny        (123,"oak ln",,"123 oak ln","st marie",NY,,,US)
 123 oak lane, st marie ny      (123,"oak lane",,"123 oak lane","st marie",NY,,,US)
 123 oak ln, st marie ny        (123,"oak ln",,"123 oak ln","st marie",NY,,,US)
 123 oak ln, saint marie ny     (123,"oak ln",,"123 oak ln","saint marie",NY,,,US)
 123 oak lane, saint marie ny   (123,"oak lane",,"123 oak lane","saint marie",NY,,,US)
 123 oak ln, saint marie ny     (123,"oak ln",,"123 oak ln","saint marie",NY,,,US)
-@@ sttype words$       
+@@ sttype words$
 123 oak ln, marie ny   (123,"oak ln",,"123 oak ln",marie,NY,,,US)
 123 oak ln, new marie ny       (123,"oak ln",,"123 oak ln","new marie",NY,,,US)
 \.
index 1eab3f1c4e2b2c4fc40c036eadc9e9cec7f40acc..57e79e8313717cfda5855357c850478ff705133b 100644 (file)
@@ -2951,6 +2951,5 @@ INSERT INTO us_lex (seq, word, stdword, token) VALUES (1, 'ZERO', '0', 0);
 INSERT INTO us_lex (seq, word, stdword, token) VALUES (1, 'ZERO', '0', 1);
 INSERT INTO us_lex (seq, word, stdword, token) VALUES (1, 'ZNJA', 'ZANJA', 1);
 
-
 -- needed set default back to original
 ALTER TABLE us_lex ALTER COLUMN is_custom SET DEFAULT true;
index 21725587d749948bb2bf2a7499ca6f36c994ad3e..c6d533f7fe7f199e1ff1009a3ae53890577d542d 100644 (file)
@@ -4378,6 +4378,5 @@ INSERT INTO us_rules (rule) VALUES ('0 3 1 2 22 -1 1 3 5 6 7 -1 1 17');
 INSERT INTO us_rules (rule) VALUES ('0 1 6 -1 1 5 5 -1 1 9');
 INSERT INTO us_rules (rule) VALUES ('-1');
 
-
 -- needed so entries added by users will default to custom
 ALTER TABLE us_rules ALTER COLUMN is_custom SET DEFAULT true;
index b21a248225fbef776160287fba9a5010b3ad181e..37dfa0a7deea68ce6c98c2aed684e2f0fe577fc8 100644 (file)
@@ -28,4 +28,3 @@ WHERE d.refclassid = 'pg_catalog.pg_extension'::pg_catalog.regclass
 AND deptype = 'e' AND e.extname = 'postgis_tiger_geocoder'
 ORDER BY sqladd;
 
-
index c8b123fe4c5c7eaf9afcb3f2ff2fe5356c390217..e3d3d5833e123bb353ae205b1523c0b534e5324e 100644 (file)
@@ -1,5 +1,5 @@
 -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--- 
+--
 ----
 -- PostGIS - Spatial Types for PostgreSQL
 -- http://postgis.net
@@ -10,9 +10,9 @@
 -- the terms of the GNU General Public Licence. See the COPYING file.
 --
 -- Author: Regina Obe <lr@pcorp.us>
---  
+--
 -- This adds the tiger schema to search path
--- Functions in tiger are not schema qualified 
+-- Functions in tiger are not schema qualified
 -- so this is needed for them to work
 
 SELECT postgis_extension_AddToSearchPath('tiger');
index b74161e3f7e7fbb6f97268f5dfac5c9ed5acfc78..7b70bf876fbeea24da6b7a079ba7489a580271e6 100644 (file)
@@ -8,6 +8,6 @@ CREATE TYPE norm_addy AS (
     location VARCHAR,
     stateAbbrev VARCHAR,
     zip VARCHAR,
-    parsed BOOLEAN, 
-    zip4 varchar, 
+    parsed BOOLEAN,
+    zip4 varchar,
     address_alphanumeric varchar);
index 40ca72b4cb7c6820559607d38fdc49da9211e953..99bf4364cae2eefe56120aa15ea81c33766e55df 100644 (file)
@@ -1,2 +1,2 @@
-ALTER TYPE tiger.norm_addy ADD ATTRIBUTE zip4 varchar(4);\r
+ALTER TYPE tiger.norm_addy ADD ATTRIBUTE zip4 varchar(4);
 ALTER TYPE  tiger.norm_addy ADD ATTRIBUTE  address_alphanumeric varchar;
\ No newline at end of file
index 23edbcf7fd8765068cb83e418ebbdfe3815a9c74..704a145b6cad4ef096801a8cdba6bc44bbb9f6a0 100644 (file)
@@ -1,5 +1,5 @@
 -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--- 
+--
 ----
 -- PostGIS - Spatial Types for PostgreSQL
 -- http://postgis.net
 -- the terms of the GNU General Public Licence. See the COPYING file.
 --
 -- Author: Regina Obe <lr@pcorp.us>
---  
+--
 -- This drops extension helper functions
 -- and should be called at the end of the extension upgrade file
--- removes all postgis_topology functions from postgis_topology extension since they will be readded 
+-- removes all postgis_topology functions from postgis_topology extension since they will be readded
 -- during upgrade
 SELECT postgis_extension_remove_objects('postgis_tiger_geocoder', 'FUNCTION');
 SELECT postgis_extension_remove_objects('postgis_tiger_geocoder', 'AGGREGATE');
index bf161a43f35b1edfd38551da1cbdeef2f28a533e..5bba0642845a62312ac4f21255d9cb751ee27daa 100644 (file)
@@ -1,10 +1,10 @@
--- these introduced in PostGIS 2.4\r
-DO language plpgsql\r
-$$\r
-    BEGIN\r
-        ALTER TYPE tiger.norm_addy ADD ATTRIBUTE zip4 varchar;\r
-        ALTER TYPE tiger.norm_addy ADD ATTRIBUTE address_alphanumeric varchar;\r
-    EXCEPTION\r
-        WHEN others THEN  -- ignore the error probably cause it already exists\r
-    END;\r
+-- these introduced in PostGIS 2.4
+DO language plpgsql
+$$
+    BEGIN
+        ALTER TYPE tiger.norm_addy ADD ATTRIBUTE zip4 varchar;
+        ALTER TYPE tiger.norm_addy ADD ATTRIBUTE address_alphanumeric varchar;
+    EXCEPTION
+        WHEN others THEN  -- ignore the error probably cause it already exists
+    END;
 $$;
\ No newline at end of file
index 4145935b3ce1a55985c388fd721165ac497c45dc..9d695d6a35f673ff4c4c6f1de718cefed9e72246 100644 (file)
@@ -1,5 +1,5 @@
 -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--- 
+--
 ----
 -- PostGIS - Spatial Types for PostgreSQL
 -- http://postgis.net
 -- the terms of the GNU General Public Licence. See the COPYING file.
 --
 -- Author: Regina Obe <lr@pcorp.us>
---  
+--
 -- This drops extension helper functions
 -- and should be called at the end of the extension upgrade file
--- removes all postgis_topology functions from postgis_topology extension since they will be readded 
+-- removes all postgis_topology functions from postgis_topology extension since they will be readded
 -- during upgrade
 SELECT postgis_extension_remove_objects('postgis_topology', 'FUNCTION');
 SELECT postgis_extension_remove_objects('postgis_topology', 'AGGREGATE');
index 0c9f039a722b36971cd07d3a507fee992fd48602..7f2346c8bbaf9220d26dca0272cd3fde13fb8bf7 100644 (file)
@@ -1,5 +1,5 @@
 -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--- 
+--
 --
 -- PostGIS - Spatial Types for PostgreSQL
 -- http://postgis.net
@@ -7,7 +7,7 @@
 --
 -- This is free software; you can redistribute and/or modify it under
 -- the terms of the GNU General Public Licence. See the COPYING file.
---  
+--
 -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
 #define CREATEFUNCTION CREATE OR REPLACE FUNCTION
 # define _VOLATILE_STRICT VOLATILE STRICT
 # define _VOLATILE VOLATILE
 # define _STRICT STRICT
-#else 
+#else
 # define _IMMUTABLE_STRICT  with(iscachable,isstrict)
 # define _IMMUTABLE with(iscachable)
 # define _STABLE_STRICT with(isstrict)
-# define _STABLE 
+# define _STABLE
 # define _VOLATILE_STRICT with(isstrict)
-# define _VOLATILE 
+# define _VOLATILE
 # define _STRICT with(isstrict)
-#endif 
+#endif
 
 #if USE_VERSION >= 73
 # define HAS_SCHEMAS 1
 #endif
 
-
 -----------------------------------------------------------------------
 -- LONG TERM LOCKING
 -----------------------------------------------------------------------
@@ -63,7 +62,7 @@ END;
 '
 LANGUAGE 'plpgsql' _VOLATILE_STRICT;
 
--- LockRow([schema], table, rowid, auth, [expires]) 
+-- LockRow([schema], table, rowid, auth, [expires])
 -- Returns 1 if successfully obtained the lock, 0 otherwise
 CREATEFUNCTION LockRow(text, text, text, text, timestamp)
        RETURNS int
@@ -77,14 +76,14 @@ DECLARE
        ret int;
        mytoid oid;
        myrec RECORD;
-       
+
 BEGIN
 
        IF NOT LongTransactionsEnabled() THEN
                RAISE EXCEPTION ''Long transaction support disabled, use EnableLongTransaction() to enable.'';
        END IF;
 
-       EXECUTE ''DELETE FROM authorization_table WHERE expires < now()''; 
+       EXECUTE ''DELETE FROM authorization_table WHERE expires < now()'';
 
 #ifdef HAS_SCHEMAS
        SELECT c.oid INTO mytoid FROM pg_class c, pg_namespace n
@@ -98,7 +97,7 @@ BEGIN
 
        -- RAISE NOTICE ''toid: %'', mytoid;
 
-       FOR myrec IN SELECT * FROM authorization_table WHERE 
+       FOR myrec IN SELECT * FROM authorization_table WHERE
                toid = mytoid AND rid = myrid
        LOOP
                IF myrec.authid != authid THEN
@@ -148,7 +147,6 @@ CREATEFUNCTION LockRow(text, text, text, timestamp)
 #endif
        LANGUAGE 'sql' _VOLATILE_STRICT;
 
-
 CREATEFUNCTION AddAuth(text)
        RETURNS BOOLEAN
        AS '
@@ -162,8 +160,8 @@ BEGIN
        okay := ''f'';
        FOR myrec IN SELECT * FROM pg_class WHERE relname = ''temp_lock_have_table'' LOOP
                okay := ''t'';
-       END LOOP; 
-       IF (okay <> ''t'') THEN 
+       END LOOP;
+       IF (okay <> ''t'') THEN
                CREATE TEMP TABLE temp_lock_have_table (transid xid, lockcode text);
                        -- this will only work from pgsql7.4 up
                        -- ON COMMIT DELETE ROWS;
@@ -180,7 +178,6 @@ BEGIN
 END;
 '
 LANGUAGE PLPGSQL;
 
 -- CheckAuth( <schema>, <table>, <ridcolumn> )
 --
@@ -208,7 +205,7 @@ BEGIN
 
        -- 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 ''
 #ifdef HAS_SCHEMAS
                || quote_ident(schema) || ''.'' || quote_ident($2)
 #else
@@ -230,16 +227,15 @@ CREATEFUNCTION CheckAuth(text, text)
        LANGUAGE 'SQL';
 
 CREATEFUNCTION CheckAuthTrigger()
-       RETURNS trigger AS 
+       RETURNS trigger AS
        '@MODULE_FILENAME@', 'check_authorization'
        LANGUAGE C;
 
 CREATEFUNCTION GetTransactionID()
-       RETURNS xid AS 
+       RETURNS xid AS
        '@MODULE_FILENAME@', 'getTransactionID'
        LANGUAGE C;
 
-
 --
 -- Enable Long transactions support
 --
@@ -325,7 +321,7 @@ LANGUAGE 'plpgsql';
 --
 -- Disable Long transactions support
 --
---  (1) Drop any long_xact trigger 
+--  (1) Drop any long_xact trigger
 --  (2) Drop the authorization_table
 --  (3) KEEP the authorized_tables view
 --
index 5b4dc7ae35c4e27ed30faa3c16fc378ca4de55f5..5da5a76563c1a40021d63acf08dca6990c158dae 100644 (file)
@@ -40,7 +40,6 @@ BEGIN;
 
 END;
 
-
 BEGIN;
 
        -- Add authorization for row 2
index 942b3aaf81f78f01c856493291de9543f0a24e19..ac79ca686352435c143121376a7e5929fb6542a7 100644 (file)
@@ -18,7 +18,6 @@ language 'plpgsql';
 
 --end build_history_table
 
-
 --im open to suggestions for the names of the functions.
 --just realized that one is build_history_table and the other create_...
 CREATE OR REPLACE FUNCTION postgis_enable_history(p_schema text,p_table text,p_geometry_field text) returns boolean as
@@ -55,7 +54,7 @@ BEGIN
        v_srid:= (SELECT srid FROM public.geometry_columns WHERE f_table_schema = p_schema AND f_table_name = p_table AND f_geometry_column = p_geometry_field);
        v_gid:= (SELECT column_name FROM information_schema.key_column_usage WHERE table_schema = p_schema AND table_name = p_table);
        --end sql
-       
+
        --generate sql for creating the historic table
        v_table_sql:= 'CREATE TABLE ' || v_history_table ||
        '(' ||
@@ -79,7 +78,7 @@ BEGIN
        v_srid::text || ',' ||
        quote_literal(v_geometry_type) || ');';
        --end update geometry_columns
-       
+
        --insert into historic_tables
        v_update_history_sql:='INSERT INTO public.historic_information(table_id,table_name,primary_field,geometry_field) VALUES (' ||
        'DEFAULT,' ||
@@ -98,7 +97,7 @@ BEGIN
        execute _postgis_create_history_indexes(p_schema,p_table,p_geometry_field);
 
        return true;
-       
+
 END
 $$
 language 'plpgsql';
@@ -131,7 +130,7 @@ BEGIN
 
 END
 $$
-language 'plpgsql';    
+language 'plpgsql';
 --end add_insert_rule
 
 --add_update_rule
index a7b355aad832b780452b07db72e6d6801a809aa8..6c25b470e4b8c6dfb488e3e2d16d93d137299d34 100644 (file)
@@ -325,7 +325,6 @@ SELECT AddGeometryColumn('bridges','position','101','POINT','2');
 -- ---------------------
 -- -- !#@ ADAPTATION END
 
-
 --
 -- Streams
 --
index 5eb5ce0f5eec79370e9967139e0f0bd7be59e3d8..6ef76774e1938efcd905e88eeaf7400ad33fdc2e 100644 (file)
 --//////////////////////////////////////////////////////////////////////////////
 --
 --================================
--- Conformance Item T1 
--- GEOMETRY_COLUMNS table/view is created/updated properly     
+-- Conformance Item T1
+-- GEOMETRY_COLUMNS table/view is created/updated properly
 -- For this test we will check to see that all of the feature tables are
 -- represented by entries in the GEOMETRY_COLUMNS table/view
 --
 -- ANSWER: lakes, road_segments, divided_routes, buildings, forests, bridges,
 --         named_places, streams, ponds, map_neatlines
--- *** ADAPTATION ALERT ***    
+-- *** ADAPTATION ALERT ***
 -- Since there are no quotes around the table names in the CREATE TABLEs,
 -- they will be converted to upper case in many DBMSs, and therefore, the
 -- answer to this query may be:
 -- ANSWER: LAKES, ROAD_SEGMENTS, DIVIDED_ROUTES, BUILDINGS, FORESTS, BRIDGES,
 --         NAMED_PLACES, STREAMS, PONDS, MAP_NEATLINES
--- *** ADAPTATION ALERT ***    
+-- *** ADAPTATION ALERT ***
 -- If the implementer made the adaptation concerning the buildings table
 -- in sqltsch.sql, then the answer here may differ slightly.
---     
+--
 --
 --================================
 --
@@ -103,13 +103,13 @@ FROM geometry_columns;
 --
 --
 --================================
--- Conformance Item T2 
--- GEOMETRY_COLUMNS table/view is created/updated properly     
+-- Conformance Item T2
+-- GEOMETRY_COLUMNS table/view is created/updated properly
 -- For this test we will check to see that the correct geometry columns for the
 -- streams table is represented in the GEOMETRY_COLUMNS table/view
 --
 -- ANSWER: centerline
--- *** ADAPTATION ALERT ***    
+-- *** ADAPTATION ALERT ***
 -- Since there are no quotes around the table name, streams, in it's CREATE TABLE,
 -- it will be converted to upper case in many DBMSs, and therefore, the WHERE
 -- clause may have to be f_table_name = 'STREAMS'.
@@ -122,13 +122,13 @@ WHERE f_table_name = 'streams';
 --
 --
 --================================
--- Conformance Item T3 
--- GEOMETRY_COLUMNS table/view is created/updated properly     
+-- Conformance Item T3
+-- GEOMETRY_COLUMNS table/view is created/updated properly
 -- For this test we will check to see that the correct coordinate dimension
 -- for the streams table is represented in the GEOMETRY_COLUMNS table/view
 --
--- ANSWER: 2   
--- *** ADAPTATION ALERT ***    
+-- ANSWER: 2
+-- *** ADAPTATION ALERT ***
 -- Since there are no quotes around the table name, streams, in it's CREATE TABLE,
 -- it will be converted to upper case in many DBMSs, and therefore, the WHERE
 -- clause may have to be f_table_name = 'STREAMS'.
@@ -141,13 +141,13 @@ WHERE f_table_name = 'streams';
 --
 --
 --================================
--- Conformance Item T4 
--- GEOMETRY_COLUMNS table/view is created/updated properly     
+-- Conformance Item T4
+-- GEOMETRY_COLUMNS table/view is created/updated properly
 -- For this test we will check to see that the correct value of srid for
 -- the streams table is represented in the GEOMETRY_COLUMNS table/view
 --
--- ANSWER: 101 
--- *** ADAPTATION ALERT ***    
+-- ANSWER: 101
+-- *** ADAPTATION ALERT ***
 -- Since there are no quotes around the table name, streams, in it's CREATE TABLE,
 -- it will be converted to upper case in many DBMSs, and therefore, the WHERE
 -- clause may have to be f_table_name = 'STREAMS'.
@@ -171,7 +171,7 @@ WHERE f_table_name = 'streams';
 --           PROJECTION["Traverse_Mercator"], PARAMETER["False_Easting", 500000.0],
 --           PARAMETER["False_Northing", 0.0], PARAMETER["Central_Meridian", -99.0],
 --           PARAMETER["Scale_Factor", 0.9996], PARAMETER["Latitude_of_origin", 0.0],
---           UNIT["Meter", 1.0]]'      
+--           UNIT["Meter", 1.0]]'
 --
 --================================
 --
@@ -188,7 +188,7 @@ WHERE SRID = 101;
 --//////////////////////////////////////////////////////////////////////////////
 --
 --================================
--- Conformance Item T6 
+-- Conformance Item T6
 -- Dimension(g Geometry) : Integer
 -- For this test we will determine the dimension of Blue Lake.
 --
@@ -202,7 +202,7 @@ WHERE name = 'Blue Lake';
 --
 --
 --================================
--- Conformance Item T7 
+-- Conformance Item T7
 -- GeometryType(g Geometry) : String
 -- For this test we will determine the type of Route 75.
 --
@@ -234,7 +234,7 @@ WHERE name = 'Route 75';
 -- -- !#@ ADAPTATION END
 --
 --================================
--- Conformance Item T8 
+-- Conformance Item T8
 -- AsText(g Geometry) : String
 -- For this test we will determine the WKT representation of Goose Island.
 --
@@ -247,7 +247,7 @@ FROM named_places
 WHERE name = 'Goose Island';
 --
 --================================
--- Conformance Item T9 
+-- Conformance Item T9
 -- AsBinary(g Geometry) : Blob
 -- For this test we will determine the WKB representation of Goose Island.
 -- We will test by applying AsText to the result of PolygonFromText to the
@@ -262,7 +262,7 @@ FROM named_places
 WHERE name = 'Goose Island';
 --
 --================================
--- Conformance Item T10        
+-- Conformance Item T10
 -- SRID(g Geometry) : Integer
 -- For this test we will determine the SRID of Goose Island.
 --
@@ -275,7 +275,7 @@ FROM named_places
 WHERE name = 'Goose Island';
 --
 --================================
--- Conformance Item T11        
+-- Conformance Item T11
 -- IsEmpty(g Geometry) : Integer
 -- For this test we will determine whether the geometry of a
 -- segment of Route 5 is empty.
@@ -293,7 +293,7 @@ FROM road_segments
 WHERE name = 'Route 5' AND aliases = 'Main Street';
 --
 --================================
--- Conformance Item T12        
+-- Conformance Item T12
 -- IsSimple(g Geometry) : Integer
 -- For this test we will determine whether the geometry of a
 -- segment of Blue Lake is simple.
@@ -311,7 +311,7 @@ FROM lakes
 WHERE name = 'Blue Lake';
 --
 --================================
--- Conformance Item T13        
+-- Conformance Item T13
 -- Boundary(g Geometry) : Geometry
 -- For this test we will determine the boundary of Goose Island.
 -- NOTE: The boundary result is as defined in 3.12.3.2 of 96-015R1.
@@ -343,7 +343,7 @@ WHERE name = 'Goose Island';
 -- -- !#@ ADAPTATION END
 --
 --================================
--- Conformance Item T14        
+-- Conformance Item T14
 -- Envelope(g Geometry) : Geometry
 -- For this test we will determine the envelope of Goose Island.
 --
@@ -382,7 +382,7 @@ WHERE name = 'Goose Island';
 --//////////////////////////////////////////////////////////////////////////////
 --
 --================================
--- Conformance Item T15        
+-- Conformance Item T15
 -- X(p Point) : Double Precision
 -- For this test we will determine the X coordinate of Cam Bridge.
 --
@@ -413,7 +413,7 @@ WHERE name = 'Cam Bridge';
 -- -- !#@ ADAPTATION END
 --
 --================================
--- Conformance Item T16        
+-- Conformance Item T16
 -- Y(p Point) : Double Precision
 -- For this test we will determine the Y coordinate of Cam Bridge.
 --
@@ -434,7 +434,7 @@ WHERE name = 'Cam Bridge';
 --//////////////////////////////////////////////////////////////////////////////
 --
 --================================
--- Conformance Item T17        
+-- Conformance Item T17
 -- StartPoint(c Curve) : Point
 -- For this test we will determine the start point of road segment 102.
 --
@@ -447,7 +447,7 @@ FROM road_segments
 WHERE fid = 102;
 --
 --================================
--- Conformance Item T18        
+-- Conformance Item T18
 -- EndPoint(c Curve) : Point
 -- For this test we will determine the end point of road segment 102.
 --
@@ -460,7 +460,7 @@ FROM road_segments
 WHERE fid = 102;
 --
 --================================
--- Conformance Item T19        
+-- Conformance Item T19
 -- IsClosed(c Curve) : Integer
 -- For this test we will determine the boundary of Goose Island.
 --
@@ -477,7 +477,7 @@ FROM named_places
 WHERE name = 'Goose Island';
 --
 --================================
--- Conformance Item T20        
+-- Conformance Item T20
 -- IsRing(c Curve) : Integer
 -- For this test we will determine the boundary of Goose Island.
 --
@@ -494,7 +494,7 @@ FROM named_places
 WHERE name = 'Goose Island';
 --
 --================================
--- Conformance Item T21        
+-- Conformance Item T21
 -- Length(c Curve) : Double Precision
 -- For this test we will determine the length of road segment 106.
 --
@@ -515,7 +515,7 @@ WHERE fid = 106;
 --//////////////////////////////////////////////////////////////////////////////
 --
 --================================
--- Conformance Item T22        
+-- Conformance Item T22
 -- NumPoints(l LineString) : Integer
 -- For this test we will determine the number of points in road segment 102.
 --
@@ -528,7 +528,7 @@ FROM road_segments
 WHERE fid = 102;
 --
 --================================
--- Conformance Item T23        
+-- Conformance Item T23
 -- PointN(l LineString, n Integer) : Point
 -- For this test we will determine the 1st point in road segment 102.
 --
@@ -549,7 +549,7 @@ WHERE fid = 102;
 --//////////////////////////////////////////////////////////////////////////////
 --
 --================================
--- Conformance Item T24        
+-- Conformance Item T24
 -- Centroid(s Surface) : Point
 -- For this test we will determine the centroid of Goose Island.
 --
@@ -562,7 +562,7 @@ FROM named_places
 WHERE name = 'Goose Island';
 --
 --================================
--- Conformance Item T25        
+-- Conformance Item T25
 -- PointOnSurface(s Surface) : Point
 -- For this test we will determine a point on Goose Island.
 -- NOTE: For this test we will have to uses the Contains function
@@ -581,7 +581,7 @@ FROM named_places
 WHERE name = 'Goose Island';
 --
 --================================
--- Conformance Item T26        
+-- Conformance Item T26
 -- Area(s Surface) : Double Precision
 -- For this test we will determine the area of Goose Island.
 --
@@ -602,7 +602,7 @@ WHERE name = 'Goose Island';
 --//////////////////////////////////////////////////////////////////////////////
 --
 --================================
--- Conformance Item T27        
+-- Conformance Item T27
 -- ExteriorRing(p Polygon) : LineString
 -- For this test we will determine the exteroir ring of Blue Lake.
 --
@@ -615,7 +615,7 @@ FROM lakes
 WHERE name = 'Blue Lake';
 --
 --================================
--- Conformance Item T28        
+-- Conformance Item T28
 -- NumInteriorRings(p Polygon) : Integer
 -- For this test we will determine the number of interior rings of Blue Lake.
 --
@@ -628,7 +628,7 @@ FROM lakes
 WHERE name = 'Blue Lake';
 --
 --================================
--- Conformance Item T29        
+-- Conformance Item T29
 -- InteriorRingN(p Polygon, n Integer) : LineString
 -- For this test we will determine the first interior ring of Blue Lake.
 --
@@ -649,7 +649,7 @@ WHERE name = 'Blue Lake';
 --//////////////////////////////////////////////////////////////////////////////
 --
 --================================
--- Conformance Item T30        
+-- Conformance Item T30
 -- NumGeometries(g GeometryCollection) : Integer
 -- For this test we will determine the number of geometries in Route 75.
 --
@@ -662,7 +662,7 @@ FROM divided_routes
 WHERE name = 'Route 75';
 --
 --================================
--- Conformance Item T31        
+-- Conformance Item T31
 -- GeometryN(g GeometryCollection, n Integer) : Geometry
 -- For this test we will determine the second geometry in Route 75.
 --
@@ -702,7 +702,7 @@ WHERE name = 'Route 75';
 --//////////////////////////////////////////////////////////////////////////////
 --
 --================================
--- Conformance Item T32        
+-- Conformance Item T32
 -- IsClosed(mc MultiCurve) : Integer
 -- For this test we will determine if the geometry of Route 75 is closed.
 --
@@ -719,7 +719,7 @@ FROM divided_routes
 WHERE name = 'Route 75';
 --
 --================================
--- Conformance Item T33        
+-- Conformance Item T33
 -- Length(mc MultiCurve) : Double Precision
 -- For this test we will determine the length of Route 75.
 -- NOTE: This makes no semantic sense in our example...
@@ -741,7 +741,7 @@ WHERE name = 'Route 75';
 --//////////////////////////////////////////////////////////////////////////////
 --
 --================================
--- Conformance Item T34        
+-- Conformance Item T34
 -- Centroid(ms MultiSurface) : Point
 -- For this test we will determine the centroid of the ponds.
 --
@@ -754,7 +754,7 @@ FROM ponds
 WHERE fid = 120;
 --
 --================================
--- Conformance Item T35        
+-- Conformance Item T35
 -- PointOnSurface(ms MultiSurface) : Point
 -- For this test we will determine a point on the ponds.
 -- NOTE: For this test we will have to uses the Contains function
@@ -773,7 +773,7 @@ FROM ponds
 WHERE fid = 120;
 --
 --================================
--- Conformance Item T36        
+-- Conformance Item T36
 -- Area(ms MultiSurface) : Double Precision
 -- For this test we will determine the area of the ponds.
 --
@@ -794,7 +794,7 @@ WHERE fid = 120;
 --//////////////////////////////////////////////////////////////////////////////
 --
 --================================
--- Conformance Item T37        
+-- Conformance Item T37
 -- Equals(g1 Geometry, g2 Geometry) : Integer
 -- For this test we will determine if the geometry of Goose Island is equal
 -- to the same geometry as consructed from it's WKT representation.
@@ -812,7 +812,7 @@ FROM named_places
 WHERE name = 'Goose Island';
 --
 --================================
--- Conformance Item T38        
+-- Conformance Item T38
 -- Disjoint(g1 Geometry, g2 Geometry) : Integer
 -- For this test we will determine if the geometry of Route 75 is disjoint
 -- from the geometry of Ashton.
@@ -830,7 +830,7 @@ FROM divided_routes, named_places
 WHERE divided_routes.name = 'Route 75' AND named_places.name = 'Ashton';
 --
 --================================
--- Conformance Item T39        
+-- Conformance Item T39
 -- Touch(g1 Geometry, g2 Geometry) : Integer
 -- For this test we will determine if the geometry of Cam Stream touches
 -- the geometry of Blue Lake.
@@ -866,7 +866,7 @@ WHERE streams.name = 'Cam Stream' AND lakes.name = 'Blue Lake';
 -- -- !#@ ADAPTATION END
 --
 --================================
--- Conformance Item T40        
+-- Conformance Item T40
 -- Within(g1 Geometry, g2 Geometry) : Integer
 -- For this test we will determine if the geometry of the house at 215 Main Street
 -- is within Ashton.
@@ -904,7 +904,7 @@ WHERE named_places.name = 'Ashton' AND buildings.address = '215 Main Street';
 -- -- !#@ ADAPTATION END
 --
 --================================
--- Conformance Item T41        
+-- Conformance Item T41
 -- Overlap(g1 Geometry, g2 Geometry) : Integer
 -- For this test we will determine if the geometry of Green Forest overlaps
 -- the geometry of Ashton.
@@ -940,7 +940,7 @@ WHERE forests.name = 'Green Forest' AND named_places.name = 'Ashton';
 -- -- !#@ ADAPTATION END
 --
 --================================
--- Conformance Item T42        
+-- Conformance Item T42
 -- Cross(g1 Geometry, g2 Geometry) : Integer
 -- For this test we will determine if the geometry of road segment 102 crosses
 -- the geometry of Route 75.
@@ -978,7 +978,7 @@ WHERE road_segments.fid = 102 AND divided_routes.name = 'Route 75';
 -- -- !#@ ADAPTATION END
 --
 --================================
--- Conformance Item T43        
+-- Conformance Item T43
 -- Intersects(g1 Geometry, g2 Geometry) : Integer
 -- For this test we will determine if the geometry of road segment 102 intersects
 -- the geometry of Route 75.
@@ -1014,7 +1014,7 @@ WHERE road_segments.fid = 102 AND divided_routes.name = 'Route 75';
 -- -- !#@ ADAPTATION END
 --
 --================================
--- Conformance Item T44        
+-- Conformance Item T44
 -- Contains(g1 Geometry, g2 Geometry) : Integer
 -- For this test we will determine if the geometry of Green Forest contains
 -- the geometry of Ashton.
@@ -1050,7 +1050,7 @@ WHERE forests.name = 'Green Forest' AND named_places.name = 'Ashton';
 -- -- !#@ ADAPTATION END
 --
 --================================
--- Conformance Item T45        
+-- Conformance Item T45
 -- Relate(g1 Geometry, g2 Geometry, PatternMatrix String) : Integer
 -- For this test we will determine if the geometry of Green Forest relates to
 -- the geometry of Ashton using the pattern "TTTTTTTTT".
@@ -1094,7 +1094,7 @@ WHERE forests.name = 'Green Forest' AND named_places.name = 'Ashton';
 --//////////////////////////////////////////////////////////////////////////////
 --
 --================================
--- Conformance Item T46        
+-- Conformance Item T46
 -- Distance(g1 Geometry, g2 Geometry) : Double Precision
 -- For this test we will determine the distance between Cam Bridge and Ashton.
 --
@@ -1115,7 +1115,7 @@ WHERE bridges.name = 'Cam Bridge' AND named_places.name = 'Ashton';
 --//////////////////////////////////////////////////////////////////////////////
 --
 --================================
--- Conformance Item T47        
+-- Conformance Item T47
 -- Intersection(g1 Geometry, g2 Geometry) : Geometry
 -- For this test we will determine the intersection between Cam Stream and
 -- Blue Lake.
@@ -1148,7 +1148,7 @@ WHERE streams.name = 'Cam Stream' AND lakes.name = 'Blue Lake';
 -- -- !#@ ADAPTATION END
 --
 --================================
--- Conformance Item T48        
+-- Conformance Item T48
 -- Difference(g1 Geometry, g2 Geometry) : Geometry
 -- For this test we will determine the difference between Ashton and
 -- Green Forest.
@@ -1184,7 +1184,7 @@ WHERE named_places.name = 'Ashton' AND forests.name = 'Green Forest';
 -- -- !#@ ADAPTATION END
 --
 --================================
--- Conformance Item T49        
+-- Conformance Item T49
 -- Union(g1 Geometry, g2 Geometry) : Integer
 -- For this test we will determine the union of Blue Lake and Goose Island
 --
@@ -1222,7 +1222,7 @@ WHERE lakes.name = 'Blue Lake' AND named_places.name = 'Goose Island';
 -- -- !#@ ADAPTATION END
 --
 --================================
--- Conformance Item T50        
+-- Conformance Item T50
 -- SymmetricDifference(g1 Geometry, g2 Geometry) : Integer
 -- For this test we will determine the symmetric difference of Blue Lake
 -- and Goose Island
@@ -1258,7 +1258,7 @@ WHERE lakes.name = 'Blue Lake' AND named_places.name = 'Goose Island';
 -- -- !#@ ADAPTATION END
 --
 --================================
--- Conformance Item T51        
+-- Conformance Item T51
 -- Buffer(g Geometry, d Double Precision) : Geometry
 -- For this test we will make a 15 meter buffer about Cam Bridge.
 -- NOTE: This test we count the number of buildings contained in
@@ -1300,7 +1300,7 @@ WHERE Contains(Buffer(bridges.position, 15.0), buildings.footprint);
 -- -- !#@ ADAPTATION END
 --
 --================================
--- Conformance Item T52        
+-- Conformance Item T52
 -- ConvexHull(g Geometry) : Geometry
 -- For this test we will determine the convex hull of Blue Lake
 --
@@ -1334,7 +1334,6 @@ WHERE lakes.name = 'Blue Lake';
 -- ---------------------
 -- -- !#@ ADAPTATION END
 
-
 --
 --
 --
index 36f9bbe53abedf3083ca728146066c8a47545a6f..50899fef4695f33b153d748dec66f9516b1dcd2b 100644 (file)
@@ -35,7 +35,6 @@ BEGIN
 END;
 $_$ LANGUAGE plpgsql STABLE;
 
-
 CREATE OR REPLACE FUNCTION geocode(
     IN_ADDY NORM_ADDY,
     max_results integer DEFAULT 10,
index 9e48d248b9e3642a09890d45b2f74e278633954c..cfa8b03b2db36448b2e8c216633acd0056f76a00 100644 (file)
@@ -245,7 +245,6 @@ BEGIN
         RETURN;
     END IF;
 
-
 -- There are a couple of different things to try, from the highest preference and falling back
   -- to lower-preference options.
   -- We start out with zip-code matching, where the zip code could possibly be in more than one
index 7d3d5cda98526befe86993d48fbcba5d2af38d17..1a5142c176142081b3db200706fd07f1d6ba176b 100644 (file)
@@ -50,7 +50,7 @@ BEGIN
         var_zip := array_agg(zip) FROM zip_lookup_base WHERE statefp = in_statefp AND lower(city) LIKE lower(in_city) || '%'  ;
     END IF;
     IF var_debug THEN
-               RAISE NOTICE 'var_zip: %, city: %', quote_nullable(var_zip), quote_nullable(in_city);   
+               RAISE NOTICE 'var_zip: %, city: %', quote_nullable(var_zip), quote_nullable(in_city);
     END IF;
     var_sql := '
     WITH
@@ -84,7 +84,7 @@ BEGIN
                                FROM (SELECT * FROM tiger.edges WHERE statefp = $1) AS e INNER JOIN a2 AS a ON (e.statefp = a.statefp AND a.tlid = e.tlid)
                                        INNER JOIN e1 ON (e.statefp = e1.statefp
                                        AND ARRAY[e.tnidf, e.tnidt] && ARRAY[e1.tnidf, e1.tnidt] )
-                                       
+
                                WHERE (lower(e.fullname) = $7 or lower(a.name) LIKE $4 || ''%'')
                                ORDER BY CASE WHEN lower(a.name) = $4 THEN 0 ELSE 1 END + CASE WHEN lower(e.fullname) = $7 THEN 0 ELSE 1 END
                                LIMIT 5000
index 899592cd4cbb16454bad68f79050f3251273d20e..04f2f993ac48cd4e69925bc485edc88276643126 100644 (file)
@@ -67,13 +67,13 @@ BEGIN
                        FROM generate_series(1,ST_NPoints(road)) As i
                                        WHERE part > ST_LineLocatePoint(road,ST_PointN(road,i))
                                        ORDER BY i DESC;
-               IF npos < ST_NPoints(road) THEN                         
+               IF npos < ST_NPoints(road) THEN
                        az := ST_Azimuth (ST_PointN(road,npos), ST_PointN(road, npos + 1));
                ELSE
                        az := ST_Azimuth (center_pt, ST_PointN(road, npos));
                END IF;
        END IF;
-       
+
         dir := CASE WHEN az < pi() THEN -1 ELSE 1 END;
         --dir := 1;
         var_dist := in_offset_m*CASE WHEN in_side = 'L' THEN -1 ELSE 1 END;
index 083a384734fb2a84969768039470b40ce083d530..7d3d288e2670f8c76d94fe5434cae579444cb6b9 100644 (file)
@@ -46,7 +46,6 @@ $$
 LANGUAGE sql IMMUTABLE
 COST 5;
 
-
 -- Generate script to drop all non-primary unique indexes on tiger and tiger_data tables
 CREATE OR REPLACE FUNCTION drop_indexes_generate_script(tiger_data_schema text DEFAULT 'tiger_data')
 RETURNS text AS
@@ -199,7 +198,6 @@ ORDER BY 1), E'\r');
 $$
 LANGUAGE sql VOLATILE;
 
-
 CREATE OR REPLACE FUNCTION install_missing_indexes() RETURNS boolean
 AS
 $$
@@ -211,7 +209,6 @@ END
 $$
 language plpgsql;
 
-
 CREATE OR REPLACE FUNCTION drop_dupe_featnames_generate_script() RETURNS text
 AS
 $$
@@ -221,7 +218,7 @@ SELECT min(f.gid) As min_gid, f.tlid, lower(f.fullname) As fname
        FROM ONLY ' || t.table_schema || '.' || t.table_name || ' As f
        GROUP BY f.tlid, lower(f.fullname)
        HAVING count(*) > 1;
-       
+
 DELETE FROM ' || t.table_schema || '.' || t.table_name || ' AS feat
 WHERE EXISTS (SELECT tlid FROM dup WHERE feat.tlid = dup.tlid AND lower(feat.fullname) = dup.fname
                AND feat.gid > dup.min_gid);
index 2925cf688f03111b55c4717cc62208d979d4eea3..e126f825b8a445c54670e0bdf3216163603a0122 100644 (file)
@@ -40,8 +40,8 @@ BEGIN
                        , ('use_pagc_address_parser', 'false', 'boolean','normalize', 'If set to true, will try to use the address_standardizer extension (via pagc_normalize_address) instead of tiger normalize_address built on')
                        , ('zip_penalty', '2', 'numeric','rating', 'As input to rating will add (ref_zip - tar_zip)*zip_penalty where ref_zip is input address and tar_zip is a target address candidate')
                ) f(name,setting,unit,category,short_desc);
-               
-       -- delete entries that are the same as default values   
+
+       -- delete entries that are the same as default values
        DELETE FROM geocode_settings As gc USING geocode_settings_default As gf WHERE gf.name = gc.name AND gf.setting = gc.setting;
 END;
 $$
index ec99821e8b7f567af6a2d4e7e885a71ddb85b668..91afb81dec4ef815e2c7a022a30f9a62210dbabc 100644 (file)
@@ -96,7 +96,7 @@ BEGIN
   -- Assume that the address begins with a digit, and extract it from
   -- the input string.
   addressString := substring(rawInput from E'^([0-9].*?)[ ,/.]');
-  
+
   -- try to pull full street number including non-digits like 1R
   result.address_alphanumeric := substring(rawInput from E'^([0-9a-zA-Z].*?)[ ,/.]');
 
@@ -114,7 +114,7 @@ BEGIN
     zipString := COALESCE(substring(rawInput from ws || '([0-9]{5})-[0-9]{0,4}$'),
                 substring(rawInput from ws || '([0-9]{2,5})$'),
                 substring(rawInput from ws || '([0-9]{6,14})$'));
-                
+
     result.zip4 := COALESCE(substring(rawInput from ws || '[0-9]{5}-([0-9]{0,4})$'),substring(rawInput from ws || '[0-9]{5}([0-9]{0,4})$'));
 
     IF debug_flag THEN
@@ -442,11 +442,10 @@ BEGIN
                  END IF;
                END IF;
 
-
                IF debug_flag THEN
                        raise notice '% reduced street: %', clock_timestamp(), reducedStreet;
                END IF;
-               
+
                -- The pre direction should be at the beginning of the fullStreet string.
                -- The post direction should be at the beginning of the location string
                -- if there is no internal address
index efc629c78a97e41d4dfe7b8e280fef58483739e6..900ee952bf9c5e086a6f7ca6dc15002adbf8d85b 100644 (file)
@@ -20,7 +20,7 @@ BEGIN
     RETURN NULL;
   END IF;
 
-  result := COALESCE(input.address_alphanumeric, cull_null(input.address::text)) 
+  result := COALESCE(input.address_alphanumeric, cull_null(input.address::text))
          || COALESCE(' ' || input.preDirAbbrev, '')
          || CASE WHEN is_pretype(input.streetTypeAbbrev) THEN ' ' || input.streetTypeAbbrev  ELSE '' END
          || COALESCE(' ' || input.streetName, '')
index 0d51b50f4e552559ee2a841cb1cab7bad6b1386f..ff78fc8f8af3da270c42d62b4f2d0ff3901320b6 100644 (file)
@@ -35,7 +35,6 @@ END;
 $$
 language plpgsql;
 
-
 SELECT install_pagc_tables();
 DELETE FROM pagc_gaz WHERE is_custom = false;
 DELETE FROM pagc_lex WHERE is_custom = false;
@@ -3821,10 +3820,8 @@ INSERT INTO pagc_lex (id, seq, word, stdword, token, is_custom) VALUES (2935, 2,
 INSERT INTO pagc_lex (id, seq, word, stdword, token, is_custom) VALUES (2936, 2, 'NORTH', 'NORTH', 1, false);
 INSERT INTO pagc_lex (id, seq, word, stdword, token, is_custom) VALUES (2937, 2, 'SOUTH', 'SOUTH', 1, false);
 
-
 SELECT pg_catalog.setval('pagc_lex_id_seq', (SELECT greatest((SELECT MAX(id) FROM pagc_lex),50000)), true);
 
-
 -- set default to false so all we input will be treated as no custom --
 ALTER TABLE tiger.pagc_rules ALTER COLUMN is_custom SET DEFAULT false;
 INSERT INTO pagc_rules (id, rule) VALUES (1, '1 -1 5 -1 2 7');
index d54009bc4b91433c85ccf5b31b12403b8158a912..5cea12e4710268b8874fed4d2b9d879098a61d72 100644 (file)
@@ -71,7 +71,6 @@ SELECT '#1074b' As ticket, pprint_addy((g).addy) As address, target, ST_AsText(S
 SELECT '#1070a' As ticket, pprint_addy(addy) As address, ST_AsText(ST_SnapToGrid(geomout,0.00001)) As pt, rating FROM geocode('100 Federal Street, Boston, MA 02109',3, (SELECT ST_Union(the_geom) FROM place WHERE statefp = '25' AND name = 'Lynn')::geometry);
 SELECT '#1070b' As ticket, pprint_addy(addy) As address, ST_AsText(ST_SnapToGrid(geomout,0.00001)) As pt, rating FROM geocode('100 Federal Street, MA',3, (SELECT ST_Union(the_geom) FROM place WHERE statefp = '25' AND name = 'Lynn')::geometry);
 
-
 -- service roads and interstates
 SELECT '#1112a' As ticket, pprint_addy((g).addy) As address, target, ST_AsText(ST_SnapToGrid((g).geomout, 0.00001)) As pt, (g).rating FROM (SELECT geocode(target,2) As g, target FROM (SELECT '8401 W 35W Service Dr NE, Blaine, MN 55449'::text As target) As f) As foo;
 SELECT '#1112b' As ticket, pprint_addy((g).addy) As address, target, ST_AsText(ST_SnapToGrid((g).geomout, 0.00001)) As pt, (g).rating FROM (SELECT geocode(target,1) As g, target FROM (SELECT '8401 35W, Blaine, MN 55449'::text As target) As f) As foo;
index 954e46f6a1f9f14ffd62f033936347a585297c4a..947993298696e7f5c290b843f9bea4ab3473581f 100644 (file)
@@ -33,8 +33,6 @@ INSERT INTO direction_lookup (name, abbrev) VALUES('EAST', 'E');
 INSERT INTO direction_lookup (name, abbrev) VALUES('E', 'E');
 CREATE INDEX direction_lookup_abbrev_idx ON direction_lookup (abbrev);
 
-
-
 -- Create secondary unit lookup table
 DROP TABLE IF EXISTS tiger.secondary_unit_lookup;
 CREATE TABLE secondary_unit_lookup (name VARCHAR(20) PRIMARY KEY, abbrev VARCHAR(5));
@@ -79,8 +77,6 @@ INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('UPPER', 'UPPR');
 INSERT INTO secondary_unit_lookup (name, abbrev) VALUES ('UPPR', 'UPPR');
 CREATE INDEX secondary_unit_lookup_abbrev_idx ON secondary_unit_lookup (abbrev);
 
-
-
 -- Create state lookup table
 DROP TABLE IF EXISTS tiger.state_lookup;
 CREATE TABLE state_lookup (st_code INTEGER PRIMARY KEY, name VARCHAR(40) UNIQUE, abbrev VARCHAR(3) UNIQUE, statefp char(2) UNIQUE);
@@ -146,7 +142,6 @@ INSERT INTO state_lookup (name, abbrev, st_code) VALUES ('Wyoming', 'WY', '56');
 -- NOTE: fix later -- this is wrong for those - state code ones
 UPDATE state_lookup SET statefp = lpad(st_code::text,2,'0');
 
-
 -- Create street type lookup table
 DROP TABLE IF EXISTS tiger.street_type_lookup;
 CREATE TABLE street_type_lookup (name VARCHAR(50) PRIMARY KEY, abbrev VARCHAR(50), is_hw boolean NOT NULL DEFAULT false);
@@ -1183,7 +1178,6 @@ CREATE INDEX idx_addrfeat_tlid ON addrfeat USING btree(tlid);
 CREATE INDEX idx_addrfeat_zipl ON addrfeat USING btree(zipl);
 CREATE INDEX idx_addrfeat_zipr ON addrfeat USING btree(zipr);
 
-
 DROP TABLE IF EXISTS tiger.faces;
 CREATE TABLE faces
 (
index a886777cdb3ef3cacd94503e4932f8ab102283cc..6a5084204abfcd77c944932296dc59d9ac2166c9 100644 (file)
@@ -55,8 +55,6 @@ SELECT array_to_string(array_agg('DROP TABLE ' || quote_ident(table_schema) || '
 $$
   LANGUAGE sql VOLATILE;
 
-
-
 DROP TABLE IF EXISTS loader_platform;
 CREATE TABLE loader_platform(os varchar(50) PRIMARY KEY, declare_sect text, pgbin text, wget text, unzip_command text, psql text, path_sep text, loader text, environ_set_command text, county_process_command text);
 GRANT SELECT ON TABLE loader_platform TO public;
@@ -82,7 +80,6 @@ cd %TMPDIR%', E'%PSQL%', E'\\', E'%SHP2PGSQL%', 'set ',
 'for /r %%z in (*${table_name}.dbf) do (${loader} -D -s 4269 -g the_geom -W "latin1" %%z tiger_staging.${state_abbrev}_${table_name} | ${psql} & ${psql} -c "SELECT loader_load_staged_data(lower(''${state_abbrev}_${table_name}''), lower(''${state_abbrev}_${lookup_name}''));")'
 );
 
-
 INSERT INTO loader_platform(os, wget, pgbin, declare_sect, unzip_command, psql, path_sep, loader, environ_set_command, county_process_command)
 VALUES('sh', 'wget', '',
 E'TMPDIR="${staging_fold}/temp/"
@@ -127,9 +124,9 @@ CREATE TABLE loader_lookuptables(process_order integer NOT NULL DEFAULT 1000,
                post_load_process text, single_geom_mode boolean DEFAULT false,
                insert_mode char(1) NOT NULL DEFAULT 'c',
                pre_load_process text,columns_exclude text[], website_root_override text);
-               
+
 GRANT SELECT ON TABLE loader_lookuptables TO public;
-               
+
 -- put in explanatory comments of what each column is for
 COMMENT ON COLUMN loader_lookuptables.lookup_name IS 'This is the table name to inherit from and suffix of resulting output table -- how the table will be named --  edges here would mean -- ma_edges , pa_edges etc. except in the case of national tables. national level tables have no prefix';
 COMMENT ON COLUMN loader_lookuptables.level_nation IS 'These are tables that contain all data for the whole US so there is just a single file';
@@ -148,7 +145,7 @@ VALUES(2, 'county_all', 'county', true, false, false, true,
        ${psql} -c "VACUUM ANALYZE ${data_schema}.${lookup_name};"
        ${psql} -c "INSERT INTO ${data_schema}.${lookup_name}_lookup(st_code, state, co_code, name) SELECT CAST(s.statefp as integer), s.abbrev, CAST(c.countyfp as integer), c.name FROM ${data_schema}.${lookup_name} As c INNER JOIN state_lookup As s ON s.statefp = c.statefp;"
        ${psql} -c "VACUUM ANALYZE ${data_schema}.${lookup_name}_lookup;" ');
-       
+
 INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, level_nation, single_geom_mode, insert_mode, pre_load_process, post_load_process )
 VALUES(1, 'state_all', 'state', true, false, false,true,false, 'c',
        '${psql} -c "CREATE TABLE ${data_schema}.${lookup_name}(CONSTRAINT pk_${lookup_name} PRIMARY KEY (statefp),CONSTRAINT uidx_${lookup_name}_stusps  UNIQUE (stusps), CONSTRAINT uidx_${lookup_name}_gid UNIQUE (gid) ) INHERITS(state); "',
@@ -171,7 +168,7 @@ VALUES(4, 'cousub', 'cousub', true, false, true,false, 'c',
        '${psql} -c "ALTER TABLE ${staging_schema}.${state_abbrev}_${table_name} RENAME geoid TO cosbidfp;SELECT loader_load_staged_data(lower(''${state_abbrev}_${table_name}''), lower(''${state_abbrev}_${lookup_name}'')); ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');"
 ${psql} -c "CREATE INDEX ${data_schema}_${state_abbrev}_${lookup_name}_the_geom_gist ON ${data_schema}.${state_abbrev}_${lookup_name} USING gist(the_geom);"
 ${psql} -c "CREATE INDEX idx_${data_schema}_${state_abbrev}_${lookup_name}_countyfp ON ${data_schema}.${state_abbrev}_${lookup_name} USING btree(countyfp);"');
-       
+
 INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, level_nation, single_geom_mode, insert_mode, pre_load_process, post_load_process, columns_exclude, website_root_override  )
 -- this is a bit of a lie that its county.  It's really state but works better with column routine
 VALUES(4, 'zcta5', 'zcta510', true,true, false,false, false, 'a',
@@ -180,7 +177,6 @@ VALUES(4, 'zcta5', 'zcta510', true,true, false,false, false, 'a',
 ${psql} -c "CREATE INDEX ${data_schema}_${state_abbrev}_${lookup_name}_the_geom_gist ON ${data_schema}.${state_abbrev}_${lookup_name} USING gist(the_geom);"'
 , ARRAY['gid','geoid','geoid10'], 'ftp://ftp2.census.gov/geo/tiger/TIGER2010/ZCTA5/2010');
 
-
 INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process )
 VALUES(6, 'faces', 'faces', true, true, false,false, 'c',
        '${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_${table_name}(CONSTRAINT pk_${state_abbrev}_${lookup_name} PRIMARY KEY (gid)) INHERITS(${lookup_name});" ',
@@ -198,7 +194,7 @@ ${psql} -c "CREATE INDEX idx_${data_schema}_${state_abbrev}_${lookup_name}_lname
 ${psql} -c "CREATE INDEX idx_${data_schema}_${state_abbrev}_${lookup_name}_tlid_statefp ON ${data_schema}.${state_abbrev}_${table_name} USING btree (tlid,statefp);"
 ${psql} -c "ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');"
 ${psql} -c "vacuum analyze ${data_schema}.${state_abbrev}_${lookup_name};"', ARRAY['gid','statefp']);
-       
+
 INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process )
 VALUES(8, 'edges', 'edges', true, true, false,false, 'a',
 '${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_${table_name}(CONSTRAINT pk_${state_abbrev}_${table_name} PRIMARY KEY (gid)) INHERITS(${table_name});" ',
@@ -219,7 +215,7 @@ ${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_zip_lookup_base(CONSTRAI
 ${psql} -c "INSERT INTO ${data_schema}.${state_abbrev}_zip_lookup_base(zip,state,county,city, statefp) SELECT DISTINCT e.zipl, ''${state_abbrev}'', c.name,p.name,''${state_fips}''  FROM ${data_schema}.${state_abbrev}_edges AS e INNER JOIN tiger.county As c  ON (e.countyfp = c.countyfp AND e.statefp = c.statefp AND e.statefp = ''${state_fips}'') INNER JOIN ${data_schema}.${state_abbrev}_faces AS f ON (e.tfidl = f.tfid OR e.tfidr = f.tfid) INNER JOIN ${data_schema}.${state_abbrev}_place As p ON(f.statefp = p.statefp AND f.placefp = p.placefp ) WHERE e.zipl IS NOT NULL;"
 ${psql} -c "ALTER TABLE ${data_schema}.${state_abbrev}_zip_lookup_base ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');"
 ${psql} -c "CREATE INDEX idx_${data_schema}_${state_abbrev}_zip_lookup_base_citysnd ON ${data_schema}.${state_abbrev}_zip_lookup_base USING btree(soundex(city));" ');
-       
+
 INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process,columns_exclude )
 VALUES(9, 'addr', 'addr', true, true, false,false, 'a',
        '${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_${lookup_name}(CONSTRAINT pk_${state_abbrev}_${table_name} PRIMARY KEY (gid)) INHERITS(${table_name});ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ALTER COLUMN statefp SET DEFAULT ''${state_fips}'';" ',
@@ -231,7 +227,7 @@ VALUES(9, 'addr', 'addr', true, true, false,false, 'a',
        ${psql} -c "INSERT INTO ${data_schema}.${state_abbrev}_zip_state(zip,stusps,statefp) SELECT DISTINCT zip, ''${state_abbrev}'', ''${state_fips}'' FROM ${data_schema}.${state_abbrev}_${lookup_name} WHERE zip is not null;"
        ${psql} -c "ALTER TABLE ${data_schema}.${state_abbrev}_zip_state ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');"
        ${psql} -c "vacuum analyze ${data_schema}.${state_abbrev}_${lookup_name};"',  ARRAY['gid','statefp','fromarmid', 'toarmid']);
-       
+
 INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process,columns_exclude )
 VALUES(9, 'addrfeat', 'addrfeat', false, true, false,true, 'a',
        '${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_${lookup_name}(CONSTRAINT pk_${state_abbrev}_${table_name} PRIMARY KEY (gid)) INHERITS(${table_name});ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ALTER COLUMN statefp SET DEFAULT ''${state_fips}'';" ',
index fcfa9b627e12f2782d6508e9fc293d9a71136f9b..c4d6da1b7bf23eea0750b85bd645e5b7c5c5a24f 100644 (file)
@@ -72,7 +72,6 @@ BEGIN
 END
 $$ LANGUAGE 'plpgsql';
 
-
 DELETE FROM loader_platform WHERE os IN ('sh', 'windows');
 GRANT SELECT ON TABLE loader_platform TO public;
 INSERT INTO loader_platform(os, wget, pgbin, declare_sect, unzip_command, psql,path_sep,loader, environ_set_command, county_process_command)
@@ -98,7 +97,6 @@ cd %TMPDIR%', E'%PSQL%', E'\\', E'%SHP2PGSQL%', 'set ',
 'for /r %%z in (*${table_name}.dbf) do (${loader} -D -s 4269 -g the_geom -W "latin1" %%z tiger_staging.${state_abbrev}_${table_name} | ${psql} & ${psql} -c "SELECT loader_load_staged_data(lower(''${state_abbrev}_${table_name}''), lower(''${state_abbrev}_${lookup_name}''));")'
 );
 
-
 INSERT INTO loader_platform(os, wget, pgbin, declare_sect, unzip_command, psql, path_sep, loader, environ_set_command, county_process_command)
 VALUES('sh', 'wget', '',
 E'TMPDIR="${staging_fold}/temp/"
@@ -157,9 +155,8 @@ $$ LANGUAGE 'plpgsql';
 
 TRUNCATE TABLE loader_lookuptables;
 
-               
 GRANT SELECT ON TABLE loader_lookuptables TO public;
-               
+
 -- put in explanatory comments of what each column is for
 COMMENT ON COLUMN loader_lookuptables.lookup_name IS 'This is the table name to inherit from and suffix of resulting output table -- how the table will be named --  edges here would mean -- ma_edges , pa_edges etc. except in the case of national tables. national level tables have no prefix';
 COMMENT ON COLUMN loader_lookuptables.level_nation IS 'These are tables that contain all data for the whole US so there is just a single file';
@@ -178,7 +175,7 @@ VALUES(2, 'county_all', 'county', true, false, false, true,
        ${psql} -c "VACUUM ANALYZE ${data_schema}.${lookup_name};"
        ${psql} -c "INSERT INTO ${data_schema}.${lookup_name}_lookup(st_code, state, co_code, name) SELECT CAST(s.statefp as integer), s.abbrev, CAST(c.countyfp as integer), c.name FROM ${data_schema}.${lookup_name} As c INNER JOIN state_lookup As s ON s.statefp = c.statefp;"
        ${psql} -c "VACUUM ANALYZE ${data_schema}.${lookup_name}_lookup;" ');
-       
+
 INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, level_nation, single_geom_mode, insert_mode, pre_load_process, post_load_process )
 VALUES(1, 'state_all', 'state', true, false, false,true,false, 'c',
        '${psql} -c "CREATE TABLE ${data_schema}.${lookup_name}(CONSTRAINT pk_${lookup_name} PRIMARY KEY (statefp),CONSTRAINT uidx_${lookup_name}_stusps  UNIQUE (stusps), CONSTRAINT uidx_${lookup_name}_gid UNIQUE (gid) ) INHERITS(state); "',
@@ -201,7 +198,7 @@ VALUES(4, 'cousub', 'cousub', true, false, true,false, 'c',
        '${psql} -c "ALTER TABLE ${staging_schema}.${state_abbrev}_${table_name} RENAME geoid TO cosbidfp;SELECT loader_load_staged_data(lower(''${state_abbrev}_${table_name}''), lower(''${state_abbrev}_${lookup_name}'')); ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');"
 ${psql} -c "CREATE INDEX ${data_schema}_${state_abbrev}_${lookup_name}_the_geom_gist ON ${data_schema}.${state_abbrev}_${lookup_name} USING gist(the_geom);"
 ${psql} -c "CREATE INDEX idx_${data_schema}_${state_abbrev}_${lookup_name}_countyfp ON ${data_schema}.${state_abbrev}_${lookup_name} USING btree(countyfp);"');
-       
+
 INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, level_nation, single_geom_mode, insert_mode, pre_load_process, post_load_process, columns_exclude, website_root_override  )
 -- this is a bit of a lie that its county.  It's really state but works better with column routine
 VALUES(4, 'zcta5', 'zcta510', true,true, false,false, false, 'a',
@@ -210,7 +207,6 @@ VALUES(4, 'zcta5', 'zcta510', true,true, false,false, false, 'a',
 ${psql} -c "CREATE INDEX ${data_schema}_${state_abbrev}_${lookup_name}_the_geom_gist ON ${data_schema}.${state_abbrev}_${lookup_name} USING gist(the_geom);"'
 , ARRAY['gid','geoid','geoid10'], 'ftp://ftp2.census.gov/geo/tiger/TIGER2010/ZCTA5/2010');
 
-
 INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process )
 VALUES(6, 'faces', 'faces', true, true, false,false, 'c',
        '${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_${table_name}(CONSTRAINT pk_${state_abbrev}_${lookup_name} PRIMARY KEY (gid)) INHERITS(${lookup_name});" ',
@@ -228,7 +224,7 @@ ${psql} -c "CREATE INDEX idx_${data_schema}_${state_abbrev}_${lookup_name}_lname
 ${psql} -c "CREATE INDEX idx_${data_schema}_${state_abbrev}_${lookup_name}_tlid_statefp ON ${data_schema}.${state_abbrev}_${table_name} USING btree (tlid,statefp);"
 ${psql} -c "ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');"
 ${psql} -c "vacuum analyze ${data_schema}.${state_abbrev}_${lookup_name};"', ARRAY['gid','statefp']);
-       
+
 INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process )
 VALUES(8, 'edges', 'edges', true, true, false,false, 'a',
 '${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_${table_name}(CONSTRAINT pk_${state_abbrev}_${table_name} PRIMARY KEY (gid)) INHERITS(${table_name});" ',
@@ -249,7 +245,7 @@ ${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_zip_lookup_base(CONSTRAI
 ${psql} -c "INSERT INTO ${data_schema}.${state_abbrev}_zip_lookup_base(zip,state,county,city, statefp) SELECT DISTINCT e.zipl, ''${state_abbrev}'', c.name,p.name,''${state_fips}''  FROM ${data_schema}.${state_abbrev}_edges AS e INNER JOIN tiger.county As c  ON (e.countyfp = c.countyfp AND e.statefp = c.statefp AND e.statefp = ''${state_fips}'') INNER JOIN ${data_schema}.${state_abbrev}_faces AS f ON (e.tfidl = f.tfid OR e.tfidr = f.tfid) INNER JOIN ${data_schema}.${state_abbrev}_place As p ON(f.statefp = p.statefp AND f.placefp = p.placefp ) WHERE e.zipl IS NOT NULL;"
 ${psql} -c "ALTER TABLE ${data_schema}.${state_abbrev}_zip_lookup_base ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');"
 ${psql} -c "CREATE INDEX idx_${data_schema}_${state_abbrev}_zip_lookup_base_citysnd ON ${data_schema}.${state_abbrev}_zip_lookup_base USING btree(soundex(city));" ');
-       
+
 INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process,columns_exclude )
 VALUES(9, 'addr', 'addr', true, true, false,false, 'a',
        '${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_${lookup_name}(CONSTRAINT pk_${state_abbrev}_${table_name} PRIMARY KEY (gid)) INHERITS(${table_name});ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ALTER COLUMN statefp SET DEFAULT ''${state_fips}'';" ',
@@ -261,7 +257,7 @@ VALUES(9, 'addr', 'addr', true, true, false,false, 'a',
        ${psql} -c "INSERT INTO ${data_schema}.${state_abbrev}_zip_state(zip,stusps,statefp) SELECT DISTINCT zip, ''${state_abbrev}'', ''${state_fips}'' FROM ${data_schema}.${state_abbrev}_${lookup_name} WHERE zip is not null;"
        ${psql} -c "ALTER TABLE ${data_schema}.${state_abbrev}_zip_state ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');"
        ${psql} -c "vacuum analyze ${data_schema}.${state_abbrev}_${lookup_name};"',  ARRAY['gid','statefp','fromarmid', 'toarmid']);
-       
+
 INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process,columns_exclude )
 VALUES(9, 'addrfeat', 'addrfeat', false, true, false,true, 'a',
        '${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_${lookup_name}(CONSTRAINT pk_${state_abbrev}_${table_name} PRIMARY KEY (gid)) INHERITS(${table_name});ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ALTER COLUMN statefp SET DEFAULT ''${state_fips}'';" ',
index aa16c4c14684f34db7d43f8c9d2438362fecb8f7..d42f60ea2f3a0e094dff02bdcc0def40f0aa677a 100644 (file)
@@ -71,7 +71,6 @@ BEGIN
 END
 $$ LANGUAGE 'plpgsql';
 
-
 DELETE FROM loader_platform WHERE os IN ('sh', 'windows');
 GRANT SELECT ON TABLE loader_platform TO public;
 INSERT INTO loader_platform(os, wget, pgbin, declare_sect, unzip_command, psql,path_sep,loader, environ_set_command, county_process_command)
@@ -97,7 +96,6 @@ cd %TMPDIR%', E'%PSQL%', E'\\', E'%SHP2PGSQL%', 'set ',
 'for /r %%z in (*${table_name}.dbf) do (${loader} -D -s 4269 -g the_geom -W "latin1" %%z tiger_staging.${state_abbrev}_${table_name} | ${psql} & ${psql} -c "SELECT loader_load_staged_data(lower(''${state_abbrev}_${table_name}''), lower(''${state_abbrev}_${lookup_name}''));")'
 );
 
-
 INSERT INTO loader_platform(os, wget, pgbin, declare_sect, unzip_command, psql, path_sep, loader, environ_set_command, county_process_command)
 VALUES('sh', 'wget', '',
 E'TMPDIR="${staging_fold}/temp/"
@@ -156,9 +154,8 @@ $$ LANGUAGE 'plpgsql';
 
 TRUNCATE TABLE loader_lookuptables;
 
-               
 GRANT SELECT ON TABLE loader_lookuptables TO public;
-               
+
 -- put in explanatory comments of what each column is for
 COMMENT ON COLUMN loader_lookuptables.lookup_name IS 'This is the table name to inherit from and suffix of resulting output table -- how the table will be named --  edges here would mean -- ma_edges , pa_edges etc. except in the case of national tables. national level tables have no prefix';
 COMMENT ON COLUMN loader_lookuptables.level_nation IS 'These are tables that contain all data for the whole US so there is just a single file';
@@ -177,7 +174,7 @@ VALUES(2, 'county_all', 'county', true, false, false, true,
        ${psql} -c "VACUUM ANALYZE ${data_schema}.${lookup_name};"
        ${psql} -c "INSERT INTO ${data_schema}.${lookup_name}_lookup(st_code, state, co_code, name) SELECT CAST(s.statefp as integer), s.abbrev, CAST(c.countyfp as integer), c.name FROM ${data_schema}.${lookup_name} As c INNER JOIN state_lookup As s ON s.statefp = c.statefp;"
        ${psql} -c "VACUUM ANALYZE ${data_schema}.${lookup_name}_lookup;" ');
-       
+
 INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, level_nation, single_geom_mode, insert_mode, pre_load_process, post_load_process )
 VALUES(1, 'state_all', 'state', true, false, false,true,false, 'c',
        '${psql} -c "CREATE TABLE ${data_schema}.${lookup_name}(CONSTRAINT pk_${lookup_name} PRIMARY KEY (statefp),CONSTRAINT uidx_${lookup_name}_stusps  UNIQUE (stusps), CONSTRAINT uidx_${lookup_name}_gid UNIQUE (gid) ) INHERITS(state); "',
@@ -200,7 +197,7 @@ VALUES(4, 'cousub', 'cousub', true, false, true,false, 'c',
        '${psql} -c "ALTER TABLE ${staging_schema}.${state_abbrev}_${table_name} RENAME geoid TO cosbidfp;SELECT loader_load_staged_data(lower(''${state_abbrev}_${table_name}''), lower(''${state_abbrev}_${lookup_name}'')); ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');"
 ${psql} -c "CREATE INDEX ${data_schema}_${state_abbrev}_${lookup_name}_the_geom_gist ON ${data_schema}.${state_abbrev}_${lookup_name} USING gist(the_geom);"
 ${psql} -c "CREATE INDEX idx_${data_schema}_${state_abbrev}_${lookup_name}_countyfp ON ${data_schema}.${state_abbrev}_${lookup_name} USING btree(countyfp);"');
-       
+
 INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, level_nation, single_geom_mode, insert_mode, pre_load_process, post_load_process, columns_exclude, website_root_override  )
 -- this is a bit of a lie that its county.  It's really state but works better with column routine
 VALUES(4, 'zcta5', 'zcta510', true,true, false,false, false, 'a',
@@ -209,7 +206,6 @@ VALUES(4, 'zcta5', 'zcta510', true,true, false,false, false, 'a',
 ${psql} -c "CREATE INDEX ${data_schema}_${state_abbrev}_${lookup_name}_the_geom_gist ON ${data_schema}.${state_abbrev}_${lookup_name} USING gist(the_geom);"'
 , ARRAY['gid','geoid','geoid10'], 'ftp://ftp2.census.gov/geo/tiger/TIGER2010/ZCTA5/2010');
 
-
 INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process )
 VALUES(6, 'faces', 'faces', true, true, false,false, 'c',
        '${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_${table_name}(CONSTRAINT pk_${state_abbrev}_${lookup_name} PRIMARY KEY (gid)) INHERITS(${lookup_name});" ',
@@ -227,7 +223,7 @@ ${psql} -c "CREATE INDEX idx_${data_schema}_${state_abbrev}_${lookup_name}_lname
 ${psql} -c "CREATE INDEX idx_${data_schema}_${state_abbrev}_${lookup_name}_tlid_statefp ON ${data_schema}.${state_abbrev}_${table_name} USING btree (tlid,statefp);"
 ${psql} -c "ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');"
 ${psql} -c "vacuum analyze ${data_schema}.${state_abbrev}_${lookup_name};"', ARRAY['gid','statefp']);
-       
+
 INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process )
 VALUES(8, 'edges', 'edges', true, true, false,false, 'a',
 '${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_${table_name}(CONSTRAINT pk_${state_abbrev}_${table_name} PRIMARY KEY (gid)) INHERITS(${table_name});" ',
@@ -248,7 +244,7 @@ ${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_zip_lookup_base(CONSTRAI
 ${psql} -c "INSERT INTO ${data_schema}.${state_abbrev}_zip_lookup_base(zip,state,county,city, statefp) SELECT DISTINCT e.zipl, ''${state_abbrev}'', c.name,p.name,''${state_fips}''  FROM ${data_schema}.${state_abbrev}_edges AS e INNER JOIN tiger.county As c  ON (e.countyfp = c.countyfp AND e.statefp = c.statefp AND e.statefp = ''${state_fips}'') INNER JOIN ${data_schema}.${state_abbrev}_faces AS f ON (e.tfidl = f.tfid OR e.tfidr = f.tfid) INNER JOIN ${data_schema}.${state_abbrev}_place As p ON(f.statefp = p.statefp AND f.placefp = p.placefp ) WHERE e.zipl IS NOT NULL;"
 ${psql} -c "ALTER TABLE ${data_schema}.${state_abbrev}_zip_lookup_base ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');"
 ${psql} -c "CREATE INDEX idx_${data_schema}_${state_abbrev}_zip_lookup_base_citysnd ON ${data_schema}.${state_abbrev}_zip_lookup_base USING btree(soundex(city));" ');
-       
+
 INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process,columns_exclude )
 VALUES(9, 'addr', 'addr', true, true, false,false, 'a',
        '${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_${lookup_name}(CONSTRAINT pk_${state_abbrev}_${table_name} PRIMARY KEY (gid)) INHERITS(${table_name});ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ALTER COLUMN statefp SET DEFAULT ''${state_fips}'';" ',
@@ -260,7 +256,7 @@ VALUES(9, 'addr', 'addr', true, true, false,false, 'a',
        ${psql} -c "INSERT INTO ${data_schema}.${state_abbrev}_zip_state(zip,stusps,statefp) SELECT DISTINCT zip, ''${state_abbrev}'', ''${state_fips}'' FROM ${data_schema}.${state_abbrev}_${lookup_name} WHERE zip is not null;"
        ${psql} -c "ALTER TABLE ${data_schema}.${state_abbrev}_zip_state ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');"
        ${psql} -c "vacuum analyze ${data_schema}.${state_abbrev}_${lookup_name};"',  ARRAY['gid','statefp','fromarmid', 'toarmid']);
-       
+
 INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process,columns_exclude )
 VALUES(9, 'addrfeat', 'addrfeat', false, true, false,true, 'a',
        '${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_${lookup_name}(CONSTRAINT pk_${state_abbrev}_${table_name} PRIMARY KEY (gid)) INHERITS(${table_name});ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ALTER COLUMN statefp SET DEFAULT ''${state_fips}'';" ',
index 7829df0d4f0ffb76f7cd09b373742e7198a6eb82..bedb84051f495dd0acf9551490970b69bba8fd03 100644 (file)
@@ -42,7 +42,7 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche
          CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL),
          CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269)
        );
-       
+
        DROP TABLE IF EXISTS tiger.tabblock;
        CREATE TABLE tabblock
        (
@@ -159,7 +159,6 @@ BEGIN
 END
 $$ LANGUAGE 'plpgsql';
 
-
 DELETE FROM loader_platform WHERE os IN ('sh', 'windows');
 GRANT SELECT ON TABLE loader_platform TO public;
 INSERT INTO loader_platform(os, wget, pgbin, declare_sect, unzip_command, psql,path_sep,loader, environ_set_command, county_process_command)
@@ -185,7 +184,6 @@ cd %TMPDIR%', E'%PSQL%', E'\\', E'%SHP2PGSQL%', 'set ',
 'for /r %%z in (*${table_name}*.dbf) do (${loader} -D -s 4269 -g the_geom -W "latin1" %%z tiger_staging.${state_abbrev}_${table_name} | ${psql} & ${psql} -c "SELECT loader_load_staged_data(lower(''${state_abbrev}_${table_name}''), lower(''${state_abbrev}_${lookup_name}''));")'
 );
 
-
 INSERT INTO loader_platform(os, wget, pgbin, declare_sect, unzip_command, psql, path_sep, loader, environ_set_command, county_process_command)
 VALUES('sh', 'wget', '',
 E'TMPDIR="${staging_fold}/temp/"
@@ -244,9 +242,8 @@ $$ LANGUAGE 'plpgsql';
 
 TRUNCATE TABLE loader_lookuptables;
 
-               
 GRANT SELECT ON TABLE loader_lookuptables TO public;
-               
+
 -- put in explanatory comments of what each column is for
 COMMENT ON COLUMN loader_lookuptables.lookup_name IS 'This is the table name to inherit from and suffix of resulting output table -- how the table will be named --  edges here would mean -- ma_edges , pa_edges etc. except in the case of national tables. national level tables have no prefix';
 COMMENT ON COLUMN loader_lookuptables.level_nation IS 'These are tables that contain all data for the whole US so there is just a single file';
@@ -271,7 +268,6 @@ ${psql} -c "ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ADD CONSTR
 ${psql} -c "CREATE INDEX ${data_schema}_${state_abbrev}_${lookup_name}_the_geom_gist ON ${data_schema}.${state_abbrev}_${lookup_name} USING gist(the_geom);"
 ${psql} -c "vacuum analyze ${data_schema}.${state_abbrev}_${lookup_name};"', '{gid, uatyp10, tractce10, blockce10,suffix1ce,blockce,tractce}'::text[]);
 
-
 INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process, columns_exclude )
 VALUES(12, 'bg', 'bg', true,false, true,false, 'c',
 '${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_${lookup_name}(CONSTRAINT pk_${state_abbrev}_${lookup_name} PRIMARY KEY (bg_id)) INHERITS(tiger.${lookup_name});" ',
@@ -290,7 +286,7 @@ VALUES(2, 'county_all', 'county', true, false, false, true,
        ${psql} -c "VACUUM ANALYZE ${data_schema}.${lookup_name};"
        ${psql} -c "INSERT INTO ${data_schema}.${lookup_name}_lookup(st_code, state, co_code, name) SELECT CAST(s.statefp as integer), s.abbrev, CAST(c.countyfp as integer), c.name FROM ${data_schema}.${lookup_name} As c INNER JOIN state_lookup As s ON s.statefp = c.statefp;"
        ${psql} -c "VACUUM ANALYZE ${data_schema}.${lookup_name}_lookup;" ');
-       
+
 INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, level_nation, single_geom_mode, insert_mode, pre_load_process, post_load_process )
 VALUES(1, 'state_all', 'state', true, false, false,true,false, 'c',
        '${psql} -c "CREATE TABLE ${data_schema}.${lookup_name}(CONSTRAINT pk_${lookup_name} PRIMARY KEY (statefp),CONSTRAINT uidx_${lookup_name}_stusps  UNIQUE (stusps), CONSTRAINT uidx_${lookup_name}_gid UNIQUE (gid) ) INHERITS(state); "',
@@ -313,7 +309,7 @@ VALUES(4, 'cousub', 'cousub', true, false, true,false, 'c',
        '${psql} -c "ALTER TABLE ${staging_schema}.${state_abbrev}_${table_name} RENAME geoid TO cosbidfp;SELECT loader_load_staged_data(lower(''${state_abbrev}_${table_name}''), lower(''${state_abbrev}_${lookup_name}'')); ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');"
 ${psql} -c "CREATE INDEX ${data_schema}_${state_abbrev}_${lookup_name}_the_geom_gist ON ${data_schema}.${state_abbrev}_${lookup_name} USING gist(the_geom);"
 ${psql} -c "CREATE INDEX idx_${data_schema}_${state_abbrev}_${lookup_name}_countyfp ON ${data_schema}.${state_abbrev}_${lookup_name} USING btree(countyfp);"');
-       
+
 INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, level_nation, single_geom_mode, insert_mode, pre_load_process, post_load_process, columns_exclude, website_root_override  )
 -- this is a bit of a lie that its county.  It's really state but works better with column routine
 VALUES(4, 'zcta5', 'zcta510', true,true, false,false, false, 'a',
@@ -322,7 +318,6 @@ VALUES(4, 'zcta5', 'zcta510', true,true, false,false, false, 'a',
 ${psql} -c "CREATE INDEX ${data_schema}_${state_abbrev}_${lookup_name}_the_geom_gist ON ${data_schema}.${state_abbrev}_${lookup_name} USING gist(the_geom);"'
 , ARRAY['gid','geoid','geoid10'], 'ftp://ftp2.census.gov/geo/tiger/TIGER2010/ZCTA5/2010');
 
-
 INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process )
 VALUES(6, 'faces', 'faces', true, true, false,false, 'c',
        '${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_${table_name}(CONSTRAINT pk_${state_abbrev}_${lookup_name} PRIMARY KEY (gid)) INHERITS(${lookup_name});" ',
@@ -340,7 +335,7 @@ ${psql} -c "CREATE INDEX idx_${data_schema}_${state_abbrev}_${lookup_name}_lname
 ${psql} -c "CREATE INDEX idx_${data_schema}_${state_abbrev}_${lookup_name}_tlid_statefp ON ${data_schema}.${state_abbrev}_${table_name} USING btree (tlid,statefp);"
 ${psql} -c "ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');"
 ${psql} -c "vacuum analyze ${data_schema}.${state_abbrev}_${lookup_name};"', ARRAY['gid','statefp']);
-       
+
 INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process )
 VALUES(8, 'edges', 'edges', true, true, false,false, 'a',
 '${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_${table_name}(CONSTRAINT pk_${state_abbrev}_${table_name} PRIMARY KEY (gid)) INHERITS(${table_name});" ',
@@ -361,7 +356,7 @@ ${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_zip_lookup_base(CONSTRAI
 ${psql} -c "INSERT INTO ${data_schema}.${state_abbrev}_zip_lookup_base(zip,state,county,city, statefp) SELECT DISTINCT e.zipl, ''${state_abbrev}'', c.name,p.name,''${state_fips}''  FROM ${data_schema}.${state_abbrev}_edges AS e INNER JOIN tiger.county As c  ON (e.countyfp = c.countyfp AND e.statefp = c.statefp AND e.statefp = ''${state_fips}'') INNER JOIN ${data_schema}.${state_abbrev}_faces AS f ON (e.tfidl = f.tfid OR e.tfidr = f.tfid) INNER JOIN ${data_schema}.${state_abbrev}_place As p ON(f.statefp = p.statefp AND f.placefp = p.placefp ) WHERE e.zipl IS NOT NULL;"
 ${psql} -c "ALTER TABLE ${data_schema}.${state_abbrev}_zip_lookup_base ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');"
 ${psql} -c "CREATE INDEX idx_${data_schema}_${state_abbrev}_zip_lookup_base_citysnd ON ${data_schema}.${state_abbrev}_zip_lookup_base USING btree(soundex(city));" ');
-       
+
 INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process,columns_exclude )
 VALUES(9, 'addr', 'addr', true, true, false,false, 'a',
        '${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_${lookup_name}(CONSTRAINT pk_${state_abbrev}_${table_name} PRIMARY KEY (gid)) INHERITS(${table_name});ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ALTER COLUMN statefp SET DEFAULT ''${state_fips}'';" ',
@@ -373,7 +368,7 @@ VALUES(9, 'addr', 'addr', true, true, false,false, 'a',
        ${psql} -c "INSERT INTO ${data_schema}.${state_abbrev}_zip_state(zip,stusps,statefp) SELECT DISTINCT zip, ''${state_abbrev}'', ''${state_fips}'' FROM ${data_schema}.${state_abbrev}_${lookup_name} WHERE zip is not null;"
        ${psql} -c "ALTER TABLE ${data_schema}.${state_abbrev}_zip_state ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');"
        ${psql} -c "vacuum analyze ${data_schema}.${state_abbrev}_${lookup_name};"',  ARRAY['gid','statefp','fromarmid', 'toarmid']);
-       
+
 INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process,columns_exclude )
 VALUES(9, 'addrfeat', 'addrfeat', false, true, false,true, 'a',
        '${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_${lookup_name}(CONSTRAINT pk_${state_abbrev}_${table_name} PRIMARY KEY (gid)) INHERITS(${table_name});ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ALTER COLUMN statefp SET DEFAULT ''${state_fips}'';" ',
index 0a09f0b72d225e589302b69310901ee6d9d8a1c2..fe0bdf62f52d8e4cca9bc44fc4c8ad51b7a97736 100644 (file)
@@ -42,7 +42,7 @@ IF NOT EXISTS(SELECT table_name FROM information_schema.columns WHERE table_sche
          CONSTRAINT enforce_geotype_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL),
          CONSTRAINT enforce_srid_geom CHECK (st_srid(the_geom) = 4269)
        );
-       
+
        DROP TABLE IF EXISTS tiger.tabblock;
        CREATE TABLE tabblock
        (
@@ -159,7 +159,6 @@ BEGIN
 END
 $$ LANGUAGE 'plpgsql';
 
-
 DELETE FROM loader_platform WHERE os IN ('sh', 'windows');
 GRANT SELECT ON TABLE loader_platform TO public;
 INSERT INTO loader_platform(os, wget, pgbin, declare_sect, unzip_command, psql,path_sep,loader, environ_set_command, county_process_command)
@@ -185,7 +184,6 @@ cd %TMPDIR%', E'%PSQL%', E'\\', E'%SHP2PGSQL%', 'set ',
 'for /r %%z in (*${table_name}*.dbf) do (${loader} -D -s 4269 -g the_geom -W "latin1" %%z tiger_staging.${state_abbrev}_${table_name} | ${psql} & ${psql} -c "SELECT loader_load_staged_data(lower(''${state_abbrev}_${table_name}''), lower(''${state_abbrev}_${lookup_name}''));")'
 );
 
-
 INSERT INTO loader_platform(os, wget, pgbin, declare_sect, unzip_command, psql, path_sep, loader, environ_set_command, county_process_command)
 VALUES('sh', 'wget', '',
 E'TMPDIR="${staging_fold}/temp/"
@@ -244,9 +242,8 @@ $$ LANGUAGE 'plpgsql';
 
 TRUNCATE TABLE loader_lookuptables;
 
-               
 GRANT SELECT ON TABLE loader_lookuptables TO public;
-               
+
 -- put in explanatory comments of what each column is for
 COMMENT ON COLUMN loader_lookuptables.lookup_name IS 'This is the table name to inherit from and suffix of resulting output table -- how the table will be named --  edges here would mean -- ma_edges , pa_edges etc. except in the case of national tables. national level tables have no prefix';
 COMMENT ON COLUMN loader_lookuptables.level_nation IS 'These are tables that contain all data for the whole US so there is just a single file';
@@ -271,7 +268,6 @@ ${psql} -c "ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ADD CONSTR
 ${psql} -c "CREATE INDEX ${data_schema}_${state_abbrev}_${lookup_name}_the_geom_gist ON ${data_schema}.${state_abbrev}_${lookup_name} USING gist(the_geom);"
 ${psql} -c "vacuum analyze ${data_schema}.${state_abbrev}_${lookup_name};"', '{gid, uatyp10, uatype, tractce10, blockce10,suffix1ce,blockce,tractce}'::text[]);
 
-
 INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process, columns_exclude )
 VALUES(12, 'bg', 'bg', true,false, true,false, 'c',
 '${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_${lookup_name}(CONSTRAINT pk_${state_abbrev}_${lookup_name} PRIMARY KEY (bg_id)) INHERITS(tiger.${lookup_name});" ',
@@ -290,7 +286,7 @@ VALUES(2, 'county_all', 'county', true, false, false, true,
        ${psql} -c "VACUUM ANALYZE ${data_schema}.${lookup_name};"
        ${psql} -c "INSERT INTO ${data_schema}.${lookup_name}_lookup(st_code, state, co_code, name) SELECT CAST(s.statefp as integer), s.abbrev, CAST(c.countyfp as integer), c.name FROM ${data_schema}.${lookup_name} As c INNER JOIN state_lookup As s ON s.statefp = c.statefp;"
        ${psql} -c "VACUUM ANALYZE ${data_schema}.${lookup_name}_lookup;" ');
-       
+
 INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, level_nation, single_geom_mode, insert_mode, pre_load_process, post_load_process )
 VALUES(1, 'state_all', 'state', true, false, false,true,false, 'c',
        '${psql} -c "CREATE TABLE ${data_schema}.${lookup_name}(CONSTRAINT pk_${lookup_name} PRIMARY KEY (statefp),CONSTRAINT uidx_${lookup_name}_stusps  UNIQUE (stusps), CONSTRAINT uidx_${lookup_name}_gid UNIQUE (gid) ) INHERITS(tiger.state); "',
@@ -313,7 +309,7 @@ VALUES(4, 'cousub', 'cousub', true, false, true,false, 'c',
        '${psql} -c "ALTER TABLE ${staging_schema}.${state_abbrev}_${table_name} RENAME geoid TO cosbidfp;SELECT loader_load_staged_data(lower(''${state_abbrev}_${table_name}''), lower(''${state_abbrev}_${lookup_name}'')); ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');"
 ${psql} -c "CREATE INDEX ${data_schema}_${state_abbrev}_${lookup_name}_the_geom_gist ON ${data_schema}.${state_abbrev}_${lookup_name} USING gist(the_geom);"
 ${psql} -c "CREATE INDEX idx_${data_schema}_${state_abbrev}_${lookup_name}_countyfp ON ${data_schema}.${state_abbrev}_${lookup_name} USING btree(countyfp);"');
-       
+
 INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, level_nation, single_geom_mode, insert_mode, pre_load_process, post_load_process, columns_exclude, website_root_override  )
 -- this is a bit of a lie that its county.  It's really state but works better with column routine
 VALUES(4, 'zcta5', 'zcta510', true,true, false,false, false, 'a',
@@ -322,7 +318,6 @@ VALUES(4, 'zcta5', 'zcta510', true,true, false,false, false, 'a',
 ${psql} -c "CREATE INDEX ${data_schema}_${state_abbrev}_${lookup_name}_the_geom_gist ON ${data_schema}.${state_abbrev}_${lookup_name} USING gist(the_geom);"'
 , ARRAY['gid','geoid','geoid10'], 'ftp://ftp2.census.gov/geo/tiger/TIGER2010/ZCTA5/2010');
 
-
 INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process )
 VALUES(6, 'faces', 'faces', true, true, false,false, 'c',
        '${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_${table_name}(CONSTRAINT pk_${state_abbrev}_${lookup_name} PRIMARY KEY (gid)) INHERITS(tiger.${lookup_name});" ',
@@ -340,7 +335,7 @@ ${psql} -c "CREATE INDEX idx_${data_schema}_${state_abbrev}_${lookup_name}_lname
 ${psql} -c "CREATE INDEX idx_${data_schema}_${state_abbrev}_${lookup_name}_tlid_statefp ON ${data_schema}.${state_abbrev}_${table_name} USING btree (tlid,statefp);"
 ${psql} -c "ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');"
 ${psql} -c "vacuum analyze ${data_schema}.${state_abbrev}_${lookup_name};"', ARRAY['gid','statefp']);
-       
+
 INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process )
 VALUES(8, 'edges', 'edges', true, true, false,false, 'a',
 '${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_${table_name}(CONSTRAINT pk_${state_abbrev}_${table_name} PRIMARY KEY (gid)) INHERITS(tiger.${table_name});" ',
@@ -361,7 +356,7 @@ ${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_zip_lookup_base(CONSTRAI
 ${psql} -c "INSERT INTO ${data_schema}.${state_abbrev}_zip_lookup_base(zip,state,county,city, statefp) SELECT DISTINCT e.zipl, ''${state_abbrev}'', c.name,p.name,''${state_fips}''  FROM ${data_schema}.${state_abbrev}_edges AS e INNER JOIN tiger.county As c  ON (e.countyfp = c.countyfp AND e.statefp = c.statefp AND e.statefp = ''${state_fips}'') INNER JOIN ${data_schema}.${state_abbrev}_faces AS f ON (e.tfidl = f.tfid OR e.tfidr = f.tfid) INNER JOIN ${data_schema}.${state_abbrev}_place As p ON(f.statefp = p.statefp AND f.placefp = p.placefp ) WHERE e.zipl IS NOT NULL;"
 ${psql} -c "ALTER TABLE ${data_schema}.${state_abbrev}_zip_lookup_base ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');"
 ${psql} -c "CREATE INDEX idx_${data_schema}_${state_abbrev}_zip_lookup_base_citysnd ON ${data_schema}.${state_abbrev}_zip_lookup_base USING btree(soundex(city));" ');
-       
+
 INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process,columns_exclude )
 VALUES(9, 'addr', 'addr', true, true, false,false, 'a',
        '${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_${lookup_name}(CONSTRAINT pk_${state_abbrev}_${table_name} PRIMARY KEY (gid)) INHERITS(tiger.${table_name});ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ALTER COLUMN statefp SET DEFAULT ''${state_fips}'';" ',
@@ -373,7 +368,7 @@ VALUES(9, 'addr', 'addr', true, true, false,false, 'a',
        ${psql} -c "INSERT INTO ${data_schema}.${state_abbrev}_zip_state(zip,stusps,statefp) SELECT DISTINCT zip, ''${state_abbrev}'', ''${state_fips}'' FROM ${data_schema}.${state_abbrev}_${lookup_name} WHERE zip is not null;"
        ${psql} -c "ALTER TABLE ${data_schema}.${state_abbrev}_zip_state ADD CONSTRAINT chk_statefp CHECK (statefp = ''${state_fips}'');"
        ${psql} -c "vacuum analyze ${data_schema}.${state_abbrev}_${lookup_name};"',  ARRAY['gid','statefp','fromarmid', 'toarmid']);
-       
+
 INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process,columns_exclude )
 VALUES(9, 'addrfeat', 'addrfeat', false, true, false,true, 'a',
        '${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_${lookup_name}(CONSTRAINT pk_${state_abbrev}_${table_name} PRIMARY KEY (gid)) INHERITS(tiger.${table_name});ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ALTER COLUMN statefp SET DEFAULT ''${state_fips}'';" ',
index 5d52d55cea12924c357fc37af4f47f7896268067..0cb93e442204915fb1df2e4ca1de38278cbb6c8d 100644 (file)
@@ -159,7 +159,6 @@ BEGIN
 END
 $$ LANGUAGE 'plpgsql';
 
-
 DELETE FROM loader_platform WHERE os IN ('sh', 'windows');
 GRANT SELECT ON TABLE loader_platform TO public;
 INSERT INTO loader_platform(os, wget, pgbin, declare_sect, unzip_command, psql,path_sep,loader, environ_set_command, county_process_command)
@@ -185,7 +184,6 @@ cd %TMPDIR%', E'%PSQL%', E'\\', E'%SHP2PGSQL%', 'set ',
 'for /r %%z in (*${table_name}*.dbf) do (${loader} -D -s 4269 -g the_geom -W "latin1" %%z tiger_staging.${state_abbrev}_${table_name} | ${psql} & ${psql} -c "SELECT loader_load_staged_data(lower(''${state_abbrev}_${table_name}''), lower(''${state_abbrev}_${lookup_name}''));")'
 );
 
-
 INSERT INTO loader_platform(os, wget, pgbin, declare_sect, unzip_command, psql, path_sep, loader, environ_set_command, county_process_command)
 VALUES('sh', 'wget', '',
 E'TMPDIR="${staging_fold}/temp/"
@@ -243,7 +241,6 @@ $$ LANGUAGE 'plpgsql';
 
 TRUNCATE TABLE loader_lookuptables;
 
-
 GRANT SELECT ON TABLE loader_lookuptables TO public;
 
 -- put in explanatory comments of what each column is for
@@ -270,7 +267,6 @@ ${psql} -c "ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ADD CONSTR
 ${psql} -c "CREATE INDEX ${data_schema}_${state_abbrev}_${lookup_name}_the_geom_gist ON ${data_schema}.${state_abbrev}_${lookup_name} USING gist(the_geom);"
 ${psql} -c "vacuum analyze ${data_schema}.${state_abbrev}_${lookup_name};"', '{gid, uatyp10, uatype, suffix1ce}'::text[]);
 
-
 INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process, columns_exclude )
 VALUES(12, 'bg', 'bg', false,false, true,false, 'c',
 '${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_${lookup_name}(CONSTRAINT pk_${state_abbrev}_${lookup_name} PRIMARY KEY (bg_id)) INHERITS(tiger.${lookup_name});" ',
@@ -321,7 +317,6 @@ VALUES(4, 'zcta5', 'zcta510', false,true, false,false, false, 'a',
 ${psql} -c "CREATE INDEX ${data_schema}_${state_abbrev}_${lookup_name}_the_geom_gist ON ${data_schema}.${state_abbrev}_${lookup_name} USING gist(the_geom);"'
 , ARRAY['gid','geoid','geoid10'], 'ftp://ftp2.census.gov/geo/tiger/TIGER2010/ZCTA5/2010');**/
 
-
 INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process )
 VALUES(6, 'faces', 'faces', true, true, false,false, 'c',
        '${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_${table_name}(CONSTRAINT pk_${state_abbrev}_${lookup_name} PRIMARY KEY (gid)) INHERITS(tiger.${lookup_name});" ',
index 5bfe932abfc02223e5d618204461fe8e16a5b068..99427e9c417fedc6e6fabc012262e8f42661796d 100644 (file)
@@ -159,7 +159,6 @@ BEGIN
 END
 $$ LANGUAGE 'plpgsql';
 
-
 DELETE FROM loader_platform WHERE os IN ('sh', 'windows');
 GRANT SELECT ON TABLE loader_platform TO public;
 INSERT INTO loader_platform(os, wget, pgbin, declare_sect, unzip_command, psql,path_sep,loader, environ_set_command, county_process_command)
@@ -185,7 +184,6 @@ cd %TMPDIR%', E'%PSQL%', E'\\', E'%SHP2PGSQL%', 'set ',
 'for /r %%z in (*${table_name}*.dbf) do (${loader} -D -s 4269 -g the_geom -W "latin1" %%z tiger_staging.${state_abbrev}_${table_name} | ${psql} & ${psql} -c "SELECT loader_load_staged_data(lower(''${state_abbrev}_${table_name}''), lower(''${state_abbrev}_${lookup_name}''));")'
 );
 
-
 INSERT INTO loader_platform(os, wget, pgbin, declare_sect, unzip_command, psql, path_sep, loader, environ_set_command, county_process_command)
 VALUES('sh', 'wget', '',
 E'TMPDIR="${staging_fold}/temp/"
@@ -243,7 +241,6 @@ $$ LANGUAGE 'plpgsql';
 
 TRUNCATE TABLE loader_lookuptables;
 
-
 GRANT SELECT ON TABLE loader_lookuptables TO public;
 
 -- put in explanatory comments of what each column is for
@@ -270,7 +267,6 @@ ${psql} -c "ALTER TABLE ${data_schema}.${state_abbrev}_${lookup_name} ADD CONSTR
 ${psql} -c "CREATE INDEX ${data_schema}_${state_abbrev}_${lookup_name}_the_geom_gist ON ${data_schema}.${state_abbrev}_${lookup_name} USING gist(the_geom);"
 ${psql} -c "vacuum analyze ${data_schema}.${state_abbrev}_${lookup_name};"', '{gid, uatyp10, uatype, suffix1ce}'::text[]);
 
-
 INSERT INTO loader_lookuptables(process_order, lookup_name, table_name, load, level_county, level_state, single_geom_mode, insert_mode, pre_load_process, post_load_process, columns_exclude )
 VALUES(12, 'bg', 'bg', false,false, true,false, 'c',
 '${psql} -c "CREATE TABLE ${data_schema}.${state_abbrev}_${lookup_name}(CONSTRAINT pk_${state_abbrev}_${lookup_name} PRIMARY KEY (bg_id)) INHERITS(tiger.${lookup_name});" ',
index 2be54f06f9e4b98a9fa3fa813c5b567858a29c64..6b9e8bcd9877577e379951265262c574def48838 100644 (file)
@@ -63,7 +63,7 @@ BEGIN
                         , COALESCE(t.tfidr,0) As right_face, COALESCE(tl.tlid, t.tlid) AS next_left_edge,  COALESCE(tr.tlid, t.tlid) As next_right_edge, t.orig_geom
                                                FROM
                                                        te AS t LEFT JOIN te As tl ON (t.tnidf = tl.tnidt AND t.tfidl = tl.tfidl)
-                                                        LEFT JOIN te As tr ON (t.tnidt = tr.tnidf AND t.tfidr = tr.tfidr)                              
+                                                        LEFT JOIN te As tr ON (t.tnidt = tr.tnidf AND t.tfidr = tr.tfidr)
                                                ';
        EXECUTE var_sql USING var_statefp, var_rgeom, var_srid, var_precision;
        GET DIAGNOSTICS var_rcnt = ROW_COUNT;
@@ -84,7 +84,7 @@ BEGIN
        var_sql := 'CREATE INDEX idx_tmp_edge_next_left_edge ON tmp_edge USING btree (next_left_edge ); CREATE INDEX idx_tmp_edge_next_right_edge ON tmp_edge USING btree (next_right_edge);';
 
        EXECUTE var_sql;
-       
+
        -- start load in faces
        var_sql := 'INSERT INTO ' || quote_ident(toponame) || '.face(face_id, mbr)
                                                SELECT f.tfid, ST_Envelope(ST_Transform(f.the_geom,$3)) As mbr
@@ -99,7 +99,7 @@ BEGIN
    -- end load in faces
 
    -- add remaining missing edges of present faces --
-   var_sql := 'INSERT INTO tmp_edge(edge_id, geom, start_node, end_node, left_face, right_face, next_left_edge, next_right_edge, orig_geom)    
+   var_sql := 'INSERT INTO tmp_edge(edge_id, geom, start_node, end_node, left_face, right_face, next_left_edge, next_right_edge, orig_geom)
                        WITH te AS
                        (SELECT tlid,  ST_GeometryN(ST_SnapToGrid(ST_Transform(ST_LineMerge(the_geom),$2),$3),1) As geom, tnidf, tnidt, tfidl, tfidr, the_geom As orig_geom
                                                                        FROM tiger.edges
@@ -108,7 +108,7 @@ BEGIN
                                OR tfidr IN(SELECT face_id FROM ' || quote_ident(toponame) || '.face) )
                                AND tlid NOT IN(SELECT edge_id FROM tmp_edge)
                                 )
-                               
+
                        SELECT DISTINCT ON (t.tlid) t.tlid As edge_id,t.geom
                         , t.tnidf As start_node, t.tnidt As end_node, t.tfidl As left_face
                         , t.tfidr As right_face, tl.tlid AS next_left_edge,  tr.tlid As next_right_edge, t.orig_geom
@@ -172,7 +172,7 @@ BEGIN
                                        SELECT t.edge_id, t.geom, t.start_node, t.end_node, COALESCE(t.left_face,0) As left_face, COALESCE(t.right_face,0) As right_face, t.next_left_edge, t.next_right_edge
                                                FROM
                                                        tmp_edge AS t
-                                                       WHERE t.edge_id NOT IN(SELECT edge_id FROM ' || quote_ident(toponame) || '.edge)                                
+                                                       WHERE t.edge_id NOT IN(SELECT edge_id FROM ' || quote_ident(toponame) || '.edge)
                                                ';
        EXECUTE var_sql USING var_statefp, var_rgeom;
        GET DIAGNOSTICS var_rcnt = ROW_COUNT;
index 744aca98a913b2bc6a7e6f43224aed14f0605399..95e11bddc8619d0f008909cb353202ada8ac6849 100644 (file)
@@ -276,7 +276,6 @@ SELECT create_census_base_tables();
 \i pagc_normalize/pagc_tables.sql
 \i pagc_normalize/pagc_normalize_address.sql
 
-
 ---- Geocoder functions
 -- General helpers
 \i geocode/other_helper_functions.sql
index 67cf946f65134545146bb6dc2e5d3b6d9a1581d9..5e86659300f38e18e88c30264c96410a78c917a8 100644 (file)
@@ -1,8 +1,8 @@
-CREATE OR REPLACE FUNCTION tiger.standardize_tiger_data(param_states varchar[]) RETURNS void AS\r
-$$\r
--- fix park addresses, normalizer puts this in suftype\r
-UPDATE tiger.featnames SET name = replace(name,' Park', ''), suftypabrv = 'Park' where statefp IN (SELECT statefp FROM tiger.state_lookup WHERE abbrev = ANY(param_states) ) \r
-     AND name ILIKE '% Park' AND suftypabrv is null;\r
-\r
-$$\r
+CREATE OR REPLACE FUNCTION tiger.standardize_tiger_data(param_states varchar[]) RETURNS void AS
+$$
+-- fix park addresses, normalizer puts this in suftype
+UPDATE tiger.featnames SET name = replace(name,' Park', ''), suftypabrv = 'Park' where statefp IN (SELECT statefp FROM tiger.state_lookup WHERE abbrev = ANY(param_states) )
+     AND name ILIKE '% Park' AND suftypabrv is null;
+
+$$
 language 'sql';
\ No newline at end of file
index 8166c5661923572b4c6e21a801adb481042380fe..eeb205649866ebb58d34c4f3af70b06e9141fb13 100644 (file)
@@ -23,7 +23,7 @@ CREATE OR REPLACE FUNCTION geography_typmod_out(integer)
        RETURNS cstring
        AS 'MODULE_PATHNAME','postgis_typmod_out'
        LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL;
-       
+
 -- Availability: 1.5.0
 CREATE OR REPLACE FUNCTION geography_in(cstring, oid, integer)
        RETURNS geography
@@ -69,13 +69,11 @@ CREATE TYPE geography (
        alignment = double
 );
 
-
-
 -- Availability: 1.5.0
 CREATE OR REPLACE FUNCTION geography(geography, integer, boolean)
        RETURNS geography
        AS 'MODULE_PATHNAME','geography_enforce_typmod'
-       LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL; 
+       LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL;
 
 -- Availability: 1.5.0
 CREATE CAST (geography AS geography) WITH FUNCTION geography(geography, integer, boolean) AS IMPLICIT;
@@ -103,7 +101,7 @@ CREATE OR REPLACE FUNCTION ST_AsText(geography)
        RETURNS TEXT
        AS 'MODULE_PATHNAME','LWGEOM_asText'
        LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL;
-       
+
 -- Availability: 1.5.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography
 CREATE OR REPLACE FUNCTION ST_AsText(text)
        RETURNS text AS
@@ -150,17 +148,17 @@ CREATE OR REPLACE FUNCTION postgis_typmod_type(integer)
 -- Changed: 2.4.0 Limit to only list things that are tables
 CREATE OR REPLACE VIEW geography_columns AS
        SELECT
-               current_database() AS f_table_catalog, 
-               n.nspname AS f_table_schema, 
-               c.relname AS f_table_name, 
+               current_database() AS f_table_catalog,
+               n.nspname AS f_table_schema,
+               c.relname AS f_table_name,
                a.attname AS f_geography_column,
                postgis_typmod_dims(a.atttypmod) AS coord_dimension,
                postgis_typmod_srid(a.atttypmod) AS srid,
                postgis_typmod_type(a.atttypmod) AS type
-       FROM 
-               pg_class c, 
-               pg_attribute a, 
-               pg_type t, 
+       FROM
+               pg_class c,
+               pg_attribute a,
+               pg_type t,
                pg_namespace n
        WHERE t.typname = 'geography'
                AND a.attisdropped = false
@@ -194,50 +192,50 @@ CREATE CAST (geography AS geometry) WITH FUNCTION geometry(geography) ;
 -- ---------- ---------- ---------- ---------- ---------- ---------- ----------
 
 -- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION geography_gist_consistent(internal,geography,int4) 
-       RETURNS bool 
+CREATE OR REPLACE FUNCTION geography_gist_consistent(internal,geography,int4)
+       RETURNS bool
        AS 'MODULE_PATHNAME' ,'gserialized_gist_consistent'
        LANGUAGE 'c';
 
 -- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION geography_gist_compress(internal) 
-       RETURNS internal 
+CREATE OR REPLACE FUNCTION geography_gist_compress(internal)
+       RETURNS internal
        AS 'MODULE_PATHNAME','gserialized_gist_compress'
        LANGUAGE 'c';
 
 -- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION geography_gist_penalty(internal,internal,internal) 
-       RETURNS internal 
+CREATE OR REPLACE FUNCTION geography_gist_penalty(internal,internal,internal)
+       RETURNS internal
        AS 'MODULE_PATHNAME' ,'gserialized_gist_penalty'
        LANGUAGE 'c';
 
 -- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION geography_gist_picksplit(internal, internal) 
-       RETURNS internal 
+CREATE OR REPLACE FUNCTION geography_gist_picksplit(internal, internal)
+       RETURNS internal
        AS 'MODULE_PATHNAME' ,'gserialized_gist_picksplit'
        LANGUAGE 'c';
 
 -- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION geography_gist_union(bytea, internal) 
-       RETURNS internal 
+CREATE OR REPLACE FUNCTION geography_gist_union(bytea, internal)
+       RETURNS internal
        AS 'MODULE_PATHNAME' ,'gserialized_gist_union'
        LANGUAGE 'c';
 
 -- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION geography_gist_same(box2d, box2d, internal) 
-       RETURNS internal 
+CREATE OR REPLACE FUNCTION geography_gist_same(box2d, box2d, internal)
+       RETURNS internal
        AS 'MODULE_PATHNAME' ,'gserialized_gist_same'
        LANGUAGE 'c';
 
 -- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION geography_gist_decompress(internal) 
-       RETURNS internal 
+CREATE OR REPLACE FUNCTION geography_gist_decompress(internal)
+       RETURNS internal
        AS 'MODULE_PATHNAME' ,'gserialized_gist_decompress'
        LANGUAGE 'c';
 
 -- Availability: 1.5.0
-CREATE OR REPLACE FUNCTION geography_overlaps(geography, geography) 
-       RETURNS boolean 
+CREATE OR REPLACE FUNCTION geography_overlaps(geography, geography)
+       RETURNS boolean
        AS 'MODULE_PATHNAME' ,'gserialized_overlaps'
        LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL;
 
@@ -246,7 +244,7 @@ CREATE OPERATOR && (
        LEFTARG = geography, RIGHTARG = geography, PROCEDURE = geography_overlaps,
        COMMUTATOR = '&&',
        RESTRICT = gserialized_gist_sel_nd,
-       JOIN = gserialized_gist_joinsel_nd      
+       JOIN = gserialized_gist_joinsel_nd
 );
 
 -- Availability: 2.2.0
@@ -263,12 +261,11 @@ CREATE OPERATOR <-> (
 );
 
 -- Availability: 2.2.0
-CREATE OR REPLACE FUNCTION geography_gist_distance(internal, geography, int4) 
-       RETURNS float8 
+CREATE OR REPLACE FUNCTION geography_gist_distance(internal, geography, int4)
+       RETURNS float8
        AS 'MODULE_PATHNAME' ,'gserialized_gist_geog_distance'
        LANGUAGE 'c';
 
-
 -- Availability: 1.5.0
 CREATE OPERATOR CLASS gist_geography_ops
        DEFAULT FOR TYPE geography USING GIST AS
@@ -314,19 +311,19 @@ CREATE OR REPLACE FUNCTION geography_gt(geography, geography)
        AS 'MODULE_PATHNAME', 'geography_gt'
        LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL;
 
--- Availability: 1.5.0 
+-- Availability: 1.5.0
 CREATE OR REPLACE FUNCTION geography_ge(geography, geography)
        RETURNS bool
        AS 'MODULE_PATHNAME', 'geography_ge'
        LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL;
 
--- Availability: 1.5.0 
+-- Availability: 1.5.0
 CREATE OR REPLACE FUNCTION geography_eq(geography, geography)
        RETURNS bool
        AS 'MODULE_PATHNAME', 'geography_eq'
        LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL;
 
--- Availability: 1.5.0 
+-- Availability: 1.5.0
 CREATE OR REPLACE FUNCTION geography_cmp(geography, geography)
        RETURNS integer
        AS 'MODULE_PATHNAME', 'geography_cmp'
@@ -380,7 +377,6 @@ CREATE OPERATOR CLASS btree_geography_ops
        OPERATOR        5       > ,
        FUNCTION        1       geography_cmp (geography, geography);
 
-
 -- ---------- ---------- ---------- ---------- ---------- ---------- ----------
 -- Export Functions
 -- Availability: 1.5.0
@@ -397,7 +393,7 @@ CREATE OR REPLACE FUNCTION ST_AsSVG(geog geography,rel int4 DEFAULT 0,maxdecimal
        RETURNS text
        AS 'MODULE_PATHNAME','geography_as_svg'
        LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL;
-       
+
 -- Availability: 1.5.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography
 CREATE OR REPLACE FUNCTION ST_AsSVG(text)
        RETURNS text AS
@@ -533,7 +529,7 @@ CREATE OR REPLACE FUNCTION ST_Distance(geography, geography)
        RETURNS float8
        AS 'SELECT @extschema@._ST_Distance($1, $2, 0.0, true)'
        LANGUAGE 'sql' IMMUTABLE STRICT _PARALLEL;
-       
+
 -- Availability: 1.5.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography
 CREATE OR REPLACE FUNCTION ST_Distance(text, text)
        RETURNS float8 AS
@@ -567,7 +563,6 @@ CREATE OR REPLACE FUNCTION ST_DWithin(text, text, float8)
        $$ SELECT ST_DWithin($1::@extschema@.geometry, $2::@extschema@.geometry, $3);  $$
        LANGUAGE 'sql' IMMUTABLE _PARALLEL;
 
-
 -- ---------- ---------- ---------- ---------- ---------- ---------- ----------
 -- Distance/DWithin testing functions for cached operations.
 -- For developer/tester use only.
@@ -579,7 +574,7 @@ CREATE OR REPLACE FUNCTION _ST_DistanceUnCached(geography, geography, float8, bo
        AS 'MODULE_PATHNAME','geography_distance_uncached'
        LANGUAGE 'c' IMMUTABLE STRICT
        COST 100;
-       
+
 -- Calculate the distance in geographics *without* using the caching code line or tree code
 CREATE OR REPLACE FUNCTION _ST_DistanceUnCached(geography, geography, boolean)
        RETURNS float8
@@ -592,7 +587,7 @@ CREATE OR REPLACE FUNCTION _ST_DistanceUnCached(geography, geography)
        AS 'SELECT @extschema@._ST_DistanceUnCached($1, $2, 0.0, true)'
        LANGUAGE 'sql' IMMUTABLE STRICT;
 
--- Calculate the distance in geographics using the circular tree code, but 
+-- Calculate the distance in geographics using the circular tree code, but
 -- *without* using the caching code line
 CREATE OR REPLACE FUNCTION _ST_DistanceTree(geography, geography, float8, boolean)
        RETURNS float8
@@ -600,7 +595,7 @@ CREATE OR REPLACE FUNCTION _ST_DistanceTree(geography, geography, float8, boolea
        LANGUAGE 'c' IMMUTABLE STRICT
        COST 100;
 
--- Calculate the distance in geographics using the circular tree code, but 
+-- Calculate the distance in geographics using the circular tree code, but
 -- *without* using the caching code line
 CREATE OR REPLACE FUNCTION _ST_DistanceTree(geography, geography)
        RETURNS float8
@@ -619,7 +614,7 @@ CREATE OR REPLACE FUNCTION _ST_DWithinUnCached(geography, geography, float8)
        RETURNS boolean
        AS 'SELECT $1 OPERATOR(@extschema@.&&) @extschema@._ST_Expand($2,$3) AND $2 OPERATOR(@extschema@.&&) @extschema@._ST_Expand($1,$3) AND @extschema@._ST_DWithinUnCached($1, $2, $3, true)'
        LANGUAGE 'sql' IMMUTABLE;
-       
+
 -- ---------- ---------- ---------- ---------- ---------- ---------- ----------
 
 -- Availability: 1.5.0
@@ -848,7 +843,6 @@ CREATE OR REPLACE FUNCTION ST_Centroid(geography, use_spheroid boolean DEFAULT t
        AS 'MODULE_PATHNAME','geography_centroid'
        LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL;
 
-
 -- Availability: 1.5.0 - this is just a hack to prevent unknown from causing ambiguous name because of geography
 CREATE OR REPLACE FUNCTION ST_Centroid(text)
        RETURNS geometry AS
index c647e985beae50b53fd549548cff123798c6ed32..eeef1729a461f1e89cf765782026a89dd4674c29 100644 (file)
@@ -19,8 +19,6 @@ RETURNS boolean
 AS 'MODULE_PATHNAME','gserialized_gidx_gidx_overlaps'
 LANGUAGE 'c' IMMUTABLE STRICT;
 
-
-
 -- Availability: 2.3.0
 CREATE OPERATOR && (
   LEFTARG    = gidx,
index c44ddfa9b4c2f8e6f28dc7824e4f3b61ba076530..855b1d5905cbf69c3bab3b3bc1452a9b48c47015 100644 (file)
@@ -1,6 +1,6 @@
 -- Legacy functions without chip functions --
 -- This is the full list including the legacy_minimal.sql (minimal)
--- so no need to install both legacy and the minimal 
+-- so no need to install both legacy and the minimal
 #include "legacy_minimal.sql.in"
 --- start functions that in theory should never have been used or internal like stuff deprecated
 
@@ -9,67 +9,67 @@ CREATE OR REPLACE FUNCTION addbbox(geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME','LWGEOM_addBBOX'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 CREATE OR REPLACE FUNCTION dropbbox(geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME','LWGEOM_dropBBOX'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION hasbbox(geometry)
        RETURNS bool
        AS 'MODULE_PATHNAME', 'LWGEOM_hasBBOX'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Availability: 1.2.2 -- never deprecated but don't think anyone uses it
 CREATE OR REPLACE FUNCTION getsrid(geometry)
        RETURNS int4
        AS 'MODULE_PATHNAME','LWGEOM_get_srid'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION GeometryFromText(text, int4)
        RETURNS geometry
        AS 'MODULE_PATHNAME','LWGEOM_from_text'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION GeometryFromText(text)
        RETURNS geometry
        AS 'MODULE_PATHNAME','LWGEOM_from_text'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION GeomFromWKB(bytea)
        RETURNS geometry
        AS 'MODULE_PATHNAME','LWGEOM_from_WKB'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION GeomFromWKB(bytea, int)
        RETURNS geometry
        AS 'SELECT ST_SetSRID(ST_GeomFromWKB($1), $2)'
        LANGUAGE 'sql' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION noop(geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'LWGEOM_noop'
        LANGUAGE 'c' VOLATILE STRICT;
-       
+
 -- ESRI ArcSDE compatibility functions --
 -- We are remiving these because we don't
--- think ESRI relies on them 
+-- think ESRI relies on them
 -- so their existence is pointless
 -- Availability: 1.5.0
 -- PostGIS equivalent function: none
 CREATE OR REPLACE FUNCTION SE_EnvelopesIntersect(geometry,geometry)
        RETURNS boolean
-       AS $$ 
+       AS $$
        SELECT $1 && $2
-       $$      
-       LANGUAGE 'sql' IMMUTABLE STRICT; 
-       
+       $$
+       LANGUAGE 'sql' IMMUTABLE STRICT;
+
 CREATE OR REPLACE FUNCTION SE_Is3D(geometry)
        RETURNS bool
        AS 'MODULE_PATHNAME', 'LWGEOM_hasz'
@@ -80,32 +80,31 @@ CREATE OR REPLACE FUNCTION SE_IsMeasured(geometry)
        RETURNS bool
        AS 'MODULE_PATHNAME', 'LWGEOM_hasm'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- PostGIS equivalent function: Z(geometry)
 CREATE OR REPLACE FUNCTION SE_Z(geometry)
        RETURNS float8
        AS 'MODULE_PATHNAME','LWGEOM_z_point'
-       LANGUAGE 'c' IMMUTABLE STRICT; 
+       LANGUAGE 'c' IMMUTABLE STRICT;
 
 -- PostGIS equivalent function: M(geometry)
 CREATE OR REPLACE FUNCTION SE_M(geometry)
        RETURNS float8
        AS 'MODULE_PATHNAME','LWGEOM_m_point'
-       LANGUAGE 'c' IMMUTABLE STRICT; 
-       
+       LANGUAGE 'c' IMMUTABLE STRICT;
+
 -- PostGIS equivalent function: locate_between_measures(geometry, float8, float8)
 CREATE OR REPLACE FUNCTION SE_LocateBetween(geometry, float8, float8)
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'LWGEOM_locate_between_m'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- PostGIS equivalent function: locate_along_measure(geometry, float8)
 CREATE OR REPLACE FUNCTION SE_LocateAlong(geometry, float8)
        RETURNS geometry
        AS $$ SELECT SE_LocateBetween($1, $2, $2) $$
        LANGUAGE 'sql' IMMUTABLE STRICT;
 
-       
 --- Deprecation in 1.5.0
 CREATE OR REPLACE FUNCTION st_box2d(geometry)
        RETURNS box2d
@@ -273,7 +272,7 @@ BEGIN
                                        AND a.attname::varchar = gc.f_geometry_column
                        );
 
-       GET DIAGNOSTICS foundschema = ROW_COUNT; 
+       GET DIAGNOSTICS foundschema = ROW_COUNT;
 
        -- no linkage to system table needed
        return 'fixed:'||foundschema::text; **/
@@ -381,8 +380,6 @@ END
 $$
 LANGUAGE 'plpgsql' VOLATILE;
 
-
-
 -- END MANAGEMENT FUNCTIONS --
 
 -- Deprecation in 1.5.0
@@ -392,7 +389,7 @@ LANGUAGE 'plpgsql' VOLATILE;
        RETURNS bool
        AS 'MODULE_PATHNAME', 'geometry_analyze'
        LANGUAGE 'c' VOLATILE STRICT;
-       
+
 -- Deprecation in 1.5.0
 CREATE OR REPLACE FUNCTION st_geometry_in(cstring)
        RETURNS geometry
@@ -404,7 +401,7 @@ CREATE OR REPLACE FUNCTION st_geometry_out(geometry)
        RETURNS cstring
        AS 'MODULE_PATHNAME','LWGEOM_out'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.5.0
 CREATE OR REPLACE FUNCTION st_geometry_recv(internal)
        RETURNS geometry
@@ -416,7 +413,7 @@ CREATE OR REPLACE FUNCTION st_geometry_send(geometry)
        RETURNS bytea
        AS 'MODULE_PATHNAME','LWGEOM_send'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.5.0
 CREATE OR REPLACE FUNCTION st_spheroid_in(cstring)
        RETURNS spheroid
@@ -428,7 +425,7 @@ CREATE OR REPLACE FUNCTION st_spheroid_out(spheroid)
        RETURNS cstring
        AS 'MODULE_PATHNAME','ellipsoid_out'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 **/
 -- Deprecation in 1.5.0
 CREATE OR REPLACE FUNCTION st_geometry_lt(geometry, geometry)
@@ -465,11 +462,9 @@ CREATE OR REPLACE FUNCTION st_geometry_cmp(geometry, geometry)
        RETURNS integer
        AS 'MODULE_PATHNAME', 'lwgeom_cmp'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
 
 --- end functions that in theory should never have been used
 
-
 -- begin old ogc (and non-ST) names that have been replaced with new SQL-MM and SQL ST_ Like names --
 -- AFFINE Functions --
 -- Availability: 1.1.2
@@ -478,7 +473,7 @@ CREATE OR REPLACE FUNCTION Affine(geometry,float8,float8,float8,float8,float8,fl
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'LWGEOM_affine'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Availability: 1.1.2
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION Affine(geometry,float8,float8,float8,float8,float8,float8)
@@ -513,7 +508,7 @@ CREATE OR REPLACE FUNCTION RotateY(geometry,float8)
        RETURNS geometry
        AS 'SELECT st_affine($1,  cos($2), 0, sin($2),  0, 1, 0,  -sin($2), 0, cos($2), 0,  0, 0)'
        LANGUAGE 'sql' IMMUTABLE STRICT;
-       
+
 -- Availability: 1.1.0
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION Scale(geometry,float8,float8,float8)
@@ -540,7 +535,6 @@ CREATE OR REPLACE FUNCTION Translate(geometry,float8,float8)
        AS 'SELECT st_translate($1, $2, $3, 0)'
        LANGUAGE 'sql' IMMUTABLE STRICT;
 
-
 -- Availability: 1.1.0
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION TransScale(geometry,float8,float8,float8,float8)
@@ -550,25 +544,25 @@ CREATE OR REPLACE FUNCTION TransScale(geometry,float8,float8,float8,float8)
        LANGUAGE 'sql' IMMUTABLE STRICT;
 
 -- END Affine functions
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION AddPoint(geometry, geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'LWGEOM_addpoint'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION AddPoint(geometry, geometry, integer)
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'LWGEOM_addpoint'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION Area(geometry)
        RETURNS FLOAT8
        AS 'MODULE_PATHNAME','LWGEOM_area_polygon'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- this is an alias for 'area(geometry)'
 -- there is nothing such an 'area3d'...
 -- Deprecation in 1.2.3
@@ -576,84 +570,83 @@ CREATE OR REPLACE FUNCTION Area2D(geometry)
        RETURNS FLOAT8
        AS 'MODULE_PATHNAME', 'LWGEOM_area_polygon'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION AsEWKB(geometry)
        RETURNS BYTEA
        AS 'MODULE_PATHNAME','WKBFromLWGEOM'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
 
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION AsEWKB(geometry,text)
        RETURNS bytea
        AS 'MODULE_PATHNAME','WKBFromLWGEOM'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION AsEWKT(geometry)
        RETURNS TEXT
        AS 'MODULE_PATHNAME','LWGEOM_asEWKT'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- AsGML(geom) / precision=15 version=2
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION AsGML(geometry)
        RETURNS TEXT
        AS 'SELECT _ST_AsGML(2, $1, 15, 0, null, null)'
        LANGUAGE 'sql' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION AsGML(geometry, int4)
        RETURNS TEXT
        AS 'SELECT _ST_AsGML(2, $1, $2, 0, null, null)'
        LANGUAGE 'sql' IMMUTABLE STRICT;
-       
+
 -- AsKML(geom, precision) / version=2
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION AsKML(geometry, int4)
        RETURNS TEXT
        AS 'SELECT _ST_AsKML(2, ST_transform($1,4326), $2, null)'
        LANGUAGE 'sql' IMMUTABLE STRICT;
-       
+
 -- AsKML(geom) / precision=15 version=2
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION AsKML(geometry)
        RETURNS TEXT
        AS 'SELECT _ST_AsKML(2, ST_Transform($1,4326), 15, null)'
        LANGUAGE 'sql' IMMUTABLE STRICT;
-       
+
 -- AsKML(version, geom, precision)
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION AsKML(int4, geometry, int4)
        RETURNS TEXT
        AS 'SELECT _ST_AsKML($1, ST_Transform($2,4326), $3, null)'
        LANGUAGE 'sql' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION AsHEXEWKB(geometry)
        RETURNS TEXT
        AS 'MODULE_PATHNAME','LWGEOM_asHEXEWKB'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION AsHEXEWKB(geometry, text)
        RETURNS TEXT
        AS 'MODULE_PATHNAME','LWGEOM_asHEXEWKB'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION AsSVG(geometry)
        RETURNS TEXT
        AS 'MODULE_PATHNAME','LWGEOM_asSVG'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION AsSVG(geometry,int4)
        RETURNS TEXT
        AS 'MODULE_PATHNAME','LWGEOM_asSVG'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION AsSVG(geometry,int4,int4)
        RETURNS TEXT
@@ -665,7 +658,7 @@ CREATE OR REPLACE FUNCTION azimuth(geometry,geometry)
        RETURNS float8
        AS 'MODULE_PATHNAME', 'LWGEOM_azimuth'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION BdPolyFromText(text, integer)
 RETURNS geometry
@@ -718,45 +711,45 @@ BEGIN
 END;
 $$
 LANGUAGE 'plpgsql' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION boundary(geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME','boundary'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION buffer(geometry,float8,integer)
        RETURNS geometry
        AS 'SELECT ST_Buffer($1, $2, $3)'
        LANGUAGE 'sql' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION buffer(geometry,float8)
        RETURNS geometry
        AS 'MODULE_PATHNAME','buffer'
        LANGUAGE 'c' IMMUTABLE STRICT
        COST 100;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION BuildArea(geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'ST_BuildArea'
        LANGUAGE 'c' IMMUTABLE STRICT
        COST 100;
-       
+
 -- This is also available w/out GEOS
 CREATE OR REPLACE FUNCTION Centroid(geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME'
        LANGUAGE 'c' IMMUTABLE STRICT;
-               
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION Contains(geometry,geometry)
        RETURNS boolean
        AS 'MODULE_PATHNAME'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION convexhull(geometry)
        RETURNS geometry
@@ -769,52 +762,52 @@ CREATE OR REPLACE FUNCTION crosses(geometry,geometry)
        RETURNS boolean
        AS 'MODULE_PATHNAME'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION distance(geometry,geometry)
        RETURNS float8
        AS 'MODULE_PATHNAME', 'LWGEOM_mindistance2d'
        LANGUAGE 'c' IMMUTABLE STRICT
        COST 100;
-               
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION difference(geometry,geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME','difference'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION Dimension(geometry)
        RETURNS int4
        AS 'MODULE_PATHNAME', 'LWGEOM_dimension'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION disjoint(geometry,geometry)
        RETURNS boolean
        AS 'MODULE_PATHNAME'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION distance_sphere(geometry,geometry)
        RETURNS FLOAT8
        AS 'MODULE_PATHNAME','LWGEOM_distance_sphere'
        LANGUAGE 'c' IMMUTABLE STRICT
        COST 100;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION distance_spheroid(geometry,geometry,spheroid)
        RETURNS FLOAT8
        AS 'MODULE_PATHNAME','LWGEOM_distance_ellipsoid'
        LANGUAGE 'c' IMMUTABLE STRICT
        COST 100;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION Dump(geometry)
        RETURNS SETOF geometry_dump
        AS 'MODULE_PATHNAME', 'LWGEOM_dump'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION DumpRings(geometry)
        RETURNS SETOF geometry_dump
@@ -826,32 +819,32 @@ CREATE OR REPLACE FUNCTION Envelope(geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'LWGEOM_envelope'
        LANGUAGE 'c' IMMUTABLE STRICT;
-               
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION Expand(box2d,float8)
        RETURNS box2d
        AS 'MODULE_PATHNAME', 'BOX2D_expand'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION Expand(box3d,float8)
        RETURNS box3d
        AS 'MODULE_PATHNAME', 'BOX3D_expand'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION Expand(geometry,float8)
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'LWGEOM_expand'
        LANGUAGE 'c' IMMUTABLE STRICT;
-               
+
 CREATE AGGREGATE Extent(
        sfunc = ST_combine_bbox,
        basetype = geometry,
        finalfunc = box2d,
        stype = box3d
        );
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION Find_Extent(text,text) RETURNS box2d AS
 $$
@@ -884,63 +877,62 @@ BEGIN
 END;
 $$
 LANGUAGE 'plpgsql' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION EndPoint(geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'LWGEOM_endpoint_linestring'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION ExteriorRing(geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME','LWGEOM_exteriorring_polygon'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION Force_2d(geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'LWGEOM_force_2d'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- an alias for force_3dz
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION Force_3d(geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'LWGEOM_force_3dz'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
 
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION Force_3dm(geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'LWGEOM_force_3dm'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION Force_3dz(geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'LWGEOM_force_3dz'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION Force_4d(geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'LWGEOM_force_4d'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION Force_Collection(geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'LWGEOM_force_collection'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION ForceRHR(geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'LWGEOM_force_clockwise_poly'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION GeomCollFromText(text, int4)
        RETURNS geometry
@@ -951,7 +943,7 @@ CREATE OR REPLACE FUNCTION GeomCollFromText(text, int4)
        ELSE NULL END
        '
        LANGUAGE 'sql' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION GeomCollFromText(text)
        RETURNS geometry
@@ -984,94 +976,94 @@ CREATE OR REPLACE FUNCTION GeomCollFromWKB(bytea)
        ELSE NULL END
        '
        LANGUAGE 'sql' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION GeometryN(geometry,integer)
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'LWGEOM_geometryn_collection'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION GeomUnion(geometry,geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME','geomunion'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Availability: 1.5.0  -- replaced with postgis_getbbox
 CREATE OR REPLACE FUNCTION getbbox(geometry)
        RETURNS box2d
        AS 'MODULE_PATHNAME','LWGEOM_to_BOX2D'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION intersects(geometry,geometry)
        RETURNS boolean
        AS 'MODULE_PATHNAME'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION IsRing(geometry)
        RETURNS boolean
        AS 'MODULE_PATHNAME'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION IsSimple(geometry)
        RETURNS boolean
        AS 'MODULE_PATHNAME', 'issimple'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION length_spheroid(geometry, spheroid)
        RETURNS FLOAT8
        AS 'MODULE_PATHNAME','LWGEOM_length_ellipsoid_linestring'
        LANGUAGE 'c' IMMUTABLE STRICT
        COST 100;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION length2d_spheroid(geometry, spheroid)
        RETURNS FLOAT8
        AS 'MODULE_PATHNAME','LWGEOM_length2d_ellipsoid'
        LANGUAGE 'c' IMMUTABLE STRICT
        COST 100;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION length3d_spheroid(geometry, spheroid)
        RETURNS FLOAT8
        AS 'MODULE_PATHNAME','LWGEOM_length_ellipsoid_linestring'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION LineMerge(geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'linemerge'
        LANGUAGE 'c' IMMUTABLE STRICT
        COST 100;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION locate_along_measure(geometry, float8)
        RETURNS geometry
        AS $$ SELECT ST_locate_between_measures($1, $2, $2) $$
        LANGUAGE 'sql' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION MakeBox2d(geometry, geometry)
        RETURNS box2d
        AS 'MODULE_PATHNAME', 'BOX2D_construct'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION MakePolygon(geometry, geometry[])
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'LWGEOM_makepoly'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION MakePolygon(geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'LWGEOM_makepoly'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION MPolyFromWKB(bytea)
        RETURNS geometry
@@ -1081,13 +1073,13 @@ CREATE OR REPLACE FUNCTION MPolyFromWKB(bytea)
        ELSE NULL END
        '
        LANGUAGE 'sql' IMMUTABLE STRICT;
-               
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION multi(geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'LWGEOM_force_multi'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION MultiPolyFromWKB(bytea, int)
        RETURNS geometry
@@ -1097,7 +1089,7 @@ CREATE OR REPLACE FUNCTION MultiPolyFromWKB(bytea, int)
        ELSE NULL END
        '
        LANGUAGE 'sql' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION MultiPolyFromWKB(bytea)
        RETURNS geometry
@@ -1107,13 +1099,13 @@ CREATE OR REPLACE FUNCTION MultiPolyFromWKB(bytea)
        ELSE NULL END
        '
        LANGUAGE 'sql' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION InteriorRingN(geometry,integer)
        RETURNS geometry
        AS 'MODULE_PATHNAME','LWGEOM_interiorringn_polygon'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION intersection(geometry,geometry)
        RETURNS geometry
@@ -1125,13 +1117,13 @@ CREATE OR REPLACE FUNCTION IsClosed(geometry)
        RETURNS boolean
        AS 'MODULE_PATHNAME', 'LWGEOM_isclosed'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION IsEmpty(geometry)
        RETURNS boolean
        AS 'MODULE_PATHNAME', 'LWGEOM_isempty'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION IsValid(geometry)
        RETURNS boolean
@@ -1156,25 +1148,25 @@ CREATE OR REPLACE FUNCTION length(geometry)
        RETURNS FLOAT8
        AS 'MODULE_PATHNAME', 'LWGEOM_length_linestring'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION line_interpolate_point(geometry, float8)
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'LWGEOM_line_interpolate_point'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION line_locate_point(geometry, geometry)
        RETURNS float8
        AS 'MODULE_PATHNAME', 'LWGEOM_line_locate_point'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION line_substring(geometry, float8, float8)
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'LWGEOM_line_substring'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION LineFromText(text)
        RETURNS geometry
@@ -1184,7 +1176,7 @@ CREATE OR REPLACE FUNCTION LineFromText(text)
        ELSE NULL END
        '
        LANGUAGE 'sql' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION LineFromText(text, int4)
        RETURNS geometry
@@ -1194,13 +1186,13 @@ CREATE OR REPLACE FUNCTION LineFromText(text, int4)
        ELSE NULL END
        '
        LANGUAGE 'sql' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION LineFromMultiPoint(geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'LWGEOM_line_from_mpoint'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION LineFromWKB(bytea, int)
        RETURNS geometry
@@ -1210,7 +1202,7 @@ CREATE OR REPLACE FUNCTION LineFromWKB(bytea, int)
        ELSE NULL END
        '
        LANGUAGE 'sql' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION LineFromWKB(bytea)
        RETURNS geometry
@@ -1220,8 +1212,7 @@ CREATE OR REPLACE FUNCTION LineFromWKB(bytea)
        ELSE NULL END
        '
        LANGUAGE 'sql' IMMUTABLE STRICT;
-       
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION LineStringFromText(text)
        RETURNS geometry
@@ -1233,7 +1224,7 @@ CREATE OR REPLACE FUNCTION LineStringFromText(text, int4)
        RETURNS geometry
        AS 'SELECT LineFromText($1, $2)'
        LANGUAGE 'sql' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION LinestringFromWKB(bytea, int)
        RETURNS geometry
@@ -1243,7 +1234,7 @@ CREATE OR REPLACE FUNCTION LinestringFromWKB(bytea, int)
        ELSE NULL END
        '
        LANGUAGE 'sql' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION LinestringFromWKB(bytea)
        RETURNS geometry
@@ -1259,7 +1250,7 @@ CREATE OR REPLACE FUNCTION locate_between_measures(geometry, float8, float8)
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'LWGEOM_locate_between_m'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION M(geometry)
        RETURNS float8
@@ -1271,13 +1262,13 @@ CREATE OR REPLACE FUNCTION MakeBox3d(geometry, geometry)
        RETURNS box3d
        AS 'MODULE_PATHNAME', 'BOX3D_construct'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION makeline_garray (geometry[])
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'LWGEOM_makeline_garray'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE AGGREGATE makeline (
        BASETYPE = geometry,
@@ -1285,19 +1276,19 @@ CREATE AGGREGATE makeline (
        STYPE = pgis_abs,
        FINALFUNC = pgis_geometry_makeline_finalfn
        );
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION MakeLine(geometry, geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'LWGEOM_makeline'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION MakePoint(float8, float8)
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'LWGEOM_makepoint'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION MakePoint(float8, float8, float8)
        RETURNS geometry
@@ -1309,19 +1300,19 @@ CREATE OR REPLACE FUNCTION MakePoint(float8, float8, float8, float8)
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'LWGEOM_makepoint'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION MakePointM(float8, float8, float8)
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'LWGEOM_makepoint3dm'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- This should really be deprecated -- 2011-01-04 robe
 CREATE OR REPLACE FUNCTION max_distance(geometry,geometry)
        RETURNS float8
        AS 'MODULE_PATHNAME', 'LWGEOM_maxdistance2d_linestring'
-       LANGUAGE 'c' IMMUTABLE STRICT; 
-       
+       LANGUAGE 'c' IMMUTABLE STRICT;
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION mem_size(geometry)
        RETURNS int4
@@ -1338,7 +1329,7 @@ CREATE OR REPLACE FUNCTION MLineFromText(text, int4)
        ELSE NULL END
        '
        LANGUAGE 'sql' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION MLineFromText(text)
        RETURNS geometry
@@ -1348,7 +1339,7 @@ CREATE OR REPLACE FUNCTION MLineFromText(text)
        ELSE NULL END
        '
        LANGUAGE 'sql' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION MLineFromWKB(bytea, int)
        RETURNS geometry
@@ -1358,7 +1349,7 @@ CREATE OR REPLACE FUNCTION MLineFromWKB(bytea, int)
        ELSE NULL END
        '
        LANGUAGE 'sql' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION MLineFromWKB(bytea)
        RETURNS geometry
@@ -1408,7 +1399,7 @@ CREATE OR REPLACE FUNCTION MPointFromWKB(bytea)
        ELSE NULL END
        '
        LANGUAGE 'sql' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION MPolyFromText(text, int4)
        RETURNS geometry
@@ -1428,7 +1419,7 @@ CREATE OR REPLACE FUNCTION MPolyFromText(text)
        ELSE NULL END
        '
        LANGUAGE 'sql' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION MPolyFromWKB(bytea, int)
        RETURNS geometry
@@ -1438,7 +1429,7 @@ CREATE OR REPLACE FUNCTION MPolyFromWKB(bytea, int)
        ELSE NULL END
        '
        LANGUAGE 'sql' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION MultiLineFromWKB(bytea, int)
        RETURNS geometry
@@ -1468,37 +1459,37 @@ CREATE OR REPLACE FUNCTION MultiLineFromWKB(bytea)
        ELSE NULL END
        '
        LANGUAGE 'sql' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION MultiLineStringFromText(text)
        RETURNS geometry
        AS 'SELECT ST_MLineFromText($1)'
        LANGUAGE 'sql' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION MultiLineStringFromText(text, int4)
        RETURNS geometry
        AS 'SELECT MLineFromText($1, $2)'
        LANGUAGE 'sql' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION MultiPointFromText(text)
        RETURNS geometry
        AS 'SELECT MPointFromText($1)'
        LANGUAGE 'sql' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION MultiPointFromText(text)
        RETURNS geometry
        AS 'SELECT MPointFromText($1)'
        LANGUAGE 'sql' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION MultiPointFromText(text, int4)
        RETURNS geometry
        AS 'SELECT MPointFromText($1, $2)'
        LANGUAGE 'sql' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION MultiPointFromWKB(bytea, int)
        RETURNS geometry
@@ -1508,7 +1499,7 @@ CREATE OR REPLACE FUNCTION MultiPointFromWKB(bytea, int)
        ELSE NULL END
        '
        LANGUAGE 'sql' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION MultiPointFromWKB(bytea)
        RETURNS geometry
@@ -1518,13 +1509,13 @@ CREATE OR REPLACE FUNCTION MultiPointFromWKB(bytea)
        ELSE NULL END
        '
        LANGUAGE 'sql' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION MultiPolygonFromText(text, int4)
        RETURNS geometry
        AS 'SELECT MPolyFromText($1, $2)'
        LANGUAGE 'sql' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION MultiPolygonFromText(text)
        RETURNS geometry
@@ -1536,43 +1527,43 @@ CREATE OR REPLACE FUNCTION NumInteriorRing(geometry)
        RETURNS integer
        AS 'MODULE_PATHNAME','LWGEOM_numinteriorrings_polygon'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION NumInteriorRings(geometry)
        RETURNS integer
        AS 'MODULE_PATHNAME','LWGEOM_numinteriorrings_polygon'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION npoints(geometry)
        RETURNS int4
        AS 'MODULE_PATHNAME', 'LWGEOM_npoints'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION nrings(geometry)
        RETURNS int4
        AS 'MODULE_PATHNAME', 'LWGEOM_nrings'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION NumGeometries(geometry)
        RETURNS int4
        AS 'MODULE_PATHNAME', 'LWGEOM_numgeometries_collection'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION NumPoints(geometry)
        RETURNS int4
        AS 'MODULE_PATHNAME', 'LWGEOM_numpoints_linestring'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION overlaps(geometry,geometry)
        RETURNS boolean
        AS 'MODULE_PATHNAME'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- this is a fake (for back-compatibility)
 -- uses 3d if 3d is available, 2d otherwise
 -- Deprecation in 1.2.3
@@ -1580,19 +1571,19 @@ CREATE OR REPLACE FUNCTION perimeter3d(geometry)
        RETURNS FLOAT8
        AS 'MODULE_PATHNAME', 'LWGEOM_perimeter_poly'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION perimeter2d(geometry)
        RETURNS FLOAT8
        AS 'MODULE_PATHNAME', 'LWGEOM_perimeter2d_poly'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION point_inside_circle(geometry,float8,float8,float8)
        RETURNS bool
        AS 'MODULE_PATHNAME', 'LWGEOM_inside_circle_point'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION PointFromText(text)
        RETURNS geometry
@@ -1612,7 +1603,7 @@ CREATE OR REPLACE FUNCTION PointFromText(text, int4)
        ELSE NULL END
        '
        LANGUAGE 'sql' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION PointFromWKB(bytea)
        RETURNS geometry
@@ -1622,7 +1613,7 @@ CREATE OR REPLACE FUNCTION PointFromWKB(bytea)
        ELSE NULL END
        '
        LANGUAGE 'sql' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION PointFromWKB(bytea, int)
        RETURNS geometry
@@ -1633,20 +1624,18 @@ CREATE OR REPLACE FUNCTION PointFromWKB(bytea, int)
        '
        LANGUAGE 'sql' IMMUTABLE STRICT;
 
-       
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION PointN(geometry,integer)
        RETURNS geometry
        AS 'MODULE_PATHNAME','LWGEOM_pointn_linestring'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION PointOnSurface(geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME'
        LANGUAGE 'c' IMMUTABLE STRICT;
 
-       
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION PolyFromText(text)
        RETURNS geometry
@@ -1665,7 +1654,7 @@ CREATE OR REPLACE FUNCTION PolyFromText(text, int4)
        ELSE NULL END
        '
        LANGUAGE 'sql' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION PolyFromWKB(bytea, int)
        RETURNS geometry
@@ -1675,7 +1664,7 @@ CREATE OR REPLACE FUNCTION PolyFromWKB(bytea, int)
        ELSE NULL END
        '
        LANGUAGE 'sql' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION PolyFromWKB(bytea)
        RETURNS geometry
@@ -1685,19 +1674,19 @@ CREATE OR REPLACE FUNCTION PolyFromWKB(bytea)
        ELSE NULL END
        '
        LANGUAGE 'sql' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION PolygonFromText(text, int4)
        RETURNS geometry
        AS 'SELECT PolyFromText($1, $2)'
        LANGUAGE 'sql' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION PolygonFromText(text)
        RETURNS geometry
        AS 'SELECT PolyFromText($1)'
        LANGUAGE 'sql' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION PolygonFromWKB(bytea, int)
        RETURNS geometry
@@ -1717,7 +1706,7 @@ CREATE OR REPLACE FUNCTION PolygonFromWKB(bytea)
        ELSE NULL END
        '
        LANGUAGE 'sql' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION Polygonize_GArray (geometry[])
        RETURNS geometry
@@ -1735,96 +1724,96 @@ CREATE OR REPLACE FUNCTION relate(geometry,geometry)
 CREATE OR REPLACE FUNCTION relate(geometry,geometry,text)
        RETURNS boolean
        AS 'MODULE_PATHNAME','relate_pattern'
-       LANGUAGE 'c' IMMUTABLE STRICT;  
+       LANGUAGE 'c' IMMUTABLE STRICT;
 
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION RemovePoint(geometry, integer)
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'LWGEOM_removepoint'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION reverse(geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'LWGEOM_reverse'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION Segmentize(geometry, float8)
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'LWGEOM_segmentize2d'
-       LANGUAGE 'c' IMMUTABLE STRICT;  
-       
+       LANGUAGE 'c' IMMUTABLE STRICT;
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION SetPoint(geometry, integer, geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'LWGEOM_setpoint_linestring'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Availability: 1.1.0
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION shift_longitude(geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'LWGEOM_longitude_shift'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION Simplify(geometry, float8)
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'LWGEOM_simplify2d'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- SnapToGrid(input, size) # xsize=ysize=size, offsets=0
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION SnapToGrid(geometry, float8, float8, float8, float8)
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'LWGEOM_snaptogrid'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION SnapToGrid(geometry, float8)
        RETURNS geometry
        AS 'SELECT ST_SnapToGrid($1, 0, 0, $2, $2)'
        LANGUAGE 'sql' IMMUTABLE STRICT;
-       
+
 -- SnapToGrid(input, point_offsets, xsize, ysize, zsize, msize)
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION SnapToGrid(geometry, geometry, float8, float8, float8, float8)
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'LWGEOM_snaptogrid_pointoff'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- SnapToGrid(input, xsize, ysize) # offsets=0
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION SnapToGrid(geometry, float8, float8)
        RETURNS geometry
        AS 'SELECT ST_SnapToGrid($1, 0, 0, $2, $3)'
        LANGUAGE 'sql' IMMUTABLE STRICT;
-       
+
 -- Availability: 1.2.2 -- this should be deprecated (do not think anyone has ever used it)
 CREATE OR REPLACE FUNCTION ST_MakeLine_GArray (geometry[])
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'LWGEOM_makeline_garray'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION StartPoint(geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'LWGEOM_startpoint_linestring'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION symdifference(geometry,geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME','symdifference'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION symmetricdifference(geometry,geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME','symdifference'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION summary(geometry)
        RETURNS text
@@ -1835,7 +1824,7 @@ CREATE OR REPLACE FUNCTION transform(geometry,integer)
        RETURNS geometry
        AS 'MODULE_PATHNAME','transform'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION touches(geometry,geometry)
        RETURNS boolean
@@ -1847,67 +1836,67 @@ CREATE OR REPLACE FUNCTION within(geometry,geometry)
        RETURNS boolean
        AS 'SELECT ST_Within($1, $2)'
        LANGUAGE 'sql' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION X(geometry)
        RETURNS float8
        AS 'MODULE_PATHNAME','LWGEOM_x_point'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION xmax(box3d)
        RETURNS FLOAT8
        AS 'MODULE_PATHNAME','BOX3D_xmax'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION xmin(box3d)
        RETURNS FLOAT8
        AS 'MODULE_PATHNAME','BOX3D_xmin'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION Y(geometry)
        RETURNS float8
        AS 'MODULE_PATHNAME','LWGEOM_y_point'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION ymax(box3d)
        RETURNS FLOAT8
        AS 'MODULE_PATHNAME','BOX3D_ymax'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION ymin(box3d)
        RETURNS FLOAT8
        AS 'MODULE_PATHNAME','BOX3D_ymin'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION Z(geometry)
        RETURNS float8
        AS 'MODULE_PATHNAME','LWGEOM_z_point'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION zmax(box3d)
        RETURNS FLOAT8
        AS 'MODULE_PATHNAME','BOX3D_zmax'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION zmin(box3d)
        RETURNS FLOAT8
        AS 'MODULE_PATHNAME','BOX3D_zmin'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION zmflag(geometry)
        RETURNS smallint
        AS 'MODULE_PATHNAME', 'LWGEOM_zmflag'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- end old ogc names that have been replaced with new SQL-MM names --
 
 --- Start Aggregates and supporting functions --
@@ -1923,13 +1912,13 @@ CREATE OR REPLACE FUNCTION collect(geometry, geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'LWGEOM_collect'
        LANGUAGE 'c' IMMUTABLE;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION combine_bbox(box2d,geometry)
        RETURNS box2d
        AS 'MODULE_PATHNAME', 'BOX2D_combine'
        LANGUAGE 'c' IMMUTABLE;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION combine_bbox(box3d,geometry)
        RETURNS box3d
@@ -1948,20 +1937,20 @@ CREATE OR REPLACE FUNCTION ST_unite_garray (geometry[])
        RETURNS geometry
        AS 'MODULE_PATHNAME','pgis_union_geometry_array'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION unite_garray (geometry[])
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'pgis_union_geometry_array'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE AGGREGATE Extent3d(
        sfunc = combine_bbox,
        basetype = geometry,
        stype = box3d
        );
-       
+
 -- Deprecation in 1.2.3
 CREATE AGGREGATE memcollect(
        sfunc = ST_collect,
@@ -1993,7 +1982,7 @@ CREATE OR REPLACE FUNCTION ST_Length_spheroid3D(geometry, spheroid)
        AS 'MODULE_PATHNAME','LWGEOM_length_ellipsoid_linestring'
        LANGUAGE 'c' IMMUTABLE STRICT
        COST 100;
-       
+
 -- Renamed in 2.0.0 to ST_3DPerimeter
 CREATE OR REPLACE FUNCTION ST_Perimeter3D(geometry)
        RETURNS FLOAT8
index ebdc14a9ebeeda1b9490efad1e25784d7815fb79..ec9110b713a8dbea2fa7c8fca50f2737b820d2b7 100644 (file)
@@ -1,27 +1,27 @@
-CREATE OPERATOR CLASS gist_geometry_ops\r
-       FOR TYPE geometry USING GIST AS\r
-       STORAGE box2df,\r
-       OPERATOR        1        <<  ,\r
-       OPERATOR        2        &<      ,\r
-       OPERATOR        3        &&  ,\r
-       OPERATOR        4        &>      ,\r
-       OPERATOR        5        >>      ,\r
-       OPERATOR        6        ~=      ,\r
-       OPERATOR        7        ~       ,\r
-       OPERATOR        8        @       ,\r
-       OPERATOR        9        &<| ,\r
-       OPERATOR        10       <<| ,\r
-       OPERATOR        11       |>> ,\r
-       OPERATOR        12       |&> ,\r
-\r
-       OPERATOR        13       <-> FOR ORDER BY pg_catalog.float_ops,\r
-       OPERATOR        14       <#> FOR ORDER BY pg_catalog.float_ops,\r
-       FUNCTION        8        geometry_gist_distance_2d (internal, geometry, int4),\r
-\r
-       FUNCTION        1        geometry_gist_consistent_2d (internal, geometry, int4),\r
-       FUNCTION        2        geometry_gist_union_2d (bytea, internal),\r
-       FUNCTION        3        geometry_gist_compress_2d (internal),\r
-       FUNCTION        4        geometry_gist_decompress_2d (internal),\r
-       FUNCTION        5        geometry_gist_penalty_2d (internal, internal, internal),\r
-       FUNCTION        6        geometry_gist_picksplit_2d (internal, internal),\r
+CREATE OPERATOR CLASS gist_geometry_ops
+       FOR TYPE geometry USING GIST AS
+       STORAGE box2df,
+       OPERATOR        1        <<  ,
+       OPERATOR        2        &<      ,
+       OPERATOR        3        &&  ,
+       OPERATOR        4        &>      ,
+       OPERATOR        5        >>      ,
+       OPERATOR        6        ~=      ,
+       OPERATOR        7        ~       ,
+       OPERATOR        8        @       ,
+       OPERATOR        9        &<| ,
+       OPERATOR        10       <<| ,
+       OPERATOR        11       |>> ,
+       OPERATOR        12       |&> ,
+
+       OPERATOR        13       <-> FOR ORDER BY pg_catalog.float_ops,
+       OPERATOR        14       <#> FOR ORDER BY pg_catalog.float_ops,
+       FUNCTION        8        geometry_gist_distance_2d (internal, geometry, int4),
+
+       FUNCTION        1        geometry_gist_consistent_2d (internal, geometry, int4),
+       FUNCTION        2        geometry_gist_union_2d (bytea, internal),
+       FUNCTION        3        geometry_gist_compress_2d (internal),
+       FUNCTION        4        geometry_gist_decompress_2d (internal),
+       FUNCTION        5        geometry_gist_penalty_2d (internal, internal, internal),
+       FUNCTION        6        geometry_gist_picksplit_2d (internal, internal),
        FUNCTION        7        geometry_gist_same_2d (geom1 geometry, geom2 geometry, internal);
index 46b10707f1e44b17ff391736fe0e51722a3a0d2e..9a32792a6603b8e939e7ff511979fc8ec45d5098 100644 (file)
@@ -9,7 +9,7 @@ CREATE OR REPLACE FUNCTION AsBinary(geometry)
        RETURNS bytea
        AS 'MODULE_PATHNAME','LWGEOM_asBinary'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION AsBinary(geometry,text)
        RETURNS bytea
@@ -20,60 +20,60 @@ CREATE OR REPLACE FUNCTION AsBinary(geometry,text)
 CREATE OR REPLACE FUNCTION AsText(geometry)
        RETURNS TEXT
        AS 'MODULE_PATHNAME','LWGEOM_asText'
-       LANGUAGE 'c' IMMUTABLE STRICT;  
+       LANGUAGE 'c' IMMUTABLE STRICT;
 
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION Estimated_Extent(text,text,text) RETURNS box2d AS
        'MODULE_PATHNAME', 'geometry_estimated_extent'
        LANGUAGE 'c' IMMUTABLE STRICT SECURITY DEFINER;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION Estimated_Extent(text,text) RETURNS box2d AS
        'MODULE_PATHNAME', 'geometry_estimated_extent'
        LANGUAGE 'c' IMMUTABLE STRICT SECURITY DEFINER;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION GeomFromText(text, int4)
        RETURNS geometry AS 'SELECT ST_GeomFromText($1, $2)'
        LANGUAGE 'sql' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION GeomFromText(text)
        RETURNS geometry AS 'SELECT ST_GeomFromText($1)'
        LANGUAGE 'sql' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION ndims(geometry)
        RETURNS smallint
        AS 'MODULE_PATHNAME', 'LWGEOM_ndims'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION SetSRID(geometry,int4)
        RETURNS geometry
        AS 'MODULE_PATHNAME','LWGEOM_set_srid'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.2.3
 CREATE OR REPLACE FUNCTION SRID(geometry)
        RETURNS int4
        AS 'MODULE_PATHNAME','LWGEOM_get_srid'
        LANGUAGE 'c' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.5.0
 -- hack to allow unknown to cast to geometry
 -- so does not yield function is not unique
 CREATE OR REPLACE FUNCTION ST_AsBinary(text)
        RETURNS bytea
-       AS 
+       AS
        $$ SELECT ST_AsBinary($1::geometry);$$
        LANGUAGE 'sql' IMMUTABLE STRICT;
-       
+
 -- Deprecation in 1.5.0
 -- hack to allow unknown to cast to geometry
 -- so does not yield function is not unique
 CREATE OR REPLACE FUNCTION ST_AsText(bytea)
        RETURNS text
-       AS 
+       AS
        $$ SELECT ST_AsText($1::geometry);$$
        LANGUAGE 'sql' IMMUTABLE STRICT;
index 63c93d9493f974f9e5813c7970539890baf73573..cb7294ba2a6e48296d149312bedf87bfeba7bc55 100644 (file)
@@ -1,5 +1,5 @@
 -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--- 
+--
 --
 -- PostGIS - Spatial Types for PostgreSQL
 -- http://postgis.net
@@ -7,13 +7,11 @@
 --
 -- This is free software; you can redistribute and/or modify it under
 -- the terms of the GNU General Public Licence. See the COPYING file.
---  
+--
 -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
-
 #include "sqldefines.h"
 
-
 -----------------------------------------------------------------------
 -- LONG TERM LOCKING
 -----------------------------------------------------------------------
@@ -23,7 +21,7 @@
 -- returns the number of locks released
 CREATE OR REPLACE FUNCTION UnlockRows(text)
        RETURNS int
-       AS $$ 
+       AS $$
 DECLARE
        ret int;
 BEGIN
@@ -42,11 +40,11 @@ END;
 $$
 LANGUAGE 'plpgsql'  VOLATILE STRICT;
 
--- LockRow([schema], table, rowid, auth, [expires]) 
+-- LockRow([schema], table, rowid, auth, [expires])
 -- Returns 1 if successfully obtained the lock, 0 otherwise
 CREATE OR REPLACE FUNCTION LockRow(text, text, text, text, timestamp)
        RETURNS int
-       AS $$ 
+       AS $$
 DECLARE
        myschema alias for $1;
        mytable alias for $2;
@@ -56,14 +54,14 @@ DECLARE
        ret int;
        mytoid oid;
        myrec RECORD;
-       
+
 BEGIN
 
        IF NOT LongTransactionsEnabled() THEN
                RAISE EXCEPTION 'Long transaction support disabled, use EnableLongTransaction() to enable.';
        END IF;
 
-       EXECUTE 'DELETE FROM authorization_table WHERE expires < now()'; 
+       EXECUTE 'DELETE FROM authorization_table WHERE expires < now()';
 
        SELECT c.oid INTO mytoid FROM pg_class c, pg_namespace n
                WHERE c.relname = mytable
@@ -72,7 +70,7 @@ BEGIN
 
        -- RAISE NOTICE 'toid: %', mytoid;
 
-       FOR myrec IN SELECT * FROM authorization_table WHERE 
+       FOR myrec IN SELECT * FROM authorization_table WHERE
                toid = mytoid AND rid = myrid
        LOOP
                IF myrec.authid != authid THEN
@@ -115,10 +113,9 @@ CREATE OR REPLACE FUNCTION LockRow(text, text, text, timestamp)
 $$ SELECT LockRow(current_schema(), $1, $2, $3, $4); $$
        LANGUAGE 'sql'  VOLATILE STRICT;
 
-
 CREATE OR REPLACE FUNCTION AddAuth(text)
        RETURNS BOOLEAN
-       AS $$ 
+       AS $$
 DECLARE
        lockid alias for $1;
        okay boolean;
@@ -129,8 +126,8 @@ BEGIN
        okay := 'f';
        FOR myrec IN SELECT * FROM pg_class WHERE relname = 'temp_lock_have_table' LOOP
                okay := 't';
-       END LOOP; 
-       IF (okay <> 't') THEN 
+       END LOOP;
+       IF (okay <> 't') THEN
                CREATE TEMP TABLE temp_lock_have_table (transid xid, lockcode text);
                        -- this will only work from pgsql7.4 up
                        -- ON COMMIT DELETE ROWS;
@@ -147,7 +144,6 @@ BEGIN
 END;
 $$
 LANGUAGE PLPGSQL;
 
 -- CheckAuth( <schema>, <table>, <ridcolumn> )
 --
@@ -155,7 +151,7 @@ LANGUAGE PLPGSQL;
 --
 CREATE OR REPLACE FUNCTION CheckAuth(text, text, text)
        RETURNS INT
-       AS $$ 
+       AS $$
 DECLARE
        schema text;
 BEGIN
@@ -171,7 +167,7 @@ BEGIN
 
        -- 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)
                ||' FOR EACH ROW EXECUTE PROCEDURE CheckAuthTrigger('
                || quote_literal($3) || ')';
@@ -189,16 +185,15 @@ CREATE OR REPLACE FUNCTION CheckAuth(text, text)
        LANGUAGE 'sql';
 
 CREATE OR REPLACE FUNCTION CheckAuthTrigger()
-       RETURNS trigger AS 
+       RETURNS trigger AS
        'MODULE_PATHNAME', 'check_authorization'
        LANGUAGE C;
 
 CREATE OR REPLACE FUNCTION GetTransactionID()
-       RETURNS xid AS 
+       RETURNS xid AS
        'MODULE_PATHNAME', 'getTransactionID'
        LANGUAGE C;
 
-
 --
 -- Enable Long transactions support
 --
@@ -206,7 +201,7 @@ CREATE OR REPLACE FUNCTION GetTransactionID()
 --
 CREATE OR REPLACE FUNCTION EnableLongTransactions()
        RETURNS TEXT
-       AS $$ 
+       AS $$
 DECLARE
        "query" text;
        exists bool;
@@ -262,7 +257,7 @@ LANGUAGE 'plpgsql';
 --
 CREATE OR REPLACE FUNCTION LongTransactionsEnabled()
        RETURNS bool
-AS $$ 
+AS $$
 DECLARE
        rec RECORD;
 BEGIN
@@ -278,13 +273,13 @@ LANGUAGE 'plpgsql';
 --
 -- Disable Long transactions support
 --
---  (1) Drop any long_xact trigger 
+--  (1) Drop any long_xact trigger
 --  (2) Drop the authorization_table
 --  (3) KEEP the authorized_tables view
 --
 CREATE OR REPLACE FUNCTION DisableLongTransactions()
        RETURNS TEXT
-       AS $$ 
+       AS $$
 DECLARE
        rec RECORD;
 
index 7b94f434b24b5d7d1d25666993e944df46760b47..ec661386f4a9f0e2f05b2899d80bbeee49fa832f 100644 (file)
@@ -40,7 +40,6 @@ BEGIN
 END
 $$ LANGUAGE 'plpgsql';
 
-
 -- Let the user know about a deprecated signature and its new name, if any
 CREATE OR REPLACE FUNCTION _postgis_deprecate(oldname text, newname text, version text)
 RETURNS void AS
@@ -141,7 +140,6 @@ CREATE TYPE geometry (
        storage = main
 );
 
-
 -- Availability: 2.0.0
 -- Special cast for enforcing the typmod restrictions
 CREATE OR REPLACE FUNCTION geometry(geometry, integer, boolean)
@@ -152,7 +150,6 @@ CREATE OR REPLACE FUNCTION geometry(geometry, integer, boolean)
 -- Availability: 2.0.0
 CREATE CAST (geometry AS geometry) WITH FUNCTION geometry(geometry, integer, boolean) AS IMPLICIT;
 
-
 -- Availability: 2.1.0
 CREATE OR REPLACE FUNCTION geometry(point)
        RETURNS geometry
@@ -295,7 +292,6 @@ CREATE TYPE box2df (
        alignment = double
 );
 
-
 -------------------------------------------------------------------
 --  GIDX TYPE (INTERNAL ONLY)
 -------------------------------------------------------------------
@@ -407,7 +403,6 @@ CREATE OPERATOR CLASS btree_geometry_ops
        OPERATOR        5       > ,
        FUNCTION        1       geometry_cmp (geom1 geometry, geom2 geometry);
 
-
 --
 -- Sorting operators for Btree
 --
@@ -424,7 +419,6 @@ CREATE OPERATOR CLASS hash_geometry_ops
     OPERATOR    1   = ,
     FUNCTION    1   geometry_hash(geometry);
 
-
 -----------------------------------------------------------------------------
 -- GiST 2D GEOMETRY-over-GSERIALIZED INDEX
 -----------------------------------------------------------------------------
@@ -481,7 +475,6 @@ CREATE OR REPLACE FUNCTION geometry_gist_decompress_2d(internal)
        AS 'MODULE_PATHNAME' ,'gserialized_gist_decompress_2d'
        LANGUAGE 'c' _PARALLEL;
 
-
 -----------------------------------------------------------------------------
 
 -- Availability: 2.1.0
@@ -544,7 +537,6 @@ CREATE OR REPLACE FUNCTION gserialized_gist_joinsel_nd (internal, oid, internal,
        AS 'MODULE_PATHNAME', 'gserialized_gist_joinsel_nd'
        LANGUAGE 'c' _PARALLEL;
 
-
 -----------------------------------------------------------------------------
 -- GEOMETRY Operators
 -----------------------------------------------------------------------------
@@ -818,7 +810,6 @@ CREATE OR REPLACE FUNCTION geometry_gist_decompress_nd(internal)
        AS 'MODULE_PATHNAME' ,'gserialized_gist_decompress'
        LANGUAGE 'c' _PARALLEL;
 
-
 -- ---------- ---------- ---------- ---------- ---------- ---------- ----------
 -- N-D GEOMETRY Operators
 -- ---------- ---------- ---------- ---------- ---------- ---------- ----------
@@ -874,7 +865,6 @@ CREATE OR REPLACE FUNCTION geometry_gist_distance_nd(internal,geometry,int4)
        AS 'MODULE_PATHNAME', 'gserialized_gist_distance'
        LANGUAGE 'c' _PARALLEL;
 
-
 -- Availability: 2.0.0
 CREATE OPERATOR CLASS gist_geometry_ops_nd
        FOR TYPE geometry USING GIST AS
@@ -899,7 +889,6 @@ CREATE OPERATOR CLASS gist_geometry_ops_nd
        FUNCTION        6        geometry_gist_picksplit_nd (internal, internal),
        FUNCTION        7        geometry_gist_same_nd (geometry, geometry, internal);
 
-
 -- Availability: 2.2.0
 CREATE OR REPLACE FUNCTION ST_ShiftLongitude(geometry)
        RETURNS geometry
@@ -1110,7 +1099,6 @@ CREATE OR REPLACE FUNCTION postgis_hasbbox(geometry)
        AS 'MODULE_PATHNAME', 'LWGEOM_hasBBOX'
        LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL;
 
-
 ------------------------------------------------------------------------
 -- DEBUG
 ------------------------------------------------------------------------
@@ -1194,7 +1182,6 @@ CREATE OR REPLACE FUNCTION ST_3DLength_spheroid(geometry, spheroid)
        LANGUAGE 'sql' IMMUTABLE STRICT
        COST 100;
 
-
 -- Availability: 1.2.2
 -- Deprecation in 2.2.0
 CREATE OR REPLACE FUNCTION ST_length_spheroid(geometry, spheroid)
@@ -1322,8 +1309,6 @@ CREATE OR REPLACE FUNCTION ST_Angle(pt1 geometry, pt2 geometry, pt3 geometry, pt
        AS 'MODULE_PATHNAME', 'LWGEOM_angle'
        LANGUAGE 'c' IMMUTABLE STRICT;
 
-
-
 ------------------------------------------------------------------------
 -- MISC
 ------------------------------------------------------------------------
@@ -1896,7 +1881,6 @@ CREATE OR REPLACE FUNCTION ST_DumpRings(geometry)
        AS 'MODULE_PATHNAME', 'LWGEOM_dump_rings'
        LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL;
 
-
 -----------------------------------------------------------------------
 -- ST_DumpPoints()
 -----------------------------------------------------------------------
@@ -1909,7 +1893,6 @@ CREATE OR REPLACE FUNCTION ST_DumpPoints(geometry)
        LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL
        COST 100;
 
-
 -------------------------------------------------------------------
 -- SPATIAL_REF_SYS
 -------------------------------------------------------------------
@@ -1922,7 +1905,6 @@ CREATE TABLE spatial_ref_sys (
         proj4text varchar(2048)
 );
 
-
 -----------------------------------------------------------------------
 -- POPULATE_GEOMETRY_COLUMNS()
 -----------------------------------------------------------------------
@@ -2203,7 +2185,6 @@ BEGIN
                RETURN 'fail';
        END IF;
 
-
        -- Verify dimension
        IF ( (new_dim >4) OR (new_dim <2) ) THEN
                RAISE EXCEPTION 'invalid dimension';
@@ -2215,7 +2196,6 @@ BEGIN
                RETURN 'fail';
        END IF;
 
-
        -- Verify SRID
        IF ( new_srid_in > 0 ) THEN
                IF new_srid_in > SRID_USR_MAX THEN
@@ -2234,7 +2214,6 @@ BEGIN
                END IF;
        END IF;
 
-
        -- Verify schema
        IF ( schema_name IS NOT NULL AND schema_name != '' ) THEN
                sql := 'SELECT nspname FROM pg_namespace ' ||
@@ -2267,7 +2246,6 @@ BEGIN
                END IF;
        END IF;
 
-
        -- Add geometry column to table
        IF use_typmod THEN
             sql := 'ALTER TABLE ' ||
@@ -2384,7 +2362,6 @@ DECLARE
 
 BEGIN
 
-
        -- Find, check or fix schema_name
        IF ( schema_name != '' ) THEN
                okay = false;
@@ -2553,7 +2530,6 @@ DECLARE
 
 BEGIN
 
-
        -- Find, check or fix schema_name
        IF ( schema_name != '' ) THEN
                okay = false;
@@ -2847,7 +2823,6 @@ BEGIN
 END
 $$ language plpgsql;
 
-
 -- Changed: 2.4.0
 CREATE OR REPLACE FUNCTION postgis_full_version() RETURNS text
 AS $$
@@ -3120,7 +3095,6 @@ CREATE CAST (geometry AS text) WITH FUNCTION text(geometry) AS IMPLICIT;
 CREATE CAST (bytea AS geometry) WITH FUNCTION geometry(bytea) AS IMPLICIT;
 CREATE CAST (geometry AS bytea) WITH FUNCTION bytea(geometry) AS IMPLICIT;
 
-
 ---------------------------------------------------------------
 -- Algorithms
 ---------------------------------------------------------------
@@ -3443,7 +3417,6 @@ CREATE OR REPLACE FUNCTION ST_IsValid(geometry, int4)
        AS 'SELECT (@extschema@.ST_isValidDetail($1, $2)).valid'
        LANGUAGE 'sql' IMMUTABLE STRICT _PARALLEL;
 
-
 -- Requires GEOS >= 3.2.0
 -- Availability: 1.5.0
 CREATE OR REPLACE FUNCTION ST_HausdorffDistance(geom1 geometry, geom2 geometry)
@@ -3541,7 +3514,6 @@ CREATE OR REPLACE FUNCTION ST_Subdivide(geom geometry, maxvertices integer DEFAU
        LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL
        COST 100; -- Guessed cost
 
-
 --------------------------------------------------------------------------------
 -- ST_CleanGeometry / ST_MakeValid
 --------------------------------------------------------------------------------
@@ -3702,7 +3674,6 @@ CREATE OR REPLACE FUNCTION ST_DelaunayTriangles(g1 geometry, tolerance float8 DE
        LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL
        COST 1; -- reset cost, see #3675
 
-
 --------------------------------------------------------------------------------
 -- _ST_Voronoi
 --------------------------------------------------------------------------------
@@ -3734,7 +3705,6 @@ CREATE OR REPLACE FUNCTION _ST_Voronoi(g1 geometry, clip geometry DEFAULT NULL,
        LANGUAGE 'c' IMMUTABLE _PARALLEL
        COST 1; -- reset cost, see #3675
 
-
 CREATE OR REPLACE FUNCTION ST_VoronoiPolygons(g1 geometry, tolerance float8 DEFAULT 0.0, extend_to geometry DEFAULT NULL)
        RETURNS geometry
        AS $$ SELECT @extschema@._ST_Voronoi(g1, extend_to, tolerance, true) $$
@@ -3789,7 +3759,6 @@ CREATE OR REPLACE FUNCTION ST_Combine_BBox(box2d,geometry)
   $$
        LANGUAGE 'sql' IMMUTABLE;
 
-
 -- Availability: 1.2.2
 -- Changed: 2.2.0 to use non-deprecated ST_CombineBBox (r13535)
 -- Changed: 2.3.0 to support PostgreSQL 9.6
@@ -3966,7 +3935,6 @@ CREATE AGGREGATE ST_Union (geometry) (
        finalfunc = pgis_geometry_union_finalfn
        );
 
-
 -- Availability: 1.2.2
 -- Changed: 2.4.0: marked parallel safe
 CREATE AGGREGATE ST_Collect (geometry) (
@@ -4022,7 +3990,6 @@ CREATE AGGREGATE ST_MakeLine (geometry) (
        FINALFUNC = pgis_geometry_makeline_finalfn
        );
 
-
 --------------------------------------------------------------------------------
 
 -- Availability: 2.3.0
@@ -4220,7 +4187,6 @@ CREATE OR REPLACE FUNCTION ST_Centroid(geometry)
        LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL
        COST 1; -- reset cost, see #3675
 
-
 -- Availability: 2.3.0
 CREATE OR REPLACE FUNCTION ST_GeometricMedian(g geometry, tolerance float8 DEFAULT NULL, max_iter int DEFAULT 10000, fail_if_not_converged boolean DEFAULT false)
        RETURNS geometry
@@ -4422,7 +4388,6 @@ CREATE OR REPLACE FUNCTION ST_AsKML(version int4, geom geometry, maxdecimaldigit
        AS $$ SELECT @extschema@._ST_AsKML($1, @extschema@.ST_Transform($2,4326), $3, $4); $$
        LANGUAGE 'sql' IMMUTABLE  _PARALLEL;
 
-
 -----------------------------------------------------------------------
 -- GEOJSON OUTPUT
 -- Availability: 1.3.4
@@ -4574,7 +4539,6 @@ CREATE OR REPLACE FUNCTION postgis_libprotobuf_version()
        AS 'MODULE_PATHNAME','postgis_libprotobuf_version'
        LANGUAGE 'c' IMMUTABLE STRICT;
 
-
 -----------------------------------------------------------------------
 -- GEOBUF OUTPUT
 -- Availability: 2.4.0
@@ -4620,7 +4584,6 @@ CREATE AGGREGATE ST_AsGeobuf(anyelement, text)
        finalfunc = pgis_asgeobuf_finalfn
 );
 
-
 ------------------------------------------------------------------------
 -- GeoHash (geohash.org)
 ------------------------------------------------------------------------
@@ -4834,7 +4797,6 @@ CREATE OR REPLACE FUNCTION ST_PointFromText(text)
        '
        LANGUAGE 'sql' IMMUTABLE STRICT _PARALLEL;
 
-
 -- PostGIS equivalent function: PointFromText(text, int4)
 -- TODO: improve this ... by not duplicating constructor time.
 CREATE OR REPLACE FUNCTION ST_PointFromText(text, int4)
@@ -4919,7 +4881,6 @@ CREATE OR REPLACE FUNCTION ST_MLineFromText(text)
        '
        LANGUAGE 'sql' IMMUTABLE STRICT _PARALLEL;
 
-
 -- Availability: 1.2.2
 CREATE OR REPLACE FUNCTION ST_MultiLineStringFromText(text)
        RETURNS geometry
@@ -5134,7 +5095,6 @@ CREATE OR REPLACE FUNCTION ST_MPointFromWKB(bytea, int)
        '
        LANGUAGE 'sql' IMMUTABLE STRICT _PARALLEL;
 
-
 -- Availability: 1.2.2
 CREATE OR REPLACE FUNCTION ST_MPointFromWKB(bytea)
        RETURNS geometry
@@ -5226,7 +5186,6 @@ CREATE OR REPLACE FUNCTION ST_MultiPolyFromWKB(bytea, int)
        '
        LANGUAGE 'sql' IMMUTABLE STRICT _PARALLEL;
 
-
 -- Availability: 1.2.2
 CREATE OR REPLACE FUNCTION ST_MultiPolyFromWKB(bytea)
        RETURNS geometry
@@ -5248,7 +5207,6 @@ CREATE OR REPLACE FUNCTION ST_GeomCollFromWKB(bytea, int)
        '
        LANGUAGE 'sql' IMMUTABLE STRICT _PARALLEL;
 
-
 -- Availability: 1.2.2
 CREATE OR REPLACE FUNCTION ST_GeomCollFromWKB(bytea)
        RETURNS geometry
@@ -5407,7 +5365,6 @@ LANGUAGE 'plpgsql' IMMUTABLE STRICT _PARALLEL;
 #include "long_xact.sql.in"
 #include "geography.sql.in"
 
-
 -- Availability: 2.2.0
 CREATE OR REPLACE FUNCTION ST_DistanceSphere(geom1 geometry, geom2 geometry)
        RETURNS FLOAT8
@@ -5617,7 +5574,6 @@ CREATE OR REPLACE VIEW geometry_columns AS
   AND NOT c.relname = 'raster_columns'::name AND t.typname = 'geometry'::name
   AND NOT pg_is_other_temp_schema(c.relnamespace) AND has_table_privilege(c.oid, 'SELECT'::text);
 
-
 -- TODO: support RETURNING and raise a WARNING
 CREATE OR REPLACE RULE geometry_columns_insert AS
         ON INSERT TO geometry_columns
@@ -5633,7 +5589,6 @@ CREATE OR REPLACE RULE geometry_columns_delete AS
         ON DELETE TO geometry_columns
         DO INSTEAD NOTHING;
 
-
 ---------------------------------------------------------------
 -- 3D-functions
 ---------------------------------------------------------------
@@ -5704,7 +5659,6 @@ CREATE OR REPLACE FUNCTION ST_3DIntersects(geom1 geometry, geom2 geometry)
        LANGUAGE 'sql' IMMUTABLE  _PARALLEL
        COST 100;
 
-
 ---------------------------------------------------------------
 -- SQL-MM
 ---------------------------------------------------------------
@@ -5816,7 +5770,6 @@ CREATE OR REPLACE FUNCTION ST_InterpolatePoint(Line geometry, Point geometry)
        AS 'MODULE_PATHNAME', 'ST_InterpolatePoint'
        LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL;
 
-
 -- moved to separate file cause its invovled
 #include "postgis_brin.sql.in"
 
@@ -5881,7 +5834,6 @@ $$
                        )
                ;
 
-
                var_resultgeom := @extschema@.ST_MakeLine(geom)
                        FROM @extschema@.ST_Dump(cavering) As foo;
 
@@ -6072,7 +6024,6 @@ CREATE OR REPLACE FUNCTION ST_AsX3D(geom geometry, maxdecimaldigits integer DEFA
        AS $$SELECT @extschema@._ST_AsX3D(3,$1,$2,$3,'');$$
        LANGUAGE 'sql' IMMUTABLE  _PARALLEL;
 
-
 -----------------------------------------------------------------------
 -- ST_Angle
 -----------------------------------------------------------------------
@@ -6082,7 +6033,6 @@ CREATE OR REPLACE FUNCTION ST_Angle(line1 geometry, line2 geometry)
        RETURNS float8 AS 'SELECT ST_Angle(St_StartPoint($1), ST_EndPoint($1), St_StartPoint($2), ST_EndPoint($2))'
        LANGUAGE 'sql' IMMUTABLE STRICT;
 
-
 -- make views and spatial_ref_sys public viewable --
 GRANT SELECT ON TABLE geography_columns TO public;
 GRANT SELECT ON TABLE geometry_columns TO public;
index 4dbff17e5305f10b20fe91ab13d2d0411973d109..2bfd9ace6576a43734c156f6ea617bbd4366b9fd 100644 (file)
@@ -89,7 +89,6 @@ AS
        'SELECT $2 OPERATOR(@extschema@.&&) $1;'
 LANGUAGE SQL IMMUTABLE STRICT;
 
-
 -- Availability: 2.3.0
 CREATE OPERATOR ~ (
        LEFTARG = geometry,
@@ -164,7 +163,6 @@ AS
        'SELECT $2 OPERATOR(@extschema@.&&&) $1;'
 LANGUAGE SQL IMMUTABLE STRICT;
 
-
 -- Availability: 2.3.0
 CREATE OPERATOR &&& (
        LEFTARG    = geometry,
@@ -173,7 +171,6 @@ CREATE OPERATOR &&& (
        COMMUTATOR = &&&
 );
 
-
 -- Availability: 2.3.0
 CREATE OPERATOR &&& (
        LEFTARG   = gidx,
index c8ae34097de112d2ff97ce6db04d6155ee90a38e..406fa4921356989580125afd387c39c05974d77c 100644 (file)
@@ -35,7 +35,6 @@ DROP AGGREGATE IF EXISTS st_astwkbagg(geometry, integer, bigint); -- temporarely
 DROP AGGREGATE IF EXISTS st_astwkbagg(geometry, integer, bigint, boolean); -- temporarely introduced before 2.2.0 final
 DROP AGGREGATE IF EXISTS st_astwkbagg(geometry, integer, bigint, boolean, boolean); -- temporarely introduced before 2.2.0 final
 
-
 -- BEGIN Management functions that now have default param for typmod --
 DROP FUNCTION IF EXISTS AddGeometryColumn(varchar,varchar,varchar,varchar,integer,varchar,integer);
 DROP FUNCTION IF EXISTS AddGeometryColumn(varchar,varchar,varchar,integer,varchar,integer);
index fd53006d6d6e32f0cb89952ed6dac0639ef64b98..d06fd77341c857bdd502904e6db8c3edb4787be7 100644 (file)
@@ -8,7 +8,6 @@
 --
 ---------------------------------------------------------------------------
 
-
 --
 -- New SFCGAL functions (meaning prototype not already provided by GEOS)
 --
@@ -27,7 +26,7 @@ CREATE OR REPLACE FUNCTION postgis_sfcgal_scripts_installed() RETURNS text
 CREATE OR REPLACE FUNCTION postgis_sfcgal_version() RETURNS text
         AS 'MODULE_PATHNAME'
         LANGUAGE 'c' IMMUTABLE;
-        
+
 -- Availability: 2.1.0
 CREATE OR REPLACE FUNCTION ST_3DIntersection(geom1 geometry, geom2 geometry)
        RETURNS geometry
@@ -41,21 +40,21 @@ CREATE OR REPLACE FUNCTION ST_3DDifference(geom1 geometry, geom2 geometry)
        AS 'MODULE_PATHNAME','sfcgal_difference3D'
        LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL
        COST 100;
-       
+
 -- Availability: 2.2
 CREATE OR REPLACE FUNCTION ST_3DUnion(geom1 geometry, geom2 geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME','sfcgal_union3D'
        LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL
        COST 100;
-       
+
 -- Availability: 2.1.0
 CREATE OR REPLACE FUNCTION ST_Tesselate(geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME','sfcgal_tesselate'
        LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL
        COST 100;
-       
+
 -- Availability: 2.1.0
 CREATE OR REPLACE FUNCTION ST_3DArea(geometry)
        RETURNS FLOAT8
@@ -63,20 +62,20 @@ CREATE OR REPLACE FUNCTION ST_3DArea(geometry)
        LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL
        COST 100;
 
--- Availability: 2.1.0       
+-- Availability: 2.1.0
 CREATE OR REPLACE FUNCTION ST_Extrude(geometry, float8, float8, float8)
        RETURNS geometry
        AS 'MODULE_PATHNAME','sfcgal_extrude'
        LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL
        COST 100;
 
--- Availability: 2.1.0       
+-- Availability: 2.1.0
 CREATE OR REPLACE FUNCTION ST_ForceLHR(geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME','sfcgal_force_lhr'
        LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL
        COST 100;
-       
+
 -- Availability: 2.1.0
 CREATE OR REPLACE FUNCTION ST_Orientation(geometry)
        RETURNS INT4
@@ -126,10 +125,10 @@ CREATE OR REPLACE FUNCTION ST_ApproximateMedialAxis(geometry)
        AS 'MODULE_PATHNAME','sfcgal_approximate_medial_axis'
        LANGUAGE 'c'
 #endif // POSTGIS_SFCGAL_VERSION >= 12
-       IMMUTABLE STRICT  _PARALLEL 
+       IMMUTABLE STRICT  _PARALLEL
        COST 100;
 
--- Availability: 2.2.0       
+-- Availability: 2.2.0
 CREATE OR REPLACE FUNCTION ST_IsPlanar(geometry)
        RETURNS boolean
        AS 'MODULE_PATHNAME','sfcgal_is_planar'
index 7a8c43e6a9a1e90a704249b69e751dd515ef8423..60b3885f88d7546834f7f7cc4a0d832406fef5cd 100644 (file)
@@ -1,5 +1,5 @@
 -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--- 
+--
 --
 -- PostGIS - Spatial Types for PostgreSQL
 -- http://postgis.org/
@@ -7,11 +7,11 @@
 --
 -- This is free software; you can redistribute and/or modify it under
 -- the terms of the GNU General Public Licence. See the COPYING file.
---  
+--
 -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
 -- metadata table
-DROP VIEW geography_columns; 
+DROP VIEW geography_columns;
 
 -- indexes
 DROP OPERATOR FAMILY gist_geography_ops USING gist CASCADE;
@@ -34,7 +34,7 @@ DROP CAST IF EXISTS (geometry AS geography);
 
 --
 -- Text hacks to over-ride implicit casting issues with GEOMETRY
--- TODO Remove for 2.0 
+-- TODO Remove for 2.0
 --
 DROP FUNCTION IF EXISTS ST_AsText(text);
 DROP FUNCTION IF EXISTS ST_AsBinary(text);
@@ -63,16 +63,16 @@ DROP FUNCTION IF EXISTS geography_typmod_type(integer);
 DROP FUNCTION IF EXISTS geography(geometry);
 DROP FUNCTION IF EXISTS geometry(geography);
 
-DROP FUNCTION IF EXISTS geography_gist_consistent(internal,geometry,int4); 
-DROP FUNCTION IF EXISTS geography_gist_compress(internal); 
-DROP FUNCTION IF EXISTS geography_gist_penalty(internal,internal,internal); 
-DROP FUNCTION IF EXISTS geography_gist_picksplit(internal, internal); 
-DROP FUNCTION IF EXISTS geography_gist_union(bytea, internal); 
-DROP FUNCTION IF EXISTS geography_gist_same(box2d, box2d, internal); 
-DROP FUNCTION IF EXISTS geography_gist_decompress(internal); 
+DROP FUNCTION IF EXISTS geography_gist_consistent(internal,geometry,int4);
+DROP FUNCTION IF EXISTS geography_gist_compress(internal);
+DROP FUNCTION IF EXISTS geography_gist_penalty(internal,internal,internal);
+DROP FUNCTION IF EXISTS geography_gist_picksplit(internal, internal);
+DROP FUNCTION IF EXISTS geography_gist_union(bytea, internal);
+DROP FUNCTION IF EXISTS geography_gist_same(box2d, box2d, internal);
+DROP FUNCTION IF EXISTS geography_gist_decompress(internal);
 DROP FUNCTION IF EXISTS geography_gist_selectivity (internal, oid, internal, int4);
 DROP FUNCTION IF EXISTS geography_gist_join_selectivity(internal, oid, internal, smallint);
-DROP FUNCTION IF EXISTS geography_overlaps(geography, geography); 
+DROP FUNCTION IF EXISTS geography_overlaps(geography, geography);
 
 DROP FUNCTION IF EXISTS geography_lt(geography, geography);
 DROP FUNCTION IF EXISTS geography_le(geography, geography);
index fcf1e1e260a41fe029d386630d1c9d3beace1b8f..cda20e78525d5f15c430e06d790fada299fc2e7f 100644 (file)
@@ -1,5 +1,5 @@
 -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--- 
+--
 --
 -- PostGIS - Spatial Types for PostgreSQL
 -- http://postgis.net
@@ -7,10 +7,9 @@
 --
 -- This is free software; you can redistribute and/or modify it under
 -- the terms of the GNU General Public Licence. See the COPYING file.
---  
+--
 -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
-
 -----------------------------------------------------------------------
 -- LONG TERM LOCKING
 -----------------------------------------------------------------------
index dea74665ecd746d56dd28195194396c309a8d877..095131f15e55ae1892ac376e8a1aa5a4f6f4633b 100644 (file)
@@ -8,7 +8,6 @@
 --
 ---------------------------------------------------------------------------
 
-
 --
 -- New SFCGAL functions (meaning prototype not already provided by GEOS)
 --
index 2f4fbd8239d51d598701a711be9f39b63eddd16b..a5d91b47779074628207d4835be59e5c6877c30c 100644 (file)
@@ -1,5 +1,5 @@
 -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--- 
+--
 --
 -- PostGIS - Spatial Types for PostgreSQL
 -- http://postgis.net
@@ -7,7 +7,7 @@
 --
 -- This is free software; you can redistribute and/or modify it under
 -- the terms of the GNU General Public Licence. See the COPYING file.
---  
+--
 -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
 -------------------------------------------------------------------------------
index 54f7d0f4e40438d44908233916a6fc8cdd56b9e3..b80ebfcd22789bcef622d4e819a5c5bb20369dcf 100644 (file)
@@ -75,7 +75,6 @@ BEGIN
 END
 $$ LANGUAGE 'plpgsql';
 
-
 ------------------------------------------------------------------------------
 -- RASTER Type
 ------------------------------------------------------------------------------
@@ -2919,7 +2918,6 @@ CREATE OR REPLACE FUNCTION st_max4ma(matrix float[][], nodatamode text, variadic
     $$
     LANGUAGE 'plpgsql' IMMUTABLE _PARALLEL;
 
-
 CREATE OR REPLACE FUNCTION st_min4ma(matrix float[][], nodatamode text, variadic args text[])
     RETURNS float AS
     $$
@@ -3067,8 +3065,6 @@ CREATE OR REPLACE FUNCTION _st_mapalgebra(
        AS 'MODULE_PATHNAME', 'RASTER_nMapAlgebra'
        LANGUAGE 'c' IMMUTABLE _PARALLEL;
 
-
-
 CREATE OR REPLACE FUNCTION st_mapalgebra(
        rastbandargset rastbandarg[],
        callbackfunc regprocedure,
@@ -9029,7 +9025,6 @@ BEGIN
 END;
 $$ LANGUAGE 'plpgsql' VOLATILE STRICT;
 
-
 -- Availability: 2.4.0
 CREATE OR REPLACE FUNCTION st_makeemptycoverage(tilewidth int, tileheight int, width int, height int, upperleftx float8, upperlefty float8, scalex float8, scaley float8, skewx float8, skewy float8, srid int4 DEFAULT 0)
     RETURNS SETOF RASTER AS $$
@@ -9083,7 +9078,6 @@ CREATE OR REPLACE FUNCTION st_makeemptycoverage(tilewidth int, tileheight int, w
     END;
     $$ LANGUAGE 'plpgsql' IMMUTABLE _PARALLEL;
 
-
 -------------------------------------------------------------------
 --  Debugging
 -------------------------------------------------------------------
@@ -9094,7 +9088,6 @@ CREATE OR REPLACE FUNCTION postgis_noop(raster)
        AS 'MODULE_PATHNAME', 'RASTER_noop'
        LANGUAGE 'c' STABLE STRICT;
 
-
 -------------------------------------------------------------------
 --  END
 -------------------------------------------------------------------
index 4b1267ca102eb97853ed17786659825b2f3fc35d..3cb9699d1b5427d2f0f3ca3874f0cbe8eb7b85d3 100644 (file)
@@ -48,7 +48,6 @@ DROP AGGREGATE IF EXISTS ST_Union(raster, text, text);
 DROP AGGREGATE IF EXISTS ST_Union(raster, text, text, text, double precision);
 DROP AGGREGATE IF EXISTS ST_Union(raster, record[]);
 
-
 DROP FUNCTION IF EXISTS ST_Intersects(raster,boolean,geometry);
 DROP FUNCTION IF EXISTS ST_Intersects(geometry,raster,boolean);
 DROP FUNCTION IF EXISTS ST_Intersects(raster,geometry);
index 0374325e65066ee95530e45d7d6bb049e552639f..dbb797f82ce27ba481652e893229dda5ee6c612d 100644 (file)
@@ -31,7 +31,7 @@
 -- This section is take add / drop things like CASTS, TYPES etc. that have changed
 -- Since these are normally excluded from sed upgrade generator
 -- they must be explicitly added
--- So that they can immediately be recreated. 
+-- So that they can immediately be recreated.
 -- It is not run thru the sed processor to prevent it from being stripped
 -- Note: We put these in separate file from drop since the extension module has
 -- to add additional logic to drop them from the extension as well
@@ -143,24 +143,22 @@ $$;
 DROP FUNCTION IF EXISTS ST_MapAlgebra(raster, integer, text, text, nodatavaluerepl text);
 DROP FUNCTION IF EXISTS ST_MapAlgebra(raster, pixeltype text, expression text, nodatavaluerepl text);
 
-
 --signatures or arg names changed
 DROP FUNCTION IF EXISTS ST_MapAlgebraExpr(raster, integer, text, text, text);
 DROP FUNCTION IF EXISTS ST_MapAlgebraExpr(raster, text, text, text);
 DROP FUNCTION IF EXISTS ST_MapalgebraFct(raster, regprocedure);
-DROP FUNCTION IF EXISTS ST_MapAlgebraFct(raster, text, regprocedure, VARIADIC text[]); 
-DROP FUNCTION IF EXISTS ST_MapAlgebraFct(raster, text, regprocedure); 
+DROP FUNCTION IF EXISTS ST_MapAlgebraFct(raster, text, regprocedure, VARIADIC text[]);
+DROP FUNCTION IF EXISTS ST_MapAlgebraFct(raster, text, regprocedure);
 DROP FUNCTION IF EXISTS ST_MapAlgebraFct(raster, regprocedure, VARIADIC text[]);
 DROP FUNCTION IF EXISTS ST_MapAlgebraFct(raster, integer, regprocedure, variadic text[]);
-DROP FUNCTION IF EXISTS ST_MapAlgebraFct(raster, integer, text, regprocedure, VARIADIC text[]); 
-DROP FUNCTION IF EXISTS ST_MapAlgebraFct(raster, integer, text, regprocedure); 
+DROP FUNCTION IF EXISTS ST_MapAlgebraFct(raster, integer, text, regprocedure, VARIADIC text[]);
+DROP FUNCTION IF EXISTS ST_MapAlgebraFct(raster, integer, text, regprocedure);
 DROP FUNCTION IF EXISTS ST_MapAlgebraFct(raster, integer, regprocedure, variadic text[]);
 DROP FUNCTION IF EXISTS ST_MapalgebraFct(raster, integer, regprocedure);
 DROP FUNCTION IF EXISTS ST_MapAlgebraFct(raster, raster, regprocedure, text, text, VARIADIC text[]);
 DROP FUNCTION IF EXISTS ST_MapAlgebraFct(raster, integer, raster, integer, regprocedure, text, text, VARIADIC text[]);
 DROP FUNCTION IF EXISTS ST_MapAlgebraFctNgb(raster, integer, text, integer, integer, regprocedure, text,  VARIADIC text[]);
 
-
 --dropped functions
 DROP FUNCTION IF EXISTS  ST_MapAlgebraFct(raster, raster, regprocedure, VARIADIC text[]);
 
@@ -248,7 +246,6 @@ DROP FUNCTION IF EXISTS st_bandpixeltype(raster);
 -- signature changed
 DROP FUNCTION IF EXISTS st_bandpixeltype(raster, integer);
 
-
 -- function no longer exists
 DROP FUNCTION IF EXISTS st_value(raster, integer, integer, integer);
 DROP FUNCTION IF EXISTS st_value(raster, integer, integer);
@@ -274,7 +271,7 @@ DROP FUNCTION IF EXISTS dumpaswktpolygons(raster, integer);
 DROP FUNCTION IF EXISTS st_bandmetadata(raster, VARIADIC int[]);
 
 --change to use default parameters
-DROP FUNCTION IF EXISTS ST_PixelAsPolygons(raster); 
+DROP FUNCTION IF EXISTS ST_PixelAsPolygons(raster);
 DROP FUNCTION IF EXISTS ST_PixelAsPolygons(raster,integer);
 
 -- TYPE summarystats removed in version 2.1.0
index f8aa8209b81ecae6aebfb1aa72c513f0ad9841b6..3c4f2c5ed880126d84862c5453c491e79df8f343 100644 (file)
@@ -312,7 +312,6 @@ FROM X1W1X2W2() as (nx int, x1 int, w1 int, x2 int, w2 int), Y1H1Y2H2() as (ny i
 SELECT asbinary(_MapAlgebraPartsGeom(nx, ny, x1, y1, w1, h1, x2, y2, w2, h2))
 FROM X1W1X2W2() as (nx int, x1 int, w1 int, x2 int, w2 int), Y1H1Y2H2() as (ny int, y1 int, h1 int, y2 int, h2 int);
 
-
 -- First series of zones covering raster 1
 SELECT nx, ny, map[1], map[2], map[3], map[4],
        asbinary(ST_MakeBox2D(ST_Point(10 * ny + map[1], -10 * nx + 5 - map[2]), ST_Point(10 * ny + map[1] + map[3], -10 * nx + 5 - (map[2] + map[4])))::geometry)
index ba64cf57906bbeb462c5ce62408e569a3c58e7d0..83eae7cb500cddaa8362ae400e3c9bcf41b4b7ac 100644 (file)
@@ -200,7 +200,6 @@ CREATE AGGREGATE ST_AreaWeightedSummaryStats(geometry, double precision) (
   FINALFUNC=geomval_arealweightedfinal
 );
 
-
 SELECT id,
        (aws).count,
        (aws).distinctcount,
index 916204d110fc57d710d947bb70f3a82158fc3f23..aef0f7652bbf9d53ec1a6c69d04e9bb15fc25476 100644 (file)
@@ -7,7 +7,6 @@
 
 -- NOTE: The ST_DeleteBand function found in this file still need enhancement before being implemented in C.
 
-
 -- NOTE: ST_DeleteBand(rast raster, band int) is dependent on
 --   ST_AddBand(rast1 raster, rast2 raster, band int, index int)
 -- to be found in the script/plpgsql folder
index f19ba2193053ff7362e06f1b606f2b8a5ea82ae4..9d7f41af4fc4ca7e7f16cbe2bad663c2fd6b3218 100644 (file)
@@ -92,11 +92,9 @@ SELECT DISTINCT rid
 FROM srtm_22_03_tiled, rect3
 WHERE st_intersects(rast, geom)
 
-
 SELECT rid, id, ST_GeomExtent2RasterCoord(rast, geom)
 FROM srtm_22_03_tiled, rect3
 WHERE st_intersects(rast, geom)
 
-
 SELECT (ext).x1, (ext).y1, (ext).x2, (ext).y2 FROM (SELECT ST_GeomExtent2RasterCoord(rast, geom) ext FROM srtm_22_03_tiled, rect3
 WHERE st_intersects(rast, geom)) foo
\ No newline at end of file
index 6e39f691502fb8481252cab5fcbfb4481608464b..e7389fb619dbc55851db507d18ea67980b99031a 100644 (file)
@@ -137,7 +137,6 @@ CREATE OR REPLACE FUNCTION ST_MapAlgebra(rast raster, band integer, expression t
         --Create the raster receiving all the computed values. Initialize it to the new initial value.
         newrast := ST_AddBand(newrast, newpixeltype, newinitialvalue, newnodatavalue);
 
-
         -- Optimization: If expression is NULL, or all the pixels could be set in a one step, return the initialised raster now
         IF expression IS NULL OR skipcomputation = 2 THEN
             RETURN newrast;
@@ -222,7 +221,6 @@ CREATE OR REPLACE FUNCTION ST_TestRaster(val float8)
 --SELECT ST_Value(rast, 1, 2), ST_Value(ST_MapAlgebra(rast, 1, 'rast + 20', 'rast + 2', '2BUI'), 1, 2)
 --FROM ST_TestRaster(0, 0, 101) rast;
 
-
 --------------------------------------------------------------------
 -- ST_SameAlignment
 -- Determine if the raster coordinates are aligned.
@@ -822,7 +820,6 @@ CREATE OR REPLACE FUNCTION ST_MapAlgebra(rast1 raster,
     $$
     LANGUAGE 'plpgsql';
 
-
 --------------------------------------------------------------------
 -- ST_MapAlgebra (two raster version) variants
 --------------------------------------------------------------------
@@ -859,7 +856,6 @@ CREATE OR REPLACE FUNCTION ST_MapAlgebra(rast1 raster,
     AS 'SELECT ST_MapAlgebra($1, 1, $2, 1, $3, $4, NULL, NULL, NULL, NULL)'
     LANGUAGE 'SQL' IMMUTABLE;
 
-
 -- Variant 8
 CREATE OR REPLACE FUNCTION ST_MapAlgebra(rast1 raster,
                                          rast2 raster,
@@ -921,7 +917,6 @@ CREATE OR REPLACE FUNCTION ST_MapAlgebra(rast1 raster,
 
 --SELECT ST_MapAlgebra(NULL, 1, NULL, 1, 'rast2', NULL, 'UNION', 0);
 
-
 --Test rasters
 CREATE OR REPLACE FUNCTION ST_TestRaster(ulx float8, uly float8, val float8)
     RETURNS raster AS
@@ -933,7 +928,6 @@ CREATE OR REPLACE FUNCTION ST_TestRaster(ulx float8, uly float8, val float8)
     $$
     LANGUAGE 'plpgsql';
 
-
 CREATE OR REPLACE FUNCTION ST_TestRotatedRaster(ulx float8, uly float8)
     RETURNS raster AS
     $$
@@ -954,7 +948,6 @@ CREATE OR REPLACE FUNCTION ST_TestRotatedRaster(ulx float8, uly float8)
 --SELECT (gv).val, ST_AsBinary((gv).geom)
 --FROM (SELECT ST_PixelAsPolygons(ST_TestRaster(1, 1, 3)) gv) foo
 
-
 -- 1) ST_Intersection and ST_Clip
 --SELECT ST_MapAlgebra(rast1, rast2, 'rast1', '32BF', 'INTERSECTION')
 --FROM (SELECT ST_TestRaster(0, 0, 1) rast1, ST_TestRaster(1, 1, 3) rast2) foo
@@ -964,7 +957,6 @@ CREATE OR REPLACE FUNCTION ST_TestRotatedRaster(ulx float8, uly float8)
 --FROM (SELECT ST_PixelAsPolygons(ST_MapAlgebra(rast1, rast2, 'rast1', '32BF', 'INTERSECTION')) gv
 --      FROM (SELECT ST_TestRaster(0, 0, 1) rast1, ST_TestRaster(1, 1, 3) rast2) foo) foo2
 
-
 -- 2) ST_Intersection returning a two band raster
 --SELECT ST_AddBand(ST_MapAlgebra(rast1, rast2, 'rast1', '32BF', 'INTERSECTION'), ST_MapAlgebra(rast1, rast2, 'rast2', '32BF', 'INTERSECTION'))
 --FROM (SELECT ST_TestRaster(0, 0, 1) rast1, ST_TestRaster(1, 1, 3) rast2) foo
@@ -979,7 +971,6 @@ CREATE OR REPLACE FUNCTION ST_TestRotatedRaster(ulx float8, uly float8)
 --FROM (SELECT ST_PixelAsPolygons(ST_AddBand(ST_MapAlgebra(rast1, rast2, 'rast1', '32BF', 'INTERSECTION'), ST_MapAlgebra(rast1, rast2, 'rast2', '32BF', 'INTERSECTION')), 2) gv
 --      FROM (SELECT ST_TestRaster(0, 0, 1) rast1, ST_TestRaster(1, 1, 3) rast2) foo) foo2
 
-
 -- 3) ST_Union
 --SELECT ST_MapAlgebra(rast1, rast2, '(rast1 + rast2)/2::numeric', '32BF', 'UNION', 'rast2', 'rast1', NULL)
 --FROM (SELECT ST_TestRaster(0, 0, 1) rast1, ST_TestRaster(1, 1, 3) rast2) foo
@@ -989,7 +980,6 @@ CREATE OR REPLACE FUNCTION ST_TestRotatedRaster(ulx float8, uly float8)
 --FROM (SELECT ST_PixelAsPolygons(ST_MapAlgebra(rast1, rast2, '(rast1 + rast2)/2::numeric', '32BF', 'UNION', 'rast2', 'rast1', NULL)) gv
 --      FROM (SELECT ST_TestRaster(0, 0, 1) rast1, ST_TestRaster(1, 1, 3) rast2) foo) foo2
 
-
 -- 4) ST_Collect
 --SELECT ST_MapAlgebra(rast1, rast2, 'rast2', '32BF', 'UNION', 'rast2', 'rast1', NULL)
 --FROM (SELECT ST_TestRaster(0, 0, 1) rast1, ST_TestRaster(1, 1, 3) rast2) foo
@@ -999,7 +989,6 @@ CREATE OR REPLACE FUNCTION ST_TestRotatedRaster(ulx float8, uly float8)
 --FROM (SELECT ST_PixelAsPolygons(ST_MapAlgebra(rast1, rast2, 'rast2', '32BF', 'UNION', 'rast2', 'rast1', NULL)) gv
 --      FROM (SELECT ST_TestRaster(0, 0, 1) rast1, ST_TestRaster(1, 1, 3) rast2) foo) foo2
 
-
 -- 5) ST_Difference making a mere geometric difference
 --SELECT ST_MapAlgebra(rast1, rast2, 'CASE WHEN NOT rast2 IS NULL THEN NULL ELSE rast1 END', '32BF', 'FIRST', NULL, 'rast1', NULL)
 --FROM (SELECT ST_TestRaster(0, 0, 1) rast1, ST_TestRaster(1, 1, 3) rast2) foo
@@ -1009,7 +998,6 @@ CREATE OR REPLACE FUNCTION ST_TestRotatedRaster(ulx float8, uly float8)
 --FROM (SELECT ST_PixelAsPolygons(ST_MapAlgebra(rast1, rast2, 'CASE WHEN NOT rast2 IS NULL THEN NULL ELSE rast1 END', '32BF', 'FIRST', NULL, 'rast1', NULL)) gv
 --      FROM (SELECT ST_TestRaster(0, 0, 1) rast1, ST_TestRaster(1, 1, 3) rast2) foo) foo2
 
-
 -- 6) ST_Difference making an arithmetic difference
 --SELECT ST_MapAlgebra(rast1, rast2, 'rast1 - rast2', '32BF', 'FIRST', NULL, 'rast1', NULL)
 --FROM (SELECT ST_TestRaster(0, 0, 1) rast1, ST_TestRaster(1, 1, 3) rast2) foo
@@ -1019,7 +1007,6 @@ CREATE OR REPLACE FUNCTION ST_TestRotatedRaster(ulx float8, uly float8)
 --FROM (SELECT ST_PixelAsPolygons(ST_MapAlgebra(rast1, rast2, 'rast1 - rast2', '32BF', 'FIRST', NULL, 'rast1', NULL)) gv
 --      FROM (SELECT ST_TestRaster(0, 0, 1) rast1, ST_TestRaster(1, 1, 3) rast2) foo) foo2
 
-
 -- 7) ST_SymDifference making a mere geometric difference (commutative)
 --SELECT ST_MapAlgebra(rast1, rast2, 'NULL', '32BF', 'UNION', 'rast2', 'rast1', NULL)
 --FROM (SELECT ST_TestRaster(0, 0, 1) rast1, ST_TestRaster(1, 1, 3) rast2) foo
@@ -1034,7 +1021,6 @@ CREATE OR REPLACE FUNCTION ST_TestRotatedRaster(ulx float8, uly float8)
 --FROM (SELECT ST_PixelAsPolygons(ST_MapAlgebra(rast1, rast2, 'NULL', '32BF', 'UNION', 'rast2', 'rast1', NULL)) gv
 --      FROM (SELECT ST_TestRaster(1, 1, 3) rast1, ST_TestRaster(0, 0, 1) rast2) foo) foo2
 
-
 -- 8) ST_SymDifference making an arithmetic difference (not commutative)
 --Commutation 1
 --SELECT ST_MapAlgebra(rast1, rast2, 'rast1 - rast2', '32BF', 'UNION', 'rast2', 'rast1', NULL)
@@ -1044,7 +1030,6 @@ CREATE OR REPLACE FUNCTION ST_TestRotatedRaster(ulx float8, uly float8)
 --SELECT ST_MapAlgebra(rast1, rast2, 'rast1 - rast2', '32BF', 'UNION', 'rast2', 'rast1', NULL)
 --FROM (SELECT ST_TestRaster(1, 1, 2) rast1, ST_TestRaster(0, 0, 1) rast2) foo
 
-
 -- Other tests
 
 -- UNION
@@ -1070,7 +1055,6 @@ CREATE OR REPLACE FUNCTION ST_TestRotatedRaster(ulx float8, uly float8)
 --       ST_Height(rast)
 --FROM (SELECT ST_MapAlgebra(ST_TestRaster(0, 0, 1), 1, ST_TestRaster(1, 0, 1), 1, '(rast1 + rast2)/3::float8', '64BF', 'INTERSECTION', '0'::text) AS rast) foo
 
-
 -- FIRST -- Doesn't work...
 --SELECT ST_Value(rast, 1, 1),
 --       ST_Value(rast, 1, 2),
@@ -1091,7 +1075,6 @@ CREATE OR REPLACE FUNCTION ST_TestRotatedRaster(ulx float8, uly float8)
 --       ST_Height(rast)
 --FROM (SELECT ST_MapAlgebra(ST_TestRaster(0, 0, 1), 1, ST_TestRaster(1, 1, 1), 1, 'rast1 + rast2 + 2*rast2 + toto()', '8BSI', 'SECOND', NULL) AS rast) foo
 
-
 -- INTERSECTION with rotated. -- Doesn't work...
 --SELECT ST_IsEmpty(rast),
 --       ST_Value(rast, 1, 1) AS "1, 1",
index df558941cae768e6a51aa63839e4af54b8c3bc8f..301198cfdcf71a1ed97399d47b95af0ef1593c10 100644 (file)
@@ -409,7 +409,6 @@ RAISE NOTICE 'ST_MapAlgebra2 000';
                 RETURN ST_MakeEmptyRaster(0, 0, 0, 0, 0, 0, 0, 0, newsrid);
             END IF;
 
-
             -- Compute the new ulx and uly
             newulx := st_raster2worldcoordx(rast1, zcx - r1x + 1, zcy - r1y + 1);
             newuly := st_raster2worldcoordy(rast1, zcx - r1x + 1, zcy - r1y + 1);
@@ -539,7 +538,6 @@ RAISE NOTICE 'ST_MapAlgebra2 111 z11x=%, z11y=%, z11w=%, z11h=%', z11x, z11y, z1
         IF z11w > 0 AND z11h > 0 AND NOT ST_BandIsNodata(rast1, band1) AND NOT nodata2expr IS NULL THEN
             IF upnodata2expr = 'RAST' THEN
 
-
                 -- IF rast1nodataval != nodatanodataval THEN
 RAISE NOTICE 'ST_MapAlgebra2 222';
                 --     newrast := ST_SetValues(newrast, 1, z11x, z11y, z11w, z11h, nodatanodataval);
@@ -626,7 +624,6 @@ RAISE NOTICE 'ST_MapAlgebra2 666';
     $$
     LANGUAGE 'plpgsql';
 
-
 CREATE OR REPLACE FUNCTION ST_TestRaster(ulx float8, uly float8, val float8)
     RETURNS raster AS
     $$
@@ -637,7 +634,6 @@ CREATE OR REPLACE FUNCTION ST_TestRaster(ulx float8, uly float8, val float8)
     $$
     LANGUAGE 'plpgsql';
 
-
 SELECT asbinary((gv).geom), (gv).val
 FROM st_pixelaspolygons(ST_TestRaster(-10, 2, 1)) gv;
 
@@ -646,6 +642,3 @@ SELECT asbinary(_MapAlgebraAllPartsGeom(0, 0, 2, 1, 1, 0, 2, 1))
 SELECT asbinary(pix.geom) as geom, pix.val
 FROM st_pixelaspolygons(ST_MapAlgebra2(ST_TestRaster(0, 1, 1), 1, ST_TestRaster(1, 0, 1), 1, '(rast1 + rast2) / 2', NULL, 'union', '2*rast', 'rast', NULL), 1) as pix
 
-
-
-
index be9b866113142def0d0841a81b1235db95bf5ba8..a808a16563d894c9b76219f9c395ea964fd5508c 100644 (file)
@@ -23,4 +23,3 @@ CREATE OR REPLACE FUNCTION ST_SetArea(rast raster, band, x int, y int, width int
     $$
     LANGUAGE 'plpgsql';
 
-
index cf50abf611df276086226dbee268e7bd1c368f0e..096e7dffb8fd2dc5094a54a9c58b453cd8c64b06 100644 (file)
@@ -159,7 +159,6 @@ CREATE OR REPLACE FUNCTION ST_TestRaster(ulx float8, uly float8, val float8)
     $$
     LANGUAGE 'plpgsql';
 
-
 -- Test
 SELECT ST_SetValues(ST_TestRaster(0, 0, 1), 2, 2, 1, 1, 0)
 
@@ -381,5 +380,3 @@ FROM (SELECT ST_PixelAsPolygons(ST_TestRaster(0, 0, 1)) as pix) foo
 SELECT ST_AsBinary((pix).geom), (pix).val
 FROM (SELECT ST_PixelAsPolygons(ST_SetValues(ST_TestRaster(0, 0, 1), 2, 1, 3, 1, ST_TestRaster(3, 0, 3))) as pix) foo
 
-
-
index c92e52313e279e1eb57029493ae48ae43ecc6cf5..6a091a0178e50b47018e9675c352746e5795f71f 100644 (file)
@@ -170,7 +170,6 @@ CREATE OR REPLACE FUNCTION ST_TileAsGeom(rast raster, width integer, height inte
     $$
     LANGUAGE 'plpgsql';
 
-
 -- Redefine ST_TestRaster()
 CREATE OR REPLACE FUNCTION ST_TestRaster(ulx float8, uly float8, val float8)
     RETURNS raster AS
@@ -217,7 +216,6 @@ FROM (SELECT ST_PixelAsPolygons(rast) gv, rid
 -- Test ST_TileAsGeom
 SELECT ST_TileAsGeom(ST_TestRaster(0, 0, 1), 10, 10);
 
-
 -- Other tests
 SELECT ST_Tile(ST_AddBand(ST_MakeEmptyRaster(48, 63, 0, 0, 0.001, -0.001, 0, 0, 4269), '8BSI'::text, 0, -2), 10, 10, true, -10);
 
index 4566ed5b2ae7b754fe792af80cf1ce8815a7bd3f..18af1d57948d55cbe5a866a3ec1fa3bd2b3ea6c8 100644 (file)
@@ -94,7 +94,6 @@ CREATE OR REPLACE FUNCTION MapAlgebra4UnionFinal1(rast rastexpr)
     $$
     LANGUAGE 'plpgsql';
 
-
 CREATE OR REPLACE FUNCTION MapAlgebra4Union(rast1 rastexpr,
                         rast2 raster,
                         p_expression text,
@@ -248,7 +247,6 @@ FROM (SELECT ST_PixelAsPolygons(ST_Union(rast, 'last'), 1) rast
             SELECT ST_TestRaster(0, 3, 3) AS rast
             ) foi) foo
 
-
 -- Explicit implementation of 'MEAN' to make sure directly passing expressions works properly
 SELECT ST_AsBinary((rast).geom), (rast).val
 FROM (SELECT ST_PixelAsPolygons(ST_Union(rast, '[rast1.val] + [rast2.val]'::text, '[rast2.val]'::text, '[rast1.val]'::text, NULL::double precision,
@@ -277,14 +275,12 @@ FROM (SELECT ST_PixelAsPolygons(ST_Union(rast, 'SUM'::text,
             SELECT ST_TestRaster(-1, 0, 6) AS rast
             ) foi) foo
 
-
 SELECT ST_AsBinary((rast).geom), (rast).val
 FROM (SELECT ST_PixelAsPolygons(ST_Union(rast), 1) AS rast
       FROM (SELECT ST_TestRaster(0, 0, 1) AS rast UNION ALL SELECT ST_TestRaster(2, 0, 2)
            ) foi
      ) foo
 
-
 SELECT ST_AsBinary((rast).geom), (rast).val
 FROM (SELECT ST_PixelAsPolygons(ST_Union(rast, 'mean'), 1) AS rast
       FROM (SELECT ST_TestRaster(0, 0, 1) AS rast UNION ALL SELECT ST_TestRaster(1, 0, 2) UNION ALL SELECT ST_TestRaster(0, 1, 6)
index 1092e1f1ec30a520d594f724b3aa6d7fddff921b..1b7f7e5afe67e81cc3a4bf1e896a5dc91f6fff32 100644 (file)
@@ -62,7 +62,6 @@ CREATE OR REPLACE FUNCTION make_test_raster(
                rast := ST_MakeEmptyRaster(width, height, ul_x, ul_y, 1, 1, skew_x, skew_y, 0);
                rast := ST_AddBand(rast, 1, '8BUI', initvalue, nodataval);
 
-
                INSERT INTO test_raster_columns VALUES (rid, rast);
 
                RETURN;
index 2e523ab6c6121920f4fb3244f6956f6dce825c4d..b60bb7dc7f1c532abe392d7ea5ed7945fc68e3f4 100644 (file)
@@ -61,7 +61,6 @@ CREATE OR REPLACE FUNCTION make_test_raster(
                rast := ST_MakeEmptyRaster(width, height, ul_x, ul_y, 1, 1, skew_x, skew_y, 0);
                rast := ST_AddBand(rast, 1, '8BUI', initvalue, nodataval);
 
-
                INSERT INTO test_raster_columns VALUES (rid, rast);
 
                RETURN;
index 08332791db23eb647ac922738372781ad8cce4cd..1a3b214f3782d7802a2bd74484ccfda1b583f2cf 100644 (file)
@@ -32,7 +32,7 @@ CREATE OR REPLACE FUNCTION make_value_array(
                                        expr := replace(skip_expr, '[v]'::text, value::text);
                                        EXECUTE 'SELECT (' || expr || ')::boolean' INTO result;
                                END IF;
-                               
+
                                IF result IS TRUE THEN
                                        values[1][y][x] := value;
                                END IF;
index 790665ae1453dbb97afa7e5186fb2a1cf4b4c46d..566b6f8de97e48b118ebd7b995d1757ee6440f32 100644 (file)
@@ -21,7 +21,6 @@
 --- Test of "ST_AddBand".
 -----------------------------------------------------------------------
 
-
 -----------------------------------------------------------------------
 --- ST_AddBand
 -----------------------------------------------------------------------
index 5263e33c6e50ea31ed0fd43fe71f12b35cfcfd27..430919bbe313df596b6b939fbcfb377e0e23d95b 100644 (file)
@@ -253,7 +253,6 @@ SELECT
  FROM rt_band_properties_test
 WHERE b1nodatavalue != st_bandnodatavalue(rast, 1) or b2nodatavalue != st_bandnodatavalue(rast, 2);
 
-
 -----------------------------------------------------------------------
 --- ST_BandIsNoData
 -----------------------------------------------------------------------
@@ -267,7 +266,6 @@ SELECT
   FROM rt_band_properties_test
 WHERE id = 3;
 
-
 -----------------------------------------------------------------------
 --- ST_SetBandIsNoData
 -----------------------------------------------------------------------
index 46cf51df575dcdc52c43710133a5336f3f5af469..908842ea62ec8211fd46209a671f5983ea5917b3 100644 (file)
@@ -53,14 +53,13 @@ DROP TABLE o_16_res1;
 DROP TABLE o_8_res1;
 DROP TABLE o_4_res1;
 DROP TABLE o_2_res1;
--- Keep the source table 
-
+-- Keep the source table
 
 -- Test overview with table in schema
--- 
+--
 CREATE SCHEMA oschm;
 -- offset the schema tableto distinguish it from original
--- let it be small to reduce time cost. 
+-- let it be small to reduce time cost.
 CREATE TABLE oschm.res1 AS SELECT
   ST_AddBand(
     ST_MakeEmptyRaster(10, 10, x, y, 1, -1, 0, 0, 0)
@@ -82,7 +81,7 @@ SELECT ST_CreateOverview('res1', 'r', 4)::text = 'o_4_res1';
 -- Create overview for table in public schema with explict path
 -- at same factor of schema table
 SELECT ST_CreateOverview('public.res1', 'r', 8)::text = 'public.o_8_res1';
+
 -- Reset the search_path
 SET search_path to public;
 
@@ -90,7 +89,7 @@ SET search_path to public;
 -- and scale as schema table above using reset search path.
 SELECT ST_CreateOverview('res1', 'r', 4)::text = 'o_4_res1';
 
--- Check scale and extent 
+-- Check scale and extent
 -- Offset means that original raster overviews won't match
 -- extent and values only mach on schema table not public one
 SELECT r_table_schema, r_table_name tab, r_raster_column c,
@@ -134,7 +133,7 @@ DROP TABLE o_8_res1;
 DROP TABLE o_4_res1;
 DROP TABLE res1;
 
--- Reset the session environment 
+-- Reset the session environment
 -- possibly a bit harsh, but we had to set the search_path
 -- and need to reset it back to default.
 DISCARD ALL;
index 96d7bb7d735bbf2097e9fcf279b83c007895e9d1..2cf67f042f4d3bf001067cf43cd780fd9c5a4754 100644 (file)
@@ -45,7 +45,7 @@ CREATE OR REPLACE FUNCTION make_raster(
                                        expr := replace(skip_expr, '[v]'::text, value::text);
                                        EXECUTE 'SELECT (' || expr || ')::boolean' INTO result;
                                END IF;
-                               
+
                                IF result IS TRUE THEN
                                        values[y][x] := value;
                                END IF;
@@ -100,7 +100,6 @@ DROP TABLE IF EXISTS raster_dumpvalues;
 
 SELECT (ST_DumpValues(ST_AddBand(ST_MakeEmptyRaster(0, 0, 0, 0, 1), ARRAY[ROW(NULL, '8BUI', 255, 0),ROW(NULL, '16BUI', 1, 2)]::addbandarg[]))).*;
 
-
 -- #3086
 DROP TABLE IF EXISTS raster_tile;
 CREATE TABLE raster_tile AS
index 7780fea8f9c1fb0e2b4deb354887d4e90d0f1f22..5190d5239b57a2a5ef9d1d55a2da425ced1879a3 100644 (file)
@@ -327,7 +327,7 @@ CREATE OR REPLACE FUNCTION make_value_array(
                                        expr := replace(skip_expr, '[v]'::text, value::text);
                                        EXECUTE 'SELECT (' || expr || ')::boolean' INTO result;
                                END IF;
-                               
+
                                IF result IS TRUE THEN
                                        values[1][y][x] := value;
                                END IF;
@@ -354,7 +354,6 @@ INSERT INTO raster_value_arrays VALUES
        (10,make_value_array(3,3,3.14,12)),
        (11,make_value_array(3,3,2.11,11));
 
-
 SELECT
        id,
        val,
index 1d38739c64f825a90dbbe7343ce3536212dd6c67..b5bbd2c1fc370c4b3ff54c2b20900c70a2e4a31c 100644 (file)
@@ -243,7 +243,6 @@ SELECT
 FROM rt_properties_test
 WHERE id = 2;
 
-
 SELECT
     replace(st_georeference(rast)::text, E'\n', E'EOL'),
     replace(st_georeference(rast)::text, E'\n', E'EOL') =
@@ -357,7 +356,6 @@ SELECT
 FROM rt_properties_test
 WHERE id = 5;
 
-
 -----------------------------------------------------------------------
 -- st_setgeoreference (error conditions)
 -----------------------------------------------------------------------
index 10cb4d778de34145cf2dd9fca544107c0ff7aae0..75f20a6ee4c3fe17002f7943633fc41999853142 100644 (file)
@@ -23,7 +23,6 @@ CREATE OR REPLACE FUNCTION make_test_raster(
                rast := ST_MakeEmptyRaster(width, height, ul_x, ul_y, 1, 1, skew_x, skew_y, 0);
                rast := ST_AddBand(rast, 1, '8BUI', 1, 0);
 
-
                INSERT INTO raster_geos_rast VALUES (rid, rast);
 
                RETURN;
@@ -230,7 +229,6 @@ JOIN raster_geos_rast r2
        ON r1.rid != r2.rid
 WHERE r2.rid = 0;
 
-
 SELECT
        '2.1',
        r1.rid,
index 76be445f7b2bd2307a2d4cd8ee5aecc2a41b5d59..643aa2bc32c7e248e629e9c1a056e532c96adc07 100644 (file)
@@ -34,7 +34,7 @@ DECLARE
     ipx float8;
     ipy float8;
 BEGIN
-       
+
     -- compute some sizes
     -- each tile extent width is extent.width / gridRows
     scalex = ((ST_xmax(extent)-ST_xmin(extent))/gridCols)/tileWidth;
index 7e636d815d9669d9373a55138a0c9e5387b8935b..46344e0e23076a2e3dde991a9e108462a795b2d7 100644 (file)
@@ -32,7 +32,6 @@ CREATE OR REPLACE FUNCTION make_test_raster(
                rast := ST_MakeEmptyRaster(width, height, ul_x, ul_y, 1, 1, skew_x, skew_y, 0);
                rast := ST_AddBand(rast, 1, '8BUI', initvalue, nodataval);
 
-
                INSERT INTO raster_intersection VALUES (rid, rast);
 
                RETURN;
index 3458b59e8bcf924b3d01627c5ae3e4ea0f5764f2..cb0c944cf9d34156337934f9aae92007ec09eca5 100644 (file)
@@ -21,7 +21,6 @@ CREATE OR REPLACE FUNCTION make_test_raster(rid integer, width integer DEFAULT 2
                rast := ST_MakeEmptyRaster(width, height, ul_x, ul_y, 1, 1, skew_x, skew_y, 0);
                rast := ST_AddBand(rast, 1, '8BUI', 1, 0);
 
-
                INSERT INTO raster_intersects_rast VALUES (rid, rast);
 
                RETURN;
index 8573d703168beca4da2676fdc452be6cf4e703dd..ae1743497d49fc242cd614a6b4ce7c80b040bc4a 100644 (file)
@@ -32,7 +32,7 @@ CREATE OR REPLACE FUNCTION make_value_array(
                                        expr := replace(skip_expr, '[v]'::text, value::text);
                                        EXECUTE 'SELECT (' || expr || ')::boolean' INTO result;
                                END IF;
-                               
+
                                IF result IS TRUE THEN
                                        values[1][y][x] := value;
                                END IF;
@@ -65,7 +65,6 @@ INSERT INTO raster_value_arrays VALUES
        (18, make_value_array(3, 3, 1, 1, '[v] > 8'))
 ;
 
-
 SELECT
        id,
        val,
index cc87ff11f36ece4952077d85eab6ee66bb3df562..419e91741ccf0938ca8dbd788ddd4e1adaae3686 100644 (file)
@@ -196,7 +196,6 @@ CREATE OR REPLACE FUNCTION make_test_raster(
                rast := ST_MakeEmptyRaster(width, height, ul_x, ul_y, 1, 1, skew_x, skew_y, 0);
                rast := ST_AddBand(rast, 1, '8BUI', initvalue, nodataval);
 
-
                INSERT INTO raster_mapalgebra VALUES (rid, rast);
 
                RETURN;
index 1297542f33899d9216b7240bf8e0ce491eae746c..3e814dc2bb7ca6814301aed8af9a8225c6fda096 100644 (file)
@@ -70,8 +70,6 @@ FROM (SELECT rid, st_dumpvalues(st_mapalgebra(rast,1,'raster_nmapalgebra_test(do
     from raster_nmapalgebra_mask_in) AS f
 ORDER BY rid, (dv).nband;
 
-
-
 select st_mapalgebra(rast,1,'raster_nmapalgebra_test(double precision[], int[], text[])'::regprocedure,ARRAY[[1,1],[1,1],[1,1]]::double precision[],true) from raster_nmapalgebra_mask_in;
 
 select st_mapalgebra(rast,1,'raster_nmapalgebra_test(double precision[], int[], text[])'::regprocedure,ARRAY[[1,1,1],[1,1,1]]::double precision[],true) from raster_nmapalgebra_mask_in;
@@ -102,7 +100,6 @@ FROM (SELECT rid, st_dumpvalues(st_mapalgebra(rast,1,'raster_nmapalgebra_test(do
     from raster_nmapalgebra_mask_in) As f
 ORDER BY rid, (dv).nband;
 
-
 select st_mapalgebra(rast,1,'raster_nmapalgebra_test(double precision[], int[], text[])'::regprocedure,ARRAY[[.5,.5],[.5,.5],[.5,.5]]::double precision[],true) from raster_nmapalgebra_mask_in;
 
 select st_mapalgebra(rast,1,'raster_nmapalgebra_test(double precision[], int[], text[])'::regprocedure,ARRAY[[.5,.5,.5],[.5,.5,.5]]::double precision[],true) from raster_nmapalgebra_mask_in;
index ffdb6cab94ed00280311eb88b802025b37f037c9..3f0c416a77d9074a1868b48bf15c114279d4c727 100644 (file)
@@ -31,7 +31,6 @@ CREATE OR REPLACE FUNCTION make_test_raster(
                rast := ST_MakeEmptyRaster(width, height, ul_x, ul_y, 1, 1, skew_x, skew_y, 0);
                rast := ST_AddBand(rast, 1, '8BUI', initvalue, nodataval);
 
-
                INSERT INTO raster_mapalgebra VALUES (rid, rast);
 
                RETURN;
index dfba25994c38a405eb81afcaf21c38559a9d468d..5d1f99ddfd85ec692c571991b28004c4d5bdf856 100644 (file)
@@ -10,7 +10,6 @@ CREATE OR REPLACE FUNCTION ST_Nullage(matrix float[][], nodatamode text, VARIADI
     $$
     LANGUAGE 'plpgsql' IMMUTABLE;
 
-
 --
 --Test rasters
 --
index b51d76685a673e41fcc0cc35eabe58b717ad1f4b..759e6c2117ab047deea4a5e35d079321af7f02bb 100644 (file)
@@ -10,7 +10,6 @@ CREATE OR REPLACE FUNCTION ST_Nullage(matrix float[][], nodatamode text, VARIADI
     $$
     LANGUAGE 'plpgsql' IMMUTABLE;
 
-
 --
 --Test rasters
 --
index bdb4cac8aad3c7e1e036c041a760bbb002e14874..00888601896930b5f49a7e9c69c1c82fb8e0e118 100644 (file)
@@ -16,7 +16,6 @@ CREATE OR REPLACE FUNCTION make_test_raster()
                rast := ST_MakeEmptyRaster(width, height, 0, 0, 1, -1, 0, 0, 0);
                rast := ST_AddBand(rast, 1, '8BUI', 1, 0);
 
-
                valset := array_fill(0., ARRAY[height, width]);
                FOR y IN 1..height LOOP
                        FOR x IN 1..width LOOP
index 23c80747eefebf12f9cbc9bc0ffe7d1d4af15237..d9cab34bc58852aca44e8d6f20fa09afee7e0681 100644 (file)
@@ -93,7 +93,7 @@ FROM (
        SELECT
                ST_PixelOfValue(
                        rast,
-                       2       
+                       2
                ) AS pixval
        FROM raster_pixelofvalue
 ) foo;
index 1878c65b06c7df332d40edf260c8c37230d20d4e..997c3d9011d218e8013f01ee378944f43cf50dd5 100644 (file)
@@ -223,7 +223,6 @@ VALUES ( 5, '1x1, ip:7.5,2.5 scale:5,5 skew:3,7, srid:-1, width:1, height:1',
 --- (Objective B03a)
 -----------------------------------------------------------------------
 
-
 -----------------------------------------------------------------------
 --- ST_SetSRID
 -----------------------------------------------------------------------
@@ -234,7 +233,6 @@ SELECT
  FROM rt_properties_test
 WHERE (srid+1) != st_srid(st_setsrid(rast,srid+1));
 
-
 -----------------------------------------------------------------------
 --- ST_SetScale
 -----------------------------------------------------------------------
@@ -283,7 +281,6 @@ WHERE
     (skewx+2) != st_skewx(st_setskew(rast,skewx+2)) OR
     (skewy+3) != st_skewy(st_setskew(rast,skewy+3));
 
-
 -----------------------------------------------------------------------
 --- ST_SetUpperLeft
 -----------------------------------------------------------------------
index 6e5a73d76b8cf82fcb546b4707684fd535667959..5a05dc4c8192169e05774a9720432a69aeda6c1d 100644 (file)
@@ -299,7 +299,6 @@ SELECT 'test 5.4', id, name
                                 ipy
                                ), 0) != 1;
 
-
 -----------------------------------------------------------------------
 -- Test 6 - ST_WorldTorastercoordy(rast raster, pt geometry)
 -----------------------------------------------------------------------
index 6887a44bce50a61eaee72488e1339f57555a8457..5ddc33e489fc13508bf348d5d7e2780f03697d16 100644 (file)
@@ -44,7 +44,6 @@ SELECT origin,caseno,
        (st_isvaliddetail(orig)).valid
   FROM clean_cases;
 
-
 SELECT '#1719.1', ST_AsEWKT(ST_MakeValid('POINT(0 0)'));
 SELECT '#1719.2', ST_AsEWKT(ST_MakeValid('GEOMETRYCOLLECTION(POINT(0 0),MULTIPOINT(3 4,5 2),LINESTRING(4 4, 4 4),POLYGON((0 0,10 10,0 10,10 0,0 0)))'));
 SELECT '#1719.3', ST_AsEWKT(ST_MakeValid('MULTIPOINT(3 4,5 2)'));
index 70b9f585b709b933d6a846381d36e66ba7b6a92e..c46000df84643eb94dcc0c6ee33a6e8cd9fe3fdb 100644 (file)
@@ -9,7 +9,7 @@ FROM ST_Union(ST_GeomFromText('POLYGON((175 150, 20 40,
                        50 60, 125 100, 175 150))'),
                ST_Buffer(ST_GeomFromText('POINT(110 170)'), 20)
                ) As geom;
-               
+
 SELECT
        'ST_ConcaveHull Lines 0.80', ST_Within(geom,ST_ConcaveHull(
                geom, 0.80) ) As encloses_geom,
index 00a7ca48472ed7426d4059be656235057f749324..3fe30a78a2230f4efc6ed09c5bb1354f10f42bcc 100644 (file)
@@ -1,5 +1,4 @@
 
-
 -- Semantic of tolerance depends on the `toltype` argument, which can be:
 --    0: Tolerance is number of segments per quadrant
 --    1: Tolerance is max distance between curve and line
@@ -61,4 +60,3 @@ SELECT 'multiarc1.maxerr20.sym', ST_AsText(ST_SnapToGrid(ST_CurveToLine(
        1  -- Symmetric
 ), 2));
 
-
index 8150e67aeb85fd48a73705f4e61a83fc00e8206f..6dfe078b95eb237e93b8787f163627e2b48f07cb 100644 (file)
@@ -138,7 +138,6 @@ WITH inp AS (SELECT
  'LINESTRING EMPTY'::geometry as empty
  ) SELECT 'ST_Length(empty) == 0', ST_Length(empty) FROM inp;
 
-
 -- Operators
 
 -- same box, see http://trac.osgeo.org/postgis/ticket/1453
index cbd8496d0192938ed3909805fef46ecc60decdb4..50f97a115c15bfc9f35bc0faeeb29a8280264515 100644 (file)
@@ -36,7 +36,6 @@ analyze c1;
 analyze c2;
 analyze p;
 
-
 -- #3391.1
 with e as ( select ST_EstimatedExtent('c1','g') as e )
 select '#3391.1', round(st_xmin(e.e)::numeric, 2), round(st_xmax(e.e)::numeric, 2),
@@ -52,7 +51,6 @@ with e as ( select ST_EstimatedExtent('p','g') as e )
 select '#3391.3', round(st_xmin(e.e)::numeric, 2), round(st_xmax(e.e)::numeric, 2),
 round(st_ymin(e.e)::numeric, 2), round(st_ymax(e.e)::numeric, 2) from e;
 
-
 insert into c1 values ('Point(0 0)'::geometry);
 insert into c1 values ('Point(1 1)'::geometry);
 
@@ -75,7 +73,6 @@ with e as ( select ST_EstimatedExtent('p','g') as e )
 select '#3391.6', round(st_xmin(e.e)::numeric, 2), round(st_xmax(e.e)::numeric, 2),
 round(st_ymin(e.e)::numeric, 2), round(st_ymax(e.e)::numeric, 2) from e;
 
-
 insert into c2 values ('Point(0 0)'::geometry);
 insert into c2 values ('Point(-1 -1)'::geometry);
 
@@ -98,7 +95,6 @@ with e as ( select ST_EstimatedExtent('p','g') as e )
 select '#3391.9', round(st_xmin(e.e)::numeric, 2), round(st_xmax(e.e)::numeric, 2),
 round(st_ymin(e.e)::numeric, 2), round(st_ymax(e.e)::numeric, 2) from e;
 
-
 insert into p values ('Point(1 1)'::geometry);
 insert into p values ('Point(2 2)'::geometry);
 
@@ -135,7 +131,6 @@ analyze c1;
 analyze c2;
 analyze p;
 
-
 -- #3391.13
 with e as ( select ST_EstimatedExtent('public','p','g','t') as e )
 select '#3391.13', round(st_xmin(e.e)::numeric, 2), round(st_xmax(e.e)::numeric, 2),
@@ -156,7 +151,6 @@ with e as ( select ST_EstimatedExtent('public','c1','g', 'f') as e )
 select '#3391.16', round(st_xmin(e.e)::numeric, 2), round(st_xmax(e.e)::numeric, 2),
 round(st_ymin(e.e)::numeric, 2), round(st_ymax(e.e)::numeric, 2) from e;
 
-
 insert into c1 values ('Point(0 0)'::geometry);
 insert into c1 values ('Point(1 1)'::geometry);
 
@@ -184,7 +178,6 @@ with e as ( select ST_EstimatedExtent('public','c1','g', 't') as e )
 select '#3391.20', round(st_xmin(e.e)::numeric, 2), round(st_xmax(e.e)::numeric, 2),
 round(st_ymin(e.e)::numeric, 2), round(st_ymax(e.e)::numeric, 2) from e;
 
-
 drop table p cascade;
 
 --
index ed83a774e932f65930ab19d2e8bfb3b6e988e6b8..34ecb2c17d8d929cfd07adfc712679a577a6bb49 100644 (file)
@@ -22,7 +22,7 @@ SELECT 'frechet_ls_mp', st_frechetdistance(
 SELECT 'frechet_ls_ls_3', st_frechetdistance(
        'LINESTRING (0 0, 100 0)'::geometry,
        'LINESTRING (0 0, 50 50, 100 0)'::geometry);
--- 70.7106781186548 
+-- 70.7106781186548
 
 -- rechet with densification
 SELECT 'frechetdensify_ls_ls', st_frechetdistance(
index 021eb51feb4259e78b0f155819697ff43ec3356f..2bae7880e949552c5443afc148b8dffc95602f92 100644 (file)
@@ -17,7 +17,6 @@ SELECT c, ST_Covers(g1::geography, g2::geography) FROM
     ('geog_covers_poly_line_out', 'POLYGON((0 40, 40 40, 40 0, 0 0, 0 40))', 'LINESTRING (-10 -40, -40 -40, -40 -10, -10 -10)')
 ) AS u(c, g1, g2);
 
-
 -- poly in poly (reversed arguments)
 SELECT c, ST_CoveredBy(g1::geography, g2::geography) FROM
 ( VALUES
index d84f82ab9d257cec7fb816b3f674de8e9d914645..aca18fdd7af53b34f1abe93356e7e548237eff2b 100644 (file)
@@ -3,7 +3,6 @@
 -- Written by Olivier Courtin - Oslandia
 --
 
-
 --
 -- spatial_ref_sys datas
 --
@@ -17,9 +16,6 @@ INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4tex
 --- EPSG 27582 : NTF (Paris) / France II (deprecated)
 INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (27582,'EPSG',27582,'PROJCS["NTF (Paris) / France II (deprecated)",GEOGCS["NTF (Paris)",DATUM["Nouvelle_Triangulation_Francaise_Paris",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265,AUTHORITY["EPSG","7011"]],TOWGS84[-168,-60,320,0,0,0,0],AUTHORITY["EPSG","6807"]],PRIMEM["Paris",2.33722917,AUTHORITY["EPSG","8903"]],UNIT["grad",0.01570796326794897,AUTHORITY["EPSG","9105"]],AUTHORITY["EPSG","4807"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",52],PARAMETER["central_meridian",0],PARAMETER["scale_factor",0.99987742],PARAMETER["false_easting",600000],PARAMETER["false_northing",2200000],AUTHORITY["EPSG","27582"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ');
 
-
-
-
 -- Empty Geometry
 SELECT 'empty_geom', ST_AsEWKT(ST_GeomFromGML(NULL));
 
@@ -36,8 +32,6 @@ SELECT 'xml_2', ST_AsEWKT(ST_GeomFromGML('<foo>'));
 -- ERROR: Not a GML Geometry
 SELECT 'xml_3', ST_AsEWKT(ST_GeomFromGML('<foo/>'));
 
-
-
 --
 -- Point
 --
@@ -54,8 +48,6 @@ SELECT 'point_3', ST_AsEWKT(ST_GeomFromGML('<gml:Point></gml:Point>'));
 -- srsName handle
 SELECT 'point_4', ST_AsEWKT(ST_GeomFromGML('<gml:Point srsName="EPSG:4326"><gml:pos>1 2</gml:pos></gml:Point>'));
 
-
-
 --
 -- LineString
 --
@@ -76,9 +68,6 @@ SELECT 'linestring_5', ST_AsEWKT(ST_GeomFromGML('<gml:LineString></gml:LineStrin
 -- XML not elements handle
 SELECT 'linestring_6', ST_AsEWKT(ST_GeomFromGML(' <!-- --> <gml:LineString> <!-- --> <gml:coordinates>1,2 3,4</gml:coordinates></gml:LineString>'));
 
-
-
-
 --
 -- Curve
 --
@@ -121,9 +110,6 @@ SELECT 'curve_14', ST_AsEWKT(ST_GeomFromGML('<gml:Curve><gml:segments><gml:LineS
 SELECT 'curve_15', ST_AsEWKT(ST_GeomFromGML('<gml:Curve><gml:segments><gml:LineStringSegment><gml:posList srsDimension="3">1 2 3 4 5 6</gml:posList></gml:LineStringSegment><gml:LineStringSegment><gml:posList srsDimension="2">4 5 7 8</gml:posList></gml:LineStringSegment></gml:segments></gml:Curve>'));
 SELECT 'curve_16', ST_AsEWKT(ST_GeomFromGML('<gml:Curve><gml:segments><gml:LineStringSegment><gml:posList srsDimension="2">1 2 3 4</gml:posList></gml:LineStringSegment><gml:LineStringSegment><gml:posList srsDimension="3">3 4 5 6 7 8</gml:posList></gml:LineStringSegment></gml:segments></gml:Curve>'));
 
-
-
-
 --
 -- Polygon
 --
@@ -177,8 +163,6 @@ SELECT 'polygon_17', ST_AsEWKT(ST_GeomFromGML('<gml:Polygon><gml:exterior><gml:L
 SELECT 'polygon_18', ST_AsEWKT(ST_GeomFromGML('<gml:Polygon><gml:exterior><gml:LinearRing><gml:posList srsDimension="3">1 2 3 4 5 6 7 8 9 1 2 3</gml:posList></gml:LinearRing></gml:exterior><gml:interior><gml:LinearRing><gml:posList srsDimension="2">10 11 12 13 14 15 10 11</gml:posList></gml:LinearRing></gml:interior></gml:Polygon>'));
 SELECT 'polygon_19', ST_AsEWKT(ST_GeomFromGML('<gml:Polygon><gml:exterior><gml:LinearRing><gml:posList srsDimension="2">1 2 3 4 5 6 1 2</gml:posList></gml:LinearRing></gml:exterior><gml:interior><gml:LinearRing><gml:posList srsDimension="3">7 8 9 10 11 12 13 14 15 7 8 9</gml:posList></gml:LinearRing></gml:interior></gml:Polygon>'));
 
-
-
 --
 -- LinearRing
 --
@@ -205,7 +189,6 @@ SELECT 'linearring_7', ST_AsEWKT(ST_GeomFromGML('<gml:LinearRing></gml:LinearRin
 -- XML not elements handle
 SELECT 'linearring_8', ST_AsEWKT(ST_GeomFromGML(' <!-- --> <gml:LinearRing> <!-- --> <gml:posList>1 2 3 4 5 6 1 2</gml:posList> <!-- --> </gml:LinearRing>'));
 
-
 --
 -- Triangle
 --
@@ -239,8 +222,6 @@ SELECT 'triangle_10', ST_AsEWKT(ST_GeomFromGML('<gml:Triangle interpolation="pla
 -- ERROR: interpolation not planar
 SELECT 'triangle_11', ST_AsEWKT(ST_GeomFromGML('<gml:Triangle interpolation="not_planar"><gml:exterior><gml:LinearRing><gml:coordinates>1,2 3,4 5,6 1,2</gml:coordinates></gml:LinearRing></gml:exterior></gml:Triangle>'));
 
-
-
 --
 -- Surface
 --
@@ -304,7 +285,6 @@ SELECT 'surface_22', ST_AsEWKT(ST_GeomFromGML('<gml:Surface><gml:patches><gml:Po
 -- ERROR: interior but no exterior
 SELECT 'surface_23', ST_AsEWKT(ST_GeomFromGML('<gml:Surface><gml:patches><gml:PolygonPatch><gml:interior><gml:LinearRing><gml:coordinates>1,2 3,4 5,6 1,2</gml:coordinates></gml:LinearRing></gml:interior></gml:PolygonPatch></gml:patches></gml:Surface>'));
 
-
 --
 -- MultiPoint
 --
@@ -337,7 +317,6 @@ SELECT 'mpoint_9', ST_AsEWKT(ST_GeomFromGML('<gml:MultiPoint><gml:pointMembers><
 -- Empty pointMembers
 SELECT 'mpoint_10', ST_AsEWKT(ST_GeomFromGML('<gml:MultiPoint><gml:pointMembers></gml:pointMembers></gml:MultiPoint>'));
 
-
 --
 -- MultiLineString
 --
@@ -365,7 +344,6 @@ SELECT 'mline_8', ST_AsEWKT(ST_GeomFromGML('<gml:MultiLineString><gml:lineString
 -- Mixed srsName
 SELECT 'mline_9', ST_AsEWKT(ST_GeomFromGML('<gml:MultiLineString srsName="EPSG:27582"><gml:lineStringMember><gml:LineString><gml:coordinates>1,2 3,4</gml:coordinates></gml:LineString></gml:lineStringMember><gml:lineStringMember><gml:LineString srsName="EPSG:27562"><gml:coordinates>400000,5000000 400010,5000010</gml:coordinates></gml:LineString></gml:lineStringMember></gml:MultiLineString>'));
 
-
 --
 -- MultiCurve
 --
@@ -401,7 +379,6 @@ SELECT 'mcurve_11', ST_AsEWKT(ST_GeomFromGML('<gml:MultiCurve><gml:curveMembers>
 
 SELECT 'mcurve_12', ST_AsEWKT(ST_GeomFromGML('<gml:MultiCurve><gml:curveMembers></gml:curveMembers></gml:MultiCurve>'));
 
-
 --
 -- MultiPolygon
 --
@@ -419,7 +396,6 @@ SELECT 'mpoly_3', ST_AsEWKT(ST_GeomFromGML('<gml:MultiPolygon srsName="EPSG:4326
 SELECT 'mpoly_4', ST_AsEWKT(ST_GeomFromGML('<gml:MultiPolygon><gml:polygonMember></gml:polygonMember></gml:MultiPolygon>'));
 SELECT 'mpoly_5', ST_AsEWKT(ST_GeomFromGML('<gml:MultiPolygon></gml:MultiPolygon>'));
 
-
 -- XML not elements handle
 SELECT 'mpoly_6', ST_AsEWKT(ST_GeomFromGML(' <!-- --> <gml:MultiPolygon> <!-- --> <gml:polygonMember> <!-- --> <gml:Polygon> <!-- --> <gml:outerBoundaryIs> <!-- --> <gml:LinearRing> <!-- --> <gml:coordinates>1,2 3,4 5,6 1,2</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember> <!-- --> <gml:polygonMember> <!-- --> <gml:Polygon> <!-- --> <gml:outerBoundaryIs> <!-- --> <gml:LinearRing> <!-- --> <gml:coordinates>7,8 9,10 11,12 7,8</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember></gml:MultiPolygon>'));
 
@@ -430,9 +406,6 @@ SELECT 'mpoly_8', ST_AsEWKT(ST_GeomFromGML('<gml:MultiPolygon><gml:polygonMember
 -- Mixed srsName
 SELECT 'mpoly_9', ST_AsEWKT(ST_GeomFromGML('<gml:MultiPolygon srsName="EPSG:27582"><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>1,2 3,4 5,6 1,2</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember><gml:polygonMember><gml:Polygon srsName="EPSG:27562"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>400000,5000000 400010,5000010 400020,5000020 400000,5000000</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs><gml:innerBoundaryIs><gml:LinearRing><gml:coordinates>400100,5000100 400110,5000110 400120,5000120 400100,5000100</gml:coordinates></gml:LinearRing></gml:innerBoundaryIs></gml:Polygon></gml:polygonMember></gml:MultiPolygon>'));
 
-
-
-
 --
 -- MultiSurface
 --
@@ -469,7 +442,6 @@ SELECT 'msurface_11', ST_AsEWKT(ST_GeomFromGML('<gml:MultiSurface><gml:surfaceMe
 -- Empty surfaceMembers
 SELECT 'msurface_12', ST_AsEWKT(ST_GeomFromGML('<gml:MultiSurface><gml:surfaceMembers></gml:surfaceMembers></gml:MultiSurface>'));
 
-
 --
 -- PolyhedralSurface
 --
@@ -541,7 +513,6 @@ SELECT 'polyhedralsurface_24', ST_AsEWKT(ST_GeomFromGML('<gml:PolyhedralSurface>
 -- ERROR: interpolation not planar
 SELECT 'polyhedralsurface_25', ST_AsEWKT(ST_GeomFromGML('<gml:PolyhedralSurface><gml:polygonPatches><gml:PolygonPatch interpolation="not_planar"><gml:exterior><gml:LinearRing><gml:posList srsDimension="3">1 2 3 4 5 6 7 8 9 1 2 3</gml:posList></gml:LinearRing></gml:exterior></gml:PolygonPatch></gml:polygonPatches></gml:PolyhedralSurface>'));
 
-
 --
 -- Tin and TriangulatedSurface
 --
@@ -592,8 +563,6 @@ SELECT 'tin_17', ST_AsEWKT(ST_GeomFromGML('<gml:Tin><gml:trianglePatches><gml:Tr
 
 SELECT 'tin_18', ST_AsEWKT(ST_GeomFromGML('<gml:TriangulatedSurface><gml:trianglePatches><gml:Triangle><gml:exterior><gml:LinearRing><gml:posList srsDimension="3">1 2 3 4 5 6 7 8 9 1 2 3</gml:posList></gml:LinearRing></gml:exterior></gml:Triangle></gml:trianglePatches></gml:TriangulatedSurface>'));
 
-
-
 --
 -- GeometryCollection
 --
@@ -636,9 +605,6 @@ SELECT 'collection_13', ST_AsEWKT(ST_GeomFromGML('<gml:MultiGeometry><gml:geomet
 -- Mixed srsName
 SELECT 'collection_14', ST_AsEWKT(ST_GeomFromGML('<gml:MultiGeometry srsName="EPSG:27582"><gml:geometryMember><gml:Point><gml:coordinates>1,2</gml:coordinates></gml:Point></gml:geometryMember><gml:geometryMember><gml:MultiGeometry><gml:geometryMember><gml:MultiGeometry srsName="EPSG:27562"><gml:geometryMember><gml:Point><gml:coordinates>400000,5000000</gml:coordinates></gml:Point></gml:geometryMember></gml:MultiGeometry></gml:geometryMember></gml:MultiGeometry></gml:geometryMember></gml:MultiGeometry>'));
 
-
-
-
 --
 -- srsName
 --
@@ -681,8 +647,6 @@ SELECT 'srs_17', ST_AsEWKT(ST_GeomFromGML('<gml:MultiGeometry srsName="urn:ogc:d
 -- Reverse axis with severals multi geometry types
 -- TODO
 
-
-
 --
 -- GML Namespace
 --
@@ -726,7 +690,6 @@ SELECT 'ns_12', ST_AsEWKT(ST_GeomFromGML('<gml:Point foo:srsName="EPSG:4326" xml
 -- Explicit GML namespace (no prefix)
 SELECT 'ns_13', ST_AsEWKT(ST_GeomFromGML('<Point srsName="EPSG:4326" xmlns="http://www.opengis.net/gml"><coordinates>1,2</coordinates></Point>'));
 
-
 --
 -- Coordinates (simple)
 --
@@ -774,8 +737,6 @@ SELECT 'coordinates_16', ST_AsEWKT(ST_GeomFromGML('<gml:LineString><gml:coordina
 -- ERROR: Junk
 SELECT 'coordinates_17', ST_AsEWKT(ST_GeomFromGML('<gml:LineString><gml:coordinates>!@#$%^*()"</gml:coordinates></gml:LineString>'));
 
-
-
 --
 -- Coordinates (cs,ts,decimal)
 --
@@ -830,13 +791,9 @@ SELECT 'coordinates_cs_16', ST_AsEWKT(ST_GeomFromGML('<gml:LineString><gml:coord
 SELECT 'coordinates_cs_17', ST_AsEWKT(ST_GeomFromGML('<gml:LineString><gml:coordinates cs="." ts=";" decimal=".">1.1.2.2;3.3.4,4</gml:coordinates></gml:LineString>'));
 SELECT 'coordinates_cs_18', ST_AsEWKT(ST_GeomFromGML('<gml:LineString><gml:coordinates cs="." ts=";" decimal=";">1;1.2;2;3;3.4,4</gml:coordinates></gml:LineString>'));
 
-
 -- XML Entity substitution
 SELECT 'coordinates_cs_19', ST_AsEWKT(ST_GeomFromGML('<gml:LineString><gml:coordinates ts="," cs="&#x20;">1 2,3 4</gml:coordinates></gml:LineString>'));
 
-
-
-
 --
 -- pos
 --
@@ -885,7 +842,6 @@ SELECT 'pos_16', ST_AsEWKT(ST_GeomFromGML('<gml:Point><gml:pos srsDimension="3">
 -- ERROR: 4 dimensions
 SELECT 'pos_17', ST_AsEWKT(ST_GeomFromGML('<gml:Point><gml:pos srsDimension="4">1 2 3 4</gml:pos></gml:Point>'));
 
-
 --
 -- posList
 --
@@ -930,8 +886,6 @@ SELECT 'poslist_17', ST_AsEWKT(ST_GeomFromGML('<gml:LineString><gml:posList> 1
 -- ERROR: Junk
 SELECT 'poslist_18', ST_AsEWKT(ST_GeomFromGML('<gml:LineString><gml:posList>!@#$%^*()"</gml:posList></gml:LineString>'));
 
-
-
 --
 -- Generic data
 --
@@ -942,9 +896,6 @@ SELECT 'data_1', ST_AsEWKT(ST_GeomFromGML('<gml:LineString><gml:pos>1 2</gml:pos
 -- Mixed pos, posList, pointProperty, pointRep
 SELECT 'data_2', ST_AsEWKT(ST_GeomFromGML('<gml:LineString><gml:pos>1 2</gml:pos><gml:posList>3 4 5 6</gml:posList><gml:pointProperty><gml:Point><gml:pos>7 8</gml:pos></gml:Point></gml:pointProperty><gml:pointRep><gml:Point><gml:coordinates>9,10</gml:coordinates></gml:Point></gml:pointRep></gml:LineString>'));
 
-
-
-
 --
 -- XLink
 --
@@ -1018,8 +969,6 @@ SELECT 'xlink_22', ST_AsEWKT(ST_GeomFromGML('<gml:MultiGeometry xmlns:gml="http:
 -- ERROR circular ref
 SELECT 'xlink_23', ST_AsEWKT(ST_GeomFromGML('<gml:MultiGeometry gml:id="mg1" xmlns:gml="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink"><gml:geometryMember><gml:Point><gml:pos>1 2</gml:pos></gml:Point></gml:geometryMember><gml:geometryMember><gml:MultiGeometry xlink:type="simple" xlink:href="#mg1"/></gml:geometryMember></gml:MultiGeometry>'));
 
-
-
 --
 -- Bijective PostGIS GML test
 --
@@ -1207,10 +1156,6 @@ SELECT 'gml_60', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('GEOMETRYCOLLECT
 -- Collection GML 3 - 3D & SRID lat/lon
 SELECT 'gml_61', ST_AsEWKT(ST_GeomFromGML(ST_AsGML(3, ST_AsEWKT('SRID=4326;GEOMETRYCOLLECTION(POINT(1 2 3))'), 16)));
 
-
-
-
-
 --
 -- coord
 --
@@ -1251,7 +1196,6 @@ SELECT 'coord_15', ST_AsEWKT(ST_GeomFromGML('<gml:LineString><gml:coord><gml:X>1
 -- XML not elements handle
 SELECT 'coord_16', ST_AsEWKT(ST_GeomFromGML('<gml:LineString><gml:coord> <!-- --> <gml:X>1</gml:X> <!-- --> <gml:Y>2</gml:Y> <!-- --> </gml:coord> <!-- --> <gml:coord> <!-- --> <gml:X>3</gml:X> <!-- --> <gml:Y>4</gml:Y></gml:coord></gml:LineString>'));
 
-
 --
 -- Double
 --
@@ -1317,9 +1261,6 @@ SELECT 'double_30', ST_AsEWKT(ST_GeomFromGML('<gml:Point><gml:pos>1 -1.23E 2</gm
 -- ERROR: Junk
 SELECT 'double_31', ST_AsEWKT(ST_GeomFromGML('<gml:Point><gml:pos>1 $0%@#$^%#</gml:pos></gml:Point>'));
 
-
-
-
 --
 -- Delete inserted spatial data
 --
index b4cb4a4bf39cf5f6c13cfc04ee13868fec7195d5..1b40f903414a26339303421e3c4ad4fb7f71bb9a 100644 (file)
@@ -3,7 +3,6 @@
 -- Written by Olivier Courtin - Oslandia
 --
 
-
 --
 -- spatial_ref_sys datas
 --
@@ -11,7 +10,6 @@
 -- EPSG 4326 : WGS 84
 INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4326,'EPSG',4326,'GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]','+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs ');
 
-
 -- Empty Geometry
 SELECT 'empty_geom', ST_AsEWKT(ST_GeomFromKML(NULL));
 
@@ -28,8 +26,6 @@ SELECT 'xml_2', ST_AsEWKT(ST_GeomFromKML('<foo>'));
 -- ERROR: Not a KML Geometry
 SELECT 'xml_3', ST_AsEWKT(ST_GeomFromKML('<foo/>'));
 
-
-
 --
 -- Point
 --
@@ -49,8 +45,6 @@ SELECT 'point_error_1', ST_AsEWKT(ST_GeomFromKML('<kml:Point><kml:coordinates>1,
 -- ERROR: empty point
 SELECT 'point_error_2', ST_AsEWKT(ST_GeomFromKML('<kml:Point></kml:Point>'));
 
-
-
 --
 -- LineString
 --
@@ -68,9 +62,6 @@ SELECT 'linestring_4', ST_AsEWKT(ST_GeomFromKML('<kml:LineString></kml:LineStrin
 -- XML not elements handle
 SELECT 'linestring_5', ST_AsEWKT(ST_GeomFromKML(' <!-- --> <kml:LineString> <!-- --> <kml:coordinates>1,2 3,4</kml:coordinates></kml:LineString>'));
 
-
-
-
 --
 -- Polygon
 --
@@ -114,9 +105,6 @@ SELECT 'polygon_14', ST_AsEWKT(ST_GeomFromKML('<kml:Polygon><kml:outerBoundaryIs
 -- 3 rings
 SELECT 'polygon_15', ST_AsEWKT(ST_GeomFromKML('<kml:Polygon><kml:outerBoundaryIs><kml:LinearRing><kml:coordinates>1,2 3,4 5,6 1,2</kml:coordinates></kml:LinearRing></kml:outerBoundaryIs><kml:innerBoundaryIs><kml:LinearRing><kml:coordinates>7,8 9,10 11,12 7,8</kml:coordinates></kml:LinearRing></kml:innerBoundaryIs><kml:innerBoundaryIs><kml:LinearRing><kml:coordinates>13,14 15,16 17,18 13,14</kml:coordinates></kml:LinearRing></kml:innerBoundaryIs></kml:Polygon>'));
 
-
-
-
 --
 -- MultiGeometry
 --
@@ -151,9 +139,6 @@ SELECT 'multi_9', ST_AsEWKT(ST_GeomFromKML('<kml:MultiGeometry><kml:Point><kml:c
 -- XML not elements handle
 SELECT 'multi_10', ST_AsEWKT(ST_GeomFromKML(' <!-- --> <kml:MultiGeometry> <!-- --> <kml:Point> <!-- --> <kml:coordinates>1,2</kml:coordinates></kml:Point> <!-- --> <kml:LineString><kml:coordinates>3,4 5,6</kml:coordinates></kml:LineString> <!-- --> <kml:Polygon><kml:outerBoundaryIs><kml:LinearRing><kml:coordinates>7,8 9,10 11,12 7,8</kml:coordinates></kml:LinearRing></kml:outerBoundaryIs></kml:Polygon></kml:MultiGeometry>'));
 
-
-
-
 --
 -- KML Namespace
 --
@@ -185,9 +170,6 @@ SELECT 'ns_5', ST_AsEWKT(ST_GeomFromKML('<kml:Point xmlns:foo="http://foo.net" x
 -- Ignore other namespace attribute
 -- TODO SELECT 'ns_11', ST_AsEWKT(ST_GeomFromKML('<kml:Point foo:srsName="EPSG:4326" xmlns:foo="http://foo.net" xmlns:gml="http://www.opengis.net/gml"><kml:coordinates>1,2</kml:coordinates><foo:coordinates>3,4</foo:coordinates></kml:Point>'));
 
-
-
-
 --
 -- Coordinates
 --
@@ -238,13 +220,6 @@ SELECT 'coordinates_16', ST_AsEWKT(ST_GeomFromKML('<kml:LineString><kml:coordina
 -- ERROR: Junk
 SELECT 'coordinates_17', ST_AsEWKT(ST_GeomFromKML('<kml:LineString><kml:coordinates>!@#$%^*()"</kml:coordinates></kml:LineString>'));
 
-
-
-
-
-
-
-
 --
 -- Bijective PostGIS KML test
 --
@@ -285,7 +260,6 @@ SELECT 'kml_11', ST_AsEWKT(ST_GeomFromKML(ST_AsKML(ST_AsEWKT('SRID=4326;MULTIPOL
 -- Multipolygon - 3D
 SELECT 'kml_12', ST_AsEWKT(ST_GeomFromKML(ST_AsKML(ST_AsEWKT('SRID=4326;MULTIPOLYGON(((1 2 3,4 5 6,7 8 9,1 2 3)),((10 11 12,13 14 15,16 17 18,10 11 12)))'))));
 
-
 --
 -- Double
 --
@@ -355,10 +329,6 @@ SELECT 'double_31', ST_AsEWKT(ST_GeomFromKML('<kml:Point><kml:coordinates>1,$0%@
 SELECT 'mixed_dims_1', ST_AsEWKT(ST_GeomFromKML('<kml:Point><kml:coordinates>1,2 1,2,3</kml:coordinates></kml:Point>'));
 SELECT 'mixed_dims_2', ST_AsEWKT(ST_GeomFromKML('<kml:Point><kml:coordinates>1,2,3 1,2</kml:coordinates></kml:Point>'));
 
-
-
-
-
 --
 -- Delete inserted spatial data
 --
index a58bcc7eeaa51a9ee526b14db494b74a1d2d0c42..e44c760c9ff0c796607b8a100a24bceb961474c7 100644 (file)
@@ -29,5 +29,4 @@ SET statement_timeout TO 0;
 -- Not affected by old timeout
 SELECT '1',ST_AsText(ST_Segmentize('LINESTRING(0 0,4 0)'::geometry, 2));
 
-
 DROP FUNCTION _timecheck(text, interval);
index 1c4309ff5eed770011ccf269e9ab57318fe77604..e45db0c71b45de58cfa77fbc5bd0b76d3e72ba21 100644 (file)
@@ -41,5 +41,4 @@ SELECT _timecheck('buffer', '200ms');
 -- Not affected by old timeout
 SELECT '1', ST_NPoints(ST_Buffer('POINT(4 0)'::geometry, 2, 1));
 
-
 DROP FUNCTION _timecheck(text, interval);
index d369215cd55ee6dafd6987bbf2942b555e6f2c92..1ade05569e5c9b563fbc8a3657a50022d657054f 100644 (file)
@@ -61,5 +61,4 @@ SELECT _timecheck('overlaps', '200ms');
 select ST_Relate(g,g) from _inputs WHERE id = 1; -- 6+ seconds
 SELECT _timecheck('relate', '200ms');
 
-
 DROP FUNCTION _timecheck(text, interval);
index 7e630d3f4b4004ea2dbf1eb0cceb91d68e2c15af..9f437c6fe137338ba0316de141c35551e1bcb972 100644 (file)
@@ -25,4 +25,3 @@ SELECT 'empty collection', ST_IsCollection('GEOMETRYCOLLECTION EMPTY');
 SELECT 'collection', ST_IsCollection('GEOMETRYCOLLECTION(POINT(0 0))');
 SELECT 'collection+', ST_IsCollection('GEOMETRYCOLLECTION(POINT(0 0), POINT(42 42))');
 
-
index c2001a1a6d6f365deafd32062105edd8c6a58e38..41729c7ef115d8ab4ff357b13cd27ec9dd7f8797 100644 (file)
@@ -48,4 +48,3 @@ select '6s', ST_IsValid(
 select '5r', ST_IsValidReason(
 'POLYGON ((70 250, 40 500, 100 400, 70 250, 80 350, 60 350, 70 250))' , 1);
 
-
index 2f10f2dfe9906739e447182261d3777cafc6ac0b..fe7cb2835c67325487e2f6de945fde0c71a81292 100644 (file)
@@ -62,7 +62,6 @@ ANALYZE test;
 --       max(st_z(the_geom)) as maxz, max(st_m(the_geom)) as maxm
 --FROM test;
 
-
 SELECT '<<->> idx', qnodes('select * from test order by the_geom <<->> ST_MakePoint(0,0) LIMIT 1');
 SELECT '<<->> res1',num,
   (the_geom <<->> 'LINESTRING(0 0,5 5)'::geometry)::numeric(10,2),
@@ -77,7 +76,6 @@ SELECT '<<->> res3',num,
   ST_astext(the_geom) from test
   order by the_geom <<->> 'POINT(631 729 25023 -25022)'::geometry LIMIT 1;
 
-
 -- Cleanup
 
 DROP FUNCTION qnodes(text);
index 7af944ac88494a4ddfa3742720ea360d70f36d5e..9568f78edd02dfc0c88504d5883ff8f9032ad61b 100644 (file)
--- create table\r
-CREATE TABLE knn_recheck_geom(gid serial primary key, geom geometry);\r
-INSERT INTO knn_recheck_geom(gid,geom)\r
-SELECT ROW_NUMBER() OVER(ORDER BY x,y) AS gid, ST_Point(x*0.777,y*0.887) As geom\r
-FROM generate_series(-100,1000, 7) AS x CROSS JOIN generate_series(-300,1000,9) As y;\r
-\r
-INSERT INTO knn_recheck_geom(gid, geom)\r
-SELECT 500000 + i, ST_Translate('LINESTRING(-100 300, 500 700, 400 123, 500 10000, 1 1)'::geometry, i*2000,0)\r
-FROM generate_series(0,10) i;\r
-\r
-INSERT INTO knn_recheck_geom(gid, geom)\r
-SELECT 500100 + i, ST_Translate('POLYGON((100 800, 100 700, 400 123, 405 124, 100 800))'::geometry,0,i*2000)\r
-FROM generate_series(0,3) i;\r
-\r
-\r
-INSERT INTO knn_recheck_geom(gid,geom)\r
-SELECT 600000 + ROW_NUMBER() OVER(ORDER BY gid) AS gid, ST_Translate(ST_Buffer(geom,8,15 ),100,300) As geom\r
-FROM knn_recheck_geom\r
-WHERE gid IN(1000, 10000, 2000,3000);\r
-\r
-\r
--- without index order should match st_distance order --\r
--- point check\r
-\r
-SELECT '#1' As t, gid, ST_Distance( 'POINT(-305 998.5)'::geometry, geom)::numeric(10,2)\r
-FROM knn_recheck_geom\r
-ORDER BY 'POINT(-305 998.5)'::geometry <-> geom LIMIT 5;\r
-\r
--- linestring check\r
-SELECT '#2' As t, gid, ST_Distance( 'MULTILINESTRING((-95 -300, 100 200, 100 323),(-50 2000, 30 6000))'::geometry, geom)::numeric(12,4)\r
-FROM knn_recheck_geom\r
-ORDER BY 'MULTILINESTRING((-95 -300, 100 200, 100 323),(-50 2000, 30 6000))'::geometry <-> geom LIMIT 5;\r
-\r
--- lateral check before index\r
-SELECT '#3' As t, a.gid, b.gid As match, ST_Distance(a.geom, b.geom)::numeric(15,4) As true_rn, b.knn_dist::numeric(15,4)\r
-FROM knn_recheck_geom As a \r
-       LEFT JOIN \r
-               LATERAL ( SELECT  gid, geom, a.geom <-> g.geom As knn_dist\r
-                       FROM knn_recheck_geom As g WHERE a.gid <> g.gid ORDER BY a.geom <-> g.geom LIMIT 5) As b ON true\r
-       WHERE a.gid IN(1,500101)\r
-ORDER BY a.gid, true_rn, b.gid;\r
-\r
--- create index and repeat\r
-CREATE INDEX idx_knn_recheck_geom_gist ON knn_recheck_geom USING gist(geom);\r
-vacuum analyze knn_recheck_geom;\r
-\r
-set enable_seqscan = false;\r
-SELECT '#1' As t, gid, ST_Distance( 'POINT(-305 998.5)'::geometry, geom)::numeric(10,2)\r
-FROM knn_recheck_geom\r
-ORDER BY 'POINT(-305 998.5)'::geometry <-> geom LIMIT 5;\r
-\r
--- linestring check\r
-SELECT '#2' As t, gid, ST_Distance( 'MULTILINESTRING((-95 -300, 100 200, 100 323),(-50 2000, 30 6000))'::geometry, geom)::numeric(12,4)\r
-FROM knn_recheck_geom\r
-ORDER BY 'MULTILINESTRING((-95 -300, 100 200, 100 323),(-50 2000, 30 6000))'::geometry <-> geom LIMIT 5;\r
-\r
--- lateral check before index\r
-SELECT '#3' As t, a.gid, b.gid As match, ST_Distance(a.geom, b.geom)::numeric(15,4) As true_rn, b.knn_dist::numeric(15,4)\r
-FROM knn_recheck_geom As a \r
-       LEFT JOIN \r
-               LATERAL ( SELECT  gid, geom, a.geom <-> g.geom As knn_dist\r
-                       FROM knn_recheck_geom As g WHERE a.gid <> g.gid ORDER BY a.geom <-> g.geom LIMIT 5) As b ON true\r
-       WHERE a.gid IN(1,500101)\r
-ORDER BY a.gid, true_rn, b.gid;\r
-\r
-DROP TABLE knn_recheck_geom;\r
-\r
--- geography tests\r
-DELETE FROM spatial_ref_sys where srid = 4326;\r
-INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","proj4text") \r
-    VALUES (4326,'EPSG',4326,'+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs ');\r
--- create table\r
-CREATE TABLE knn_recheck_geog(gid serial primary key, geog geography);\r
-INSERT INTO knn_recheck_geog(gid,geog)\r
-SELECT ROW_NUMBER() OVER(ORDER BY x,y) AS gid, ST_Point(x*1.11,y*0.95)::geography As geog\r
-FROM generate_series(-100,100, 1) AS x CROSS JOIN generate_series(-90,90,1) As y;\r
-\r
-INSERT INTO knn_recheck_geog(gid, geog)\r
-SELECT 500000, 'LINESTRING(-95 -10, -93 -10.5, -90 -10.6, -95 -10.5, -95 -10)'::geography;\r
-\r
-INSERT INTO knn_recheck_geog(gid, geog)\r
-SELECT 500001, 'POLYGON((-95 10, -95.6 10.5, -95.9 10.75, -95 10))'::geography;\r
-\r
-INSERT INTO knn_recheck_geog(gid,geog)\r
-SELECT 600000 + ROW_NUMBER() OVER(ORDER BY gid) AS gid, ST_Buffer(geog,1000) As geog\r
-FROM knn_recheck_geog\r
-WHERE gid IN(1000, 10000, 2000, 2614, 40000);\r
-\r
-\r
-SELECT '#1g' As t, gid, ST_Distance( 'POINT(-95 -10)'::geography, geog, false)::numeric(12,4) ,\r
-    ('POINT(-95 -10)'::geography <-> geog )::numeric(12,4)\r
-FROM knn_recheck_geog\r
-ORDER BY 'POINT(-95 -10)'::geography <-> geog LIMIT 5;\r
-\r
-SELECT '#2g' As t, gid, ST_Distance( 'LINESTRING(75 10, 75 12, 80 20)'::geography, geog, false)::numeric(12,4),\r
-    ('LINESTRING(75 10, 75 12, 80 20)'::geography <-> geog)::numeric(12,4) As knn_dist\r
-FROM knn_recheck_geog\r
-ORDER BY 'LINESTRING(75 10, 75 12, 80 20)'::geography <-> geog LIMIT 5;\r
-\r
--- lateral check before index\r
-SELECT '#3g' As t, a.gid,  ARRAY(SELECT  gid\r
-                       FROM knn_recheck_geog As g WHERE a.gid <> g.gid ORDER BY ST_Distance(a.geog, g.geog, false) LIMIT 5) = ARRAY(SELECT  gid\r
-                       FROM knn_recheck_geog As g WHERE a.gid <> g.gid ORDER BY a.geog <-> g.geog LIMIT 5) As dist_order_agree\r
-FROM knn_recheck_geog As a \r
-       WHERE a.gid IN(500000,500010,1000)\r
-ORDER BY a.gid;\r
-\r
-\r
--- create index and repeat\r
-CREATE INDEX idx_knn_recheck_geog_gist ON knn_recheck_geog USING gist(geog);\r
-vacuum analyze knn_recheck_geog;\r
-set enable_seqscan = false;\r
-\r
-SELECT '#1g' As t, gid, ST_Distance( 'POINT(-95 -10)'::geography, geog, false)::numeric(12,4) ,\r
-    ('POINT(-95 -10)'::geography <-> geog )::numeric(12,4)\r
-FROM knn_recheck_geog\r
-ORDER BY 'POINT(-95 -10)'::geography <-> geog LIMIT 5;\r
-\r
-SELECT '#2g' As t, gid, ST_Distance( 'LINESTRING(75 10, 75 12, 80 20)'::geography, geog, false)::numeric(12,4),\r
-    ('LINESTRING(75 10, 75 12, 80 20)'::geography <-> geog)::numeric(12,4) As knn_dist\r
-FROM knn_recheck_geog\r
-ORDER BY 'LINESTRING(75 10, 75 12, 80 20)'::geography <-> geog LIMIT 5;\r
-\r
-SELECT '#3g' As t, a.gid,  ARRAY(SELECT  g.gid\r
-                       FROM knn_recheck_geog As g WHERE a.gid <> g.gid ORDER BY ST_Distance(a.geog, g.geog, false) LIMIT 5) = ARRAY(SELECT  gid\r
-                       FROM knn_recheck_geog As g WHERE a.gid <> g.gid ORDER BY a.geog <-> g.geog LIMIT 5) As dist_order_agree\r
-FROM knn_recheck_geog As a \r
-       WHERE a.gid IN(500000,500010,1000)\r
-ORDER BY a.gid;\r
-\r
-DROP TABLE knn_recheck_geog;\r
-\r
---\r
--- Delete inserted spatial data\r
---\r
-DELETE FROM spatial_ref_sys WHERE srid = 4326;\r
-\r
---now the nd operator tests\r
--- create table and load\r
-CREATE TABLE knn_recheck_geom_nd(gid serial primary key, geom geometry);\r
-INSERT INTO knn_recheck_geom_nd(gid,geom)\r
-SELECT ROW_NUMBER() OVER(ORDER BY x,y,z) AS gid, ST_MakePoint(x*0.777,y*0.887,z*1.05) As geom\r
-FROM generate_series(-100,1000, 7) AS x , \r
-    generate_series(-300,1000,9) As y,\r
- generate_series(1005,10000,5555) As z ;\r
-\r
- -- 3d lines\r
-INSERT INTO knn_recheck_geom_nd(gid, geom)\r
-SELECT 500000 + i, ST_Translate('LINESTRING(-100 300 500, 500 700 600, 400 123 0, 500 10000 -1234, 1 1 5000)'::geometry, i*2000,0)\r
-FROM generate_series(0,10) i;\r
-\r
-\r
--- 3d polygons\r
-INSERT INTO knn_recheck_geom_nd(gid, geom)\r
-SELECT 500100 + i, ST_Translate('POLYGON((100 800 5678, 100 700 5678, 400 123 5678, 405 124 5678, 100 800 5678))'::geometry,0,i*2000)\r
-FROM generate_series(0,3) i;\r
-\r
--- polyhedral surface --\r
-INSERT INTO knn_recheck_geom_nd(gid,geom)\r
-SELECT 600000 + row_number() over(), ST_Translate(the_geom,100, 450,1000) As the_geom\r
-               FROM (VALUES ( ST_GeomFromText(\r
-'PolyhedralSurface( \r
-((0 0 0, 0 0 1, 0 1 1, 0 1 0, 0 0 0)),  \r
-((0 0 0, 0 1 0, 1 1 0, 1 0 0, 0 0 0)), ((0 0 0, 1 0 0, 1 0 1, 0 0 1, 0 0 0)),  ((1 1 0, 1 1 1, 1 0 1, 1 0 0, 1 1 0)),  \r
-((0 1 0, 0 1 1, 1 1 1, 1 1 0, 0 1 0)),  ((0 0 1, 1 0 1, 1 1 1, 0 1 1, 0 0 1)) \r
-)') ) ,\r
-( ST_GeomFromText(\r
-'PolyhedralSurface( \r
-((0 0 0, 0 0 1, 0 1 1, 0 1 0, 0 0 0)),  \r
-((0 0 0, 0 1 0, 1 1 0, 1 0 0, 0 0 0)) )') ) )\r
-As foo(the_geom) ;\r
-\r
--- without index order should match st_3ddistance order --\r
--- point check\r
-SELECT '#1nd-3' As t, gid, ST_3DDistance( 'POINT(-305 998.5 1000)'::geometry, geom)::numeric(12,4) As dist3d,\r
-('POINT(-305 998.5 1000)'::geometry <<->> geom)::numeric(12,4) As dist_knn\r
-FROM knn_recheck_geom_nd\r
-ORDER BY 'POINT(-305 998.5 1000)'::geometry <<->> geom LIMIT 5;\r
-\r
--- linestring check \r
-SELECT '#2nd-3' As t, gid, ST_3DDistance( 'MULTILINESTRING((-95 -300 5000, 105 451 1000, 100 323 200),(-50 2000 456, 30 6000 789))'::geometry::geometry, geom)::numeric(12,4),\r
- ('MULTILINESTRING((-95 -300 5000, 105 451 1000, 100 323 200),(-50 2000 456, 30 6000 789))'::geometry <<->> geom)::numeric(12,4) As knn_dist\r
-FROM knn_recheck_geom_nd\r
-ORDER BY 'MULTILINESTRING((-95 -300 5000, 105 451 1000, 100 323 200),(-50 2000 456, 30 6000 789))'::geometry <<->> geom LIMIT 5;\r
-\r
--- lateral test\r
-SELECT '#3nd-3' As t, a.gid, b.gid As match, ST_3DDistance(a.geom, b.geom)::numeric(15,4) As true_rn, b.knn_dist::numeric(15,4)\r
-FROM knn_recheck_geom_nd As a \r
-       LEFT JOIN \r
-               LATERAL ( SELECT  gid, geom, a.geom <<->> g.geom As knn_dist\r
-                       FROM knn_recheck_geom_nd As g WHERE a.gid <> g.gid ORDER BY a.geom <<->> g.geom LIMIT 5) As b ON true\r
-       WHERE a.gid IN(1,600001)\r
-ORDER BY a.gid, true_rn, b.gid;\r
-\r
--- create index and repeat\r
-CREATE INDEX idx_knn_recheck_geom_nd_gist ON knn_recheck_geom_nd USING gist(geom gist_geometry_ops_nd);\r
-vacuum analyze knn_recheck_geom_nd;\r
-set enable_seqscan = false;\r
--- point check\r
-SELECT '#1nd-3' As t, gid, ST_3DDistance( 'POINT(-305 998.5 1000)'::geometry, geom)::numeric(12,4) As dist3d,\r
-('POINT(-305 998.5 1000)'::geometry <<->> geom)::numeric(12,4) As dist_knn\r
-FROM knn_recheck_geom_nd\r
-ORDER BY 'POINT(-305 998.5 1000)'::geometry <<->> geom LIMIT 5;\r
-\r
--- linestring check \r
-SELECT '#2nd-3' As t, gid, ST_3DDistance( 'MULTILINESTRING((-95 -300 5000, 105 451 1000, 100 323 200),(-50 2000 456, 30 6000 789))'::geometry::geometry, geom)::numeric(12,4),\r
- ('MULTILINESTRING((-95 -300 5000, 105 451 1000, 100 323 200),(-50 2000 456, 30 6000 789))'::geometry <<->> geom)::numeric(12,4) As knn_dist\r
-FROM knn_recheck_geom_nd\r
-ORDER BY 'MULTILINESTRING((-95 -300 5000, 105 451 1000, 100 323 200),(-50 2000 456, 30 6000 789))'::geometry <<->> geom LIMIT 5;\r
-\r
--- lateral test\r
-SELECT '#3nd-3' As t, a.gid, b.gid As match, ST_3DDistance(a.geom, b.geom)::numeric(15,4) As true_rn, b.knn_dist::numeric(15,4)\r
-FROM knn_recheck_geom_nd As a \r
-       LEFT JOIN \r
-               LATERAL ( SELECT  gid, geom, a.geom <<->> g.geom As knn_dist\r
-                       FROM knn_recheck_geom_nd As g WHERE a.gid <> g.gid ORDER BY a.geom <<->> g.geom LIMIT 5) As b ON true\r
-       WHERE a.gid IN(1,600001)\r
-ORDER BY a.gid, true_rn, b.gid;\r
-\r
-\r
-DROP TABLE knn_recheck_geom_nd;\r
-\r
--- #3573\r
-SELECT '#3573', 'POINT M (0 0 13)'::geometry <<->> 'LINESTRING M (0 0 5, 0 1 6)'::geometry;\r
-\r
--- #3418\r
-CREATE TABLE test_wo (geo geometry);\r
-INSERT INTO test_wo VALUES \r
-  ('0101000020E61000007D91D0967329E4BF6631B1F9B8D64A40'::geometry), \r
-  ('0101000020E6100000E2AFC91AF510C1BFCDCCCCCCCCAC4A40'::geometry);\r
-CREATE INDEX ON TEST_WO USING GIST (GEO);\r
-analyze test_wo;\r
-SET enable_seqscan = false;\r
-SELECT '#3418' As ticket, '0101000020E610000092054CE0D6DDE5BFCDCCCCCCCCAC4A40'::geometry <-> geo, ST_Distance('0101000020E610000092054CE0D6DDE5BFCDCCCCCCCCAC4A40'::geometry, geo) \r
-FROM test_wo ORDER BY geo <->\r
-('0101000020E610000092054CE0D6DDE5BFCDCCCCCCCCAC4A40'::geometry);\r
-DROP TABLE test_wo;\r
-set enable_seqscan to default;\r
+-- create table
+CREATE TABLE knn_recheck_geom(gid serial primary key, geom geometry);
+INSERT INTO knn_recheck_geom(gid,geom)
+SELECT ROW_NUMBER() OVER(ORDER BY x,y) AS gid, ST_Point(x*0.777,y*0.887) As geom
+FROM generate_series(-100,1000, 7) AS x CROSS JOIN generate_series(-300,1000,9) As y;
+
+INSERT INTO knn_recheck_geom(gid, geom)
+SELECT 500000 + i, ST_Translate('LINESTRING(-100 300, 500 700, 400 123, 500 10000, 1 1)'::geometry, i*2000,0)
+FROM generate_series(0,10) i;
+
+INSERT INTO knn_recheck_geom(gid, geom)
+SELECT 500100 + i, ST_Translate('POLYGON((100 800, 100 700, 400 123, 405 124, 100 800))'::geometry,0,i*2000)
+FROM generate_series(0,3) i;
+
+
+INSERT INTO knn_recheck_geom(gid,geom)
+SELECT 600000 + ROW_NUMBER() OVER(ORDER BY gid) AS gid, ST_Translate(ST_Buffer(geom,8,15 ),100,300) As geom
+FROM knn_recheck_geom
+WHERE gid IN(1000, 10000, 2000,3000);
+
+
+-- without index order should match st_distance order --
+-- point check
+
+SELECT '#1' As t, gid, ST_Distance( 'POINT(-305 998.5)'::geometry, geom)::numeric(10,2)
+FROM knn_recheck_geom
+ORDER BY 'POINT(-305 998.5)'::geometry <-> geom LIMIT 5;
+
+-- linestring check
+SELECT '#2' As t, gid, ST_Distance( 'MULTILINESTRING((-95 -300, 100 200, 100 323),(-50 2000, 30 6000))'::geometry, geom)::numeric(12,4)
+FROM knn_recheck_geom
+ORDER BY 'MULTILINESTRING((-95 -300, 100 200, 100 323),(-50 2000, 30 6000))'::geometry <-> geom LIMIT 5;
+
+-- lateral check before index
+SELECT '#3' As t, a.gid, b.gid As match, ST_Distance(a.geom, b.geom)::numeric(15,4) As true_rn, b.knn_dist::numeric(15,4)
+FROM knn_recheck_geom As a
+       LEFT JOIN
+               LATERAL ( SELECT  gid, geom, a.geom <-> g.geom As knn_dist
+                       FROM knn_recheck_geom As g WHERE a.gid <> g.gid ORDER BY a.geom <-> g.geom LIMIT 5) As b ON true
+       WHERE a.gid IN(1,500101)
+ORDER BY a.gid, true_rn, b.gid;
+
+-- create index and repeat
+CREATE INDEX idx_knn_recheck_geom_gist ON knn_recheck_geom USING gist(geom);
+vacuum analyze knn_recheck_geom;
+
+set enable_seqscan = false;
+SELECT '#1' As t, gid, ST_Distance( 'POINT(-305 998.5)'::geometry, geom)::numeric(10,2)
+FROM knn_recheck_geom
+ORDER BY 'POINT(-305 998.5)'::geometry <-> geom LIMIT 5;
+
+-- linestring check
+SELECT '#2' As t, gid, ST_Distance( 'MULTILINESTRING((-95 -300, 100 200, 100 323),(-50 2000, 30 6000))'::geometry, geom)::numeric(12,4)
+FROM knn_recheck_geom
+ORDER BY 'MULTILINESTRING((-95 -300, 100 200, 100 323),(-50 2000, 30 6000))'::geometry <-> geom LIMIT 5;
+
+-- lateral check before index
+SELECT '#3' As t, a.gid, b.gid As match, ST_Distance(a.geom, b.geom)::numeric(15,4) As true_rn, b.knn_dist::numeric(15,4)
+FROM knn_recheck_geom As a
+       LEFT JOIN
+               LATERAL ( SELECT  gid, geom, a.geom <-> g.geom As knn_dist
+                       FROM knn_recheck_geom As g WHERE a.gid <> g.gid ORDER BY a.geom <-> g.geom LIMIT 5) As b ON true
+       WHERE a.gid IN(1,500101)
+ORDER BY a.gid, true_rn, b.gid;
+
+DROP TABLE knn_recheck_geom;
+
+-- geography tests
+DELETE FROM spatial_ref_sys where srid = 4326;
+INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","proj4text")
+    VALUES (4326,'EPSG',4326,'+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs ');
+-- create table
+CREATE TABLE knn_recheck_geog(gid serial primary key, geog geography);
+INSERT INTO knn_recheck_geog(gid,geog)
+SELECT ROW_NUMBER() OVER(ORDER BY x,y) AS gid, ST_Point(x*1.11,y*0.95)::geography As geog
+FROM generate_series(-100,100, 1) AS x CROSS JOIN generate_series(-90,90,1) As y;
+
+INSERT INTO knn_recheck_geog(gid, geog)
+SELECT 500000, 'LINESTRING(-95 -10, -93 -10.5, -90 -10.6, -95 -10.5, -95 -10)'::geography;
+
+INSERT INTO knn_recheck_geog(gid, geog)
+SELECT 500001, 'POLYGON((-95 10, -95.6 10.5, -95.9 10.75, -95 10))'::geography;
+
+INSERT INTO knn_recheck_geog(gid,geog)
+SELECT 600000 + ROW_NUMBER() OVER(ORDER BY gid) AS gid, ST_Buffer(geog,1000) As geog
+FROM knn_recheck_geog
+WHERE gid IN(1000, 10000, 2000, 2614, 40000);
+
+
+SELECT '#1g' As t, gid, ST_Distance( 'POINT(-95 -10)'::geography, geog, false)::numeric(12,4) ,
+    ('POINT(-95 -10)'::geography <-> geog )::numeric(12,4)
+FROM knn_recheck_geog
+ORDER BY 'POINT(-95 -10)'::geography <-> geog LIMIT 5;
+
+SELECT '#2g' As t, gid, ST_Distance( 'LINESTRING(75 10, 75 12, 80 20)'::geography, geog, false)::numeric(12,4),
+    ('LINESTRING(75 10, 75 12, 80 20)'::geography <-> geog)::numeric(12,4) As knn_dist
+FROM knn_recheck_geog
+ORDER BY 'LINESTRING(75 10, 75 12, 80 20)'::geography <-> geog LIMIT 5;
+
+-- lateral check before index
+SELECT '#3g' As t, a.gid,  ARRAY(SELECT  gid
+                       FROM knn_recheck_geog As g WHERE a.gid <> g.gid ORDER BY ST_Distance(a.geog, g.geog, false) LIMIT 5) = ARRAY(SELECT  gid
+                       FROM knn_recheck_geog As g WHERE a.gid <> g.gid ORDER BY a.geog <-> g.geog LIMIT 5) As dist_order_agree
+FROM knn_recheck_geog As a
+       WHERE a.gid IN(500000,500010,1000)
+ORDER BY a.gid;
+
+
+-- create index and repeat
+CREATE INDEX idx_knn_recheck_geog_gist ON knn_recheck_geog USING gist(geog);
+vacuum analyze knn_recheck_geog;
+set enable_seqscan = false;
+
+SELECT '#1g' As t, gid, ST_Distance( 'POINT(-95 -10)'::geography, geog, false)::numeric(12,4) ,
+    ('POINT(-95 -10)'::geography <-> geog )::numeric(12,4)
+FROM knn_recheck_geog
+ORDER BY 'POINT(-95 -10)'::geography <-> geog LIMIT 5;
+
+SELECT '#2g' As t, gid, ST_Distance( 'LINESTRING(75 10, 75 12, 80 20)'::geography, geog, false)::numeric(12,4),
+    ('LINESTRING(75 10, 75 12, 80 20)'::geography <-> geog)::numeric(12,4) As knn_dist
+FROM knn_recheck_geog
+ORDER BY 'LINESTRING(75 10, 75 12, 80 20)'::geography <-> geog LIMIT 5;
+
+SELECT '#3g' As t, a.gid,  ARRAY(SELECT  g.gid
+                       FROM knn_recheck_geog As g WHERE a.gid <> g.gid ORDER BY ST_Distance(a.geog, g.geog, false) LIMIT 5) = ARRAY(SELECT  gid
+                       FROM knn_recheck_geog As g WHERE a.gid <> g.gid ORDER BY a.geog <-> g.geog LIMIT 5) As dist_order_agree
+FROM knn_recheck_geog As a
+       WHERE a.gid IN(500000,500010,1000)
+ORDER BY a.gid;
+
+DROP TABLE knn_recheck_geog;
+
+--
+-- Delete inserted spatial data
+--
+DELETE FROM spatial_ref_sys WHERE srid = 4326;
+
+--now the nd operator tests
+-- create table and load
+CREATE TABLE knn_recheck_geom_nd(gid serial primary key, geom geometry);
+INSERT INTO knn_recheck_geom_nd(gid,geom)
+SELECT ROW_NUMBER() OVER(ORDER BY x,y,z) AS gid, ST_MakePoint(x*0.777,y*0.887,z*1.05) As geom
+FROM generate_series(-100,1000, 7) AS x ,
+    generate_series(-300,1000,9) As y,
+ generate_series(1005,10000,5555) As z ;
+
+ -- 3d lines
+INSERT INTO knn_recheck_geom_nd(gid, geom)
+SELECT 500000 + i, ST_Translate('LINESTRING(-100 300 500, 500 700 600, 400 123 0, 500 10000 -1234, 1 1 5000)'::geometry, i*2000,0)
+FROM generate_series(0,10) i;
+
+
+-- 3d polygons
+INSERT INTO knn_recheck_geom_nd(gid, geom)
+SELECT 500100 + i, ST_Translate('POLYGON((100 800 5678, 100 700 5678, 400 123 5678, 405 124 5678, 100 800 5678))'::geometry,0,i*2000)
+FROM generate_series(0,3) i;
+
+-- polyhedral surface --
+INSERT INTO knn_recheck_geom_nd(gid,geom)
+SELECT 600000 + row_number() over(), ST_Translate(the_geom,100, 450,1000) As the_geom
+               FROM (VALUES ( ST_GeomFromText(
+'PolyhedralSurface(
+((0 0 0, 0 0 1, 0 1 1, 0 1 0, 0 0 0)),
+((0 0 0, 0 1 0, 1 1 0, 1 0 0, 0 0 0)), ((0 0 0, 1 0 0, 1 0 1, 0 0 1, 0 0 0)),  ((1 1 0, 1 1 1, 1 0 1, 1 0 0, 1 1 0)),
+((0 1 0, 0 1 1, 1 1 1, 1 1 0, 0 1 0)),  ((0 0 1, 1 0 1, 1 1 1, 0 1 1, 0 0 1))
+)') ) ,
+( ST_GeomFromText(
+'PolyhedralSurface(
+((0 0 0, 0 0 1, 0 1 1, 0 1 0, 0 0 0)),
+((0 0 0, 0 1 0, 1 1 0, 1 0 0, 0 0 0)) )') ) )
+As foo(the_geom) ;
+
+-- without index order should match st_3ddistance order --
+-- point check
+SELECT '#1nd-3' As t, gid, ST_3DDistance( 'POINT(-305 998.5 1000)'::geometry, geom)::numeric(12,4) As dist3d,
+('POINT(-305 998.5 1000)'::geometry <<->> geom)::numeric(12,4) As dist_knn
+FROM knn_recheck_geom_nd
+ORDER BY 'POINT(-305 998.5 1000)'::geometry <<->> geom LIMIT 5;
+
+-- linestring check
+SELECT '#2nd-3' As t, gid, ST_3DDistance( 'MULTILINESTRING((-95 -300 5000, 105 451 1000, 100 323 200),(-50 2000 456, 30 6000 789))'::geometry::geometry, geom)::numeric(12,4),
+ ('MULTILINESTRING((-95 -300 5000, 105 451 1000, 100 323 200),(-50 2000 456, 30 6000 789))'::geometry <<->> geom)::numeric(12,4) As knn_dist
+FROM knn_recheck_geom_nd
+ORDER BY 'MULTILINESTRING((-95 -300 5000, 105 451 1000, 100 323 200),(-50 2000 456, 30 6000 789))'::geometry <<->> geom LIMIT 5;
+
+-- lateral test
+SELECT '#3nd-3' As t, a.gid, b.gid As match, ST_3DDistance(a.geom, b.geom)::numeric(15,4) As true_rn, b.knn_dist::numeric(15,4)
+FROM knn_recheck_geom_nd As a
+       LEFT JOIN
+               LATERAL ( SELECT  gid, geom, a.geom <<->> g.geom As knn_dist
+                       FROM knn_recheck_geom_nd As g WHERE a.gid <> g.gid ORDER BY a.geom <<->> g.geom LIMIT 5) As b ON true
+       WHERE a.gid IN(1,600001)
+ORDER BY a.gid, true_rn, b.gid;
+
+-- create index and repeat
+CREATE INDEX idx_knn_recheck_geom_nd_gist ON knn_recheck_geom_nd USING gist(geom gist_geometry_ops_nd);
+vacuum analyze knn_recheck_geom_nd;
+set enable_seqscan = false;
+-- point check
+SELECT '#1nd-3' As t, gid, ST_3DDistance( 'POINT(-305 998.5 1000)'::geometry, geom)::numeric(12,4) As dist3d,
+('POINT(-305 998.5 1000)'::geometry <<->> geom)::numeric(12,4) As dist_knn
+FROM knn_recheck_geom_nd
+ORDER BY 'POINT(-305 998.5 1000)'::geometry <<->> geom LIMIT 5;
+
+-- linestring check
+SELECT '#2nd-3' As t, gid, ST_3DDistance( 'MULTILINESTRING((-95 -300 5000, 105 451 1000, 100 323 200),(-50 2000 456, 30 6000 789))'::geometry::geometry, geom)::numeric(12,4),
+ ('MULTILINESTRING((-95 -300 5000, 105 451 1000, 100 323 200),(-50 2000 456, 30 6000 789))'::geometry <<->> geom)::numeric(12,4) As knn_dist
+FROM knn_recheck_geom_nd
+ORDER BY 'MULTILINESTRING((-95 -300 5000, 105 451 1000, 100 323 200),(-50 2000 456, 30 6000 789))'::geometry <<->> geom LIMIT 5;
+
+-- lateral test
+SELECT '#3nd-3' As t, a.gid, b.gid As match, ST_3DDistance(a.geom, b.geom)::numeric(15,4) As true_rn, b.knn_dist::numeric(15,4)
+FROM knn_recheck_geom_nd As a
+       LEFT JOIN
+               LATERAL ( SELECT  gid, geom, a.geom <<->> g.geom As knn_dist
+                       FROM knn_recheck_geom_nd As g WHERE a.gid <> g.gid ORDER BY a.geom <<->> g.geom LIMIT 5) As b ON true
+       WHERE a.gid IN(1,600001)
+ORDER BY a.gid, true_rn, b.gid;
+
+
+DROP TABLE knn_recheck_geom_nd;
+
+-- #3573
+SELECT '#3573', 'POINT M (0 0 13)'::geometry <<->> 'LINESTRING M (0 0 5, 0 1 6)'::geometry;
+
+-- #3418
+CREATE TABLE test_wo (geo geometry);
+INSERT INTO test_wo VALUES
+  ('0101000020E61000007D91D0967329E4BF6631B1F9B8D64A40'::geometry),
+  ('0101000020E6100000E2AFC91AF510C1BFCDCCCCCCCCAC4A40'::geometry);
+CREATE INDEX ON TEST_WO USING GIST (GEO);
+analyze test_wo;
+SET enable_seqscan = false;
+SELECT '#3418' As ticket, '0101000020E610000092054CE0D6DDE5BFCDCCCCCCCCAC4A40'::geometry <-> geo, ST_Distance('0101000020E610000092054CE0D6DDE5BFCDCCCCCCCCAC4A40'::geometry, geo)
+FROM test_wo ORDER BY geo <->
+('0101000020E610000092054CE0D6DDE5BFCDCCCCCCCCAC4A40'::geometry);
+DROP TABLE test_wo;
+set enable_seqscan to default;
index 3fa37eeb87a255535cf6515d8fb0c0a53b867d82..20c08f6872d80c73b751744ec6a65c8e19a9114c 100644 (file)
@@ -9,4 +9,3 @@ INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4tex
 ---
 INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2260,'EPSG',2260,'PROJCS["NAD83 / New York East (ftUS)",GEOGCS["NAD83",DATUM["North_American_Datum_1983",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6269"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4269"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",38.83333333333334],PARAMETER["central_meridian",-74.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",492125],PARAMETER["false_northing",0],AUTHORITY["EPSG","2260"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.9999 +x_0=150000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs ');
 
-
index 41413b28d461c823dedb34c6ce9f0caf535dc430..dfe50eab6868897b5d0997fb8516fc8ec3efccda 100644 (file)
@@ -7,4 +7,3 @@ INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4tex
 ---
 INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (2260,'EPSG',2260,'PROJCS["NAD83 / New York East (ftUS)",GEOGCS["NAD83",DATUM["North_American_Datum_1983",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6269"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4269"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",38.83333333333334],PARAMETER["central_meridian",-74.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",492125],PARAMETER["false_northing",0],AUTHORITY["EPSG","2260"],AXIS["X",EAST],AXIS["Y",NORTH]]','+proj=tmerc +lat_0=38.83333333333334 +lon_0=-74.5 +k=0.9999 +x_0=150000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft +no_defs ');
 
-
index 7ef0341539c62a652b06fcc1c3bd255f90f0f4bb..ae20025f6b817bc345a955a994054431abacdc00 100644 (file)
@@ -1 +1 @@
-select address, short_name, color from loadedshp order by 1;\r
+select address, short_name, color from loadedshp order by 1;
index 17edd4e181d7651c411e81104ebc6dd3b447956d..19e16e74953f5bfc1b3026c3d37c30fb7df7e500 100644 (file)
@@ -40,7 +40,6 @@ BEGIN;
        UPDATE test_locks SET state = 'authorized' where id = 2;
 END;
 
-
 BEGIN;
 
        -- Add authorization for row 2
index 86ab456df3168c59410ff4a65bf8245a01cb6483..6f8a67c90591595c0705d0b697177228432b73e2 100644 (file)
@@ -88,7 +88,6 @@ SELECT id,wkt FROM test_data WHERE
        ST_asBinary(geometry(wkb_ndr)) != ST_asBinary(geometry(wkb_xdr)) OR
        ST_asBinary(geometry(wkt)) != ST_asBinary(geometry(wkb_xdr));
 
-
 SELECT ST_extent(geometry(wkb_ndr)) from test_data;
 SELECT ST_3DExtent(geometry(wkb_ndr)) from test_data WHERE ST_NDims(wkb_ndr) > 2;
 SELECT ST_MemSize(ST_collect(ST_Force2d(geometry(wkb_ndr)))) from test_data;
@@ -99,7 +98,6 @@ SELECT ST_MemSize(ST_collect(ST_Force2d(ST_force4d(ST_force3dm(ST_force3dz(ST_fo
 
 DROP TABLE test_data;
 
-
 SELECT '#3069', ST_Summary(PostGIS_Noop('SRID=4326;POINT(1 1)'::geometry));
 SELECT '#3069', ST_Summary(PostGIS_Noop('SRID=4326;LINESTRING(1 1,0 0)'::geometry));
 SELECT '#3069', replace(ST_Summary(PostGIS_Noop('SRID=4326;MULTIPOINT(1 1)'::geometry)),E'\n',' ');
@@ -133,7 +131,6 @@ SELECT 'BoundingDiagonal6', ST_AsEwkt(ST_BoundingDiagonal(
     'SRID=3857;POLYGON M EMPTY'::geometry
 ));
 
-
 --- ST_Azimuth
 SELECT 'ST_Azimuth_regular' , round(ST_Azimuth(geom1,geom2)::numeric,4)
 FROM CAST('POINT(0 1)' AS geometry) AS geom1, CAST('POINT(1 0)' AS geometry) AS geom2 ;
@@ -204,7 +201,6 @@ group by cid
 order by count(*)
 limit 1;
 
-
 -- typmod checks
 select 'typmod_point_4326', geometry_typmod_out(geometry_typmod_in('{Point,4326}'));
 select 'typmod_point_0', geometry_typmod_out(geometry_typmod_in('{Point,0}'));
index f5fc301408eb9c0c29249f72a897b81b395ca11c..a093cb421ed21011734d0845a3a26a809355f5b2 100644 (file)
@@ -5,7 +5,6 @@ select '114', ST_perimeter2d('MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0
 
 select '115', ST_3DPerimeter('MULTIPOLYGON( ((0 0 0, 10 0 0, 10 10 0, 0 10 0, 0 0 0)),( (0 0 0, 10 0 0, 10 10 0, 0 10 0, 0 0 0),(5 5 0, 7 5 0, 7 7  0, 5 7 0, 5 5 0) ) ,( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1, 5 7 1, 5 5 1),(1 1 1,2 1 1, 2 2 1, 1 2 1, 1 1 1) ) )'::GEOMETRY) as value;
 
-
 select '116', ST_length2d('MULTILINESTRING((0 0, 1 1),(0 0, 1 1, 2 2) )'::GEOMETRY) as value;
 select '117', ST_3dlength('MULTILINESTRING((0 0, 1 1),(0 0, 1 1, 2 2) )'::GEOMETRY) as value;
 select '118', ST_3dlength('MULTILINESTRING((0 0 0, 1 1 1),(0 0 0, 1 1 1, 2 2 2) )'::GEOMETRY) as value;
@@ -15,7 +14,6 @@ select '135', ST_Distance('POINT(5 0)', 'POINT(10 12)');
 
 select '136', ST_Distance('POINT(0 0)', ST_translate('POINT(0 0)', 5, 12, 0));
 
-
 -- postgis-users/2006-May/012174.html
 select 'dist', ST_Distance(a,b), ST_Distance(b,a) from (
        select 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))'::geometry as a,
@@ -41,7 +39,6 @@ select 'st_shortestline_dist', st_astext(st_shortestline(a,b)), st_astext(st_sho
                        (15 5, 15 8, 17 8, 17 5, 15 5))'::geometry as b
        ) as foo;
 
-
 --st_maxdistance
 
 select 'st_maxdistance_134', st_maxdistance('POINT(1 2)', 'POINT(1 2)');
@@ -56,8 +53,6 @@ select 'st_maxdistance_dist', st_maxdistance(a,b), st_maxdistance(b,a) from (
                        (15 5, 15 8, 17 8, 17 5, 15 5))'::geometry as b
        ) as foo;
 
-
-
 --st_longestline
 
 select 'st_longestline_134', st_astext(st_longestline('POINT(1 2)', 'POINT(1 2)'));
@@ -72,7 +67,7 @@ select 'st_longestline_dist', st_astext(st_longestline(a,b)), st_astext(st_longe
                        (15 5, 15 8, 17 8, 17 5, 15 5))'::geometry as b
        ) as foo;
 
-select 'distancetest1',                
+select 'distancetest1',
        ST_Distance(a, b),
        st_maxdistance(a, b),
        st_astext(st_shortestline(a,b)),
@@ -90,7 +85,7 @@ select  'distancetest2',
        round(st_x(st_startpoint(st_shortestline(a,b)))::numeric, 10),
        round(st_y(st_startpoint(st_shortestline(a,b)))::numeric, 10),
        round(st_x(st_endpoint(st_shortestline(a,b)))::numeric, 10),
-       round(st_y(st_endpoint(st_shortestline(a,b)))::numeric, 10),    
+       round(st_y(st_endpoint(st_shortestline(a,b)))::numeric, 10),
        st_astext(st_longestline(a,b)),
        st_astext(st_longestline(b,a)) from (
 select
@@ -98,7 +93,7 @@ select
        ST_GeomFromText('LINESTRING(-10 20, 1 -2)') as b
 ) as foo;
 
-select 'distancepoly1',                
+select 'distancepoly1',
        ST_Distance(a, b),
        st_maxdistance(a, b),
        st_astext(st_shortestline(a,b)),
@@ -110,7 +105,7 @@ select
        ST_GeomFromText('MULTIPOLYGON(((-1 -1, -1 25, 25 25, 25 -1, -1 -1), (14 14,14 19,19 19,19 14,14 14)),((33 35,33 40, 35 40, 35 35, 33 35)))') as b
 ) as foo;
 
-select 'distancepoly2',                
+select 'distancepoly2',
                ST_Distance(a, b),
                        st_maxdistance(a, b),
                                st_astext(st_shortestline(a,b)),
@@ -121,9 +116,7 @@ select 'distancepoly2',
                        ST_GeomFromText('POLYGON((-1 -1, -1 25, 25 25, 25 -1, -1 -1), (14 14,14 19,19 19,19 14,14 14))') as b
        ) as foo;
 
-
-
-select 'distancepoly3',                
+select 'distancepoly3',
                ST_Distance(a, b),
                        st_maxdistance(a, b),
                                st_astext(st_shortestline(a,b)),
@@ -134,8 +127,7 @@ select 'distancepoly3',
                        ST_GeomFromText('POLYGON((-1 -1, -1 25, 25 25, 25 -1, -1 -1), (14 14,14 19,19 19,19 14,14 14))') as b
        ) as foo;
 
-
-select 'distancepoly4',                
+select 'distancepoly4',
                ST_Distance(a, b),
                        st_maxdistance(a, b),
                                st_astext(st_shortestline(a,b)),
@@ -146,9 +138,7 @@ select 'distancepoly4',
                        ST_GeomFromText('POLYGON((-1 -1, -1 25, 25 25, 25 -1, -1 -1), (14 14,14 19,19 19,19 14,14 14))') as b
        ) as foo;
 
-
-
-select 'distancepoly5',                
+select 'distancepoly5',
                ST_Distance(a, b),
                        st_maxdistance(a, b),
                                st_astext(st_shortestline(a,b)),
@@ -159,10 +149,7 @@ select 'distancepoly5',
                        ST_GeomFromText('POLYGON((-1 -1, -1 25, 25 25, 25 -1, -1 -1), (14 14,14 19,19 19,19 14,14 14))') as b
        ) as foo;
 
-
-
-
-select 'distancepoly6',                
+select 'distancepoly6',
                ST_Distance(a, b),
                        st_maxdistance(a, b),
                                st_astext(st_shortestline(a,b)),
@@ -175,7 +162,6 @@ select 'distancepoly6',
 
 --3D Distance functions
 
-
 SELECT '3dDistancetest1',
        ST_3DDistance(a,b),
                ST_3DMaxDistance(a,b),
@@ -186,8 +172,7 @@ SELECT '3dDistancetest1',
                                                        ST_ASEWKT(ST_3DLongestline(a,b)) FROM (
        SELECT 'POINT(1 1 1)'::geometry as a, 'POINT(3 2 7)'::geometry as b
        ) as foo;
-       
-       
+
 SELECT '3dDistancetest2',
        ST_3DDistance(a,b),
                ST_3DMaxDistance(a,b),
@@ -198,8 +183,7 @@ SELECT '3dDistancetest2',
                                                        ST_ASEWKT(ST_3DLongestline(a,b)) FROM (
        SELECT 'POINT(1 1 1)'::geometry as a, 'LINESTRING(0 0 0, 2 2 2)'::geometry as b
        ) as foo;
-       
-       
+
 SELECT '3dDistancetest3',
        ST_3DDistance(a,b),
                ST_3DMaxDistance(a,b),
@@ -210,8 +194,7 @@ SELECT '3dDistancetest3',
                                                        ST_ASEWKT(ST_3DLongestline(a,b)) FROM (
        SELECT 'POINT(1 1 1)'::geometry as a, 'LINESTRING(5 2 6, -3 -2 4)'::geometry as b
        ) as foo;
-       
-       
+
 SELECT '3dDistancetest4',
        ST_3DDistance(a,b),
                ST_3DMaxDistance(a,b),
@@ -222,7 +205,7 @@ SELECT '3dDistancetest4',
                                                        ST_ASEWKT(ST_3DLongestline(a,b)) FROM (
        SELECT  'LINESTRING(1 1 3, 5 7 8)'::geometry  as a, 'POINT(1 1 1)'::geometry as b
        ) as foo;
-       
+
        SELECT '3dDistancetest5',
        ST_3DDistance(a,b),
                ST_3DMaxDistance(a,b),
@@ -236,8 +219,7 @@ SELECT '3dDistancetest4',
 
 SELECT '3dDistancetest6',
        ST_3DDistance(a,b) FROM (
-       SELECT 'LINESTRING(1 1 1 , 2 2 2)'::geometry as a, 'POLYGON((0 0 0, 2 2 2, 3 3 3, 0 0 0))'::geometry as b) as foo;      
-
+       SELECT 'LINESTRING(1 1 1 , 2 2 2)'::geometry as a, 'POLYGON((0 0 0, 2 2 2, 3 3 3, 0 0 0))'::geometry as b) as foo;
 
 -- 3D mixed dimmentionality #2034
 --closestpoint with 2d as first point and 3d as second
@@ -261,7 +243,6 @@ select st_3ddistance('linestring(0 0 1,1 1 2,2 0 3)'::geometry, 'linestring(0 2,
 select ST_AsText(ST_3DClosestPoint('POINT(0 0 0)', 'POINT(0 0)'));
 select ST_AsText(ST_3DShortestLine('LINESTRING(2 1, 3 0)', 'LINESTRING(0 0 2, 3 3 -4)'));
 
-
 -- Area of an empty polygon
 select 'emptyPolyArea', st_area('POLYGON EMPTY');
 
index 12aa2adf37af9f10ade69a1b60a38b2c7b6631ea..b1745ffaa186ea62fdf0327397f0432a397a65e6 100644 (file)
@@ -129,7 +129,6 @@ FROM (
        )) AS geom
 ) AS q;
 
-
 -- default values tests
 SELECT 'D1', encode(ST_AsMVT(q, 'test', 4096, 'geom'), 'base64') FROM (SELECT 1 AS c1, 'abcd'::text AS c2,
     ST_Normalize(ST_AsMVTGeom(ST_GeomFromText('POINT(25 17)'),
index 1d92bcb09644b1329321ed5e9fd3123fed898b2a..206fd88dd9a4af1b9834ecf17e51d2660640eb3e 100644 (file)
@@ -141,8 +141,8 @@ SELECT 'ndovm2', array_agg(i) FROM v WHERE g &&& 'POINTZ(0 0 1)'::geometry
 ORDER BY 1;
 
 -- GROUP BY on empty
-SELECT '#3777', ST_AsText(geom), count(*) 
-FROM (VALUES 
+SELECT '#3777', ST_AsText(geom), count(*)
+FROM (VALUES
     ('POINT(0 0)'::geometry),
     ('POINT(0 0)'::geometry),
     ('POINT(0 0)'::geometry),
@@ -153,7 +153,7 @@ FROM (VALUES
 ) AS f(geom)
 GROUP BY geom ORDER BY 2;
 
-SELECT '#3777.1', ST_AsText(geom), count(*) 
+SELECT '#3777.1', ST_AsText(geom), count(*)
 FROM (VALUES
     ('POINT(0 0)'::geometry),
     ('POINT(0 0)'::geometry),
index 92e7b6f8ddcd45f51934f274c614805de1d4e0a0..1ee927fd5df44c38ea9ec14dcdfdf7057a401827 100644 (file)
@@ -62,4 +62,3 @@ SELECT '416', ST_IsPolygonCCW('MULTIPOLYGON (((0 0, 1 1, 1 0, 0 0)), ((100 0, 10
 SELECT '417', ST_IsPolygonCW( 'MULTIPOLYGON (((0 0, 1 0, 1 1, 0 0)), ((100 0, 101 1, 101 0, 100 0)))');
 SELECT '418', ST_IsPolygonCCW('MULTIPOLYGON (((0 0, 1 0, 1 1, 0 0)), ((100 0, 101 1, 101 0, 100 0)))');
 
-
index 1c0688389994b637f99cd881c2ea922df6c325bf..c4e2390a91a81688c318660abf5781d89d18d04a 100644 (file)
@@ -6,7 +6,6 @@ INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","proj4text") VALUE
 
 INSERT INTO "spatial_ref_sys" ("srid", "proj4text") VALUES (102189, '+proj=tmerc +lat_0=4.599047222222222 +lon_0=-74.08091666666667 +k=1.000000 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs84=307,304,-318,0,0,0,0 +units=m +no_defs ');
 
-
 --
 -- GML
 --
@@ -47,7 +46,6 @@ SELECT 'gml_prefix_02', ST_AsGML(3, geography(ST_GeomFromEWKT('SRID=4326;POINT(1
 SELECT 'gml_prefix_03', ST_AsGML(2, geography(ST_GeomFromEWKT('SRID=4326;POINT(1 2)')), 0, 0, 'foo');
 SELECT 'gml_prefix_04', ST_AsGML(3, geography(ST_GeomFromEWKT('SRID=4326;POINT(1 2)')), 0, 0, 'foo');
 
-
 --
 -- KML
 --
@@ -76,7 +74,6 @@ SELECT 'kml_prefix_02', ST_AsKML(2, geography(ST_GeomFromEWKT('SRID=4326;POINT(1
 -- National Astronomical Observatory of Colombia - Bogota, Colombia (Placemark)
 SELECT 'kml_projection_01', ST_AsKML(geography(ST_GeomFromEWKT('SRID=102189;POINT(1000000 1000000)')), 3);
 
-
 --
 -- SVG
 --
@@ -94,7 +91,6 @@ SELECT 'svg_option_04', ST_AsSVG(geography(ST_GeomFromEWKT('LINESTRING(1 1, 4 4,
 SELECT 'svg_precision_01', ST_AsSVG(geography(ST_GeomFromEWKT('POINT(1.1111111 1.1111111)')), 1, -2);
 SELECT 'svg_precision_02', ST_AsSVG(geography(ST_GeomFromEWKT('POINT(1.1111111 1.1111111)')), 1, 19);
 
-
 --
 -- GeoJSON
 --
@@ -143,7 +139,6 @@ SELECT 'geojson_options_14', ST_AsGeoJSON(geography(ST_GeomFromEWKT('SRID=4326;L
 SELECT 'geojson_options_15', ST_AsGeoJSON(geography(ST_GeomFromEWKT('LINESTRING(1 1, 2 2, 3 3, 4 4)')), 0, 7);
 SELECT 'geojson_options_16', ST_AsGeoJSON(geography(ST_GeomFromEWKT('SRID=4326;LINESTRING(1 1, 2 2, 3 3, 4 4)')), 0, 7);
 
-
 --
 -- Delete inserted spatial data
 --
index 20778ba477f67901a555e72f01e804f0c41890b8..ca7a0ba82a51ed9bc6c7e3b164d0cf7d888934c5 100644 (file)
@@ -7,7 +7,6 @@ INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","proj4text") VALUE
 --- EPSG 1021892 : Bogota 1975 / Colombia Bogota zone (deprecated)
 INSERT INTO "spatial_ref_sys" ("srid", "proj4text") VALUES (102189, '+proj=tmerc +lat_0=4.599047222222222 +lon_0=-74.08091666666667 +k=1.000000 +x_0=1000000 +y_0=1000000 +ellps=intl +towgs84=307,304,-318,0,0,0,0 +units=m +no_defs ');
 
-
 --
 -- GML
 --
@@ -114,7 +113,6 @@ SELECT 'svg_option_04', ST_AsSVG(ST_GeomFromEWKT('LINESTRING(1 1, 4 4, 5 7)'), 1
 SELECT 'svg_precision_01', ST_AsSVG(ST_GeomFromEWKT('POINT(1.1111111 1.1111111)'), 1, -2);
 SELECT 'svg_precision_02', ST_AsSVG(ST_GeomFromEWKT('POINT(1.1111111 1.1111111)'), 1, 19);
 
-
 --
 -- GeoJSON
 --
index 2a9cf60950318c26a18689c423c13bf68ba33b9d..7c05b311877df4b811d4ce75aa3cf235b8b0cea1 100644 (file)
@@ -16,7 +16,6 @@ SELECT 'dimension_07', ST_Dimension('POLYHEDRALSURFACE(((0 0 0,0 0 1,0 1 0,0 0 0
 -- ST_Dimension on 3D: invalid polyedron (redundant point inside each face)
 SELECT 'dimension_08', ST_Dimension('POLYHEDRALSURFACE(((0 0 0,1 0 0,1 0 0,0 0 0)),((0 0 1,1 0 1,1 0 1,0 0 1)),((0 0 2,1 0 2,1 0 2,0 0 2)),((0 0 3,1 0 3,1 0 3,0 0 3)))'::geometry);
 
-
 -- ST_NumPatches
 SELECT 'numpatches_01', ST_NumPatches('POLYHEDRALSURFACE EMPTY'::geometry);
 SELECT 'numpatches_02', ST_NumPatches('POLYHEDRALSURFACE(((0 0,0 0,0 1,0 0)))'::geometry);
index 402e216b404b481c41f06cd091752808ed6b85d4..b7f9e1ab18b6e9c829efc0347353efac0c710959 100644 (file)
@@ -1,12 +1,8 @@
 -- postgres
 --- regression test for postGIS
 
-
-
 --- assume datatypes already defined
 
-
-
 --- basic datatypes (correct)
 
 select '1',ST_asewkt('POINT( 1 2 )'::GEOMETRY) as geom;
@@ -51,7 +47,6 @@ select '33',ST_asewkt('MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)) )'::GEOMETR
 select '34',ST_asewkt('MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) ) )'::GEOMETRY) as geom;
 select '35',ST_asewkt('MULTIPOLYGON( ((0 0 0, 10 0 0, 10 10 0, 0 10 0, 0 0 0)),( (0 0 0, 10 0 0, 10 10 0, 0 10 0, 0 0 0),(5 5 0, 7 5 0, 7 7 0, 5 7 0, 5 5 0) ) ,( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1, 5 7 1, 5 5 1),(1 1 1,2 1 1, 2 2 1, 1 2 1, 1 1 1) ) )'::GEOMETRY) as geom;
 
-
 select '36',ST_asewkt('GEOMETRYCOLLECTION(MULTIPOINT( 1 2))'::GEOMETRY);
 select '37',ST_asewkt('GEOMETRYCOLLECTION(MULTIPOINT( 1 2 3))'::GEOMETRY);
 select '38',ST_asewkt('GEOMETRYCOLLECTION(MULTIPOINT( 1 2 3, 5 6 7, 8 9 10, 11 12 13))'::GEOMETRY);
@@ -80,7 +75,6 @@ select '56', ST_asewkt('POLYGON( (0 0, 10 0, 10 10, 0 10) )'::GEOMETRY);
 select '57', ST_asewkt('POLYGON( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7) )'::GEOMETRY);
 select '58', ST_asewkt('MULTILINESTRING((0 0, 1 1),(0 0, 1 1, 2 2,) )'::GEOMETRY);
 
-
 --- funny results
 
 select '59',ST_asewkt('POINT(1 2 3, 4 5 6)'::GEOMETRY);
@@ -92,7 +86,6 @@ select '63',regexp_replace(ST_asewkt('POINT( -1e700 0)'::GEOMETRY), E'(Infinity|
 --select '63',ST_asewkt('POINT( -1e700 0)'::GEOMETRY);
 select '64',ST_asewkt('MULTIPOINT(1 1, 2 2'::GEOMETRY);
 
-
 --- is_same() testing
 
 select '65','POINT(1 1)'::GEOMETRY ~= 'POINT(1 1)'::GEOMETRY as bool;
@@ -116,7 +109,6 @@ select '72a',ST_OrderingEquals('MULTIPOINT(1 2 3, 4 5 6)'::GEOMETRY,'GEOMETRYCOL
 select '73','MULTIPOINT(1 2 3, 4 5 6)'::GEOMETRY ~= 'GEOMETRYCOLLECTION(MULTIPOINT(1 2 3, 4 5 6))'::GEOMETRY as bool;
 select '73a',ST_OrderingEquals('MULTIPOINT(1 2 3, 4 5 6)'::GEOMETRY,'GEOMETRYCOLLECTION(MULTIPOINT(1 2 3, 4 5 6))'::GEOMETRY) as bool;
 
-
 select '74','LINESTRING(1 1,2 2)'::GEOMETRY ~= 'POINT(1 1)'::GEOMETRY as bool;
 select '74a',ST_OrderingEquals('LINESTRING(1 1,2 2)'::GEOMETRY,'POINT(1 1)'::GEOMETRY) as bool;
 select '75','LINESTRING(1 1, 2 2)'::GEOMETRY ~= 'LINESTRING(2 2, 1 1)'::GEOMETRY as bool;
@@ -150,15 +142,12 @@ select '112',ST_NumGeometries('GEOMETRYCOLLECTION(POINT(1 1), LINESTRING( 1 1 ,
 
 ---selection
 
-
-
 --- TOAST testing
 
 -- create a table with data that will be TOASTed (even after compression)
 create table TEST(a GEOMETRY, b GEOMETRY);
 \i regress_biginsert.sql
 
-
 ---test basic ops on this
 
 select '121',box3d(a) as box3d_a, box3d(b) as box3d_b from TEST;
index b642d8981d7f3bc8c830dfbb369c043817ea9566..2d98d35b538823b4dfbc2bf45108169a89ccf624 100644 (file)
@@ -5,7 +5,6 @@ CREATE INDEX "test_geom_idx" ON "test" using gist (the_geom);
 
 DROP TABLE "test";
 
-
 -- Test node splits in geometry and geography with null-filled, empty-filled, and mixed collections of rows
 -- Previous issues showed crashing behaviour, so if we don't crash, we're golden.
 
index c76377d3bad7e8517715e635e6e691d65a972055..e9e7a715acb59af8a44ab411a344a68cec6ab5fd 100644 (file)
@@ -18,7 +18,6 @@ CREATE TABLE "test" (
 -- Name: test Type: TABLE DATA Owner: postgres
 --
 
-
 COPY "test" FROM stdin;
 1      POINT(529.522339 509.260284)
 2      POINT(395.286469 439.218109)
index 7ba36bedc04bea301aceb201c3b92205aeef3b13..f504b9f702d2600f03d3460d6a2da66f0c85c2f8 100644 (file)
@@ -46,7 +46,7 @@ SELECT 'line_locate_point_5', ST_LineLocatePoint(ST_MakeLine('POINT(1 2)'::geome
 --- postgis-devel/2006-January/001951.html
 with substr as (
   select ST_LineSubstring(ST_geomfromewkt('SRID=4326;LINESTRING(0 0 0 0, 1 1 1 1, 2 2 2 2, 3 3 3 3, 4 4 4 4)'), 0.5, 0.8) as ln
-)      
+)
 select 'line_substring_1', ST_SRID(ln), ST_AsText(ln) from substr;
 
 select 'line_substring_2', ST_AsText(ST_LineSubstring('LINESTRING(0 0 0 0, 1 1 1 1, 2 2 2 2, 3 3 3 3, 4 4 4 4)', 0.5, 0.75));
index f2a0b010612859ed0dacfa0b6476647d1d7f8590..53e20717a9ed90885c8bfe3de6f903a8b6ea158a 100644 (file)
@@ -67,7 +67,6 @@ SELECT c, ST_ContainsProperly(ply, pt) FROM
 ('containsproperly104', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POINT(0 12)')
 ) AS v(c,ply,pt);
 
-
 -- PIP - point vertically aligned with polygon vertex, poly first
 SELECT 'intersects105', ST_Intersects(p, ST_GeomFromText('POINT(521513 5377804)', 32631)) FROM
 ( VALUES
@@ -97,7 +96,6 @@ SELECT 'intersects108', ST_Intersects(ST_GeomFromText('POINT(521543 5377804)', 3
        (ST_GeomFromText('POLYGON((521526 5377783, 521482 5377811, 521494 5377832, 521539 5377804, 521526 5377783))', 32631))
 ) AS v(p);
 
-
 -- PIP - point vertically aligned with polygon vertex, poly first
 SELECT 'contains105', ST_Contains(p, ST_GeomFromText('POINT(521513 5377804)', 32631)) FROM
 ( VALUES
@@ -185,7 +183,6 @@ SELECT 'covers108', ST_Covers(ST_GeomFromText('POINT(521543 5377804)', 32631), p
        (ST_GeomFromText('POLYGON((521526 5377783, 521482 5377811, 521494 5377832, 521539 5377804, 521526 5377783))', 32631))
 ) AS v(p);
 
-
 SELECT c, ST_Intersects(p1, p2) AS intersects_p1p2, ST_Intersects(p2, p1) AS intersects_p2p1 FROM
 ( VALUES
 ('intersects200', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POLYGON((2 2, 2 3, 3 3, 3 2, 2 2))'),
@@ -267,7 +264,6 @@ SELECT c, ST_Contains(p1, p2) AS contains_p1p2, ST_Contains(p2, p1) AS contains_
 ('types114', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'LINESTRING(0 0, 0 10, 10 10, 10 0)')
 ) AS v(c,p1,p2);
 
-
 SELECT 'intersects310', ST_intersects('POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', p) FROM ( VALUES
 ('LINESTRING(1 10, 9 10, 9 8)'),('LINESTRING(1 10, 9 10, 9 8)'),('LINESTRING(1 10, 9 10, 9 8)')
 ) AS v(p);
index ca7f2722dcef9f6dcaf8de91ff43f0a0c67f7ce7..7094b818413b630f422c644c433069e3cb6a0e7d 100644 (file)
@@ -2135,7 +2135,6 @@ COPY regular_overdots_ab (a, b) FROM stdin;
 10     10
 \.
 
-
 -- Check for error messages
 create table no_stats ( g geometry, id integer );
 create table no_stats_join ( g geometry, id integer );
index 4b6b4a04a134c7770dca07448b23665f43f6a323..b0eec4da1a10760f81adfde1f2ac5182514ae294 100644 (file)
@@ -29,4 +29,3 @@ SELECT 16, ST_AsText(ST_RemoveRepeatedPoints('MULTIPOINT(0 0, 0 0, 1 1, 2 2)'::g
 SELECT 17, ST_AsText(ST_RemoveRepeatedPoints('MULTIPOINT(0 0, 0 0, 1 1, 4 4)'::geometry,2));
 SELECT 18, ST_AsText(ST_RemoveRepeatedPoints('POLYGON((-215922 5325694,-218080 5321866,-218693 5322119,-216112 5325812,-215922 5325694))'::geometry, 10000));
 
-
index 95a0a7b47139d2da98f02ea15cdb0839e6c015a1..725bacc313bb0659225fb5ca2e4e884a781e87ff 100644 (file)
@@ -22,4 +22,3 @@ SELECT ST_asewkt(ST_removepoint('LINESTRING(0 0 0 0, 1 1 1 1, 2 2 2 2)', 2));
 SELECT ST_asewkt(ST_removepoint('LINESTRING(0 0 0 0, 1 1 1 1, 2 2 2 2, 3 3 3 3, 4 4 4 4, 5 5 5 5, 6 6 6 6, 7 7 7 7)', 2));
 SELECT ST_asewkt(ST_removepoint('LINESTRING(0 0 0 0, 1 1 1 1, 2 2 2 2, 3 3 3 3, 4 4 4 4, 5 5 5 5, 6 6 6 6, 7 7 7 7)', 4));
 
-
index 00bc639eddb9ec44a9e425008553e43efaf017ff..fc58790cf1fc5e5d89d05412e259772142a49572 100644 (file)
@@ -13,7 +13,7 @@ FROM ST_Union(ST_GeomFromText('POLYGON((175 150, 20 40,
                        50 60, 125 100, 175 150))'),
                ST_Buffer(ST_GeomFromText('POINT(110 170)'), 20)
                ) As geom;
-               
+
 SELECT
        'ST_ConcaveHull Lines 0.80', ST_Within(geom,ST_ConcaveHull(
                geom, 0.80) ) As encloses_geom,
index 758aaea342219d6fb7d781283b641f72ee7170c1..6f3bc821825302a935546b8671f7cbab25117a58 100644 (file)
@@ -140,7 +140,6 @@ WITH inp AS (SELECT
  'LINESTRING EMPTY'::geometry as empty
  ) SELECT 'ST_Length(empty) == 0', ST_Length(empty) FROM inp;
 
-
 -- Operators
 
 -- same box, see http://trac.osgeo.org/postgis/ticket/1453
index 84a0bcd94ce7e6ee8cb2f462fb2aced410826878..3ec43cd30b362f5f422eedf40a6d991a25f135df 100644 (file)
@@ -73,7 +73,6 @@ ply AS (
 )
 SELECT 'geog_precision_pazafir', _ST_DistanceUnCached(pt.point, ply.polygon), ST_Distance(pt.point, ply.polygon) FROM pt, ply;
 
-
 -- Clean up spatial_ref_sys
 DELETE FROM spatial_ref_sys WHERE srid = 4326;
 
index 84e1b83bb04758b1b23ab68f1a86b9b95f1dd2e1..9bfb8e08dfc4a5c33542c2cd6063130ba7f57068 100644 (file)
@@ -6,7 +6,6 @@ select '114', ST_perimeter2d('MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0
 
 select '115', ST_3DPerimeter('MULTIPOLYGON( ((0 0 0, 10 0 0, 10 10 0, 0 10 0, 0 0 0)),( (0 0 0, 10 0 0, 10 10 0, 0 10 0, 0 0 0),(5 5 0, 7 5 0, 7 7  0, 5 7 0, 5 5 0) ) ,( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1, 5 7 1, 5 5 1),(1 1 1,2 1 1, 2 2 1, 1 2 1, 1 1 1) ) )'::GEOMETRY) as value;
 
-
 select '116', ST_length2d('MULTILINESTRING((0 0, 1 1),(0 0, 1 1, 2 2) )'::GEOMETRY) as value;
 select '117', ST_3dlength('MULTILINESTRING((0 0, 1 1),(0 0, 1 1, 2 2) )'::GEOMETRY) as value;
 select '118', ST_3dlength('MULTILINESTRING((0 0 0, 1 1 1),(0 0 0, 1 1 1, 2 2 2) )'::GEOMETRY) as value;
@@ -16,7 +15,6 @@ select '135', ST_Distance('POINT(5 0)', 'POINT(10 12)');
 
 select '136', ST_Distance('POINT(0 0)', ST_translate('POINT(0 0)', 5, 12, 0));
 
-
 -- postgis-users/2006-May/012174.html
 select 'dist', ST_Distance(a,b), ST_Distance(b,a) from (
        select 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))'::geometry as a,
@@ -42,7 +40,6 @@ select 'st_shortestline_dist', st_astext(st_shortestline(a,b)), st_astext(st_sho
                        (15 5, 15 8, 17 8, 17 5, 15 5))'::geometry as b
        ) as foo;
 
-
 --st_maxdistance
 
 select 'st_maxdistance_134', st_maxdistance('POINT(1 2)', 'POINT(1 2)');
@@ -57,8 +54,6 @@ select 'st_maxdistance_dist', st_maxdistance(a,b), st_maxdistance(b,a) from (
                        (15 5, 15 8, 17 8, 17 5, 15 5))'::geometry as b
        ) as foo;
 
-
-
 --st_longestline
 
 select 'st_longestline_134', st_astext(st_longestline('POINT(1 2)', 'POINT(1 2)'));
@@ -73,7 +68,7 @@ select 'st_longestline_dist', st_astext(st_longestline(a,b)), st_astext(st_longe
                        (15 5, 15 8, 17 8, 17 5, 15 5))'::geometry as b
        ) as foo;
 
-select 'distancetest1',                
+select 'distancetest1',
        ST_Distance(a, b),
        st_maxdistance(a, b),
        st_astext(st_shortestline(a,b)),
@@ -91,7 +86,7 @@ select  'distancetest2',
        round(st_x(st_startpoint(st_shortestline(a,b)))::numeric, 10),
        round(st_y(st_startpoint(st_shortestline(a,b)))::numeric, 10),
        round(st_x(st_endpoint(st_shortestline(a,b)))::numeric, 10),
-       round(st_y(st_endpoint(st_shortestline(a,b)))::numeric, 10),    
+       round(st_y(st_endpoint(st_shortestline(a,b)))::numeric, 10),
        st_astext(st_longestline(a,b)),
        st_astext(st_longestline(b,a)) from (
 select
@@ -99,7 +94,7 @@ select
        ST_GeomFromText('LINESTRING(-10 20, 1 -2)') as b
 ) as foo;
 
-select 'distancepoly1',                
+select 'distancepoly1',
        ST_Distance(a, b),
        st_maxdistance(a, b),
        st_astext(st_shortestline(a,b)),
@@ -111,7 +106,7 @@ select
        ST_GeomFromText('MULTIPOLYGON(((-1 -1, -1 25, 25 25, 25 -1, -1 -1), (14 14,19 14,19 19,14 19,14 14)),((33 35,33 40, 35 40, 35 35, 33 35)))') as b
 ) as foo;
 
-select 'distancepoly2',                
+select 'distancepoly2',
                ST_Distance(a, b),
                        st_maxdistance(a, b),
                                st_astext(st_shortestline(a,b)),
@@ -122,9 +117,7 @@ select 'distancepoly2',
                        ST_GeomFromText('POLYGON((-1 -1, -1 25, 25 25, 25 -1, -1 -1), (14 14,19 14,19 19,14 19,14 14))') as b
        ) as foo;
 
-
-
-select 'distancepoly3',                
+select 'distancepoly3',
                ST_Distance(a, b),
                        st_maxdistance(a, b),
                                st_astext(st_shortestline(a,b)),
@@ -135,8 +128,7 @@ select 'distancepoly3',
                        ST_GeomFromText('POLYGON((-1 -1,-1 25, 25 25,25 -1,-1 -1), (14 14,19 14,19 19,14 19,14 14))') as b
        ) as foo;
 
-
-select 'distancepoly4',                
+select 'distancepoly4',
                ST_Distance(a, b),
                        st_maxdistance(a, b),
                                st_astext(st_shortestline(a,b)),
@@ -147,9 +139,7 @@ select 'distancepoly4',
                        ST_GeomFromText('POLYGON((-1 -1,-1 25, 25 25,25 -1,-1 -1), (14 14,19 14,19 19,14 19,14 14))') as b
        ) as foo;
 
-
-
-select 'distancepoly5',                
+select 'distancepoly5',
                ST_Distance(a, b),
                        st_maxdistance(a, b),
                                st_astext(st_shortestline(a,b)),
@@ -160,10 +150,7 @@ select 'distancepoly5',
                        ST_GeomFromText('POLYGON((-1 -1,-1 25, 25 25,25 -1,-1 -1), (14 14,19 14,19 19,14 19,14 14))') as b
        ) as foo;
 
-
-
-
-select 'distancepoly6',                
+select 'distancepoly6',
                ST_Distance(a, b),
                        st_maxdistance(a, b),
                                st_astext(st_shortestline(a,b)),
@@ -176,7 +163,6 @@ select 'distancepoly6',
 
 --3D Distance functions
 
-
 SELECT '3dDistancetest1',
        ST_3DDistance(a,b),
                ST_3DMaxDistance(a,b),
@@ -187,8 +173,7 @@ SELECT '3dDistancetest1',
                                                        ST_ASEWKT(ST_3DLongestline(a,b)) FROM (
        SELECT 'POINT(1 1 1)'::geometry as a, 'POINT(3 2 7)'::geometry as b
        ) as foo;
-       
-       
+
 SELECT '3dDistancetest2',
        ST_3DDistance(a,b),
                ST_3DMaxDistance(a,b),
@@ -199,8 +184,7 @@ SELECT '3dDistancetest2',
                                                        ST_ASEWKT(ST_3DLongestline(a,b)) FROM (
        SELECT 'POINT(1 1 1)'::geometry as a, 'LINESTRING(0 0 0, 2 2 2)'::geometry as b
        ) as foo;
-       
-       
+
 SELECT '3dDistancetest3',
        ST_3DDistance(a,b),
                ST_3DMaxDistance(a,b),
@@ -211,8 +195,7 @@ SELECT '3dDistancetest3',
                                                        ST_ASEWKT(ST_3DLongestline(a,b)) FROM (
        SELECT 'POINT(1 1 1)'::geometry as a, 'LINESTRING(5 2 6, -3 -2 4)'::geometry as b
        ) as foo;
-       
-       
+
 SELECT '3dDistancetest4',
        ST_3DDistance(a,b),
                ST_3DMaxDistance(a,b),
@@ -223,7 +206,7 @@ SELECT '3dDistancetest4',
                                                        ST_ASEWKT(ST_3DLongestline(a,b)) FROM (
        SELECT  'LINESTRING(1 1 3, 5 7 8)'::geometry  as a, 'POINT(1 1 1)'::geometry as b
        ) as foo;
-       
+
        SELECT '3dDistancetest5',
        ST_3DDistance(a,b),
                ST_3DMaxDistance(a,b),
@@ -237,7 +220,7 @@ SELECT '3dDistancetest4',
 
 SELECT '3dDistancetest6',
        ST_3DDistance(a,b) FROM (
-       SELECT 'LINESTRING(1 1 1 , 2 2 2)'::geometry as a, 'POLYGON((0 0 0, 2 2 2, 3 3 0, 0 0 0))'::geometry as b) as foo;      
+       SELECT 'LINESTRING(1 1 1 , 2 2 2)'::geometry as a, 'POLYGON((0 0 0, 2 2 2, 3 3 0, 0 0 0))'::geometry as b) as foo;
 
 -- Area of an empty polygon
 select 'emptyPolyArea', st_area('POLYGON EMPTY');
index 4a38d8823c91e4f79db5a9410ee366b4c55a8fa8..33d4d94359cecbdfd6cb77379418b010d648cf85 100644 (file)
@@ -1,12 +1,8 @@
 SET postgis.backend = 'sfcgal';
 --- regression test for postGIS
 
-
-
 --- assume datatypes already defined
 
-
-
 --- basic datatypes (correct)
 
 select '1',ST_asewkt('POINT( 1 2 )'::GEOMETRY) as geom;
@@ -51,7 +47,6 @@ select '33',ST_asewkt('MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)) )'::GEOMETR
 select '34',ST_asewkt('MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) ) )'::GEOMETRY) as geom;
 select '35',ST_asewkt('MULTIPOLYGON( ((0 0 0, 10 0 0, 10 10 0, 0 10 0, 0 0 0)),( (0 0 0, 10 0 0, 10 10 0, 0 10 0, 0 0 0),(5 5 0, 7 5 0, 7 7 0, 5 7 0, 5 5 0) ) ,( (0 0 1, 10 0 1, 10 10 1, 0 10 1, 0 0 1),(5 5 1, 7 5 1, 7 7 1, 5 7 1, 5 5 1),(1 1 1,2 1 1, 2 2 1, 1 2 1, 1 1 1) ) )'::GEOMETRY) as geom;
 
-
 select '36',ST_asewkt('GEOMETRYCOLLECTION(MULTIPOINT( 1 2))'::GEOMETRY);
 select '37',ST_asewkt('GEOMETRYCOLLECTION(MULTIPOINT( 1 2 3))'::GEOMETRY);
 select '38',ST_asewkt('GEOMETRYCOLLECTION(MULTIPOINT( 1 2 3, 5 6 7, 8 9 10, 11 12 13))'::GEOMETRY);
@@ -80,7 +75,6 @@ select '56', ST_asewkt('POLYGON( (0 0, 10 0, 10 10, 0 10) )'::GEOMETRY);
 select '57', ST_asewkt('POLYGON( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7) )'::GEOMETRY);
 select '58', ST_asewkt('MULTILINESTRING((0 0, 1 1),(0 0, 1 1, 2 2,) )'::GEOMETRY);
 
-
 --- funny results
 
 select '59',ST_asewkt('POINT(1 2 3, 4 5 6)'::GEOMETRY);
@@ -92,7 +86,6 @@ select '63',regexp_replace(ST_asewkt('POINT( -1e700 0)'::GEOMETRY), E'(Infinity|
 --select '63',ST_asewkt('POINT( -1e700 0)'::GEOMETRY);
 select '64',ST_asewkt('MULTIPOINT(1 1, 2 2'::GEOMETRY);
 
-
 --- is_same() testing
 
 select '65','POINT(1 1)'::GEOMETRY ~= 'POINT(1 1)'::GEOMETRY as bool;
@@ -116,7 +109,6 @@ select '72a',ST_OrderingEquals('MULTIPOINT(1 2 3, 4 5 6)'::GEOMETRY,'GEOMETRYCOL
 select '73','MULTIPOINT(1 2 3, 4 5 6)'::GEOMETRY ~= 'GEOMETRYCOLLECTION(MULTIPOINT(1 2 3, 4 5 6))'::GEOMETRY as bool;
 select '73a',ST_OrderingEquals('MULTIPOINT(1 2 3, 4 5 6)'::GEOMETRY,'GEOMETRYCOLLECTION(MULTIPOINT(1 2 3, 4 5 6))'::GEOMETRY) as bool;
 
-
 select '74','LINESTRING(1 1,2 2)'::GEOMETRY ~= 'POINT(1 1)'::GEOMETRY as bool;
 select '74a',ST_OrderingEquals('LINESTRING(1 1,2 2)'::GEOMETRY,'POINT(1 1)'::GEOMETRY) as bool;
 select '75','LINESTRING(1 1, 2 2)'::GEOMETRY ~= 'LINESTRING(2 2, 1 1)'::GEOMETRY as bool;
@@ -134,7 +126,6 @@ select '80','POINT(1 1)'::GEOMETRY << 'POINT(1 1)'::GEOMETRY as bool;
 select '81','POINT(1 1)'::GEOMETRY << 'POINT(2 1)'::GEOMETRY as bool;
 select '82','POINT(2 1)'::GEOMETRY << 'POINT(1 1)'::GEOMETRY as bool;
 
-
 select '83','POINT(1 1)'::GEOMETRY &> 'POINT(1 1)'::GEOMETRY as bool;
 select '84','POINT(1 1)'::GEOMETRY &> 'POINT(2 1)'::GEOMETRY as bool;
 select '85','POINT(2 1)'::GEOMETRY &> 'POINT(1 1)'::GEOMETRY as bool;
@@ -170,8 +161,6 @@ select '103','MULTIPOINT(5 5, 7 7)'::GEOMETRY @ 'MULTIPOINT(0 0, 10 10)'::GEOMET
 select '104','MULTIPOINT(0 0, 7 7)'::GEOMETRY @ 'MULTIPOINT(0 0, 10 10)'::GEOMETRY as bool;
 select '105','MULTIPOINT(-0.0001 0, 7 7)'::GEOMETRY @ 'MULTIPOINT(0 0, 10 10)'::GEOMETRY as bool;
 
-
-
 --- function testing
 --- conversion function
 
@@ -198,15 +187,12 @@ select '112',ST_NumGeometries('GEOMETRYCOLLECTION(POINT(1 1), LINESTRING( 1 1 ,
 
 ---selection
 
-
-
 --- TOAST testing
 
 -- create a table with data that will be TOASTed (even after compression)
 create table TEST(a GEOMETRY, b GEOMETRY);
 \i regress_biginsert.sql
 
-
 ---test basic ops on this
 
 select '121',box3d(a) as box3d_a, box3d(b) as box3d_b from TEST;
@@ -286,7 +272,6 @@ select '179', ST_AsText('MULTICURVE EMPTY');
 select '180', ST_AsText('GEOMETRYCOLLECTION EMPTY');
 select '181', ST_AsText('GEOMETRYCOLLECTION(TRIANGLE EMPTY,TIN EMPTY)');
 
-
 -- Drop test table
 DROP table test;
 
index 6c61b487d3b1711c14e3a65650a44d2aecf797fe..0ba04243223443ad3b7c98d001a7606527df99f7 100644 (file)
@@ -69,7 +69,6 @@ SELECT c, ST_ContainsProperly(ply, pt) FROM
 ('containsproperly104', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POINT(0 12)')
 ) AS v(c,ply,pt);
 
-
 -- PIP - point vertically aligned with polygon vertex, poly first
 SELECT 'intersects105', ST_Intersects(p, ST_GeomFromText('POINT(521513 5377804)', 32631)) FROM
 ( VALUES
@@ -99,7 +98,6 @@ SELECT 'intersects108', ST_Intersects(ST_GeomFromText('POINT(521543 5377804)', 3
        (ST_GeomFromText('POLYGON((521526 5377783, 521482 5377811, 521494 5377832, 521539 5377804, 521526 5377783))', 32631))
 ) AS v(p);
 
-
 -- PIP - point vertically aligned with polygon vertex, poly first
 SELECT 'contains105', ST_Contains(p, ST_GeomFromText('POINT(521513 5377804)', 32631)) FROM
 ( VALUES
@@ -187,7 +185,6 @@ SELECT 'covers108', ST_Covers(ST_GeomFromText('POINT(521543 5377804)', 32631), p
        (ST_GeomFromText('POLYGON((521526 5377783, 521482 5377811, 521494 5377832, 521539 5377804, 521526 5377783))', 32631))
 ) AS v(p);
 
-
 SELECT c, ST_Intersects(p1, p2) AS intersects_p1p2, ST_Intersects(p2, p1) AS intersects_p2p1 FROM
 ( VALUES
 ('intersects200', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POLYGON((2 2, 2 3, 3 3, 3 2, 2 2))'),
@@ -269,7 +266,6 @@ SELECT c, ST_Contains(p1, p2) AS contains_p1p2, ST_Contains(p2, p1) AS contains_
 ('types114', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'LINESTRING(0 0, 0 10, 10 10, 10 0)')
 ) AS v(c,p1,p2);
 
-
 SELECT 'intersects310', ST_intersects('POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', p) FROM ( VALUES
 ('LINESTRING(1 10, 9 10, 9 8)'),('LINESTRING(1 10, 9 10, 9 8)'),('LINESTRING(1 10, 9 10, 9 8)')
 ) AS v(p);
index bf5b3263765d1333852f28d2afafd29fefa0911c..7b7439ae391d3ab4a8e5748b4ef3103051b31323 100644 (file)
@@ -17,7 +17,6 @@ INSERT INTO spatial_ref_sys ( srid, proj4text ) VALUES ( 3395, '+proj=merc +lon_
 
 INSERT INTO spatial_ref_sys (srid,proj4text) VALUES (32707,'+proj=utm +zone=7 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ');
 
-
 -- #2 --
 SELECT '#2', ST_AsText(ST_Union(g)) FROM
 ( VALUES
@@ -29,7 +28,7 @@ SELECT '#2', ST_AsText(ST_Union(g)) FROM
 SELECT '#11', round(ST_Distance (a.g, ST_Intersection(b.g, a.g))) AS distance
 FROM (SELECT '01020000000200000050E8303FC2E85141B017CFC05A825541000000E0C0E85141000000205C825541'::geometry AS g) a,
         (SELECT 'LINESTRING(4694792.35840419 5638508.89950758,4694793.20840419 5638506.34950758)'::geometry AS g) b;
-       
+
 -- #21 --
 SELECT '#21', ST_AsEWKT(ST_Locate_Along_Measure(g, 4566)) FROM
 ( VALUES
@@ -123,7 +122,6 @@ FROM ( VALUES
        ( ST_LineToCurve(ST_Boundary(ST_Buffer(ST_Point(1,2), 3))) )
        ) AS v(g);
 
-
 -- #168 --
 SELECT '#168', ST_NPoints(g), ST_AsText(g), ST_isValidReason(g)
 FROM ( VALUES
@@ -207,7 +205,7 @@ SELECT '#263', ST_AsEWKT(geometry(geography(pt.the_geom))) As wkt,
         As pca,
        ST_Covers(geometry(geography(poly.the_geom)),
                geometry(geography(pt.the_geom))) As gm_to_gg_gm_pca
-       
+
 FROM (SELECT ST_GeomFromEWKT('SRID=4326;POLYGON((-119.5434 34.9438,-119.5437 34.9445,-119.5452 34.9442,-119.5434 34.9438))') As the_geom)
        As poly
     CROSS JOIN
@@ -349,7 +347,6 @@ SELECT '#681e', ST_AsGML(ST_GeomFromText('MULTILINESTRING EMPTY', 4326));
 SELECT '#681f', ST_AsGML(ST_GeomFromText('MULTIPOLYGON EMPTY', 4326));
 SELECT '#681g', ST_AsGML(ST_GeomFromText('GEOMETRYCOLLECTION EMPTY', 4326));
 
-
 -- #682 --
 SELECT '#682', ST_AsText(ST_Buffer(ST_GeomFromText('POLYGON EMPTY',4326) , 0.5));
 
@@ -405,7 +402,6 @@ FROM (VALUES (ST_GeogFromText('SRID=4326;POINT(-11.1111111 40)') ), (ST_GeogFrom
 -- #804
 SELECT '#804', ST_AsGML(3, 'SRID=4326;POINT(0 0)'::geometry, 0, 1);
 
-
 -- #845
 SELECT '#845', ST_Intersects('POINT(169.69960846592 -46.5061209281002)'::geometry, 'POLYGON((169.699607857174 -46.5061218662,169.699607857174 -46.5061195965597,169.699608806526 -46.5061195965597,169.699608806526 -46.5061218662,169.699607857174 -46.5061218662))'::geometry);
 
@@ -441,7 +437,6 @@ WITH inp AS ( SELECT 'LINESTRING(0 0, 1 1)'::geometry as s,
                   ST_Equals(s, st_collect(s, e))
  FROM inp;
 
-
 -- #1023 --
 select '#1023', 'POINT(10 4)'::geometry = 'POINT(10 4)'::geometry;
 select '#1023.a', 'POINT(10 4)'::geometry = 'POINT(10 5)'::geometry;
@@ -527,7 +522,6 @@ SELECT '</#1320>';
 
 -- st_AsText POLYGON((0 0,10 0,10 10,0 0))
 
-
 -- #1344
 select '#1344', octet_length(ST_AsEWKB(st_makeline(g))) FROM ( values ('POINT(0 0)'::geometry ) ) as foo(g);
 
@@ -553,7 +547,6 @@ SELECT '010900004002000000010400004001000000010100004000000000000000000000000000
 SELECT '010B0000400200000001040000400100000001010000400000000000000000000000000000000000000000000000000101000040000000000000F03F000000000000F03F000000000000F03F'::geometry;
 SELECT '010C0000400200000001040000400100000001010000400000000000000000000000000000000000000000000000000101000040000000000000F03F000000000000F03F000000000000F03F'::geometry;
 
-
 -- #1453
 SELECT '#1453.1', ST_OrderingEquals('POINT EMPTY', 'POINT EMPTY');
 SELECT '#1453.2', ST_OrderingEquals('POINT EMPTY', 'POINT Z EMPTY');
@@ -705,7 +698,6 @@ with inp as ( SELECT
  '010100000001000000004065C0041AD965BE5554C0'::geometry as b
 ) SELECT '#1791', round(ST_Azimuth(a,b)*10)/10 from inp;
 
-
 -- #1799 --
 SELECT '#1799', ST_Segmentize('LINESTRING(0 0, 10 0)'::geometry, 0);
 
@@ -755,7 +747,6 @@ SELECT '#2001', ST_AsText(ST_CurveToLine(ST_GeomFromText('CURVEPOLYGON((0 0, 0 1
 -- #2028 --
 SELECT '#2028', ST_AsText(ST_Multi('TRIANGLE((0 0, 0 1, 1 1, 0 0))'));
 
-
 -- #2035 START ------------------------------------------------------------
 
 -- Simple geographic table, with single point.
@@ -789,7 +780,6 @@ SELECT '#2035b', Count(*) FROM "city"
 DROP TABLE "city";
 -- #2035 END --------------------------------------------------------------
 
-
 -- #2084 --
 SELECT '#2048', num, ST_Within('POINT(-54.394 56.522)', "the_geom"), ST_CoveredBy('POINT(-54.394 56.522)', "the_geom")
 FROM ( VALUES
@@ -815,10 +805,8 @@ SELECT '#2110.1', 'POINT(0 0)'::geometry = 'POINT EMPTY'::geometry;
 SELECT '#2110.2', 'POINT EMPTY'::geometry = 'POINT EMPTY'::geometry;
 SELECT '#2110.3', 'POINT(0 0)'::geometry = 'POINT(0 0)'::geometry;
 
-
 SELECT '#2145',
 round(ST_Length(St_Segmentize(ST_GeographyFromText('LINESTRING(-89.3000030518 28.2000007629,-89.1999969482 89.1999969482,-89.1999969482 89.1999969482)'), 10000))::numeric,0);
 
-
 -- Clean up
 DELETE FROM spatial_ref_sys;
index 23ff920a350fe6f73cf9ca76e3990d483aad654a..dcf0c197179558f44d7e868112f059afc5cba714 100644 (file)
@@ -156,8 +156,6 @@ INSERT INTO serialize_test(
         'SRID=4326;MULTISURFACE(CURVEPOLYGON(CIRCULARSTRING(-2 0 0 0,-1 -1 1 2,0 0 2 4,1 -1 3 6,2 0 4 8,0 2 2 4,-2 0 0 0),(-1 0 1 2,0 0.5 2 4,1 0 3 6,0 1 3 4,-1 0 1 2)),((7 8 7 8,10 10 5 5,6 14 3 1,4 11 4 6,7 8 7 8)))',
         '010C0000E0E610000002000000010A0000C00200000001080000C00700000000000000000000C0000000000000000000000000000000000000000000000000000000000000F0BF000000000000F0BF000000000000F03F00000000000000400000000000000000000000000000000000000000000000400000000000001040000000000000F03F000000000000F0BF000000000000084000000000000018400000000000000040000000000000000000000000000010400000000000002040000000000000000000000000000000400000000000000040000000000000104000000000000000C000000000000000000000000000000000000000000000000001020000C005000000000000000000F0BF0000000000000000000000000000F03F00000000000000400000000000000000000000000000E03F00000000000000400000000000001040000000000000F03F0000000000000000000000000000084000000000000018400000000000000000000000000000F03F00000000000008400000000000001040000000000000F0BF0000000000000000000000000000F03F000000000000004001030000C001000000050000000000000000001C4000000000000020400000000000001C400000000000002040000000000000244000000000000024400000000000001440000000000000144000000000000018400000000000002C400000000000000840000000000000F03F00000000000010400000000000002640000000000000104000000000000018400000000000001C4000000000000020400000000000001C400000000000002040');
 
-
-
 SELECT id, CASE WHEN ewkt = ST_asEWKT(serialized::geometry) THEN 'pass' ELSE 'fail' END AS result FROM serialize_test ORDER BY id;
 SELECT id, CASE WHEN ST_asEWKB(geomFromEWKT(ewkt)) = serialized THEN 'pass' ELSE 'fail' END AS result FROM serialize_test ORDER BY id;
 
index 70717b31608ce735d0e30a00457c53c4f81fad73..a0863b4b6d5b6244ffecdfd901b1fcd1dc2c3af4 100644 (file)
@@ -25,7 +25,6 @@ GROUP BY gs.full_area;
 
 SELECT '#3522', ST_AsText(ST_Subdivide(ST_GeomFromText('POINT(1 1)',4326),10));
 
-
 with inverted_geom as (
     select ST_Difference(
                ST_Expand('SRID=3857;POINT(0 0)' :: geometry, 20000000),
index d3b451ac69b551ff8a8ea4fb41c1cbea727d5d9a..8133c8ba8549bc40081b27caf658f2d9aa26f1a0 100644 (file)
@@ -66,7 +66,6 @@ SELECT 'cpad4', ST_DistanceCPA('LINESTRINGM(0 0 0, 10 0 10)'::geometry
 SELECT 'invalid', ST_DistanceCPA('LINESTRING(0 0 0, 1 0 0)'::geometry
             ,'LINESTRING(0 0 3 0, 1 0 2 1)'::geometry);
 
-
 ----------------------------------------
 --
 -- ST_CPAWithin
index 9c7026b34f91a08c8aa8e063499959d1fa6013fd..f853be61855fac15382cdf40172bd83f7d077c4a 100644 (file)
@@ -15,7 +15,6 @@ INSERT INTO spatial_ref_sys ( srid, proj4text ) VALUES ( 3395, '+proj=merc +lon_
 
 INSERT INTO spatial_ref_sys (srid,proj4text) VALUES (32707,'+proj=utm +zone=7 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ');
 
-
 -- #2 --
 SELECT '#2', ST_AsText(ST_Union(g)) FROM
 ( VALUES
@@ -121,7 +120,6 @@ FROM ( VALUES
        ( ST_LineToCurve(ST_Boundary(ST_Buffer(ST_Point(1,2), 3))) )
        ) AS v(g);
 
-
 -- #168 --
 SELECT '#168', ST_NPoints(g), ST_AsText(g), ST_isValidReason(g)
 FROM ( VALUES
@@ -340,7 +338,6 @@ SELECT '#681e', ST_AsGML(ST_GeomFromText('MULTILINESTRING EMPTY', 4326));
 SELECT '#681f', ST_AsGML(ST_GeomFromText('MULTIPOLYGON EMPTY', 4326));
 SELECT '#681g', ST_AsGML(ST_GeomFromText('GEOMETRYCOLLECTION EMPTY', 4326));
 
-
 -- #682 --
 SELECT '#682', encode(ST_AsEWKB(ST_Buffer(ST_GeomFromText('POLYGON EMPTY',4326) , 0.5), 'ndr'),'hex');
 
@@ -396,7 +393,6 @@ FROM (VALUES (ST_GeogFromText('SRID=4326;POINT(-11.1111111 40)') ), (ST_GeogFrom
 -- #804
 SELECT '#804', ST_AsGML(3, 'SRID=4326;POINT(0 0)'::geometry, 0, 1);
 
-
 -- #845
 SELECT '#845', ST_Intersects('POINT(169.69960846592 -46.5061209281002)'::geometry, 'POLYGON((169.699607857174 -46.5061218662,169.699607857174 -46.5061195965597,169.699608806526 -46.5061195965597,169.699608806526 -46.5061218662,169.699607857174 -46.5061218662))'::geometry);
 
@@ -432,7 +428,6 @@ WITH inp AS ( SELECT 'LINESTRING(0 0, 1 1)'::geometry as s,
                   ST_Equals(s, st_collect(s, e))
  FROM inp;
 
-
 -- #1023 --
 select '#1023', 'POINT(10 4)'::geometry = 'POINT(10 4)'::geometry;
 select '#1023.a', 'POINT(10 4)'::geometry = 'POINT(10 5)'::geometry;
@@ -492,7 +487,6 @@ SELECT '</#1320>';
 
 -- st_AsText POLYGON((0 0,10 0,10 10,0 0))
 
-
 -- #1344
 select '#1344', octet_length(ST_AsEWKB(st_makeline(g))) FROM ( values ('POINT(0 0)'::geometry ) ) as foo(g);
 
@@ -518,7 +512,6 @@ SELECT '010900004002000000010400004001000000010100004000000000000000000000000000
 SELECT '010B0000400200000001040000400100000001010000400000000000000000000000000000000000000000000000000101000040000000000000F03F000000000000F03F000000000000F03F'::geometry;
 SELECT '010C0000400200000001040000400100000001010000400000000000000000000000000000000000000000000000000101000040000000000000F03F000000000000F03F000000000000F03F'::geometry;
 
-
 -- #1453
 SELECT '#1453.1', ST_OrderingEquals('POINT EMPTY', 'POINT EMPTY');
 SELECT '#1453.2', ST_OrderingEquals('POINT EMPTY', 'POINT Z EMPTY');
@@ -677,7 +670,6 @@ with inp as ( SELECT
  '010100000001000000004065C0041AD965BE5554C0'::geometry as b
 ) SELECT '#1791', round(ST_Azimuth(a,b)*10)/10 from inp;
 
-
 -- #1799 --
 SELECT '#1799', ST_Segmentize('LINESTRING(0 0, 10 0)'::geometry, 0);
 
@@ -730,7 +722,6 @@ SELECT '#2001', ST_AsText(ST_CurveToLine(ST_GeomFromText('CURVEPOLYGON((0 0, 0 1
 -- #2028 --
 SELECT '#2028', ST_AsText(ST_Multi('TRIANGLE((0 0, 0 1, 1 1, 0 0))'));
 
-
 -- #2035 START ------------------------------------------------------------
 
 -- Simple geographic table, with single point.
@@ -764,7 +755,6 @@ SELECT '#2035b', Count(*) FROM "city"
 DROP TABLE "city";
 -- #2035 END --------------------------------------------------------------
 
-
 -- #2084 --
 SELECT '#2084', num, ST_Within('POINT(-54.394 56.522)', "the_geom"), ST_CoveredBy('POINT(-54.394 56.522)', "the_geom")
 FROM ( VALUES
@@ -790,7 +780,6 @@ SELECT '#2110.1', 'POINT(0 0)'::geometry = 'POINT EMPTY'::geometry;
 SELECT '#2110.2', 'POINT EMPTY'::geometry = 'POINT EMPTY'::geometry;
 SELECT '#2110.3', 'POINT(0 0)'::geometry = 'POINT(0 0)'::geometry;
 
-
 SELECT '#2145',
 round(ST_Length(St_Segmentize(ST_GeographyFromText('LINESTRING(-89.3000030518 28.2000007629,-89.1999969482 89.1999969482,-89.1999969482 89.1999969482)'), 10000))::numeric,0);
 
@@ -826,7 +815,6 @@ SELECT '#2427', st_astext(st_pointn(ST_CurveToLine('CIRCULARSTRING(-1 0,0 1,0 -1
 SELECT '#2168',  ST_Distance(g1,g2)::numeric(16,8)  As dist_g1_g2, ST_Distance(g2,g1)::numeric(16,8) AS dist_g2_g1,ST_Distance(g1,g2) - ST_Distance(g2,g1)
   FROM (SELECT 'POINT(18.5107234 54.7587757)'::geography As g1, 'POINT(18.58218 54.7344227)'::geography As g2) As a;
 
-
 -- #2556 --
 
 CREATE TABLE images (id integer, name varchar, extent geography(POLYGON,4326));
@@ -843,7 +831,6 @@ SELECT '#2692b', ST_AsText(st_collect(g)) FROM v;
 WITH v AS ( SELECT 'TRIANGLE((0 0, 1 1, 1 0, 0 0))'::geometry AS g FROM generate_series(1,3) )
 SELECT '#2692c', ST_AsText(st_collect(g)) FROM v;
 
-
 SELECT '#2704', ST_AsText(ST_GeomFromGML('<?xml version="1.0"?>
 <gml:Polygon xmlns:gml="http://www.opengis.net/gml/3.2"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -953,8 +940,6 @@ SELECT '#3461', ST_GeomFromKML('<Polygon>
                 </innerBoundaryIs>
             </Polygon>');
 
-
-
 -- #3437
 WITH
 mp AS (SELECT ST_Collect(ST_MakePoint(-c, c*c)) AS geom FROM generate_series(1, 5) c),
@@ -1058,6 +1043,5 @@ DROP TABLE IF EXISTS rec;
 -- #3930
 SELECT '#3930', round(1000*st_area(st_minimumboundingcircle('MULTIPOLYGON (((-76.5442733764648 34.5878295898438, -76.5551452636719 34.6106605529785, -76.5377502441406 34.6139221191406, -76.4844818115234 34.6976318359375, -76.4322967529297 34.760684967041, -76.3746795654297 34.8128700256348, -76.2877044677734 34.877010345459, -76.4692611694336 34.6932830810547, -76.5442733764648 34.5878295898438)), ((-76.0170059204102 35.0694351196289, -75.9756927490234 35.1161842346191, -75.8539352416992 35.1672821044922, -75.7637023925781 35.1922836303711, -75.8115386962891 35.1640205383301, -75.9039459228516 35.1324920654297, -76.0028762817383 35.0694351196289, -76.0170059204102 35.0694351196289)), ((-76.0271682739258 36.5567169189453, -75.998664855957 36.5566520690918, -75.9119186401367 36.5425300598145, -75.9248046875 36.4739761352539, -75.9772796630859 36.4780158996582, -75.9762878417969 36.5179252624512, -76.0271682739258 36.5567169189453)), ((-75.4912185668945 35.6704978942871, -75.5336227416992 35.768856048584, -75.4569778442383 35.6173973083496, -75.5262985229492 35.2279167175293, -75.7492904663086 35.189826965332, -75.6915664672852 35.2349891662598, -75.521484375 35.2813568115234, -75.4754180908203 35.5644950866699, -75.4912185668945 35.6704978942871)), ((-83.9379959106445 34.9893913269043, -83.9885482788086 34.9890670776367, -84.1182403564453 34.988224029541, -84.3238525390625 34.9890098571777, -84.2910385131836 35.2105445861816, -84.225944519043 35.261604309082, -84.1797256469727 35.2409896850586, -84.1016464233398 35.2455520629883, -84.0427780151367 35.272575378418, -84.0308609008789 35.2925224304199, -84.0292053222656 35.3252906799316, -84.0063095092773 35.372859954834, -84.0126495361328 35.4076232910156, -83.954704284668 35.4554595947266, -83.9100112915039 35.4764785766602, -83.8812255859375 35.5105857849121, -83.8302001953125 35.5190620422363, -83.77587890625 35.552604675293, -83.6728744506836 35.5649719238281, -83.6138610839844 35.5717391967773, -83.56103515625 35.55517578125, -83.5057983398438 35.5595512390137, -83.4582901000977 35.5972785949707, -83.387092590332 35.6252174377441, -83.3430252075195 35.6532592773438, -83.2984161376953 35.6563262939453, -83.2591247558594 35.6910095214844, -83.253303527832 35.7007064819336, -83.2438507080078 35.7182159423828, -83.1853485107422 35.7288856506348, -83.1436614990234 35.7626838684082, -83.1181869506836 35.7638092041016, -83.0599594116211 35.7825775146484, -82.9870071411133 35.7739906311035, -82.9627532958984 35.7918510437012, -82.9068222045898 35.8722152709961, -82.9140701293945 35.9278678894043, -82.8959732055664 35.9483604431152, -82.8562698364258 35.9474258422852, -82.8086700439453 35.9208717346191, -82.7764434814453 35.9565734863281, -82.7735977172852 35.9875030517578, -82.7632293701172 35.9995460510254, -82.6438903808594 36.0517234802246, -82.628044128418 36.0543403625488, -82.6044006347656 36.0429878234863, -82.5922317504883 36.0224494934082, -82.6058044433594 36.003547668457, -82.5993041992188 35.9632987976074, -82.5541458129883 35.9561080932617, -82.5069351196289 35.972541809082, -82.4751968383789 35.9931755065918, -82.4084243774414 36.0753173828125, -82.3738555908203 36.0986976623535, -82.3119277954102 36.1221504211426, -82.2623062133789 36.1203765869141, -82.2077331542969 36.1470146179199, -82.154052734375 36.1396217346191, -82.1180801391602 36.0962562561035, -82.0777587890625 36.1001396179199, -82.0204544067383 36.129711151123, -81.9331130981445 36.2633209228516, -81.9111557006836 36.2907524108887, -81.8305740356445 36.3346557617188, -81.7304916381836 36.3293418884277, -81.7094573974609 36.3337249755859, -81.7403793334961 36.3618583679199, -81.7410736083984 36.3917846679688, -81.6982803344727 36.4717788696289, -81.7027969360352 36.5193405151367, -81.6699981689453 36.5896492004395, -81.3452987670898 36.5728645324707, -80.9034423828125 36.5652122497559, -80.8381576538086 36.5634384155273, -80.6110534667969 36.5572967529297, -80.4353103637695 36.5510444641113, -80.048095703125 36.5471343994141, -80.024055480957 36.5450248718262, -79.7174453735352 36.5478897094727, -79.5102996826172 36.5476570129395, -79.2170639038086 36.5497817993164, -79.1443252563477 36.5460586547852, -78.7966995239258 36.5435333251953, -78.7373886108398 36.5460739135742, -78.4588088989258 36.5414810180664, -78.3212509155273 36.5455322265625, -78.0516662597656 36.5524749755859, -77.8988571166992 36.5529441833496, -77.7639312744141 36.5534400939941, -77.3200531005859 36.5539169311523, -77.1773529052734 36.5562858581543, -76.9241333007812 36.5541458129883, -76.921630859375 36.5541572570801, -76.5635833740234 36.5552520751953, -76.49755859375 36.5558128356934, -76.3302536010742 36.5560569763184, -76.1273956298828 36.5571632385254, -76.0459594726562 36.5569534301758, -76.0332107543945 36.5143737792969, -76.091064453125 36.5035667419434, -75.97607421875 36.4362144470215, -75.9697647094727 36.4151191711426, -76.0016098022461 36.4189147949219, -75.9512557983398 36.3654708862305, -75.9281234741211 36.4232444763184, -75.9245910644531 36.3509483337402, -75.8000564575195 36.1128158569336, -75.7988510131836 36.0728187561035, -75.8551635742188 36.1056671142578, -75.9137649536133 36.244800567627, -75.9575119018555 36.2594528198242, -75.9419326782227 36.2943382263184, -76.0089721679688 36.3195953369141, -75.9571838378906 36.1937713623047, -75.9813385009766 36.1697273254395, -76.1831665039062 36.3152389526367, -76.2189025878906 36.2966079711914, -76.1127090454102 36.1744194030762, -76.1419372558594 36.1476898193359, -76.234977722168 36.1633605957031, -76.2989273071289 36.2142295837402, -76.275505065918 36.1103706359863, -76.4805297851562 36.0797920227051, -76.4204254150391 36.0586051940918, -76.5230102539062 36.0071678161621, -76.5940017700195 36.0101318359375, -76.6490173339844 36.0657081604004, -76.6332092285156 36.0371170043945, -76.6901550292969 36.0496101379395, -76.7265090942383 36.1568222045898, -76.6887359619141 36.2945175170898, -76.7766418457031 36.3583297729492, -76.9240798950195 36.3924446105957, -76.7413482666016 36.3151664733887, -76.7074966430664 36.2661323547363, -76.7450637817383 36.2339172363281, -76.7606735229492 36.1445922851562, -76.6937637329102 35.9929695129395, -76.7411270141602 35.9366264343262, -76.6972198486328 35.9415435791016, -76.4094696044922 35.977466583252, -76.3714828491211 35.9323425292969, -76.2137680053711 35.9768753051758, -76.0896377563477 35.9629135131836, -76.0260467529297 35.9204254150391, -76.0759124755859 35.7568016052246, -76.0430679321289 35.6838493347168, -76.1673049926758 35.6968421936035, -76.1047439575195 35.6636390686035, -76.0212097167969 35.6690940856934, -75.9878540039062 35.892707824707, -75.8180541992188 35.9235191345215, -75.7489624023438 35.8693389892578, -75.7293701171875 35.6651725769043, -75.779052734375 35.578685760498, -75.8914947509766 35.6312675476074, -76.052978515625 35.4146041870117, -76.1816177368164 35.3415336608887, -76.4988021850586 35.4162178039551, -76.5337524414062 35.4501991271973, -76.4584350585938 35.5044250488281, -76.4465255737305 35.5508651733398, -76.5189437866211 35.5776443481445, -76.4925384521484 35.5417861938477, -76.6381988525391 35.520336151123, -76.6287689208984 35.4378967285156, -76.7053756713867 35.4119338989258, -77.1037673950195 35.5501861572266, -76.9831848144531 35.4365005493164, -76.6949005126953 35.3504257202148, -76.6145172119141 35.2729187011719, -76.5912094116211 35.3120803833008, -76.5409774780273 35.3036880493164, -76.5071258544922 35.2487678527832, -76.6400909423828 35.1725196838379, -76.605224609375 35.1385612487793, -76.6242218017578 35.0643501281738, -76.6780090332031 35.0240859985352, -76.8494644165039 34.9822196960449, -76.9414901733398 35.0274276733398, -76.943244934082 35.0700340270996, -77.0478820800781 35.092155456543, -77.1046752929688 35.0879859924316, -77.1105880737305 35.0660362243652, -77.0011901855469 35.0528869628906, -76.9131088256836 34.9364700317383, -76.6470489501953 34.9063339233398, -76.6700592041016 34.9699974060059, -76.5297775268555 34.9746360778809, -76.4450302124023 35.016658782959, -76.4240570068359 34.9462471008301, -76.364013671875 34.9431114196777, -76.3294067382812 34.9759559631348, -76.3147125244141 34.9488143920898, -76.4699020385742 34.7850608825684, -76.6253128051758 34.7197532653809, -77.0505294799805 34.698917388916, -77.1489562988281 34.764331817627, -77.12939453125 34.6849136352539, -77.1566009521484 34.6606369018555, -77.5386352539062 34.4570083618164, -77.5867614746094 34.4209365844727, -77.6097259521484 34.4350433349609, -77.6026153564453 34.4126281738281, -77.7505264282227 34.305046081543, -77.864387512207 34.1927375793457, -77.894401550293 34.0691795349121, -77.9267578125 34.0620346069336, -77.9607315063477 34.1892433166504, -77.9585266113281 33.9925804138184, -78.0348052978516 33.9142913818359, -78.579719543457 33.8819923400879, -78.6557159423828 33.948673248291, -79.0745010375977 34.304573059082, -79.4471435546875 34.6190605163574, -79.4559707641602 34.634090423584, -79.6675033569336 34.8006629943848, -79.6859588623047 34.8052558898926, -79.9199523925781 34.807918548584, -80.3252792358398 34.8147621154785, -80.5615463256836 34.8152275085449, -80.8000640869141 34.8161125183105, -80.7856521606445 34.9406394958496, -80.8401641845703 35.0020179748535, -80.8947143554688 35.0597343444824, -80.9277954101562 35.1012496948242, -81.0398864746094 35.0372009277344, -81.0655517578125 35.0664825439453, -81.0284423828125 35.1054077148438, -81.0490417480469 35.1320114135742, -81.0493011474609 35.1515312194824, -81.3228225708008 35.1637573242188, -81.362174987793 35.1628532409668, -81.7653579711914 35.1824722290039, -81.8705902099609 35.1831169128418, -81.9714431762695 35.1882820129395, -82.2101745605469 35.1931266784668, -82.2783279418945 35.1950073242188, -82.3207702636719 35.1841888427734, -82.3508605957031 35.1926727294922, -82.3601226806641 35.1829490661621, -82.3713760375977 35.1827239990234, -82.3896102905273 35.2082405090332, -82.4379196166992 35.1695594787598, -82.4667434692383 35.1735000610352, -82.5246353149414 35.1545600891113, -82.5700302124023 35.1494903564453, -82.6544952392578 35.119457244873, -82.6860504150391 35.1214637756348, -82.6880340576172 35.0978012084961, -82.6973571777344 35.0912322998047, -82.7713470458984 35.0854225158691, -82.8876953125 35.0553703308105, -83.0072784423828 35.0242042541504, -83.1062850952148 35.0002784729004, -83.5130081176758 34.9920234680176, -83.5494155883789 34.9895362854004, -83.9379959106445 34.9893913269043)), ((-75.7731552124023 36.2292556762695, -75.5449676513672 35.7883605957031, -75.7027359008789 36.049861907959, -75.7408676147461 36.0503234863281, -75.7831726074219 36.2251930236816, -75.901985168457 36.5561981201172, -75.8781661987305 36.5558738708496, -75.7731552124023 36.2292556762695)))')));
 
-
 -- Clean up
 DELETE FROM spatial_ref_sys;
index c3d6585855b7d110eedb5cead8ac51529c377bb7..8b0d5f2f31ef6148843e2b3f82b9b7e2593c7faf 100644 (file)
@@ -42,7 +42,6 @@ select g,encode(ST_AsTWKB(g::geometry,p),'hex') from
 select g,encode(ST_AsTWKB(g::geometry,p),'hex') from
 (select 'MULTIPOLYGON(((1 1, 1 20, 20 20, 20 1, 1 1),(3 3,3 4, 4 4,4 3,3 3)),((-1 1, -1 20, -20 20, -20 1, -1 1),(-3 3,-3 4, -4 4,-4 3,-3 3)))'::text g, 0 p) foo;
 
-
 --GEOMETRYCOLLECTION
 select st_astext(st_collect(g::geometry)), encode(ST_AsTWKB(ST_Collect(g::geometry),0),'hex') from
 (
@@ -51,7 +50,6 @@ union all
 select 'LINESTRING(2 2, 3 3)'::text g
 ) foo;
 
-
 select st_astext(st_collect(g::geometry)), encode(ST_AsTWKB(ST_Collect(g::geometry),0),'hex') from
 (
 select 'MULTIPOINT((1 1),(2 2))'::text g
index 7be046d7327dad0c40ad6eb9b5ecfd5c2eb67f96..5fcec8faa7fa0a86625c2eea3ff99afb8e24c42d 100644 (file)
@@ -337,7 +337,6 @@ BEGIN
                        END;
                        -- }
 
-
                        IF NOT hasgeog THEN
                                RETURN NEXT;
                                CONTINUE;
index 372de22f2c20255f2c0f27316f75c70a2f9b9e24..0d68a43483fd935136d5f50afd7d4e0ff3ebe80b 100644 (file)
@@ -41,17 +41,12 @@ SELECT g,
 'POINT ZM (0 0 0)' -- broken, misses an ordinate value
 ::text as g ) as foo;
 
-
-
-
 SELECT g,
       ST_AsText(g::geometry),
       ST_OrderingEquals(g::geometry, St_GeomFromText(ST_AsText(g::geometry))) FROM ( SELECT
 'POINT((0 0))'
 ::text as g ) as foo;
 
-
-
 -- MULTIPOINT --
 
 SELECT g,
@@ -103,7 +98,6 @@ SELECT g,
 'MULTIPOINT ZM ((0 0 0 0), (2 0 0 0))'
 ::text as g ) as foo;
 
-
 -- LINESTRING --
 
 SELECT g,
@@ -154,7 +148,6 @@ SELECT g,
 'LINESTRING ZM (0 0 0 0, 1 1 0 0)'
 ::text as g ) as foo;
 
-
 -- MULTILINESTRING --
 
 SELECT g,
@@ -217,7 +210,6 @@ SELECT g,
 'MULTILINESTRING ZM ((0 0 0 0, 2 0 0 0), (1 1 0 0, 2 2 0 0))'
 ::text as g ) as foo;
 
-
 -- POLYGON --
 
 SELECT g,
@@ -262,8 +254,6 @@ SELECT g,
 'POLYGON ZM ((0 0 0 2,10 0 0 2,10 10 0 2,0 10 0 2,0 0 0 2),(2 2 0 2,2 5 0 2,5 5 0 2,5 2 0 2,2 2 0 2))'
 ::text as g ) as foo;
 
-
-
 -- MULTIPOLYGON --
 
 SELECT g,
@@ -308,7 +298,6 @@ SELECT g,
 'MULTIPOLYGON ZM (((0 0 2 5,10 0 2 5,10 10 2 5,0 10 2 5,0 0 2 5),(2 2 2 5,2 5 2 5,5 5 2 5,5 2 2 5,2 2 2 5)))'
 ::text as g ) as foo;
 
-
 -- GEOMETRYCOLLECTION --
 
 SELECT g,
@@ -404,7 +393,6 @@ SELECT g,
 'CIRCULARSTRING ZM (0 0 0 0, 1 1 0 0, 1 2 3 4)'
 ::text as g ) as foo;
 
-
 -- COMPOUNDCURVE --
 
 SELECT g, -- invalid (missing point)
@@ -531,7 +519,6 @@ SELECT g,
 'MULTICURVE ZM ((5 5 1 3, 3 5 2 2, 3 3 3 1, 0 3 1 1), CIRCULARSTRING ZM (0 0 0 0, 0.2 1 3 -2, 0.5 1.4 1 2), COMPOUNDCURVE ZM (CIRCULARSTRING ZM (0 0 0 0,1 1 1 2,1 0 0 1),(1 0 0 1,0 1 5 4)))'
 ::text as g ) as foo;
 
-
 -- MULTISURFACE --
 
 SELECT g,
@@ -596,7 +583,6 @@ SELECT g,
 'POLYHEDRALSURFACE ZM (((0 0 0 0,0 0 1 0,0 1 0 2,0 0 0 0)),((0 0 0 0,0 1 0 0,1 0 0 4,0 0 0 0)),((0 0 0 0,1 0 0 0,0 0 1 6,0 0 0 0)),((1 0 0 0,0 1 0 0,0 0 1 0,1 0 0 0)))'
 ::text as g ) as foo;
 
-
 -- TRIANGLE --
 
 SELECT g,  -- invalid (non-closed ring)
@@ -635,7 +621,6 @@ SELECT g,
 'TRIANGLE ZM ((1 2 3 -1,4 5 6 -2,7 8 9 -3,1 2 3 -1))'
 ::text as g ) as foo;
 
-
 -- TIN --
 
 SELECT g,  -- invalid (non-closed ring)
@@ -674,4 +659,3 @@ SELECT g,
 'TIN ZM ( ((0 0 0 0, 0 0 1 0, 0 1 0 4, 0 0 0 0)), ((0 0 0 1, 0 1 0 2, 1 1 0 3, 0 0 0 1)) )'
 ::text as g ) as foo;
 
-
index 5ec6ed8d065eb5bd266a03880ce83062fbd34d6a..e8b96378ee8bbbb39797dc759310ae848d6d8c3b 100644 (file)
@@ -212,7 +212,6 @@ FROM _edgepath
         RAISE DEBUG ' edge % lf:%(%) rf:%(%)' , rec.signed_edge_id, rec.lf, rec.left_face, rec.rf, rec.right_face;
 #endif
 
-
         IF rec.left_face = ANY (all_faces) AND NOT rec.left_face = ANY (shell_faces) THEN
           shell_faces := shell_faces || rec.left_face;
         END IF;
@@ -293,7 +292,6 @@ FROM _edgepath
 
     EXECUTE 'SET search_path TO ' || old_search_path;
 
-
   ELSIF tg.type = 4 THEN -- collection
     RAISE EXCEPTION 'Collection TopoGeometries are not supported by AsTopoJSON';
 
index 412049bd9953464e5bd21c95ecd6767f12215b34..cd07a7e30b82cd05e2ae87c0f69745fe17e09134 100644 (file)
@@ -384,7 +384,6 @@ BEGIN
 
         END IF;
 
-
         gml = gml || '>';
 
         gml = gml || topology._AsGMLEdge(rec2.edge_id,
@@ -394,7 +393,6 @@ BEGIN
                                         nsprefix_in, precision,
                                         options, idprefix, gmlver);
 
-
         gml = gml || '</' || nsprefix || 'directedEdge>';
       END LOOP;
     END LOOP;
@@ -443,7 +441,6 @@ BEGIN
 
   END IF;
 
-
   RETURN gml;
 
 END
@@ -482,7 +479,6 @@ $$
 $$ LANGUAGE 'sql' VOLATILE; -- writes into visited table
 -- } AsGML(TopoGeometry, nsprefix, precision, options)
 
-
 --{
 --
 -- API FUNCTION
@@ -539,7 +535,6 @@ $$
 $$ LANGUAGE 'sql' VOLATILE; -- writes into visited table
 -- } AsGML(TopoGeometry, visited_table, nsprefix)
 
-
 --{
 --
 -- API FUNCTION
index 1c105add2cd979df25a2456cb11e3b3475744548..7974182af25d4d8af2e97d8e2ea594b152d57353 100644 (file)
@@ -626,7 +626,6 @@ BEGIN
     || ') ';
   END IF;
 
-
   --
   -- Set left_face/right_face of any contained edge
   --
index 38a09079a9a40ed69559c73904973eab51e96008..65d925a0c3b22af7f8469a5c40d462d2d8367624 100644 (file)
@@ -76,7 +76,6 @@ BEGIN
 
   IF tg1.type = 1 THEN -- [multi]point
 
-
     IF tg2.type = 1 THEN -- point/point
   ---------------------------------------------------------
   --
@@ -106,7 +105,6 @@ BEGIN
   --
   ---------------------------------------------------------
 
-
     ELSIF tg2.type = 2 THEN -- point/line
   ---------------------------------------------------------
   --
@@ -349,7 +347,6 @@ BEGIN
       RAISE EXCEPTION 'Invalid TopoGeometry type %', tg2.type;
     END IF;
 
-
   ELSIF tg1.type = 3 THEN -- [multi]polygon
 
     IF tg2.type = 3 THEN -- polygon/polygon
index 998792da386b63894544b7aa295a43af293a4280..5b53cd29c54990f9e6b84eeca4dda0efc93ec1be 100644 (file)
@@ -1,5 +1,5 @@
 -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--- 
+--
 -- PostGIS - Spatial Types for PostgreSQL
 -- http://postgis.net
 --
@@ -21,7 +21,7 @@
 --
 -- Returns return the integer ID if there is a face on the Point.
 --
--- When the Point is even a Node it raise an exception. 
+-- When the Point is even a Node it raise an exception.
 -- This case is testable with the GetNodeByPoint(atopology, apoint, tol)
 --
 -- If there isn't any face in the Point, GetFaceByPoint return 0.
index 0507b9ff42f310c727da59946ea942e72f6b8223..629eef4b94f73969e2e92aeec846b7c10fbcd0ec 100644 (file)
@@ -30,7 +30,6 @@ CREATE TYPE topology.GetFaceEdges_ReturnType AS (
   edge integer
 );
 
-
 --{
 -- Topo-Geo and Topo-Net 3: Routine Details
 -- X.3.5
@@ -129,7 +128,6 @@ CREATE OR REPLACE FUNCTION topology.ST_RemEdgeModFace(toponame varchar, e1id int
   LANGUAGE 'c' VOLATILE;
 --} ST_RemEdgeModFace
 
-
 --{
 -- Topo-Geo and Topo-Net 3: Routine Details
 -- X.3.16
@@ -142,7 +140,6 @@ CREATE OR REPLACE FUNCTION topology.ST_GetFaceGeometry(toponame varchar, aface i
   LANGUAGE 'c' STABLE;
 --} ST_GetFaceGeometry
 
-
 --{
 -- Topo-Geo and Topo-Net 3: Routine Details
 -- X.3.1
@@ -483,7 +480,6 @@ BEGIN
   RAISE DEBUG 'Merged edges: %', ST_NumGeometries(nodededges);
 #endif
 
-
   --
   -- Collect input points and input lines endpoints
   --
@@ -549,7 +545,6 @@ BEGIN
     PERFORM topology.ST_AddIsoNode(atopology, 0, rec.geom);
   END LOOP;
 
-
   FOR rec IN SELECT geom FROM ST_Dump(nodededges)
   LOOP
     SELECT topology.GetNodeByPoint(atopology, st_startpoint(rec.geom), 0)
index ee8699c31666e8f92efbf5252f6fb0203a244500..7ac171b8efff706386b311cb0c4fa4a26130c6aa 100644 (file)
@@ -42,7 +42,6 @@ BEGIN
 #endif
   EXECUTE sql;
 
-
   RETURN tg;
 
 END
index c860fb08da66ea76b4a46356e54a1053cdf30ac3..0a447c4ea416daec70be329989464f6cf67bcdc7 100644 (file)
@@ -97,7 +97,6 @@ BEGIN
     RAISE DEBUG '%', sql;
     EXECUTE sql INTO geom;
 
-
   ELSIF tg.type = 2 THEN -- [multi]line -- }{
 
     sql :=
index 8401a8cffac05b48712379efebe64a0e502cfffa..2a26349e7b3ff44e998a1f173c2807972dfe5fd9 100644 (file)
@@ -65,7 +65,6 @@ BEGIN
         alayer, atopology;
   END IF;
 
-
   --
   -- Check type compatibility and create empty TopoGeometry
   -- 1:puntal, 2:lineal, 3:areal, 4:collection
@@ -157,7 +156,6 @@ BEGIN
   alayer := layer_id(tg);
   atopology := topology_info.name;
 
-
   -- Get tolerance, if 0 was given
   tolerance := COALESCE( NULLIF(atolerance, 0), topology._st_mintolerance(topology_info.name, ageom) );
 
@@ -186,7 +184,6 @@ BEGIN
         alayer, atopology;
   END IF;
 
-
   --
   -- Check type compatibility and set TopoGeometry type
   -- 1:puntal, 2:lineal, 3:areal, 4:collection
index 10c000f49fba05677c925fecc55e01386ed5a6b4..3023a49e8826321bc07b4a7cd36f29eb1110bc31 100644 (file)
@@ -8,8 +8,6 @@ SELECT AddGeometryColumn('features','land_parcels','the_geom',-1,'MULTIPOLYGON',
 SELECT AddGeometryColumn('features','city_streets','the_geom',-1,'MULTILINESTRING',2);
 SELECT AddGeometryColumn('features','traffic_signs','the_geom',-1,'MULTIPOINT',2);
 
-
-
 --ALTER TABLE features.city_streets ADD the_geom geometry;
 UPDATE features.city_streets set the_geom =
   st_multi(topology.Geometry(feature));
index b2377d3c193ecda914bae4eefb9191fe81e93f92..83c75b73cd5ceec826ecf054b39aa7d6fb044681 100644 (file)
@@ -17,7 +17,6 @@
 --ORA---- 5. Initialize topology
 --ORA---- 6. Load feature tables using the SDO_TOPO_GEOMETRY constructor.
 
-
 BEGIN;
 
 -- 3. Create feature tables
@@ -31,8 +30,6 @@ CREATE TABLE features.city_streets ( -- City streets (selected edges)
 CREATE TABLE features.traffic_signs ( -- Traffic signs (selected nodes)
   feature_name VARCHAR PRIMARY KEY) with oids;
 
-
-
 -- 4. Associate feature tables with the topology.
 --    Add the three topology geometry layers to the CITY_DATA topology.
 --    Any order is OK.
@@ -46,7 +43,6 @@ SELECT topology.AddTopoGeometryColumn('city_data', 'features', 'city_streets','f
 --NOTYET---- 5. Initialize topology metadata.
 --NOTYET--EXECUTE topology.INITIALIZE_METADATA('CITY_DATA');
 
-
 -- 6. Load feature tables using the CreateTopoGeom constructor.
 -- Each topology feature can consist of one or more objects (face, edge, node)
 -- of an appropriate type. For example, a land parcel can consist of one face,
index 866f8a9418b8e4c4f69da5b086e96bb9c2d7a999..d47d8a5f169b0381b662ceb6734cb47f180cbc5f 100644 (file)
 --ORA---- 2. Load (normally bulk-load) topology data
 --ORA----    (node, edge, and face tables).
 
-
 BEGIN;
 
--- 1. Create the topology. 
--- 
+-- 1. Create the topology.
+--
 -- NOTE:
 --  Returns topology id... which depend on how many
 --  topologies where created in the regress database
 --  so we just check it's a number greater than 0
--- 
+--
 SELECT topology.CreateTopology('city_data', @SRID@) > 0;
 
 -- 2. Load topology data (node, edge, and face tables).
@@ -47,70 +46,70 @@ SELECT setval('city_data.face_face_id_seq', 9);
 
 -- 2B. Insert data into <topology_name>.NODE table.
 -- N1
-INSERT INTO city_data.node(node_id, geom, containing_face) 
+INSERT INTO city_data.node(node_id, geom, containing_face)
        VALUES(1, 'SRID=@SRID@;POINT(8 30)', NULL);
 -- N2
-INSERT INTO city_data.node(node_id, geom, containing_face) 
+INSERT INTO city_data.node(node_id, geom, containing_face)
        VALUES(2, 'SRID=@SRID@;POINT(25 30)', NULL);
 -- N3
-INSERT INTO city_data.node(node_id, geom, containing_face) 
+INSERT INTO city_data.node(node_id, geom, containing_face)
        VALUES(3, 'SRID=@SRID@;POINT(25 35)', NULL);
 -- N4
-INSERT INTO city_data.node(node_id, geom, containing_face) 
+INSERT INTO city_data.node(node_id, geom, containing_face)
        VALUES(4, 'SRID=@SRID@;POINT(20 37)', 2);
 -- N5
-INSERT INTO city_data.node(node_id, geom, containing_face) 
+INSERT INTO city_data.node(node_id, geom, containing_face)
        VALUES(5, 'SRID=@SRID@;POINT(36 38)', NULL);
 -- N6
-INSERT INTO city_data.node(node_id, geom, containing_face) 
+INSERT INTO city_data.node(node_id, geom, containing_face)
        VALUES(6, 'SRID=@SRID@;POINT(57 33)', NULL);
 -- N7
-INSERT INTO city_data.node(node_id, geom, containing_face) 
+INSERT INTO city_data.node(node_id, geom, containing_face)
        VALUES(7, 'SRID=@SRID@;POINT(41 40)', NULL);
 -- N8
-INSERT INTO city_data.node(node_id, geom, containing_face) 
+INSERT INTO city_data.node(node_id, geom, containing_face)
        VALUES(8, 'SRID=@SRID@;POINT(9 6)', NULL);
 -- N9
-INSERT INTO city_data.node(node_id, geom, containing_face) 
+INSERT INTO city_data.node(node_id, geom, containing_face)
        VALUES(9, 'SRID=@SRID@;POINT(21 6)', NULL);
 -- N10
-INSERT INTO city_data.node(node_id, geom, containing_face) 
+INSERT INTO city_data.node(node_id, geom, containing_face)
        VALUES(10, 'SRID=@SRID@;POINT(35 6)', NULL);
 -- N11
-INSERT INTO city_data.node(node_id, geom, containing_face) 
+INSERT INTO city_data.node(node_id, geom, containing_face)
        VALUES(11, 'SRID=@SRID@;POINT(47 6)', NULL);
 -- N12
-INSERT INTO city_data.node(node_id, geom, containing_face) 
+INSERT INTO city_data.node(node_id, geom, containing_face)
        VALUES(12, 'SRID=@SRID@;POINT(47 14)', NULL);
 -- N13
-INSERT INTO city_data.node(node_id, geom, containing_face) 
+INSERT INTO city_data.node(node_id, geom, containing_face)
        VALUES(13, 'SRID=@SRID@;POINT(35 14)', NULL);
 -- N14
-INSERT INTO city_data.node(node_id, geom, containing_face) 
+INSERT INTO city_data.node(node_id, geom, containing_face)
        VALUES(14, 'SRID=@SRID@;POINT(21 14)', NULL);
 -- N15
-INSERT INTO city_data.node(node_id, geom, containing_face) 
+INSERT INTO city_data.node(node_id, geom, containing_face)
        VALUES(15, 'SRID=@SRID@;POINT(9 14)', NULL);
 -- N16
-INSERT INTO city_data.node(node_id, geom, containing_face) 
+INSERT INTO city_data.node(node_id, geom, containing_face)
        VALUES(16, 'SRID=@SRID@;POINT(9 22)', NULL);
 -- N17
-INSERT INTO city_data.node(node_id, geom, containing_face) 
+INSERT INTO city_data.node(node_id, geom, containing_face)
        VALUES(17, 'SRID=@SRID@;POINT(21 22)', NULL);
 -- N18
-INSERT INTO city_data.node(node_id, geom, containing_face) 
+INSERT INTO city_data.node(node_id, geom, containing_face)
        VALUES(18, 'SRID=@SRID@;POINT(35 22)', NULL);
 -- N19
-INSERT INTO city_data.node(node_id, geom, containing_face) 
+INSERT INTO city_data.node(node_id, geom, containing_face)
        VALUES(19, 'SRID=@SRID@;POINT(47 22)', NULL);
 -- N20
-INSERT INTO city_data.node(node_id, geom, containing_face) 
+INSERT INTO city_data.node(node_id, geom, containing_face)
        VALUES(20, 'SRID=@SRID@;POINT(4 31)', NULL);
 -- N21
-INSERT INTO city_data.node(node_id, geom, containing_face) 
+INSERT INTO city_data.node(node_id, geom, containing_face)
        VALUES(21, 'SRID=@SRID@;POINT(9 35)', NULL);
 -- N22
-INSERT INTO city_data.node(node_id, geom, containing_face) 
+INSERT INTO city_data.node(node_id, geom, containing_face)
        VALUES(22, 'SRID=@SRID@;POINT(13 35)', NULL);
 
 -- UPDATE Node id sequence
index 75c8add52c3a4b425483bb3ddb74c0057e659168..a209218c9a4b2171275a4bbd90320de6e65a44c6 100644 (file)
@@ -96,4 +96,3 @@ INSERT INTO features.city_streets VALUES ('R1a', -- Feature name
 
 --END;
 
-
index a910a1898e134adb5153d068e2ee523b5e500dde..92a310aa676fb0d8e42aa6b3b808597658240ec1 100644 (file)
@@ -16,37 +16,35 @@ BEGIN;
 
 #if DO_POINT_POINT_INTERSECTS
 
--- Detect intersections between traffic_signs 
+-- Detect intersections between traffic_signs
 
 SELECT 'POINT/POINT INTERSECTS' as operation;
 
-SELECT a.feature_name, b.feature_name FROM 
+SELECT a.feature_name, b.feature_name FROM
        features.traffic_signs a, features.traffic_signs b
        WHERE a.oid < b.oid AND @SCHEMA@intersects(a.@COLUMN@, b.@COLUMN@);
 
 #endif
 
-
 #if DO_POINT_LINE_INTERSECTS
 
 -- Detect intersections between city_streets and traffic_signs
 
 SELECT 'POINT/LINE INTERSECTS' as operation;
 
-SELECT a.feature_name, b.feature_name FROM 
+SELECT a.feature_name, b.feature_name FROM
        features.traffic_signs a, features.city_streets b
        WHERE @SCHEMA@intersects(a.@COLUMN@, b.@COLUMN@);
 
 #endif
 
-
 #if DO_LINE_LINE_INTERSECTS
 
 -- Detect intersections between city_streets
 
 SELECT 'LINE/LINE INTERSECTS' as operation;
 
-SELECT a.feature_name, b.feature_name FROM 
+SELECT a.feature_name, b.feature_name FROM
        features.city_streets a, features.city_streets b
        WHERE a.oid < b.oid AND @SCHEMA@intersects(a.@COLUMN@, b.@COLUMN@);
 #endif
@@ -57,7 +55,7 @@ SELECT a.feature_name, b.feature_name FROM
 
 SELECT 'POINT/POLY INTERSECTS' as operation;
 
-SELECT a.feature_name, b.feature_name FROM 
+SELECT a.feature_name, b.feature_name FROM
        features.traffic_signs a, features.land_parcels b
        WHERE @SCHEMA@intersects(a.@COLUMN@, b.@COLUMN@);
 #endif
@@ -68,7 +66,7 @@ SELECT a.feature_name, b.feature_name FROM
 
 SELECT 'LINE/POLY INTERSECTS' as operation;
 
-SELECT a.feature_name, b.feature_name FROM 
+SELECT a.feature_name, b.feature_name FROM
        features.city_streets a, features.land_parcels b
        WHERE @SCHEMA@intersects(a.@COLUMN@, b.@COLUMN@);
 #endif
@@ -79,7 +77,7 @@ SELECT a.feature_name, b.feature_name FROM
 
 SELECT 'POLY/POLY INTERSECTS' as operation;
 
-SELECT a.feature_name, b.feature_name FROM 
+SELECT a.feature_name, b.feature_name FROM
        features.land_parcels a, features.land_parcels b
        WHERE a.oid < b.oid AND @SCHEMA@intersects(a.@COLUMN@, b.@COLUMN@);
 #endif
@@ -88,7 +86,7 @@ SELECT a.feature_name, b.feature_name FROM
 
 SELECT 'POINT/POINT EQUALS' as operation;
 
-SELECT a.feature_name, b.feature_name FROM 
+SELECT a.feature_name, b.feature_name FROM
        features.traffic_signs a, features.traffic_signs b
        WHERE a.oid < b.oid AND @SCHEMA@equals(a.@COLUMN@, b.@COLUMN@);
 
@@ -98,7 +96,7 @@ SELECT a.feature_name, b.feature_name FROM
 
 SELECT 'LINE/LINE EQUALS' as operation;
 
-SELECT a.feature_name, b.feature_name FROM 
+SELECT a.feature_name, b.feature_name FROM
        features.city_streets a, features.city_streets b
        WHERE a.oid < b.oid AND @SCHEMA@equals(a.@COLUMN@, b.@COLUMN@);
 
@@ -108,7 +106,7 @@ SELECT a.feature_name, b.feature_name FROM
 
 SELECT 'POLYGON/POLYGON EQUALS' as operation;
 
-SELECT a.feature_name, b.feature_name FROM 
+SELECT a.feature_name, b.feature_name FROM
        features.land_parcels a, features.land_parcels b
        WHERE a.oid < b.oid AND @SCHEMA@equals(a.@COLUMN@, b.@COLUMN@);
 
index edf8e7a1dd0efcf5558b4284f4a3c14b0d7267d5..cd3dd6d61299c0c12f601c7bc6702d30ffc1bed3 100644 (file)
@@ -15,7 +15,6 @@
 --ORA---- 7. Query the data.
 --ORA---- 8. Optionally, edit data using the PL/SQL or Java API.
 
-
 BEGIN;
 
 -- 7. Query the data.
@@ -43,7 +42,6 @@ FROM features.big_streets;
 SELECT feature_name,ST_AsText(topology.geometry(feature))
 FROM features.big_parcels;
 
-
 --NOTYET--
 --NOTYET--/* Window is city_streets */
 --NOTYET--SELECT a.feature_name, b.feature_name
index f482bfc93e0dafad5527a0abf422c91b3a807f7e..bb7b876f6241fe02cdac87f72305c5364702d1e3 100644 (file)
@@ -24,7 +24,6 @@ SELECT 'e6',  topology.addEdge('tt', 'LINESTRING(10 10, 20 10)');
 SELECT 'e7',  topology.addEdge('tt', 'LINESTRING(20 10, 20 0)');
 SELECT 'e8',  topology.addEdge('tt', 'LINESTRING(20 0, 10 0)');
 
-
 -- Register a face with no holes
 SELECT 'f1',  topology.addFace('tt', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))');
 
index 588b8049fc1249bd1591106da7b5a2a272b5fe02..31935fbe88ff79d22744f6dc92d8b7fab10cce38 100644 (file)
@@ -25,7 +25,6 @@ SELECT 'p5',  topology.addNode('nodes', 'POINT(5 10)', true);
 -- ... and verify the edge was split
 SELECT 'post-p5', edge_id, ST_AsText(geom) FROM nodes.edge ORDER BY edge_id;
 
-
 -- And same against a closed edge
 INSERT INTO nodes.face VALUES(nextval('nodes.face_face_id_seq'), 'POLYGON((0 20, 10 20, 10 30, 0 30, 0 20))');
 INSERT INTO nodes.edge VALUES(nextval('nodes.edge_data_edge_id_seq'),2,2,2,-2,1,0,
index 6dd8d19e1bb55e0815d3ab959e05546a47951934..eff11ecb1d4192a42f6a17309bb76b6d4a404b19 100644 (file)
@@ -20,7 +20,6 @@ select topology.GetEdgeByPoint('schema_topo',ST_GeomFromText('POINT(5 5.5)'), 0.
 -- Ask for a point where there isn't an edge
 select topology.GetEdgeByPoint('schema_topo',ST_GeomFromText('POINT(5 5.5)'), 0::float8) = 0;
 
-
 -- Failing cases (should all raise exceptions) -------
 
 -- Ask for Point in a Node
@@ -29,5 +28,4 @@ select topology.GetEdgeByPoint('schema_topo',ST_GeomFromText('POINT(4 7)'), 1::f
 -- Ask for a Point with a tollerance too high
 select topology.GetEdgeByPoint('schema_topo',ST_GeomFromText('POINT(5 5)'), 2::float8);
 
-
 SELECT topology.DropTopology('schema_topo');
index 42d0f8eb463e9dcac9fb6312f959d6cd501d0d42..9cda2cac03fa25b4ab6b6951d0698ee8fc5a01bb 100644 (file)
@@ -30,7 +30,6 @@ select 'F4',topology.addFace('schema_topo', 'POLYGON((1 5, 1 12, 7 12, 8 12, 10
 select 'F5',topology.addFace('schema_topo', 'POLYGON((4 7,6 7,6 10,4 10,4 7))');
 select 'F6',topology.addFace('schema_topo', 'POLYGON((8 12,8 14,10 14,10 12,8 12))');
 
-
 -- ask for a Point with tolerance zero
 select 't1', topology.GetFaceByPoint('schema_topo',ST_GeomFromText('POINT(7 7)'), 0::float8)::int;
 select 't2', topology.GetFaceByPoint('schema_topo',ST_GeomFromText('POINT(12 8)'), 0::float8)::int;
@@ -47,7 +46,6 @@ select 't7', topology.GetFaceByPoint('schema_topo',ST_GeomFromText('POINT(3 13)'
 -- ask for a Point where there isn't a Face
 select 't8', topology.GetFaceByPoint('schema_topo',ST_GeomFromText('POINT(5 14)'), 0::float8)::int;
 
-
 -- Failing cases (should all raise exceptions) -------
 
 -- Ask for Point in a Node (2 or more faces)
@@ -56,5 +54,4 @@ select 'e1', topology.GetFaceByPoint('schema_topo',ST_GeomFromText('POINT(1 5)')
 -- Ask for a Point with a tollerance too high (2 or more faces)
 select 'e2', topology.GetFaceByPoint('schema_topo',ST_GeomFromText('POINT(6 13)'), 1::float8)::int;
 
-
 SELECT topology.DropTopology('schema_topo');
index 9182fa944a9865d358e8215374c228bb79832890..3b9137fddc632636a637d7c48a97f7d5e860845b 100644 (file)
@@ -20,11 +20,9 @@ select topology.GetNodeByPoint('schema_topo',ST_GeomFromText('POINT(4.1 4)'), 0.
 -- Ask for a point where there isn't a node
 select topology.GetNodeByPoint('schema_topo',ST_GeomFromText('POINT(5 5.5)'), 0::float8) = 0;
 
-
 -- Failing cases (should all raise exceptions) -------
 
 -- Ask for a Point with a tollerance too high
 select topology.GetNodeByPoint('schema_topo',ST_GeomFromText('POINT(4 7)'), 5::float8);
 
-
 SELECT topology.DropTopology('schema_topo');
index a6f8cead3b89b9b665b0e2ca3f830395122cf366..aadbe017dc0ca41e475181c87686679ca5254f3b 100644 (file)
@@ -216,7 +216,6 @@ ORDER BY name;
 
 --- } GML2 output
 
-
 SELECT topology.DropTopology('city_data');
 DROP SCHEMA features CASCADE;
 DELETE FROM spatial_ref_sys where srid = 4326;
index 2600cfc5b6b1de8b9be1cb3b3df334f967e42f1f..9ef25b5694ad6a85b3036fb3333ea6b72ee5a015 100644 (file)
@@ -87,7 +87,6 @@ SELECT topology.ST_AddIsoEdge('sqlmm_topology', 1, 2, 'LINESTRING(0 0, 2 20, 10
 
 -- on different faces (TODO req. nodes contained in face)
 
-
 -------------------------------------------------------------
 -- ST_AddIsoNode (2)
 -------------------------------------------------------------
index 25881cf8912f293e5329b367d92f193ea683a33f..37914804bb5d9cb0897095ac2ce03bce1bd7bf39 100644 (file)
@@ -69,7 +69,6 @@ SELECT 'L' || topology.AddTopoGeometryColumn('city_data',
 INSERT INTO city_data.fc VALUES ('F5,N4',
   topology.CreateTopoGeom('city_data', 4, 2, '{{5,3},{4,1}}'));
 
-
 ---------------------------------------------------------------------
 -- Now add some edges splitting faces...
 ---------------------------------------------------------------------
@@ -521,7 +520,6 @@ SELECT f.id, r.element_type||':'||r.element_id as comp
 
 SELECT 'F'||face_id, st_astext(mbr) FROM city_data.face ORDER BY face_id;
 
-
 ---------------------------------------------------------------------
 -- Cleanups
 ---------------------------------------------------------------------
index f69dfbb9cff16bdf41e3e531dfa715ae0682cc58..71cfd994c87d2d0df7c575c70c358ee7898707b3 100644 (file)
@@ -69,7 +69,6 @@ SELECT 'L' || topology.AddTopoGeometryColumn('city_data',
 INSERT INTO city_data.fc VALUES ('F5,N4',
   topology.CreateTopoGeom('city_data', 4, 2, '{{5,3},{4,1}}'));
 
-
 ---------------------------------------------------------------------
 -- Now add some edges splitting faces...
 ---------------------------------------------------------------------
index 159e6b0ebcfa1c0f7acde20709f6e29db29d4f23..eea65a7dbcbcad11cf457a9676e4851cd4a89125 100644 (file)
@@ -67,7 +67,6 @@ SELECT topology.ST_AddIsoEdge('tt',
 -- See http://trac.osgeo.org/postgis/ticket/978
 SELECT topology.ST_AddIsoEdge('tt', 6, 7, 'LINESTRING(20 10, 30 10)');
 
-
 -- Edge intersection (geometry intersects an edge)
 SELECT topology.ST_AddIsoEdge('tt',
   3, 6, 'LINESTRING(5 0, 20 10)');
@@ -75,5 +74,4 @@ SELECT topology.ST_AddIsoEdge('tt',
 -- TODO: check closed edge (not-isolated I guess...)
 -- on different faces (TODO req. nodes contained in face)
 
-
 SELECT topology.DropTopology('tt');
index 4d1c46d07acb5e32302f5accb744be8fc2cd2ae1..5f97654e0cdf071489f208f3237b3e2fcdbeec01 100644 (file)
@@ -5,7 +5,6 @@ set client_min_messages to WARNING;
 
 \i load_topology.sql
 
-
 -- NULL exceptions
 select ST_AddIsoNode(NULL, 0, 'POINT(1 4)');
 select ST_AddIsoNode('tt', 0, NULL);
index a9e18b798f107ee31a8b6a8f31c47bf8bad0eb77..84a92ae7542f99734c644eec30de30835bacd42c 100644 (file)
@@ -2,7 +2,6 @@ set client_min_messages to ERROR;
 
 \i load_topology.sql
 
-
 -- good one
 SELECT 'T1', topology.ST_ChangeEdgeGeom('city_data', 25,
  'LINESTRING(9 35, 11 33, 13 35)');
index c75aeaa64072aab6588e9ba02cd6072904fc26aa..2d0b4ce70c7cf784b0d904e541543885cee6f85a 100644 (file)
@@ -38,7 +38,6 @@ BEGIN
 END;
 $$ LANGUAGE 'plpgsql';
 
-
 -- Invalid geometries
 select null from ( select topology.CreateTopology('t', 4326) > 0 ) as ct;
 select topology.st_createtopogeo('t', null); -- Invalid geometry
index 8bee609f91bb57be05ec8990ff2fadec46ff8b11..2425f18e4401bfc4a59f43a94b3e75e4f2835926 100644 (file)
@@ -143,8 +143,6 @@ WHERE n.node_id = t.node_id
 
 DROP TABLE t;
 
-
-
 DROP FUNCTION check_changes();
 SELECT DropTopology('city_data');
 DELETE FROM spatial_ref_sys where srid = 4326;
index 8f545a08c29acd73939c48a8bb72ed11fb1b98d4..c2b74dd761a157880b74d686545e18f8ac518eee 100644 (file)
@@ -176,7 +176,6 @@ SELECT '#1998.-', topology.DropTopology('t1998');
 -------------------------------------------------------------------------
 -------------------------------------------------------------------------
 
-
 -- TODO: test registered but unexistent topology
 -- TODO: test registered but corrupted topology
 --       (missing node, edge, relation...)
index fc6b85f4f9fb17b945e872d61230840829e933b1..68b9d8a4f91080e56b03719247936cd0931dc27e 100644 (file)
@@ -143,7 +143,6 @@ WHERE n.node_id = t.node_id
 
 DROP TABLE t;
 
-
 DROP FUNCTION check_changes();
 SELECT DropTopology('city_data');
 DELETE FROM spatial_ref_sys where srid = 4326;
index 650109e5849b4327ce656417102297bc9ac1d50a..f32c675d53d5a5c755d2335920bcc68bd0108802 100644 (file)
@@ -3,7 +3,6 @@ set client_min_messages to ERROR;
 
 INSERT INTO spatial_ref_sys ( auth_name, auth_srid, srid, proj4text ) VALUES ( 'EPSG', 4326, 4326, '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs' );
 
-
 -- Import city_data
 \i load_topology-4326.sql
 
@@ -152,7 +151,6 @@ SELECT * FROM check_edges('bogus');
 SELECT * FROM check_faces('bogus');
 -- }
 
-
 -- Remove isolated edge
 SELECT 'RM(25)', topology.ST_RemEdgeModFace('city_data', 25);
 SELECT * FROM check_nodes('RM(25)/nodes');
@@ -214,7 +212,6 @@ SELECT * FROM check_edges('RM(15)/edges');
 SELECT * FROM check_faces('RM(15)/faces');
 SELECT save_edges(); SELECT save_faces(); SELECT save_nodes();
 
-
 -- Universe flooding existing single-edge (closed) face
 -- with dangling edge starting from the closing node and
 -- going inside.
@@ -360,7 +357,6 @@ SELECT save_edges(); SELECT save_faces(); SELECT save_nodes();
 
 SELECT topology.DropTopology('city_data');
 
-
 -------------------------------------------------------------------------
 -- Now test in presence of features
 -------------------------------------------------------------------------
@@ -415,4 +411,3 @@ DROP FUNCTION save_nodes();
 DROP FUNCTION check_nodes(text);
 DELETE FROM spatial_ref_sys where srid = 4326;
 
-
index 08d6ca253fa6e8ddefd857a22295dddd6ac0f6dc..f1ecf07f16f1a97fb3d8783811d0e018c2efd24f 100644 (file)
@@ -3,7 +3,6 @@ set client_min_messages to ERROR;
 
 INSERT INTO spatial_ref_sys ( auth_name, auth_srid, srid, proj4text ) VALUES ( 'EPSG', 4326, 4326, '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs' );
 
-
 -- Import city_data
 \i load_topology-4326.sql
 
@@ -20,7 +19,6 @@ AS $$
     FROM city_data.node;
 $$ LANGUAGE 'sql';
 
-
 CREATE OR REPLACE FUNCTION check_nodes(lbl text)
 RETURNS TABLE (l text, o text, node_id int,
     containing_face int)
@@ -153,7 +151,6 @@ SELECT * FROM check_edges('bogus');
 SELECT * FROM check_faces('bogus');
 -- }
 
-
 -- Remove isolated edge
 SELECT 'RN(25)', topology.ST_RemEdgeNewFace('city_data', 25);
 SELECT * FROM check_nodes('RN(25)/nodes');
@@ -215,7 +212,6 @@ SELECT * FROM check_edges('RN(15)/edges');
 SELECT * FROM check_faces('RN(15)/faces');
 SELECT save_edges(); SELECT save_faces(); SELECT save_nodes();
 
-
 -- Universe flooding existing single-edge (closed) face
 -- with dangling edge starting from the closing node and
 -- going inside.
@@ -361,7 +357,6 @@ SELECT save_edges(); SELECT save_faces(); SELECT save_nodes();
 
 SELECT topology.DropTopology('city_data');
 
-
 -------------------------------------------------------------------------
 -- Now test in presence of features
 -------------------------------------------------------------------------
@@ -416,4 +411,3 @@ DROP FUNCTION save_nodes();
 DROP FUNCTION check_nodes(text);
 DELETE FROM spatial_ref_sys where srid = 4326;
 
-
index 63d426168706c4758840258b65a569ea5a088e2c..0001a3627dfa2bba8c505ce067fb3b8591a108f6 100644 (file)
@@ -58,7 +58,6 @@ END;
 $$ LANGUAGE 'plpgsql';
 -- }
 
-
 -- Invalid calls
 SELECT 'invalid', TopoGeo_addLineString('city_data', 'SRID=4326;MULTILINESTRING((36 26, 38 30))');
 SELECT 'invalid', TopoGeo_addLineString('city_data', 'SRID=4326;POINT(36 26)');
index 2ea5c7728869874bd674710add326e58cd3f88f0..adc984d2447d2ee88623de0d3335b417817eda9b 100644 (file)
@@ -70,7 +70,6 @@ END;
 $$ LANGUAGE 'plpgsql';
 -- }
 
-
 -- Invalid calls
 SELECT 'invalid', TopoGeo_addPolygon('city_data', 'MULTILINESTRING((36 26, 38 30))');
 SELECT 'invalid', TopoGeo_addPolygon('city_data', 'POINT(36 26)');
index fa83ef2b5d76078df4c5cdadc51446a2a49c628e..59e8c9f5006afa5456c01c455b753c3be3060593 100644 (file)
@@ -19,6 +19,5 @@ SELECT id, 'rem',  id, ST_Length(TopoGeom_remElement(g, '{1,2}')) FROM tt.f_line
 SELECT id, 'dup',  id, ST_Length(TopoGeom_addElement(g, '{2,2}')) FROM tt.f_line WHERE id = 1;
 SELECT id, 'mis',  id, ST_Length(TopoGeom_remElement(g, '{1,2}')) FROM tt.f_line WHERE id = 1;
 
-
 DROP TABLE tt.f_line;
 select droptopology('tt');
index 993bc6e887376d82367c532407a235cada9c7a3c..6f78aeecc5d54cee5e9946b8b574711f9e04ec0a 100644 (file)
@@ -45,7 +45,6 @@ select totopogeom('TIN( ((0 0 0, 0 0 1, 0 1 0, 0 0 0)), ((0 0 0, 0 1 0, 1 1 0, 0
 select totopogeom('TRIANGLE ((0 0, 0 9, 9 0, 0 0))'::geometry, 'tt', 4); -- TODO: support !
 select totopogeom('CIRCULARSTRING(0 0, 1 1, 1 0)'::geometry, 'tt', 3); -- Unsupported feature type
 
-
 -- Convert a point
 with inp as ( select 'POINT(0 0)' ::geometry as g)
 select St_AsText(g), ST_Equals(totopogeom(g, 'tt', 1)::geometry, g) from inp;
index 5eb1148aa9ea75670596cf66e3fa60e77b82dcab..9ddf0789f6d85bf33efab749dee6ef88c23f1cd5 100644 (file)
@@ -1,5 +1,5 @@
 -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--- 
+--
 --
 -- PostGIS - Spatial Types for PostgreSQL
 -- http://postgis.net
@@ -11,7 +11,7 @@
 -- the terms of the GNU General Public Licence. See the COPYING file.
 --
 -- Author: Sandro Santilli <strk@kbt.io>
---  
+--
 -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 --
 -- STATUS:
@@ -21,7 +21,7 @@
 --  We have PostGIS-specific objects and SQL/MM objects.
 --  PostGIS-specific objects have no prefix, SQL/MM ones
 --  have the ``ST_' prefix.
---  
+--
 -- [PostGIS-specific]
 --
 -- TABLE topology
@@ -46,7 +46,7 @@
 --  the topology.topology table.
 --  TODO: add triggers (or rules, or whatever) enforcing
 --        precision to the edge and node tables.
---  
+--
 -- FUNCTION DropTopology(name)
 --    Delete a topology removing reference from the
 --    topology.topology table
 --    Done, can be modified to include explicit sequences or
 --    more constraints. Very noisy due to implicit index creations
 --    for primary keys and sequences for serial fields...
---  
+--
 --   ST_CreateTopoGeo
 --    Complete
---  
+--
 --   ST_AddIsoNode
 --    Complete
---  
+--
 --   ST_RemoveIsoNode
 --    Complete
---  
+--
 --   ST_MoveIsoNode
 --    Complete
---  
+--
 --   ST_AddIsoEdge
 --    Complete
 --
 --   ST_RemoveIsoEdge
 --    Complete, exceptions untested
---  
+--
 --   ST_ChangeEdgeGeom
 --    Complete
 --
 --   ST_AddEdgeModFace
 --    Complete
 --    Also updates the Relation table
---  
+--
 --   ST_GetFaceEdges
 --    Complete
 --
 --   ST_NewEdgeHeal
 --    Complete
 --    Also updates the Relation table
---  
+--
 --   ST_GetFaceGeometry
 --    Implemented using ST_BuildArea()
---  
+--
 --   ST_RemEdgeNewFace
 --    Complete
 --    Also updates the Relation table
---  
+--
 --   ST_RemEdgeModFace
 --    Complete
 --    Also updates the Relation table
---  
+--
 --   ST_ValidateTopoGeo
 --    Unimplemented (probably a wrapper around ValidateTopology)
---  
---  
+--
+--
 
 -- Uninstalling previous installation isn't really a good habit ...
 -- Let people decide about that
 
 #include "../postgis/sqldefines.h"
 
-
 CREATE SCHEMA topology;
 COMMENT ON SCHEMA topology IS 'PostGIS Topology schema';
 
@@ -234,14 +233,12 @@ BEGIN
 
   --RAISE NOTICE 'LayerTrigger called % % at % level', TG_WHEN, TG_OP, TG_LEVEL;
 
-
   IF TG_OP = 'INSERT' THEN
     RAISE EXCEPTION 'LayerTrigger not meant to be called on INSERT';
   ELSIF TG_OP = 'UPDATE' THEN
     RAISE EXCEPTION 'The topology.layer table cannot be updated';
   END IF;
 
-
   -- Check for existance of any feature column referencing
   -- this layer
   FOR rec IN SELECT * FROM pg_namespace n, pg_class c, pg_attribute a
@@ -266,7 +263,6 @@ BEGIN
     END LOOP;
   END LOOP;
 
-
   -- Get topology name
   SELECT name FROM topology.topology INTO toponame
     WHERE id = OLD.topology_id;
@@ -300,7 +296,6 @@ $$
 LANGUAGE 'plpgsql' VOLATILE STRICT;
 --} LayerTrigger()
 
-
 --{
 -- Layer table.
 -- Stores topology layer informations
@@ -325,7 +320,7 @@ ON topology.layer FOR EACH ROW EXECUTE PROCEDURE topology.LayerTrigger();
 --} Layer table.
 
 --
--- Type returned by ValidateTopology 
+-- Type returned by ValidateTopology
 --
 CREATE TYPE topology.ValidateTopology_ReturnType AS (
   error varchar,
@@ -346,7 +341,7 @@ CREATE TYPE topology.TopoGeometry AS (
 
 --
 -- TopoElement domain
--- 
+--
 -- This is an array of two elements: element_id and element_type.
 --
 -- When used to define _simple_ TopoGeometries,
@@ -369,14 +364,14 @@ ALTER DOMAIN topology.TopoElement ADD
         CONSTRAINT lower_dimension CHECK (
     array_lower(VALUE, 1) = 1
   );
-ALTER DOMAIN topology.TopoElement DROP CONSTRAINT 
+ALTER DOMAIN topology.TopoElement DROP CONSTRAINT
 #if POSTGIS_PGSQL_VERSION >= 92
   IF EXISTS
 #endif
   type_range;
 ALTER DOMAIN topology.TopoElement ADD
         CONSTRAINT type_range CHECK (
-    VALUE[2] > 0 
+    VALUE[2] > 0
   );
 
 --
@@ -414,7 +409,6 @@ BEGIN
 
   --RAISE NOTICE 'RelationTrigger called % % on %.relation for a %', TG_WHEN, TG_OP, toponame, TG_LEVEL;
 
-
   IF TG_OP = 'DELETE' THEN
     RAISE EXCEPTION 'RelationTrigger not meant to be called on DELETE';
   END IF;
@@ -477,7 +471,7 @@ BEGIN
     --
     -- Element is a Node
     --
-    IF NEW.element_type = 1 
+    IF NEW.element_type = 1
     THEN
       ok = false;
       FOR rec IN EXECUTE 'SELECT node_id FROM '
@@ -495,7 +489,7 @@ BEGIN
     --
     -- Element is an Edge
     --
-    ELSIF NEW.element_type = 2 
+    ELSIF NEW.element_type = 2
     THEN
       ok = false;
       FOR rec IN EXECUTE 'SELECT edge_id FROM '
@@ -513,7 +507,7 @@ BEGIN
     --
     -- Element is a Face
     --
-    ELSIF NEW.element_type = 3 
+    ELSIF NEW.element_type = 3
     THEN
       IF NEW.element_id = 0 THEN
         RAISE EXCEPTION 'Face % cannot be associated with any feature', NEW.element_id;
@@ -534,7 +528,7 @@ BEGIN
     END IF;
 
   END IF;
-  
+
   RETURN NEW;
 END;
 $$
@@ -585,11 +579,10 @@ BEGIN
   -- Add new TopoGeometry column in schema.table
   --
   EXECUTE 'ALTER TABLE ' || quote_ident(schema)
-    || '.' || quote_ident(tbl) 
+    || '.' || quote_ident(tbl)
     || ' ADD COLUMN ' || quote_ident(col)
     || ' topology.TopoGeometry;';
 
-
   --
   -- See if child id exists and extract its level
   --
@@ -611,7 +604,7 @@ BEGIN
       quote_ident(toponame) || '.layer_id_seq'
     ) || ')' INTO STRICT newlayer_id;
 
-  EXECUTE 'INSERT INTO ' 
+  EXECUTE 'INSERT INTO '
        'topology.layer(topology_id, '
        'layer_id, level, child_id, schema_name, '
        'table_name, feature_column, feature_type) '
@@ -624,7 +617,6 @@ BEGIN
     || quote_literal(col) || ','
     || intltype || ');';
 
-
   --
   -- Create a sequence for TopoGeometries in this new layer
   --
@@ -635,7 +627,7 @@ BEGIN
   -- Add constraints on TopoGeom column
   --
   EXECUTE 'ALTER TABLE ' || quote_ident(schema)
-    || '.' || quote_ident(tbl) 
+    || '.' || quote_ident(tbl)
     || ' ADD CONSTRAINT "check_topogeom_' || col || '" CHECK ('
        'topology_id(' || quote_ident(col) || ') = ' || topoid
     || ' AND '
@@ -670,7 +662,7 @@ BEGIN
 --
 #if 0
   --
-  -- Add dependency of the topogeom sequence on the feature column 
+  -- Add dependency of the topogeom sequence on the feature column
   -- This is a dirty hack ...
   --
   query = 'INSERT INTO pg_catalog.pg_depend SELECT '
@@ -688,7 +680,7 @@ BEGIN
        ' AND fsub.attname = ' || quote_literal(col)
     || ' AND scat.relname = ''pg_class'' '
        ' AND snsp.nspname = ' || quote_literal(toponame)
-    || ' AND sobj.relnamespace = snsp.oid ' 
+    || ' AND sobj.relnamespace = snsp.oid '
        ' AND sobj.relname = '
        ' ''topogeo_s_' || newlayer_id || ''' ';
 
@@ -749,7 +741,7 @@ BEGIN
     RAISE EXCEPTION 'No layer registered on %.%.%',
       schema,tbl,col;
   END IF;
-    
+
   -- Clean up the topology schema
   BEGIN
     -- Cleanup the relation table
@@ -780,7 +772,6 @@ BEGIN
     EXIT;
   END LOOP;
 
-
   IF ok THEN
     -- Set feature column to NULL to bypass referential integrity
     -- checks
@@ -861,18 +852,17 @@ $$
 $$
 LANGUAGE 'sql' VOLATILE;
 
-
 --{
 -- CreateTopoGeom(topology_name, topogeom_type, layer_id, elements)
 --
 -- Create a TopoGeometry object from Topology elements.
--- The elements parameter is a two-dimensional array. 
+-- The elements parameter is a two-dimensional array.
 -- Every element of the array is either a Topology element represented by
 -- (id, type) or a TopoGeometry element represented by (id, layer).
 -- The actual semantic depends on the TopoGeometry layer, either at
 -- level 0 (elements are topological primitives) or higer (elements
 -- are TopoGeoms from child layer).
--- 
+--
 -- @param toponame Topology name
 --
 -- @param tg_type Spatial type of geometry
@@ -884,7 +874,7 @@ LANGUAGE 'sql' VOLATILE;
 -- @param layer_id Layer identifier
 --
 -- @param tg_objs Array of components
--- 
+--
 -- Return a topology.TopoGeometry object.
 --
 CREATE OR REPLACE FUNCTION topology.CreateTopoGeom(toponame varchar, tg_type integer, layer_id integer, tg_objs topology.TopoElementArray)
@@ -1070,8 +1060,6 @@ AS $$
   SELECT SRID FROM topology.topology WHERE name = $1;
 $$ LANGUAGE 'sql' STABLE STRICT;
 --} GetTopologySRID(toponame)
-  
-
 
 --{
 -- GetTopoGeomElementArray(toponame, layer_id, topogeom_id)
@@ -1178,7 +1166,6 @@ BEGIN
     RAISE EXCEPTION 'Layer % does not exist', layerid;
   END IF;
 
-
   query = 'SELECT abs(element_id) as element_id, element_type FROM '
     || quote_ident(toponame) || '.relation WHERE '
        ' layer_id = ' || layerid
@@ -1205,7 +1192,7 @@ BEGIN
       ret = '{' || rec.element_id || ',' || rec.element_type || '}';
       RETURN NEXT ret;
     END IF;
-  
+
   END LOOP;
 
   RETURN;
@@ -1238,7 +1225,7 @@ LANGUAGE 'plpgsql' STABLE STRICT;
 -- Geometry(TopoGeometry)
 --
 -- Construct a Geometry from a TopoGeometry.
--- 
+--
 -- }{
 CREATE OR REPLACE FUNCTION topology.Geometry(topogeom topology.TopoGeometry)
   RETURNS Geometry
@@ -1302,13 +1289,13 @@ BEGIN
       || ') = pr.element_type ';
     --RAISE DEBUG '%', query;
     EXECUTE sql INTO geom;
-      
+
   ELSIF topogeom.type = 3 THEN -- [multi]polygon -- }{
 
     sql := 'SELECT st_multi(st_union('
          'topology.ST_GetFaceGeometry('
       || quote_literal(toponame) || ','
-      || 'element_id))) as g FROM ' 
+      || 'element_id))) as g FROM '
       || quote_ident(toponame)
       || '.relation WHERE topogeo_id = '
       || topogeom.id || ' AND layer_id = '
@@ -1317,7 +1304,7 @@ BEGIN
 
   ELSIF topogeom.type = 2 THEN -- [multi]line -- }{
 
-    sql := 
+    sql :=
       'SELECT st_multi(ST_LineMerge(ST_Collect(e.geom))) as g FROM '
       || quote_ident(toponame) || '.edge e, '
       || quote_ident(toponame) || '.relation r '
@@ -1326,7 +1313,7 @@ BEGIN
       || ' AND r.element_type = 2 '
          ' AND abs(r.element_id) = e.edge_id';
     EXECUTE sql INTO geom;
-  
+
   ELSIF topogeom.type = 1 THEN -- [multi]point -- }{
 
     sql :=
@@ -1344,7 +1331,7 @@ BEGIN
     sql := 'WITH areas AS ( SELECT ST_Union('
          'topology.ST_GetFaceGeometry('
       || quote_literal(toponame) || ','
-      || 'element_id)) as g FROM ' 
+      || 'element_id)) as g FROM '
       || quote_ident(toponame)
       || '.relation WHERE topogeo_id = '
       || topogeom.id || ' AND layer_id = '
@@ -1392,7 +1379,7 @@ $$
 LANGUAGE 'plpgsql' VOLATILE STRICT;
 --} Geometry(TopoGeometry)
 
--- 7.3+ explicit cast 
+-- 7.3+ explicit cast
 CREATE CAST (topology.TopoGeometry AS Geometry) WITH FUNCTION topology.Geometry(topology.TopoGeometry) AS IMPLICIT;
 
 --{
@@ -1443,7 +1430,7 @@ BEGIN
     RETURN NEXT retrec;
   END LOOP;
 
-  -- Scan all edges 
+  -- Scan all edges
   FOR rec IN EXECUTE 'SELECT e.geom, e.edge_id as id1, e.left_face, e.right_face FROM '
     || quote_ident(toponame) || '.edge e ORDER BY edge_id'
   LOOP
@@ -1523,7 +1510,7 @@ BEGIN
     ELSIF ST_RelateMatch(rec.im, 'F01FFF102') THEN
       -- second line (g2) is open, first (g1) is closed
       -- second boundary has puntual intersection with first interior
-      -- 
+      --
       -- compute intersection, check it equals first endpoint
       IF ST_Equals(ST_Intersection(rec.g2, rec.g1),
                    ST_StartPoint(rec.g1))
@@ -1534,7 +1521,7 @@ BEGIN
     ELSIF ST_RelateMatch(rec.im, '0F1FFF1F2') THEN
       -- both lines are closed (boundary intersects nothing)
       -- they have puntual intersection between interiors
-      -- 
+      --
       -- compute intersection, check it's a single point
       -- and equals first StartPoint _and_ second StartPoint
       IF ST_Equals(ST_Intersection(rec.g1, rec.g2),
@@ -1553,7 +1540,7 @@ BEGIN
   END LOOP;
 
   -- Check for edge start_node geometry mis-match
-  -- TODO: move this in the first edge table scan 
+  -- TODO: move this in the first edge table scan
   FOR rec IN EXECUTE 'SELECT e.edge_id as id1, n.node_id as id2 FROM '
     || quote_ident(toponame) || '.edge e, '
     || quote_ident(toponame) || '.node n '
@@ -1567,7 +1554,7 @@ BEGIN
   END LOOP;
 
   -- Check for edge end_node geometry mis-match
-  -- TODO: move this in the first edge table scan 
+  -- TODO: move this in the first edge table scan
   FOR rec IN EXECUTE 'SELECT e.edge_id as id1, n.node_id as id2 FROM '
     || quote_ident(toponame) || '.edge e, '
     || quote_ident(toponame) || '.node n '
@@ -1613,7 +1600,7 @@ BEGIN
        'face_check USING gist (geom);';
 
   -- Build a btree index on id
-  EXECUTE 'CREATE INDEX "face_check_bt" ON ' 
+  EXECUTE 'CREATE INDEX "face_check_bt" ON '
        'face_check (face_id);';
 
   -- Scan the table looking for NULL geometries
@@ -1628,7 +1615,6 @@ BEGIN
     RETURN NEXT retrec;
   END LOOP;
 
-
   -- Scan the table looking for overlap or containment
   -- TODO: also check for MBR consistency
   FOR rec IN EXECUTE
@@ -1649,7 +1635,7 @@ BEGIN
     RETURN NEXT retrec;
     END IF;
 
-    -- Face 1 is within face 2 
+    -- Face 1 is within face 2
     IF ST_RelateMatch(rec.im, 'T*F**F***') THEN
     retrec.error = 'face within face';
     retrec.id1 = rec.id1;
@@ -1698,7 +1684,7 @@ LANGUAGE 'plpgsql' VOLATILE STRICT;
 --
 -- Create a topology schema, add a topology info record
 -- in the topology.topology relation, return it's numeric
--- id. 
+-- id.
 --
 CREATE OR REPLACE FUNCTION topology.CreateTopology(atopology varchar, srid integer, prec float8, hasZ boolean)
 RETURNS integer
@@ -1724,17 +1710,16 @@ BEGIN
     topology_id = rec.nextval;
   END LOOP;
 
-
   EXECUTE 'CREATE SCHEMA ' || quote_ident(atopology);
 
   -------------{ face CREATION
-  EXECUTE 
+  EXECUTE
   'CREATE TABLE ' || quote_ident(atopology) || '.face ('
      'face_id SERIAL,'
      ' CONSTRAINT face_primary_key PRIMARY KEY(face_id)'
      ');';
 
-  -- Add mbr column to the face table 
+  -- Add mbr column to the face table
   EXECUTE
   'SELECT AddGeometryColumn('||quote_literal(atopology)
   ||',''face'',''mbr'','||quote_literal(srid)
@@ -1747,10 +1732,9 @@ BEGIN
 
   -------------} END OF face CREATION
 
-
   --------------{ node CREATION
 
-  EXECUTE 
+  EXECUTE
   'CREATE TABLE ' || quote_ident(atopology) || '.node ('
      'node_id SERIAL,'
   --|| 'geom GEOMETRY,'
@@ -1766,7 +1750,7 @@ BEGIN
 
      ');';
 
-  -- Add geometry column to the node table 
+  -- Add geometry column to the node table
   EXECUTE
   'SELECT AddGeometryColumn('||quote_literal(atopology)
   ||',''node'',''geom'','||quote_literal(srid)
@@ -1782,7 +1766,7 @@ BEGIN
   --------------{ edge CREATION
 
   -- edge_data table
-  EXECUTE 
+  EXECUTE
   'CREATE TABLE ' || quote_ident(atopology) || '.edge_data ('
      'edge_id SERIAL NOT NULL PRIMARY KEY,'
      'start_node INTEGER NOT NULL,'
@@ -1822,13 +1806,12 @@ BEGIN
      ' DEFERRABLE INITIALLY DEFERRED'
      ');';
 
-  -- Add geometry column to the edge_data table 
+  -- Add geometry column to the edge_data table
   EXECUTE
   'SELECT AddGeometryColumn('||quote_literal(atopology)
   ||',''edge_data'',''geom'','||quote_literal(srid)
   ||',''LINESTRING'',' || ndims || ')';
 
-
   -- edge standard view (select rule)
   EXECUTE 'CREATE VIEW ' || quote_ident(atopology)
     || '.edge AS SELECT '
@@ -1879,14 +1862,14 @@ BEGIN
 
   --------------} END OF edge CREATION
 
-  --------------{ layer sequence 
+  --------------{ layer sequence
   EXECUTE 'CREATE SEQUENCE '
     || quote_ident(atopology) || '.layer_id_seq;';
   --------------} layer sequence
 
   --------------{ relation CREATION
   --
-  EXECUTE 
+  EXECUTE
   'CREATE TABLE ' || quote_ident(atopology) || '.relation ('
      ' topogeo_id integer NOT NULL, '
      ' layer_id integer NOT NULL, '
@@ -1894,7 +1877,7 @@ BEGIN
      ' element_type integer NOT NULL, '
      ' UNIQUE(layer_id,topogeo_id,element_id,element_type));';
 
-  EXECUTE 
+  EXECUTE
   'CREATE TRIGGER relation_integrity_checks '
      'BEFORE UPDATE OR INSERT ON '
   || quote_ident(atopology) || '.relation FOR EACH ROW '
@@ -1902,7 +1885,6 @@ BEGIN
   ||topology_id||','||quote_literal(atopology)||')';
   --------------} END OF relation CREATION
 
-  
   ------- Default (world) face
   EXECUTE 'INSERT INTO ' || quote_ident(atopology) || '.face(face_id) VALUES(0);';
 
@@ -1943,7 +1925,7 @@ BEGIN
     || quote_ident(atopology)
     || '.edge_data (end_node);';
 
-  -- TODO: consider also adding an index on node.containing_face 
+  -- TODO: consider also adding an index on node.containing_face
 
   ------- Add record to the "topology" metadata table
   EXECUTE 'INSERT INTO topology.topology '
index 88952187c8dcab83622bd75d73e3749ae551ddbb..a7146a2ca6973d5ef2471264d7d1c591253bcd83 100644 (file)
@@ -5,14 +5,14 @@
 -- This is free software; you can redistribute and/or modify it under
 -- the terms of the GNU General Public Licence. See the COPYING file.
 --
---  
+--
 -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--- These are reserved for functions where the they are changed to use default args  
+-- These are reserved for functions where the they are changed to use default args
 -- This is installed after the new functions are installed
 -- We don't have any of these yet for topology
--- The reason we put these after install is 
+-- The reason we put these after install is
 -- you can't drop a function that is used by sql functions
--- without forcing a drop on those as well which may cause issues with user functions.  
+-- without forcing a drop on those as well which may cause issues with user functions.
 -- This allows us to CREATE OR REPLACE those in general topology.sql
 -- without dropping them.
 
index d5063b75589d646587a8a60258a5e869d4503a7b..f06187745f1543f50a5bf83f303268456b974b9f 100644 (file)
@@ -5,7 +5,7 @@
 -- This is free software; you can redistribute and/or modify it under
 -- the terms of the GNU General Public Licence. See the COPYING file.
 --
---  
+--
 -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 -- These are functions where the argument names may have changed  --
 -- so have to be dropped before upgrade can happen for 9.0+ --
index 937f1474bcfcaf1a0d5996dc95f576a7c9054a51..708f95cfbcdcaa172287d0f76c3c293a6b6ee0f8 100755 (executable)
@@ -57,21 +57,21 @@ sub strip_default {
 
 my $time = POSIX::strftime("%c", localtime);
 print "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n";
-print "-- \n";
-print "-- PostGIS - Spatial Types for PostgreSQL \n";
-print "-- http://postgis.net \n";
-print "-- \n";
-print "-- This is free software; you can redistribute and/or modify it under \n";
-print "-- the terms of the GNU General Public Licence. See the COPYING file. \n";
-print "-- \n";
+print "--\n";
+print "-- PostGIS - Spatial Types for PostgreSQL\n";
+print "-- http://postgis.net\n";
+print "--\n";
+print "-- This is free software; you can redistribute and/or modify it under\n";
+print "-- the terms of the GNU General Public Licence. See the COPYING file.\n";
+print "--\n";
 print "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n";
-print "-- \n";
+print "--\n";
 print "-- Generated on: " . $time . "\n";
 print "--           by: " . $0 . "\n";
 print "--         from: " . $ARGV[0] . "\n";
-print "-- \n";
+print "--\n";
 print "-- Do not edit manually, your changes will be lost.\n";
-print "-- \n";
+print "--\n";
 print "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n";
 print "\n";
 
index b73d540a7dadf39aa706327f33e5fffd1e91246f..e4a40f0c96ad9151f4b6f2825f67036ac137eaf1 100755 (executable)
@@ -147,22 +147,22 @@ EOF
 
 my $time = POSIX::strftime("%c", localtime);
 print "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n";
-print "-- \n";
-print "-- PostGIS - Spatial Types for PostgreSQL \n";
-print "-- http://postgis.net \n";
-print "-- \n";
-print "-- This is free software; you can redistribute and/or modify it under \n";
-print "-- the terms of the GNU General Public Licence. See the COPYING file. \n";
-print "-- \n";
+print "--\n";
+print "-- PostGIS - Spatial Types for PostgreSQL\n";
+print "-- http://postgis.net\n";
+print "--\n";
+print "-- This is free software; you can redistribute and/or modify it under\n";
+print "-- the terms of the GNU General Public Licence. See the COPYING file.\n";
+print "--\n";
 print "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n";
-print "-- \n";
+print "--\n";
 print "-- Generated on: " . $time . "\n";
 print "--           by: " . $0 . "\n";
 print "--          for: " . $extname . "\n";
 print "--         from: " . ( @ARGV ? $ARGV[0] : '-' ) . "\n";
-print "-- \n";
+print "--\n";
 print "-- Do not edit manually, your changes will be lost.\n";
-print "-- \n";
+print "--\n";
 print "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n";
 print "\n";