From 651e6bdd928d1a7f3f2e42e6217522f5c2b1aec6 Mon Sep 17 00:00:00 2001 From: Darafei Praliaskouski Date: Wed, 20 Feb 2019 06:55:15 +0000 Subject: [PATCH] Remove postgis.backend switch and SFCGAL versions of functions that have both versions. Causes #4328 References #4258 Closes https://github.com/postgis/postgis/pull/374 git-svn-id: http://svn.osgeo.org/postgis/trunk@17263 b70326c6-7e19-0410-871a-916f4a2858ee --- NEWS | 7 +- doc/reference_measure.xml | 39 ++- doc/reference_sfcgal.xml | 6 - postgis/Makefile.in | 1 - postgis/legacy.sql.in | 2 +- postgis/lwgeom_backend_api.c | 173 ------------- postgis/lwgeom_backend_api.h | 30 --- postgis/lwgeom_functions_basic.c | 26 +- postgis/lwgeom_geos.c | 8 +- postgis/lwgeom_geos.h | 2 +- postgis/lwgeom_sfcgal.c | 72 ------ postgis/postgis.sql.in | 6 +- postgis/postgis_legacy.c | 8 + postgis/postgis_module.c | 4 - regress/sfcgal/Makefile.in | 8 - regress/sfcgal/empty.sql | 146 ----------- regress/sfcgal/empty_expected | 55 ----- regress/sfcgal/geography.sql | 79 ------ regress/sfcgal/geography_expected | 22 -- regress/sfcgal/legacy.sql | 12 - regress/sfcgal/legacy_expected | 19 -- regress/sfcgal/measures.sql | 247 ------------------- regress/sfcgal/measures_expected | 45 ---- regress/sfcgal/regress.sql | 289 ---------------------- regress/sfcgal/regress_expected | 194 --------------- regress/sfcgal/regress_ogc.sql | 9 - regress/sfcgal/regress_ogc_expected | 122 ---------- regress/sfcgal/regress_ogc_prep.sql | 296 ----------------------- regress/sfcgal/regress_ogc_prep_expected | 151 ------------ regress/sfcgal/regress_sfcgal.sql | 10 - regress/sfcgal/regress_sfcgal_expected | 4 - regress/sfcgal/wmsservers.sql | 38 --- regress/sfcgal/wmsservers_expected | 17 -- 33 files changed, 62 insertions(+), 2085 deletions(-) delete mode 100644 postgis/lwgeom_backend_api.c delete mode 100644 postgis/lwgeom_backend_api.h delete mode 100644 regress/sfcgal/empty.sql delete mode 100644 regress/sfcgal/empty_expected delete mode 100644 regress/sfcgal/geography.sql delete mode 100644 regress/sfcgal/geography_expected delete mode 100644 regress/sfcgal/legacy.sql delete mode 100644 regress/sfcgal/legacy_expected delete mode 100644 regress/sfcgal/measures.sql delete mode 100644 regress/sfcgal/measures_expected delete mode 100644 regress/sfcgal/regress.sql delete mode 100644 regress/sfcgal/regress_expected delete mode 100644 regress/sfcgal/regress_ogc.sql delete mode 100644 regress/sfcgal/regress_ogc_expected delete mode 100644 regress/sfcgal/regress_ogc_prep.sql delete mode 100644 regress/sfcgal/regress_ogc_prep_expected delete mode 100644 regress/sfcgal/wmsservers.sql delete mode 100644 regress/sfcgal/wmsservers_expected diff --git a/NEWS b/NEWS index 9461de86a..2b20ac803 100644 --- a/NEWS +++ b/NEWS @@ -15,7 +15,8 @@ PostGIS 3.0.0 If your project depends on them available, please use librttopo instead. (Darafei Praliaskouski) - #4258, Remove SFCGAL support for ST_Area, ST_Distance, ST_Intersection, - ST_Difference, ST_Union (Darafei Praliaskouski) + ST_Difference, ST_Union, ST_Intersects, ST_3DIntersects, ST_3DDistance + and postgis.backend switch (Darafei Praliaskouski) - #4267, Enable Proj 6 deprecated APIs (Darafei Praliaskouski, Raúl Marín) - #4268, Bump minimum SFCGAL version to 1.3.1 (Darafei Praliaskouski) @@ -69,10 +70,10 @@ PostGIS 3.0.0 - #4272, Improve notice message when unable to compute stats (Raúl Marín) - #4314, ST_ClipByBox2D: Do not throw when the geometry is invalid (Raúl Marín) - #4313, #4307, PostgreSQL 12 compatibility (Laurenz Albe, Raúl Marín) - - #4299, #4304, ST_GeneratePoints is now VOLATILE. IMMUTABLE version with + - #4299, #4304, ST_GeneratePoints is now VOLATILE. IMMUTABLE version with seed parameter added. (Mike Taves) - #4278, ST_3DDistance and ST_3DIntersects now support Solid TIN and Solid - POLYHEDRALSURFACE + POLYHEDRALSURFACE (Darafei Praliaskouski) PostGIS 2.5.0 2018/09/23 diff --git a/doc/reference_measure.xml b/doc/reference_measure.xml index 4f13bf199..e2d247654 100644 --- a/doc/reference_measure.xml +++ b/doc/reference_measure.xml @@ -128,10 +128,10 @@ SELECT ST_AsEWKT(ST_3DClosestPoint(line,pt)) AS cp3d_line_pt, &P_support; &sqlmm_compliant; SQL-MM ? - &sfcgal_enhanced; Availability: 2.0.0 Changed: 2.2.0 - In case of 2D and 3D, Z is no longer assumed to be 0 for missing Z. + Changed: 3.0.0 - SFCGAL version removed @@ -141,12 +141,12 @@ SELECT ST_AsEWKT(ST_3DClosestPoint(line,pt)) AS cp3d_line_pt, -- Geometry example - units in meters (SRID: 2163 US National Atlas Equal area) (3D point and line compared 2D point and line) -- Note: currently no vertical datum support so Z is not transformed and assumed to be same units as final. SELECT ST_3DDistance( - ST_Transform(ST_GeomFromEWKT('SRID=4326;POINT(-72.1235 42.3521 4)'),2163), - ST_Transform(ST_GeomFromEWKT('SRID=4326;LINESTRING(-72.1260 42.45 15, -72.123 42.1546 20)'),2163) + ST_Transform('SRID=4326;POINT(-72.1235 42.3521 4)'::geometry,2163), + ST_Transform('SRID=4326;LINESTRING(-72.1260 42.45 15, -72.123 42.1546 20)'::geometry,2163) ) As dist_3d, ST_Distance( - ST_Transform(ST_GeomFromText('POINT(-72.1235 42.3521)',4326),2163), - ST_Transform(ST_GeomFromText('LINESTRING(-72.1260 42.45, -72.123 42.1546)', 4326),2163) + ST_Transform('SRID=4326;POINT(-72.1235 42.3521)'::geometry,2163), + ST_Transform('SRID=4326;LINESTRING(-72.1260 42.45, -72.123 42.1546)'::geometry,2163) ) As dist_2d; dist_3d | dist_2d @@ -158,9 +158,8 @@ SELECT ST_3DDistance( -- Same example as 3D closest point example SELECT ST_3DDistance(poly, mline) As dist3d, ST_Distance(poly, mline) As dist2d - FROM (SELECT ST_GeomFromEWKT('POLYGON((175 150 5, 20 40 5, 35 45 5, 50 60 5, 100 100 5, 175 150 5))') As poly, - ST_GeomFromEWKT('MULTILINESTRING((175 155 2, 20 40 20, 50 60 -2, 125 100 1, 175 155 1), - (1 10 2, 5 20 1))') As mline ) As foo; + FROM (SELECT 'POLYGON((175 150 5, 20 40 5, 35 45 5, 50 60 5, 100 100 5, 175 150 5))'::geometry as poly, + 'MULTILINESTRING((175 155 2, 20 40 20, 50 60 -2, 125 100 1, 175 155 1), (1 10 2, 5 20 1))'::geometry as mline) as foo; dist3d | dist2d -------------------+-------- 0.716635696066337 | 0 @@ -315,7 +314,7 @@ ST_DWithin( ST_3DIntersects Returns TRUE if the Geometries "spatially - intersect" in 3d - only for points, linestrings, polygons, polyhedral surface (area). With SFCGAL backend enabled also supports TINS + intersect" in 3D - only for points, linestrings, polygons, polyhedral surface (area). @@ -339,8 +338,7 @@ ST_DWithin( returns true, then the geometries also spatially intersect. Disjoint implies false for spatial intersection. - - + Changed: 3.0.0 SFCGAL backend removed, GEOS backend supports TINs. Availability: 2.0.0 This function call will automatically include a bounding box @@ -348,7 +346,6 @@ ST_DWithin( geometries. - In order to take advantage of support for TINS, you need to enable the SFCGAL backend. This can be done at session time with: set postgis.backend = sfcgal; or at the database or system level. Database level can be done with ALTER DATABASE gisdb SET postgis.backend = sfcgal;. &Z_support; &P_support; @@ -358,9 +355,8 @@ ST_DWithin( Geometry Examples -SELECT ST_3DIntersects(pt, line), ST_Intersects(pt,line) - FROM (SELECT 'POINT(0 0 2)'::geometry As pt, - 'LINESTRING (0 0 1, 0 2 3 )'::geometry As line) As foo; +SELECT ST_3DIntersects(pt, line), ST_Intersects(pt, line) + FROM (SELECT 'POINT(0 0 2)'::geometry As pt, 'LINESTRING (0 0 1, 0 2 3)'::geometry As line) As foo; st_3dintersects | st_intersects -----------------+--------------- f | t @@ -369,8 +365,7 @@ ST_DWithin( TIN Examples - set postgis.backend = sfcgal; -SELECT ST_3DIntersects('TIN(((0 0,1 0,0 1,0 0)))'::geometry, 'POINT(.1 .1)'::geometry); + SELECT ST_3DIntersects('TIN(((0 0 0,1 0 0,0 1 0,0 0 0)))'::geometry, 'POINT(.1 .1 0)'::geometry); st_3dintersects ----------------- t @@ -3437,7 +3432,7 @@ FROM test; Returns TRUE if the Geometries/Geography "spatially intersect in 2D" - (share any portion of space) and FALSE if they don't (they are Disjoint). - For geography -- tolerance is 0.00001 meters (so any points that close are considered to intersect) + For geography tolerance is 0.00001 meters (so any points that close are considered to intersect) @@ -3470,10 +3465,12 @@ FROM test; Description If a geometry or geography shares any portion of space then they intersect. For geography -- tolerance is 0.00001 meters (so any points that are close are considered to intersect) - Overlaps, Touches, Within all imply spatial intersection. If any of the aforementioned + ST_Overlaps, ST_Touches, ST_Within all imply spatial intersection. + If any of the aforementioned returns true, then the geometries also spatially intersect. Disjoint implies false for spatial intersection. + Changed: 3.0.0 SFCGAL version removed. Enhanced: 2.5.0 Supports GEOMETRYCOLLECTION. Enhanced: 2.3.0 Enhancement to PIP short-circuit extended to support MultiPoints with few points. Prior versions only supported point in polygon. Performed by the GEOS module (for geometry), geography is native @@ -3514,8 +3511,8 @@ SELECT ST_Intersects('POINT(0 0)'::geometry, 'LINESTRING ( 0 0, 0 2 )'::geometry Geography Examples SELECT ST_Intersects( - ST_GeographyFromText('SRID=4326;LINESTRING(-43.23456 72.4567,-43.23456 72.4568)'), - ST_GeographyFromText('SRID=4326;POINT(-43.23456 72.4567772)') + 'SRID=4326;LINESTRING(-43.23456 72.4567,-43.23456 72.4568)'::geography, + 'SRID=4326;POINT(-43.23456 72.4567772)'::geography ); st_intersects diff --git a/doc/reference_sfcgal.xml b/doc/reference_sfcgal.xml index 841414656..933024e2c 100644 --- a/doc/reference_sfcgal.xml +++ b/doc/reference_sfcgal.xml @@ -10,13 +10,7 @@ Installation instructions of the library can be found on SFCGAL home page http://www.sfcgal.org. To load the functions create extension postgis_sfcgal. - - Some SFCGAL functions replace standard ones (ST_Intersects, ST_Intersection, ST_Difference, ST_Union, ST_Area and ST_Distance), to switch between standard functions and SFCGAL function use: - SET postgis.backend = sfcgal; - and - SET postgis.backend = geos; - SFCGAL Functions diff --git a/postgis/Makefile.in b/postgis/Makefile.in index 974633817..c091ac310 100644 --- a/postgis/Makefile.in +++ b/postgis/Makefile.in @@ -83,7 +83,6 @@ PG_OBJS= \ lwgeom_box.o \ lwgeom_box3d.o \ $(BACKEND_OBJ) \ - lwgeom_backend_api.o \ lwgeom_geos_prepared.o \ lwgeom_geos_clean.o \ lwgeom_geos_relatematch.o \ diff --git a/postgis/legacy.sql.in b/postgis/legacy.sql.in index 254ef11e6..f13c20353 100644 --- a/postgis/legacy.sql.in +++ b/postgis/legacy.sql.in @@ -998,7 +998,7 @@ CREATE OR REPLACE FUNCTION getbbox(geometry) -- Deprecation in 1.2.3 CREATE OR REPLACE FUNCTION intersects(geometry,geometry) RETURNS boolean - AS 'MODULE_PATHNAME' + AS 'MODULE_PATHNAME','ST_Intersects' LANGUAGE 'c' IMMUTABLE STRICT; -- Deprecation in 1.2.3 diff --git a/postgis/lwgeom_backend_api.c b/postgis/lwgeom_backend_api.c deleted file mode 100644 index 917f4b4b2..000000000 --- a/postgis/lwgeom_backend_api.c +++ /dev/null @@ -1,173 +0,0 @@ -/********************************************************************** - * - * PostGIS - Spatial Types for PostgreSQL - * http://postgis.net - * - * PostGIS is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * PostGIS is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with PostGIS. If not, see . - * - ********************************************************************** - * - * Copyright 2012-2013 Oslandia - * - **********************************************************************/ - -#include "postgres.h" -#include "fmgr.h" -#include "utils/guc.h" /* for custom variables */ - -#include "../postgis_config.h" -#include "lwgeom_pg.h" -#include "liblwgeom.h" - -#include "lwgeom_backend_api.h" -#include "lwgeom_geos.h" -#if HAVE_SFCGAL -#include "lwgeom_sfcgal.h" -#endif - -Datum intersects(PG_FUNCTION_ARGS); -Datum intersects3d(PG_FUNCTION_ARGS); -Datum distance3d(PG_FUNCTION_ARGS); -Datum intersects3d_dwithin(PG_FUNCTION_ARGS); - -struct lwgeom_backend_definition -{ - const char *name; - Datum (*intersects_fn)(PG_FUNCTION_ARGS); - Datum (*intersects3d_fn)(PG_FUNCTION_ARGS); - Datum (*distance3d_fn)(PG_FUNCTION_ARGS); -}; - -#if HAVE_SFCGAL -#define LWGEOM_NUM_BACKENDS 2 -#else -#define LWGEOM_NUM_BACKENDS 1 -#endif - -struct lwgeom_backend_definition lwgeom_backends[LWGEOM_NUM_BACKENDS] = {{.name = "geos", - .intersects_fn = geos_intersects, - .intersects3d_fn = intersects3d_dwithin, - .distance3d_fn = LWGEOM_mindistance3d}, -#if HAVE_SFCGAL - {.name = "sfcgal", - .intersects_fn = sfcgal_intersects, - .intersects3d_fn = sfcgal_intersects3D, - .distance3d_fn = sfcgal_distance3D} -#endif -}; - -/* Geometry Backend */ -char *lwgeom_backend_name; -struct lwgeom_backend_definition *lwgeom_backend = &lwgeom_backends[0]; - -static void -lwgeom_backend_switch(const char *newvalue, __attribute__((__unused__)) void *extra) -{ - int i; - - if (!newvalue) - return; - - for (i = 0; i < LWGEOM_NUM_BACKENDS; ++i) - { - if (!strcmp(lwgeom_backends[i].name, newvalue)) - { - lwgeom_backend = &lwgeom_backends[i]; - return; - } - } - lwpgerror("Can't find %s geometry backend", newvalue); -} - -void -lwgeom_init_backend() -{ - /* #2382 Before trying to create a user GUC, make sure */ - /* that the name is not already in use. Why would it be in use? */ - /* During an upgrade, a prior copy of the PostGIS library will */ - /* already be loaded in memory and the GUC already defined. We */ - /* can skip GUC definition in this case, so we just return. */ - static const char *guc_name = "postgis.backend"; - // const char *guc_installed = GetConfigOption(guc_name, TRUE, FALSE); - - /* Uh oh, this GUC name already exists. Ordinarily we could just go on */ - /* our way, but the way the postgis.backend works is by using the "assign" */ - /* callback to change which backend is in use by flipping a global variable */ - /* over. This saves the overhead of looking up the engine every time, at */ - /* the expense of the extra complexity. */ - if (postgis_guc_find_option(guc_name)) - { - /* In this narrow case the previously installed GUC is tied to the callback in */ - /* the previously loaded library. Probably this is happening during an */ - /* upgrade, so the old library is where the callback ties to. */ - elog(WARNING, "'%s' is already set and cannot be changed until you reconnect", guc_name); - return; - } - - /* Good, the GUC name is not already in use, so this must be a fresh */ - /* and clean new load of the library, and we can define the user GUC */ - DefineCustomStringVariable( - guc_name, /* name */ - "Sets the PostGIS Geometry Backend.", /* short_desc */ - "Sets the PostGIS Geometry Backend (allowed values are 'geos' or 'sfcgal')", /* long_desc */ - &lwgeom_backend_name, /* valueAddr */ - (char *)lwgeom_backends[0].name, /* bootValue */ - PGC_USERSET, /* GucContext context */ - 0, /* int flags */ - NULL, /* GucStringCheckHook check_hook */ - lwgeom_backend_switch, /* GucStringAssignHook assign_hook */ - NULL /* GucShowHook show_hook */ - ); -} - - -PG_FUNCTION_INFO_V1(intersects); -Datum intersects(PG_FUNCTION_ARGS) -{ - return (*lwgeom_backend->intersects_fn)(fcinfo); -} - -PG_FUNCTION_INFO_V1(distance3d); -Datum distance3d(PG_FUNCTION_ARGS) -{ - return (*lwgeom_backend->distance3d_fn)(fcinfo); -} - -PG_FUNCTION_INFO_V1(intersects3d); -Datum intersects3d(PG_FUNCTION_ARGS) -{ - return (*lwgeom_backend->intersects3d_fn)(fcinfo); -} - -/* intersects3d through dwithin - * used by the 'geos' backend */ -PG_FUNCTION_INFO_V1(intersects3d_dwithin); -Datum intersects3d_dwithin(PG_FUNCTION_ARGS) -{ - double mindist; - GSERIALIZED *geom1 = PG_GETARG_GSERIALIZED_P(0); - GSERIALIZED *geom2 = PG_GETARG_GSERIALIZED_P(1); - LWGEOM *lwgeom1 = lwgeom_from_gserialized(geom1); - LWGEOM *lwgeom2 = lwgeom_from_gserialized(geom2); - - error_if_srid_mismatch(lwgeom1->srid, lwgeom2->srid); - - mindist = lwgeom_mindistance3d_tolerance(lwgeom1, lwgeom2, 0.0); - - PG_FREE_IF_COPY(geom1, 0); - PG_FREE_IF_COPY(geom2, 1); - /*empty geometries cases should be right handled since return from underlying - functions should be FLT_MAX which causes false as answer*/ - PG_RETURN_BOOL(0.0 == mindist); -} diff --git a/postgis/lwgeom_backend_api.h b/postgis/lwgeom_backend_api.h deleted file mode 100644 index e5d29cd51..000000000 --- a/postgis/lwgeom_backend_api.h +++ /dev/null @@ -1,30 +0,0 @@ -/********************************************************************** - * - * PostGIS - Spatial Types for PostgreSQL - * http://postgis.net - * - * PostGIS is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * PostGIS is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with PostGIS. If not, see . - * - ********************************************************************** - * - * Copyright 2012-2013 Oslandia - * - **********************************************************************/ - -#ifndef LWGEOM_BACKEND_API_H_ -#define LWGEOM_BACKEND_API_H_ 1 - -void lwgeom_init_backend(void); - -#endif diff --git a/postgis/lwgeom_functions_basic.c b/postgis/lwgeom_functions_basic.c index aaf4f395d..a7c518152 100644 --- a/postgis/lwgeom_functions_basic.c +++ b/postgis/lwgeom_functions_basic.c @@ -908,8 +908,8 @@ Datum LWGEOM_longestline3d(PG_FUNCTION_ARGS) /** Minimum 2d distance between objects in geom1 and geom2 in 3D */ -PG_FUNCTION_INFO_V1(LWGEOM_mindistance3d); -Datum LWGEOM_mindistance3d(PG_FUNCTION_ARGS) +PG_FUNCTION_INFO_V1(ST_3DDistance); +Datum ST_3DDistance(PG_FUNCTION_ARGS) { double mindist; GSERIALIZED *geom1 = PG_GETARG_GSERIALIZED_P(0); @@ -931,6 +931,28 @@ Datum LWGEOM_mindistance3d(PG_FUNCTION_ARGS) PG_RETURN_NULL(); } +/* intersects3d through dwithin */ +PG_FUNCTION_INFO_V1(ST_3DIntersects); +Datum ST_3DIntersects(PG_FUNCTION_ARGS) +{ + double mindist; + GSERIALIZED *geom1 = PG_GETARG_GSERIALIZED_P(0); + GSERIALIZED *geom2 = PG_GETARG_GSERIALIZED_P(1); + LWGEOM *lwgeom1 = lwgeom_from_gserialized(geom1); + LWGEOM *lwgeom2 = lwgeom_from_gserialized(geom2); + + error_if_srid_mismatch(lwgeom1->srid, lwgeom2->srid); + + mindist = lwgeom_mindistance3d_tolerance(lwgeom1, lwgeom2, 0.0); + + PG_FREE_IF_COPY(geom1, 0); + PG_FREE_IF_COPY(geom2, 1); + /*empty geometries cases should be right handled since return from underlying + functions should be FLT_MAX which causes false as answer*/ + PG_RETURN_BOOL(0.0 == mindist); +} + + /** Returns boolean describing if mininimum 3d distance between objects in diff --git a/postgis/lwgeom_geos.c b/postgis/lwgeom_geos.c index 3e0d4bf8b..ef05e6459 100644 --- a/postgis/lwgeom_geos.c +++ b/postgis/lwgeom_geos.c @@ -70,7 +70,7 @@ Datum relate_full(PG_FUNCTION_ARGS); Datum relate_pattern(PG_FUNCTION_ARGS); Datum disjoint(PG_FUNCTION_ARGS); Datum touches(PG_FUNCTION_ARGS); -Datum geos_intersects(PG_FUNCTION_ARGS); +Datum ST_Intersects(PG_FUNCTION_ARGS); Datum crosses(PG_FUNCTION_ARGS); Datum contains(PG_FUNCTION_ARGS); Datum containsproperly(PG_FUNCTION_ARGS); @@ -2126,8 +2126,8 @@ Datum crosses(PG_FUNCTION_ARGS) PG_RETURN_BOOL(result); } -PG_FUNCTION_INFO_V1(geos_intersects); -Datum geos_intersects(PG_FUNCTION_ARGS) +PG_FUNCTION_INFO_V1(ST_Intersects); +Datum ST_Intersects(PG_FUNCTION_ARGS) { GSERIALIZED *geom1; GSERIALIZED *geom2; @@ -2152,9 +2152,7 @@ Datum geos_intersects(PG_FUNCTION_ARGS) gserialized_get_gbox_p(geom2, &box2) ) { if ( gbox_overlaps_2d(&box1, &box2) == LW_FALSE ) - { PG_RETURN_BOOL(false); - } } /* diff --git a/postgis/lwgeom_geos.h b/postgis/lwgeom_geos.h index f204a801d..26c50ba53 100644 --- a/postgis/lwgeom_geos.h +++ b/postgis/lwgeom_geos.h @@ -45,7 +45,7 @@ Datum geos_difference(PG_FUNCTION_ARGS); Datum geos_geomunion(PG_FUNCTION_ARGS); Datum LWGEOM_area_polygon(PG_FUNCTION_ARGS); Datum LWGEOM_mindistance2d(PG_FUNCTION_ARGS); -Datum LWGEOM_mindistance3d(PG_FUNCTION_ARGS); +Datum ST_3DDistance(PG_FUNCTION_ARGS); void errorIfGeometryCollection(GSERIALIZED *g1, GSERIALIZED *g2); uint32_t array_nelems_not_null(ArrayType* array); diff --git a/postgis/lwgeom_sfcgal.c b/postgis/lwgeom_sfcgal.c index d12cc652a..ff92f200d 100644 --- a/postgis/lwgeom_sfcgal.c +++ b/postgis/lwgeom_sfcgal.c @@ -34,10 +34,7 @@ Datum postgis_sfcgal_version(PG_FUNCTION_ARGS); Datum sfcgal_from_ewkt(PG_FUNCTION_ARGS); -Datum sfcgal_distance3D(PG_FUNCTION_ARGS); Datum sfcgal_area3D(PG_FUNCTION_ARGS); -Datum sfcgal_intersects(PG_FUNCTION_ARGS); -Datum sfcgal_intersects3D(PG_FUNCTION_ARGS); Datum sfcgal_intersection3D(PG_FUNCTION_ARGS); Datum sfcgal_difference3D(PG_FUNCTION_ARGS); Datum sfcgal_union3D(PG_FUNCTION_ARGS); @@ -206,75 +203,6 @@ Datum sfcgal_orientation(PG_FUNCTION_ARGS) PG_RETURN_INT32(result); } -PG_FUNCTION_INFO_V1(sfcgal_intersects); -Datum sfcgal_intersects(PG_FUNCTION_ARGS) -{ - GSERIALIZED *input0, *input1; - sfcgal_geometry_t *geom0, *geom1; - int result; - - sfcgal_postgis_init(); - - input0 = PG_GETARG_GSERIALIZED_P(0); - input1 = PG_GETARG_GSERIALIZED_P(1); - geom0 = POSTGIS2SFCGALGeometry(input0); - PG_FREE_IF_COPY(input0, 0); - geom1 = POSTGIS2SFCGALGeometry(input1); - PG_FREE_IF_COPY(input1, 1); - - result = sfcgal_geometry_intersects(geom0, geom1); - sfcgal_geometry_delete(geom0); - sfcgal_geometry_delete(geom1); - - PG_RETURN_BOOL(result); -} - -PG_FUNCTION_INFO_V1(sfcgal_intersects3D); -Datum sfcgal_intersects3D(PG_FUNCTION_ARGS) -{ - GSERIALIZED *input0, *input1; - sfcgal_geometry_t *geom0, *geom1; - int result; - - sfcgal_postgis_init(); - - input0 = PG_GETARG_GSERIALIZED_P(0); - input1 = PG_GETARG_GSERIALIZED_P(1); - geom0 = POSTGIS2SFCGALGeometry(input0); - PG_FREE_IF_COPY(input0, 0); - geom1 = POSTGIS2SFCGALGeometry(input1); - PG_FREE_IF_COPY(input1, 1); - - result = sfcgal_geometry_intersects_3d(geom0, geom1); - sfcgal_geometry_delete(geom0); - sfcgal_geometry_delete(geom1); - - PG_RETURN_BOOL(result); -} - -PG_FUNCTION_INFO_V1(sfcgal_distance3D); -Datum sfcgal_distance3D(PG_FUNCTION_ARGS) -{ - GSERIALIZED *input0, *input1; - sfcgal_geometry_t *geom0, *geom1; - double result; - - sfcgal_postgis_init(); - - input0 = PG_GETARG_GSERIALIZED_P(0); - input1 = PG_GETARG_GSERIALIZED_P(1); - geom0 = POSTGIS2SFCGALGeometry(input0); - PG_FREE_IF_COPY(input0, 0); - geom1 = POSTGIS2SFCGALGeometry(input1); - PG_FREE_IF_COPY(input1, 1); - - result = sfcgal_geometry_distance_3d(geom0, geom1); - sfcgal_geometry_delete(geom0); - sfcgal_geometry_delete(geom1); - - PG_RETURN_FLOAT8(result); -} - PG_FUNCTION_INFO_V1(sfcgal_tesselate); Datum sfcgal_tesselate(PG_FUNCTION_ARGS) { diff --git a/postgis/postgis.sql.in b/postgis/postgis.sql.in index 5e67f10b8..3c3658792 100644 --- a/postgis/postgis.sql.in +++ b/postgis/postgis.sql.in @@ -4190,7 +4190,7 @@ CREATE OR REPLACE FUNCTION ST_DWithin(geom1 geometry, geom2 geometry, float8) -- PostGIS equivalent function: intersects(geom1 geometry, geom2 geometry) CREATE OR REPLACE FUNCTION _ST_Intersects(geom1 geometry, geom2 geometry) RETURNS boolean - AS 'MODULE_PATHNAME','intersects' + AS 'MODULE_PATHNAME','ST_Intersects' LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL COST 100; -- Guessed cost @@ -5785,7 +5785,7 @@ CREATE OR REPLACE RULE geometry_columns_delete AS CREATE OR REPLACE FUNCTION ST_3DDistance(geom1 geometry, geom2 geometry) RETURNS float8 - AS 'MODULE_PATHNAME', 'distance3d' + AS 'MODULE_PATHNAME', 'ST_3DDistance' LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL COST 100; @@ -5839,7 +5839,7 @@ CREATE OR REPLACE FUNCTION ST_3DDFullyWithin(geom1 geometry, geom2 geometry,floa CREATE OR REPLACE FUNCTION _ST_3DIntersects(geom1 geometry, geom2 geometry) RETURNS boolean - AS 'MODULE_PATHNAME','intersects3d' + AS 'MODULE_PATHNAME', 'ST_3DIntersects' LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL COST 100; diff --git a/postgis/postgis_legacy.c b/postgis/postgis_legacy.c index 309099538..9bfc494ea 100644 --- a/postgis/postgis_legacy.c +++ b/postgis/postgis_legacy.c @@ -62,3 +62,11 @@ POSTGIS_DEPRECATE("3.0.0", intersection); POSTGIS_DEPRECATE("3.0.0", geos_intersection); POSTGIS_DEPRECATE("3.0.0", difference); POSTGIS_DEPRECATE("3.0.0", geos_difference); +POSTGIS_DEPRECATE("3.0.0", geos_intersects); +POSTGIS_DEPRECATE("3.0.0", sfcgal_intersects); +POSTGIS_DEPRECATE("3.0.0", intersects3d); +POSTGIS_DEPRECATE("3.0.0", intersects3d_dwithin); +POSTGIS_DEPRECATE("3.0.0", sfcgal_intersects3d); +POSTGIS_DEPRECATE("3.0.0", distance3d); +POSTGIS_DEPRECATE("3.0.0", sfcgal_distance3d); +POSTGIS_DEPRECATE("3.0.0", LWGEOM_mindistance3d); diff --git a/postgis/postgis_module.c b/postgis/postgis_module.c index 497bf7909..1cccc8887 100644 --- a/postgis/postgis_module.c +++ b/postgis/postgis_module.c @@ -34,7 +34,6 @@ #include "lwgeom_log.h" #include "lwgeom_pg.h" #include "geos_c.h" -#include "lwgeom_backend_api.h" #ifdef HAVE_WAGYU #include "lwgeom_wagyu.h" @@ -72,9 +71,6 @@ _PG_init(void) /* install PostgreSQL handlers */ pg_install_lwgeom_handlers(); - - /* initialize geometry backend */ - lwgeom_init_backend(); } /* diff --git a/regress/sfcgal/Makefile.in b/regress/sfcgal/Makefile.in index bbe5f3527..3c1aa0fba 100644 --- a/regress/sfcgal/Makefile.in +++ b/regress/sfcgal/Makefile.in @@ -33,14 +33,6 @@ export PATH TESTS = \ regress_sfcgal \ - empty.sql \ - geography.sql \ - legacy.sql \ - measures.sql \ - regress_ogc_prep.sql \ - regress_ogc.sql \ - regress.sql \ - wmsservers.sql \ approximatemedialaxis.sql test check: diff --git a/regress/sfcgal/empty.sql b/regress/sfcgal/empty.sql deleted file mode 100644 index 6f3bc8218..000000000 --- a/regress/sfcgal/empty.sql +++ /dev/null @@ -1,146 +0,0 @@ -SET postgis.backend = 'sfcgal'; - --- ST_SnapToGrid -SELECT 'T1.1', ST_AsEWKT(ST_SnapToGrid('POINT EMPTY', 1)); -SELECT 'T1.2', ST_AsEWKT(ST_SnapToGrid('LINESTRING EMPTY', 1)); -SELECT 'T1.3', ST_AsEWKT(ST_SnapToGrid('SRID=4326;POLYGON EMPTY', 1)); - --- ST_Buffer -SELECT 'T2.1', ST_AsEWKT(ST_Buffer('SRID=4326;POINT EMPTY', 0)); -SELECT 'T2.2', ST_AsEWKT(ST_Buffer('SRID=4326;LINESTRING EMPTY', 0)); -SELECT 'T2.3', ST_AsEWKT(ST_Buffer('SRID=4326;MULTIPOLYGON EMPTY', 0)); -WITH b as ( SELECT ST_Buffer('SRID=4326;MULTIPOINT EMPTY', 1) as g ) -SELECT 'T2.4', ST_Srid(g), GeometryType(g) from b; - --- ST_AsGML (output may need some tweaking) -SELECT 'T3.1', ST_AsGML('POINT EMPTY'); -SELECT 'T3.2', ST_AsGML('LINESTRING EMPTY'); -SELECT 'T3.3', ST_AsGML('POLYGON EMPTY'); -SELECT 'T3.4', ST_AsGML('MULTIPOLYGON EMPTY'); -SELECT 'T3.5', ST_AsGML('MULTILINESTRING EMPTY'); -SELECT 'T3.6', ST_AsGML('GEOMETRYCOLLECTION EMPTY'); -SELECT 'T3.7', ST_AsGML(3,'POINT EMPTY'::geometry); -SELECT 'T3.8', ST_AsGML(3,'LINESTRING EMPTY'::geometry); -SELECT 'T3.9', ST_AsGML(3,'POLYGON EMPTY'::geometry); -SELECT 'T3.10', ST_AsGML(3,'MULTIPOLYGON EMPTY'::geometry); -SELECT 'T3.11', ST_AsGML(3,'MULTILINESTRING EMPTY'::geometry); -SELECT 'T3.12', ST_AsGML(3,'GEOMETRYCOLLECTION EMPTY'::geometry); -SELECT 'T3.13', ST_AsGML(3,'POINT EMPTY'::geometry); -SELECT 'T3.14', ST_AsGML(3,'LINESTRING EMPTY'::geometry); -SELECT 'T3.15', ST_AsGML(3,'POLYGON EMPTY'::geometry); -SELECT 'T3.16', ST_AsGML(3,'MULTIPOLYGON EMPTY'::geometry); -SELECT 'T3.17', ST_AsGML(3,'MULTILINESTRING EMPTY'::geometry); -SELECT 'T3.18', ST_AsGML(3,'GEOMETRYCOLLECTION EMPTY'::geometry); - --- See http://trac.osgeo.org/postgis/wiki/DevWikiEmptyGeometry - -WITH inp AS (SELECT - 'POLYGON EMPTY'::geometry as empty, - 'POLYGON((0 0, 10 0, 5 5, 0 0))'::geometry as geometry, - 120 as tolerance - ) SELECT 'ST_Buffer(empty, tolerance) == empty', ST_IsEmpty(ST_Buffer(empty, tolerance)) FROM inp; -WITH inp AS (SELECT - 'POLYGON EMPTY'::geometry as empty, - 'POLYGON((0 0, 10 0, 5 5, 0 0))'::geometry as geometry - ) SELECT 'ST_Union(geometry, empty) == geometry', ST_Equals(ST_ExteriorRing(ST_Union(geometry, empty)), 'LINESTRING(0 0, 10 0, 5 5, 0 0)'::geometry) FROM inp; -WITH inp AS (SELECT - 'POLYGON EMPTY'::geometry as empty - ) SELECT 'ST_Union(empty, empty) == empty', ST_IsEmpty(ST_Union(empty, empty)) FROM inp; -WITH inp AS (SELECT - 'POLYGON EMPTY'::geometry as empty, - 'POLYGON((0 0, 10 0, 5 5, 0 0))'::geometry as geometry - ) SELECT 'ST_Intersection(geometry, empty) == geometry', ST_IsEmpty(ST_Intersection(geometry, empty)) FROM inp; -WITH inp AS (SELECT - 'POLYGON EMPTY'::geometry as empty - ) SELECT 'ST_Intersection(empty, empty) == empty', ST_IsEmpty(ST_Intersection(empty, empty)) FROM inp; -WITH inp AS (SELECT - 'POLYGON EMPTY'::geometry as empty, - 'POLYGON((0 0, 10 0, 5 5, 0 0))'::geometry as geometry - ) SELECT 'ST_Difference(geometry, empty) == geometry', ST_Equals(ST_ExteriorRing(ST_Difference(geometry, empty)), 'LINESTRING(0 0, 10 0, 5 5, 0 0)'::geometry) FROM inp; -WITH inp AS (SELECT - 'POLYGON EMPTY'::geometry as empty, - 'POLYGON((0 0, 10 0, 5 5, 0 0))'::geometry as geometry - ) SELECT 'ST_Difference(empty, geometry) == empty', ST_IsEmpty(ST_Difference(empty, geometry)) FROM inp; -WITH inp AS (SELECT - 'POLYGON EMPTY'::geometry as empty, - 'POLYGON((0 0, 10 0, 5 5, 0 0))'::geometry as geometry - ) SELECT 'ST_Distance(geometry, empty) == NULL', ST_Distance(geometry, empty) FROM inp; -WITH inp AS (SELECT - 'POLYGON EMPTY'::geometry as empty, - 'POLYGON((0 0, 10 0, 5 5, 0 0))'::geometry as geometry, - 120 as tolerance - ) SELECT 'ST_DWithin(geometry, empty, tolerance) == FALSE', ST_DWithin(geometry, empty, tolerance) FROM inp; -WITH inp AS (SELECT - 'POLYGON EMPTY'::geometry as empty, - 'POLYGON((0 0, 10 0, 5 5, 0 0))'::geometry as geometry - ) SELECT 'ST_Within(geometry, empty) == FALSE', ST_Within(geometry, empty) FROM inp; -WITH inp AS (SELECT - 'POLYGON EMPTY'::geometry as empty, - 'POLYGON((0 0, 10 0, 5 5, 0 0))'::geometry as geometry - ) SELECT 'ST_Contains(empty, geometry) == FALSE', ST_Contains(empty, geometry) FROM inp; -WITH inp AS (SELECT - 'POLYGON EMPTY'::geometry as empty, - 'POLYGON((0 0, 10 0, 5 5, 0 0))'::geometry as geometry - ) SELECT 'ST_Within(empty, geometry) == FALSE', ST_Within(empty, geometry) FROM inp; -WITH inp AS (SELECT - 'POLYGON EMPTY'::geometry as empty - ) SELECT 'ST_Contains(empty, empty) == FALSE', ST_Contains(empty, empty) FROM inp; -WITH inp AS (SELECT - 'POLYGON EMPTY'::geometry as empty, - 'POLYGON((0 0, 10 0, 5 5, 0 0))'::geometry as geometry - ) SELECT 'ST_Intersects(geometry, empty) == FALSE', ST_Intersects(geometry, empty) FROM inp; -WITH inp AS (SELECT - 'POLYGON EMPTY'::geometry as empty - ) SELECT 'ST_Intersects(empty, empty) == FALSE', ST_Intersects(empty, empty) FROM inp; -WITH inp AS (SELECT - 'POLYGON EMPTY'::geometry as empty, - 'POLYGON((0 0, 10 0, 5 5, 0 0))'::geometry as geometry - ) SELECT 'ST_Disjoint(empty, empty) == TRUE', ST_Disjoint(empty, empty) FROM inp; -WITH inp AS (SELECT - 'POLYGON EMPTY'::geometry as empty, - 'POLYGON((0 0, 10 0, 5 5, 0 0))'::geometry as geometry - ) SELECT 'ST_Disjoint(geometry, empty) == TRUE', ST_Disjoint(geometry, empty) FROM inp; -WITH inp AS (SELECT - 'POLYGON EMPTY'::geometry as empty1, - 'POINT Z EMPTY'::geometry as empty2 - ) SELECT 'ST_Equals(empty1, empty2) == TRUE', ST_Equals(empty1, empty2) FROM inp; -WITH inp AS (SELECT - 'POLYGON EMPTY'::geometry as empty - ) SELECT 'ST_IsSimple(empty) == TRUE', ST_IsSimple(empty) FROM inp; -WITH inp AS (SELECT - 'POLYGON EMPTY'::geometry as empty - ) SELECT 'ST_IsValid(empty) == TRUE', ST_IsValid(empty) FROM inp; -WITH inp AS (SELECT - 'POLYGON EMPTY'::geometry as empty - ) SELECT 'ST_NumGeometries(empty) == 0', ST_NumGeometries(empty) FROM inp; -WITH inp AS (SELECT - 'POLYGON EMPTY'::geometry as empty - ) SELECT 'ST_NRings(empty) == 0', ST_NRings(empty) FROM inp; -WITH inp AS (SELECT - 'LINESTRING EMPTY'::geometry as empty - ) SELECT 'ST_NumPoints(empty) == 0', ST_NumPoints(empty) FROM inp; -WITH inp AS (SELECT - 'POLYGON EMPTY'::geometry as empty - ) SELECT 'ST_NPoints(empty) == 0', ST_NPoints(empty) FROM inp; -WITH inp AS (SELECT - 'POLYGON EMPTY'::geometry as empty, - 1 as n - ) SELECT 'ST_GeometryN(empty, n) == empty', ST_IsEmpty(ST_GeometryN(empty, n)) FROM inp; -WITH inp AS (SELECT - 'POLYGON EMPTY'::geometry as empty - ) SELECT 'ST_ExteriorRing(empty) == empty', ST_IsEmpty(ST_ExteriorRing(empty)) FROM inp; -WITH inp AS (SELECT - 'POLYGON EMPTY'::geometry as empty, - 1 as n - ) SELECT 'ST_InteriorRingN(empty, n) == NULL', ST_InteriorRingN(empty, n) FROM inp; -WITH inp AS (SELECT - 'POLYGON EMPTY'::geometry as empty - ) SELECT 'ST_Area(empty) == 0', ST_Area(empty) FROM inp; -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 -SELECT '~=', 'POINT EMPTY'::geometry ~= 'POINT EMPTY'::geometry; diff --git a/regress/sfcgal/empty_expected b/regress/sfcgal/empty_expected deleted file mode 100644 index 9e67a2eac..000000000 --- a/regress/sfcgal/empty_expected +++ /dev/null @@ -1,55 +0,0 @@ -T1.1|POINT EMPTY -T1.2|LINESTRING EMPTY -T1.3|SRID=4326;POLYGON EMPTY -T2.1|SRID=4326;POLYGON EMPTY -T2.2|SRID=4326;POLYGON EMPTY -T2.3|SRID=4326;POLYGON EMPTY -T2.4|4326|POLYGON -T3.1| -T3.2| -T3.3| -T3.4| -T3.5| -T3.6| -T3.7| -T3.8| -T3.9| -T3.10| -T3.11| -T3.12| -T3.13| -T3.14| -T3.15| -T3.16| -T3.17| -T3.18| -ST_Buffer(empty, tolerance) == empty|t -ST_Union(geometry, empty) == geometry|t -ST_Union(empty, empty) == empty|t -ST_Intersection(geometry, empty) == geometry|t -ST_Intersection(empty, empty) == empty|t -ST_Difference(geometry, empty) == geometry|t -ST_Difference(empty, geometry) == empty|t -ST_Distance(geometry, empty) == NULL| -ST_DWithin(geometry, empty, tolerance) == FALSE|f -ST_Within(geometry, empty) == FALSE|f -ST_Contains(empty, geometry) == FALSE|f -ST_Within(empty, geometry) == FALSE|f -ST_Contains(empty, empty) == FALSE|f -ST_Intersects(geometry, empty) == FALSE|f -ST_Intersects(empty, empty) == FALSE|f -ST_Disjoint(empty, empty) == TRUE|t -ST_Disjoint(geometry, empty) == TRUE|t -ST_Equals(empty1, empty2) == TRUE|t -ST_IsSimple(empty) == TRUE|t -ST_IsValid(empty) == TRUE|t -ST_NumGeometries(empty) == 0|0 -ST_NRings(empty) == 0|0 -ST_NumPoints(empty) == 0|0 -ST_NPoints(empty) == 0|0 -ST_GeometryN(empty, n) == empty|t -ST_ExteriorRing(empty) == empty|t -ST_InteriorRingN(empty, n) == NULL| -ST_Area(empty) == 0|0 -ST_Length(empty) == 0|0 -~=|t diff --git a/regress/sfcgal/geography.sql b/regress/sfcgal/geography.sql deleted file mode 100644 index b4a78ddf6..000000000 --- a/regress/sfcgal/geography.sql +++ /dev/null @@ -1,79 +0,0 @@ -SET postgis.backend = 'sfcgal'; - -DELETE FROM spatial_ref_sys where srid = 4326; -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"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]', - '+proj=longlat +datum=WGS84 +no_defs' -); - --- Do cached and uncached distance agree? -SELECT c, abs(ST_Distance(ply::geography, pt::geography) - _ST_DistanceUnCached(ply::geography, pt::geography)) < 0.01 FROM -( VALUES -('geog_distance_cached_1a', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POINT(5 5)'), -('geog_distance_cached_1b', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POINT(5 5)'), -('geog_distance_cached_1c', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POINT(5 5)'), -('geog_distance_cached_1e', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POINT(5 5)'), -('geog_distance_cached_1f', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POINT(5 5)'), -('geog_distance_cached_1g', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POINT(5 5)'), -('geog_distance_cached_1h', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POINT(5 5)') -) AS u(c,ply,pt); - --- Does tolerance based distance work cached? Inside tolerance -SELECT c, ST_DWithin(ply::geography, pt::geography, 3000) from -( VALUES -('geog_dithin_cached_1a', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POINT(10.01 5)'), -('geog_dithin_cached_1b', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POINT(10.01 5)'), -('geog_dithin_cached_1c', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POINT(10.01 5)') -) as p(c, ply, pt); - --- Does tolerance based distance work cached? Outside tolerance -SELECT c, ST_DWithin(ply::geography, pt::geography, 1000) from -( VALUES -('geog_dithin_cached_2a', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POINT(10.01 5)'), -('geog_dithin_cached_2b', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POINT(10.01 5)'), -('geog_dithin_cached_2c', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POINT(10.01 5)') -) as p(c, ply, pt); - --- Do things work when there's cache coherence on the point side but not the poly side? -SELECT c, ST_DWithin(ply::geography, pt::geography, 3000) from -( VALUES -('geog_dithin_cached_3a', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POINT(5 5)'), -('geog_dithin_cached_3b', 'POLYGON((1 1, 1 10, 10 10, 10 1, 1 1))', 'POINT(5 5)'), -('geog_dithin_cached_3c', 'POLYGON((2 2, 2 10, 10 10, 10 2, 2 2))', 'POINT(5 5)') -) as p(c, ply, pt); - --- Test a precision case near the south pole that came up during development. -WITH pt AS ( - SELECT point::geography FROM ( VALUES - ('0101000020E61000006C5B94D920EB4CC0A0FD481119B24FC0'), - ('0101000020E610000097A8DE1AD8524CC09C8A54185B1050C0'), - ('0101000020E61000008FC2F5285C4F4CC0E5ED08A7050F50C0'), - ('0101000020E61000008FC2F5285C4F4CC0E5ED08A7050F50C0') ) AS p(point) -), -ply AS ( - SELECT polygon::geography FROM ( VALUES - ('0106000020E610000001000000010300000001000000A10100005036E50AEF8E4FC0E3FC4D2844A443C000000000008046C000000000000047C033333333335346C000000000000047C066666666662646C000000000000047C09999999999F945C000000000000047C0CDCCCCCCCCCC45C000000000000047C00000000000A045C000000000000047C033333333337345C000000000000047C066666666664645C000000000000047C099999999991945C000000000000047C0CDCCCCCCCCEC44C000000000000047C00000000000C044C000000000000047C033333333339344C000000000000047C066666666666644C000000000000047C099999999993944C000000000000047C0CDCCCCCCCC0C44C000000000000047C00000000000E043C000000000000047C03333333333B343C000000000000047C066666666668643C000000000000047C099999999995943C000000000000047C0CDCCCCCCCC2C43C000000000000047C000000000000043C000000000000047C03333333333D342C000000000000047C06666666666A642C000000000000047C099999999997942C000000000000047C0CDCCCCCCCC4C42C000000000000047C000000000002042C000000000000047C03333333333F341C000000000000047C06666666666C641C000000000000047C099999999999941C000000000000047C0CDCCCCCCCC6C41C000000000000047C000000000004041C000000000000047C033333333331341C000000000000047C06666666666E640C000000000000047C09999999999B940C000000000000047C0CDCCCCCCCC8C40C000000000000047C000000000006040C000000000000047C033333333333340C000000000000047C066666666660640C000000000000047C03333333333B33FC000000000000047C09999999999593FC000000000000047C00000000000003FC000000000000047C06666666666A63EC000000000000047C0CCCCCCCCCC4C3EC000000000000047C03333333333F33DC000000000000047C09999999999993DC000000000000047C00000000000403DC000000000000047C06666666666E63CC000000000000047C0CCCCCCCCCC8C3CC000000000000047C03333333333333CC000000000000047C09999999999D93BC000000000000047C00000000000803BC000000000000047C06666666666263BC000000000000047C0CCCCCCCCCCCC3AC000000000000047C03333333333733AC000000000000047C09999999999193AC000000000000047C00000000000C039C000000000000047C066666666666639C000000000000047C0CCCCCCCCCC0C39C000000000000047C03333333333B338C000000000000047C099999999995938C000000000000047C000000000000038C000000000000047C06666666666A637C000000000000047C0CDCCCCCCCC4C37C000000000000047C03333333333F336C000000000000047C099999999999936C000000000000047C000000000004036C000000000000047C06666666666E635C000000000000047C0CDCCCCCCCC8C35C000000000000047C033333333333335C000000000000047C09999999999D934C000000000000047C000000000008034C000000000000047C066666666662634C000000000000047C0CDCCCCCCCCCC33C000000000000047C033333333337333C000000000000047C099999999991933C000000000000047C00000000000C032C000000000000047C066666666666632C000000000000047C0CDCCCCCCCC0C32C000000000000047C03333333333B331C000000000000047C099999999995931C000000000000047C000000000000031C000000000000047C06666666666A630C000000000000047C0CDCCCCCCCC4C30C000000000000047C06666666666E62FC000000000000047C03333333333332FC000000000000047C00000000000802EC000000000000047C0CCCCCCCCCCCC2DC000000000000047C09999999999192DC000000000000047C06666666666662CC000000000000047C03333333333B32BC000000000000047C00000000000002BC000000000000047C0CCCCCCCCCC4C2AC000000000000047C099999999999929C000000000000047C06666666666E628C000000000000047C033333333333328C000000000000047C000000000008027C000000000000047C0CDCCCCCCCCCC26C000000000000047C099999999991926C000000000000047C066666666666625C000000000000047C03333333333B324C000000000000047C000000000000024C000000000000047C000000000000024C03943F5FFFF7F56C000000000008052C03943F5FFFF7F56C000000000008052C00000000000004EC068774831407A52C00000000000004EC0B8ACC266807452C00000000000004EC020240B98C06E52C00000000000004EC0705985CD006952C00000000000004EC0D9D0CDFE406352C00000000000004EC029064834815D52C00000000000004EC0917D9065C15752C00000000000004EC0E1B20A9B015252C00000000000004EC0492A53CC414C52C00000000000004EC09A5FCD01824652C00000000000004EC002D71533C24052C00000000000004EC0520C9068023B52C00000000000004EC0BA83D899423552C00000000000004EC00AB952CF822F52C00000000000004EC072309B00C32952C00000000000004EC0C3651536032452C00000000000004EC02BDD5D67431E52C00000000000004EC09354A698831852C00000000000004EC0E38920CEC31252C00000000000004EC04B0169FF030D52C00000000000004EC09B36E334440752C00000000000004EC003AE2B66840152C00000000000004EC054E3A59BC4FB51C00000000000004EC0BC5AEECC04F651C00000000000004EC00C90680245F051C00000000000004EC07407B13385EA51C00000000000004EC0C43C2B69C5E451C00000000000004EC02DB4739A05DF51C00000000000004EC07DE9EDCF45D951C00000000000004EC0E560360186D351C00000000000004EC03596B036C6CD51C00000000000004EC09D0DF96706C851C00000000000004EC0EE42739D46C251C00000000000004EC056BABBCE86BC51C00000000000004EC0A6EF3504C7B651C00000000000004EC00E677E3507B151C00000000000004EC076DEC66647AB51C00000000000004EC0C613419C87A551C00000000000004EC02E8B89CDC79F51C00000000000004EC07FC00303089A51C00000000000004EC0E7374C34489451C00000000000004EC0376DC669888E51C00000000000004EC09FE40E9BC88851C00000000000004EC0EF1989D0088351C00000000000004EC05791D101497D51C00000000000004EC0A8C64B37897751C00000000000004EC0103E9468C97151C00000000000004EC060730E9E096C51C00000000000004EC0C8EA56CF496651C00000000000004EC01820D1048A6051C00000000000004EC081971936CA5A51C00000000000004EC0D1CC936B0A5551C00000000000004EC03944DC9C4A4F51C00000000000004EC0A1BB24CE8A4951C00000000000004EC0F1F09E03CB4351C00000000000004EC05968E7340B3E51C00000000000004EC0AA9D616A4B3851C00000000000004EC01215AA9B8B3251C00000000000004EC0624A24D1CB2C51C00000000000004EC0CAC16C020C2751C00000000000004EC01AF7E6374C2151C00000000000004EC0826E2F698C1B51C00000000000004EC0D3A3A99ECC1551C00000000000004EC03B1BF2CF0C1051C00000000000004EC08B506C054D0A51C00000000000004EC0F3C7B4368D0451C00000000000004EC043FD2E6CCDFE50C00000000000004EC0AB74779D0DF950C00000000000004EC0FCA9F1D24DF350C00000000000004EC064213A048EED50C00000000000004EC0CC988235CEE750C00000000000004EC01CCEFC6A0EE250C00000000000004EC08445459C4EDC50C00000000000004EC0D47ABFD18ED650C00000000000004EC0C2340C1F11D150C00000000000004EC0C2340C1F11D150C0FE7DC685032D4DC0C2340C1F11D150C0FE7DC685033D4CC0C2340C1F11D150C0713D0AD7A3304CC02AAC545051CB50C0703D0AD7A3304CC07AE1CE8591C550C0703D0AD7A3304CC0E25817B7D1BF50C0703D0AD7A3304CC0328E91EC11BA50C0703D0AD7A3304CC09A05DA1D52B450C0703D0AD7A3304CC0EB3A545392AE50C0703D0AD7A3304CC053B29C84D2A850C0703D0AD7A3304CC0A3E716BA12A350C0703D0AD7A3304CC00B5F5FEB529D50C0703D0AD7A3304CC05B94D920939750C0703D0AD7A3304CC0C30B2252D39150C0703D0AD7A3304CC014419C87138C50C0703D0AD7A3304CC07CB8E4B8538650C0703D0AD7A3304CC0CCED5EEE938050C0703D0AD7A3304CC03465A71FD47A50C0703D0AD7A3304CC0849A2155147550C0703D0AD7A3304CC0EC116A86546F50C0703D0AD7A3304CC03ECBF3E0EE6E50C0713D0AD7A3304CC0FF3EE3C2816E50C0A2EE0390DAB04BC0EC12D55B038550C01630815B77974BC05BCEA5B8AA9A50C0C173EFE1928F4BC0A5315A4755B550C00000000000804BC0014D840D4FD150C01899DB1896744BC05D05E7421B2A51C0B38EF4B3A2754BC0BB0F406A132751C068E89FE062C94AC03D6B1217DB2851C0413F9D3C76564AC09F268E97491D51C01E55A8C9E72D4AC014AE47E17A5051C05E770481DF154AC0DA531795F95E51C0ADA81CEE7E154AC033333333337351C0EACF7EA488084AC0DA835A1DCA8251C019479B994F014AC00473F4F8BDA551C0CB4A9352D0014AC0AD927EB12DFD51C0848FD2B6AB014AC07F11D9AC1FFF51C0D21D1F8887F249C01D4762388D1B52C06AE27899BCCA49C00AD7A3703D1252C08BAF2C87CCA049C0A323B9FC871A52C0ADCE20F4229449C056760B6E351352C0F866E5A8ED8449C024F83A04E91352C0DCDB8882745249C0F1F44A59863252C0DBCD42F1195049C01A97BBE09D4452C0EEEBC039236449C09A31BBDD014C52C0454B79083E6349C0A59421D8826352C004824AA6542849C04BABC6B71C6252C046216EF36B1449C0A4F55C4BED5D52C01CE7DB27EC0549C0D9BBF550916452C058CE39D3DFF648C0DD0E6844445C52C0937D46D8A6E648C098B4F347E26652C0F6FC1F1620C748C0AB37B412845D52C0D9A2BBDA40A948C048E17A14AE5F52C0D52137C30D9448C04B1A48BCE14B52C0BF901F3BB99848C0B26DAC1FF63552C0E4709CCA587B48C0287E8CB96B2652C0912CBBBB296948C0A59421D8822852C0D49AE61DA74048C0C009E0C1AA1452C0106734A8EC2E48C0A8D94D3ADB1452C004560E2DB21948C0687B4F40EE2452C06ECF3D35A8F047C089022269DC1552C0ADAC23FDACCD47C019B2158FE61652C07BC26DC89AB747C009B3BFA2910A52C095E70B6B74B447C01DF2857F47FF51C01D8AA7C3AF9A47C0F1248EE156F651C0E9482EFF219B47C07A45A6327BFE51C0711706D1FF8747C0A5315A4755FD51C000000000008047C0395BE5AE4AFB51C0CD6152D7356547C0182DF64DD0F451C00CC3EC0A226447C0B6CA5D95D5EA51C098E19A96B34A47C06ABC749318FA51C0E51E5C4B121247C0C1920612EFEE51C0780F2B37AC0847C09D2743FA12EA51C0653FE65EBBF546C01563AAAA61F351C0FA8271CBA2CB46C00775368966E151C08208CC9E5FC346C05DEF4806CAD651C03ECB98277C9C46C03760A12042E551C0FFF1B96EA57B46C073A7CF69710152C090A4FF40147346C03D5C1723B70152C0F46C567DAE6646C03505D78198E051C023DF008E985E46C08351499D80D451C037853A51B76646C09C46A4B789C751C0B515FBCBEE4546C09C33A2B437CF51C0BE82D9A95E3446C066E1462550F651C042CB5FC6B93046C09B6B3DE8FEF551C056212FB5EF0D46C075FBF6BFEDEB51C04E36D4DE96FF45C020578FA01DF251C0C967C3ABF6E845C05CA2C4F87AE651C0E5F21FD26FD745C0FD0978E3EEFB51C06CE3F49AC3BE45C09D11A5BDC1F951C00C11267B3AAB45C08A9DDFE643F051C037EE83E27DA645C0A922CB38FCEF51C0CCBE863B729645C008D5BC99070852C0865EDACB118745C088635DDC460952C01B09D91E624E45C01F85EB51B80652C07D96E7C1DD4D45C0A8188CB6CF0152C018135102513E45C00C7D0B46000852C0166646E4602945C06E2585C31C0352C039B0C167901345C0A499DD497AEF51C0BD1358A5991245C023DBF97E6AF251C0BEF15AAE230045C0EE7C3F355EF151C0F6FC1F1620E944C040529F3FC8F851C0BBF7CB82E4D344C0D27E5AFBF1F751C0F6D61B107CB444C0CA9C23938AF751C0B498EEF4A2B544C0624775BC1FF751C035958D13C7B644C0EA8B637FB1F651C040BEE654E8B744C0AADC49E43FF651C0298B1FA206B944C0AD7CCAF3CAF551C043D796E421BA44C0D6E6CDB652F551C0ECBDE6053ABB44C0532E8236D7F451C06B72E6EF4EBC44C07E585A7C58F451C08F13AC8C60BD44C01EB00D92D6F351C0DE7A8EC66EBE44C02712978151F351C01507278879BF44C0F9333455C9F251C0D96153BC80C044C015E364173EF251C08540374E84C144C0703EEAD2AFF151C0B21F3E2984C244C062E9C5921EF151C088F91C3980C344C0313839628AF051C083F6D36978C444C05856C44CF3EF51C0A018B0A76CC544C09366255E59EF51C0A5E04CDF5CC644C0AE9C57A2BCEE51C08AED95FD48C744C0495192251DEE51C09C95C8EF30C844C0760F48F47AED51C0747975A314C944C0739C251BD6EC51C060108206F4C944C061F910A72EEC51C0372E2A07CFCA44C0385F28A584EB51C066820194A5CB44C0E834C122D8EA51C01010F59B77CC44C0DDFF662D29EA51C0149F4C0E45CD44C0DA4EDAD277E951C0E725ACDA0DCE44C0669F0F21C4E851C0FB2B15F1D1CE44C0C53D2E260EE851C0B124E84191CF44C0A41F8FF055E751C09CC2E5BD4BD044C098B9BB8E9BE651C0F042305601D144C076CF6C0FDFE551C017B14CFCB1D144C0B73F898120E551C0192224A25DD244C0F9C924F45FE451C0E5E7043A04D344C0B2D07E769DE351C03EBCA3B6A5D344C047160118D9E251C039E31C0B42D444C095753EE812E251C01B45F52AD9D444C01596F1F64AE151C09D7F1B0A6BD544C0B79BFB5381E051C048EEE89CF7D544C096D2620FB6DF51C0F7A922D87ED644C0AA565139E9DE51C0497FFAB000D744C097B713E21ADE51C0FBDB0F1D7DD744C0BB98171A4BDD51C0FBB27012F4D744C0AC4DEAF179DC51C02D579A8765D844C03173377AA7DB51C0BC4C7A73D1D844C0FB84C7C3D3DA51C0FD106FCD37D944C027707EDFFED951C095D8488D98D944C0C8225ADE28D951C013444AABF3D944C08B1871D151D851C0B40A292049DA44C0ADE4F0C979D751C0529B0EE598DA44C061B91CD9A0D651C07AB398F3E2DA44C0D4EC4B10C7D551C076ECD94527DB44C0F97BE880ECD451C0633E5AD665DB44C0398B6D3C11D451C01F7917A09EDB44C04CE5655435D351C01FB3859ED1DB44C048786ADA58D251C018AE8FCDFEDB44C022D120E07BD151C05831972926DC44C0C89539779ED051C0F25975AF47DC44C0FEFD6EB1C0CF51C091E07A5C63DC44C02B4B83A0E2CE51C0EE54702E79DC44C03D3F3F5604CE51C0F24E962389DC44C0D69270E425CD51C07E95A53A93DC44C0EE6AE85C47CC51C0A93ACF7297DC44C00BCE79D168CB51C0C6ADBCCB95DC44C04F19F8538ACA51C0D7C28F458EDC44C06D7535F6ABC951C09FAFE2E080DC44C0CD4B01CACDC851C04CFEC79E6DDC44C000BC26E1EFC751C0B675CA8054DC44C09F116B4D12C751C029F7EC8835DC44C0DF3A8C2035C651C0DC51AAB910DC44C0F53F3F6C58C551C0FC0BF515E6DB44C073BB2E427CC451C0632137A1B5DB44C0D153F9B3A0C351C0F7B7515F7FDB44C04D3630D3C5C251C0CDC99C5443DB44C0459355B1EBC151C0F8C4E68501DB44C0451CDB5F12C151C0342174F8B9DA44C0DB8320F039C051C062EBFEB16CDA44C079FF717362BF51C0E546B6B819DA44C078CB06FB8BBE51C0F2E43D13C1D944C06DB1FF97B6BD51C0DC71ADC862D944C0F890655BE2BC51C088F88FE0FED844C03BEB27560FBC51C0E13BE36295D844C014711B993DBB51C09706175826D844C04F94F8346DBA51C02E710CC9B1D744C0F31B5A3A9EB951C04B1E15BF37D744C0C6BBBBB9D0B851C0976DF243B8D644C03FAF78C304B851C014A5D46133D644C0F757CA673AB751C01A115A23A9D544C0DADFC6B671B651C0141B8E9319D544C014DF5FC0AAB551C0FE56E8BD84D444C005066194E5B451C0E6874BAEEAD344C049CB6E4222B451C0629B04714BD344C0E91D05DA60B351C03E9CC912A7D244C0051C766AA1B251C04D9CB8A0FDD144C0D3CDE802E4B151C0CD9556284FD144C058E557B228B151C00E448EB79BD044C0C48290876FB051C0DCF3AE5CE3CF44C0ABFD3091B8AF51C0A54B6B2626CF44C034B3A7DD03AF51C06F0BD82364CE44C048D9317B51AE51C0DEC46A649DCD44C0FC56DA77A1AD51C05A8BF8F7D1CC44C032A278E1F3AC51C0709CB4EE01CC44C0A0A2AFC548AC51C0B9002F592DCB44C03F9AEC31A0AB51C03225534854CA44C05A136633FAAA51C0646D66CD76C944C02DD41AD756AA51C050BE06FA94C844C04CD8D029B6A951C0720229E0AEC744C0D34F143818A951C0DEA61792C4C644C075A4360E7DA851C0AF117122D6C544C082844DB8E4A751C0EE1126A4E3C444C0FDF331424FA751C02849782AEDC344C0B6637FB7BCA651C0B58EF8C8F2C244C0A5CE92232DA651C0FE4C8593F4C144C067DD8991A0A551C0EBD8489EF2C044C01010420C17A551C084C3B7FDECBF44C046EE579E90A451C006268FC6E3BE44C0C53D26520DA451C0AAE8D20DD7BD44C0473FC5318DA351C01B04CCE8C6BC44C0E1F1094710A351C0E0BD066DB3BB44C0E85C859B96A251C000E050B09CBA44C05AE0833820A251C0CAEBB7C882B944C0CF8B0C27ADA151C02F4887CC65B844C00B7CE06F3DA151C0B66B46D245B744C02E3F7A1BD1A051C03B02B7F022B644C0813F0D3268A051C0BA0ED33EFDB444C0E43485BB02A051C02C09CBD3D4B344C0FB9C85BFA09F51C0CBF803C7A9B244C0EB396945429F51C0D58A15307CB144C0E1974154E79E51C0FC25C8264CB044C03299D6F28F9E51C0ADFA12C319AF44C03D09A6273C9E51C076101A1DE5AD44C0EF35E3F8EB9D51C084502C4DAEAC44C0F98F766C9F9D51C0A08DC16B75AB44C09EB70C93849D51C08100BE8003AB44C05036E50AEF8E4FC0E3FC4D2844A443C0') - ) as q(polygon) -) -SELECT 'geog_precision_savffir', _ST_DistanceUnCached(pt.point, ply.polygon), ST_Distance(pt.point, ply.polygon) FROM pt, ply; - --- Test another precision case near the north poly and over the dateline -WITH pt AS ( - SELECT point::geography FROM ( VALUES - ('0101000020E610000000000000004065400000000000804840'), - ('0101000020E610000075C8CD70033965C02176A6D079315040') ) AS p(point) -), -ply AS ( - SELECT polygon::geography FROM ( VALUES - ('0103000020E6100000010000004101000078A1B94E231F65C000000000000051400000000000C063C000000000000052400000000000C063C0000000000000524078A1B94E231F65C0000000000000514078A1B94E231F65C000000000008056400000000000A061C000000000008056400000000000A061C0EF940ED6FF7F56400000000000A061C0DD291DACFF7F56400000000000A061C0CBBE2B82FF7F56400000000000A061C0B9533A58FF7F56400000000000A061C0A8E8482EFF7F56400000000000A061C0967D5704FF7F56400000000000A061C072A774B0FE7F56400000000000A061C04FD1915CFE7F56400000000000A061C02BFBAE08FE7F56400000000000A061C0F6B9DA8AFD7F56400000000000A061C0C178060DFD7F56400000000000A061C079CC4065FC7F56400000000000A061C00F4A9869FB7F56400000000000A061C0A4C7EF6DFA7F56400000000000A061C0040473F4F87F56400000000000A061C052D50451F77F56400000000000A061C07DD0B359F57F56400000000000A061C0611F9DBAF27F56400000000000A061C00F2DB29DEF7F56400000000000A061C0642310AFEB7F56400000000000A061C06102B7EEE67F56400000000000A061C0E1F3C308E17F56400000000000A061C0AFB6627FD97F56400000000000A061C0DDB5847CD07F56400000000000A061C013DA722EC57F56400000000000A061C02C4D4A41B77F56400000000000A061C0CFF753E3A57F56400000000000A061C0B72DCA6C907F56400000000000A061C0776C04E2757F56400000000000A061C093C6681D557F56400000000000A061C05B0D897B2C7F56400000000000A061C01B12F758FA7E56400000000000A061C0B8239C16BC7E56400000000000A061C027FC523F6F7E56400000000000A061C0BD9179E40F7E56400000000000A061C0CFDA6D179A7D56400000000000A061C0F0332E1C087D56400000000000A061C07CB8E4B8537C56400000000000A061C0C53D963E747B56400000000000A061C08E40BCAE5F7A56400000000000A061C07F8CB96B097956400000000000A061C0FE65F7E4617756400000000000A061C0C9073D9B557556400000000000A061C0CDCCCCCCCC7256400000000000A061C07A01F6D1A96F56400000000000A061C053616C21C86B56400000000000A061C009A7052FFA6656400000000000A061C0F0332E1C086156400000000000A061C085471B47AC5956400000000000A061C0752497FF905056400000000000A061C08C84B69C4B4556400000000000A061C02C6519E2583756400000000000A061C02B357BA0152656400000000000A061C055C6BFCFB81056400000000000A061C0F988981249F655400000000000A061C08C321B6492D555400000000000A061C0ADC5A70018AD55400000000000A061C02254A9D9037B55400000000000A061C009E1D1C6113D55400000000000A061C0A0E5797077F054400000000000A061C0FA49B54FC79154400000000000A061C043959A3DD01C54400000000000A061C075EACA67798C53400000000000A061C00EE02D90A0DA52400000000000A061C000000000000052400000000000A061C000000000000052400000000000A061C00100000000004F400000000000A061C01730815B77274E408C45D3D9C99D61C04CAB21718F254E40C0120F289B9861C03EB324404D214E40745E6397A89061C0B9AAECBB221C4E406C3997E2AA8E61C09E465A2A6F274E4068666666667F61C0C9EA56CF49174E40F8D005F52D7661C01FF98381E72A4E408499B67F656261C01B69A9BC1D2D4E40C04351A04F6261C01CD82AC1E2284E40EC7C3F355E6661C0097250C24C0B4E40E8525C55F66161C001E31934F4FF4D406431B1F9B86161C0EDDD1FEF55FF4D407C4963B48E5961C06749809A5AF64D40703D0AD7A35661C0D60451F701F44D4080608E1EBF5561C0F22900C633EC4D40008750A5665561C048C49448A2E74D40205036E50A5461C0C481902C60E24D40283108AC1C4161C0C1E78711C2BB4D40B08009DCBA4061C0CA1F0C3CF7BA4D4010751F80D43E61C0029F1F4608B74D40A47EDE54A43E61C03CFC3559A3B64D405C3D27BD6F3361C00938842A359F4D40E85BE674593161C0F7D1A92B9F8D4D409820EA3E003061C019E76F42217E4D402883A3E4D53061C08833BF9A03744D40605E807D742E61C04E7FF62345744D40182B6A300D2961C06B82A8FB00804D40D0FBC6D79E2561C0C8F484251E844D4044DD0720B52261C0E46BCF2C09884D40DC9DB5DB2E2161C0AF47E17A148A4D40303D6189071F61C02A5C8FC2F58C4D40F8F719170E1C61C02259C0046E914D405031CEDF841A61C0AB2B9FE579944D401C649291B31261C077DB85E63A954D40A07A6B60AB0F61C03E963E7441A14D40247F30F0DC0F61C026E99AC937A34D402054A9D9030F61C04EB9C2BB5CA44D40C051F2EA1C0F61C0CE920035B5A84D409CF9D51C200F61C05B2A6F4738A94D40C86C9049460F61C05D8FC2F528B04D4008D3307C440F61C073BF4351A0BB4D40285C8FC2F50B61C03E61890794B94D40080C59DDEA0B61C030FA0AD28CB94D40D8166536C80B61C04C7155D977B94D400079AF5A990B61C005392861A6B94D40F836FDD98F0B61C0E8A4F78DAFB94D40D03FC1C58A0B61C0DA5A5F24B4B94D4058087250C20961C0650113B875BB4D401C5A643BDF0861C0C32FF5F3A6BE4D407862D68BA10761C0E627D53E1DC34D4020680586AC0761C03A5D16139BC74D40D02C0950530B61C07194BC3AC7CC4D4030EBC5504E0961C0988BF84ECCCE4D40CCAFE600C10861C07411DF8959CF4D40B81457957D0861C0EC8B84B69CCF4D400825CCB4FD0761C0F2EF332E1CD04D40703D0AD7A30761C023F8DF4A76D04D403837A6272C0661C0BD3AC780ECD14D40602D3E05C00261C05F2EE23B31D34D4018601F9DBA0161C057F146E691D34D409820EA3E000161C03AEE940ED6D34D406CB2463D440061C041C1C58A1AD44D4010FC6F253B0061C0C8F484251ED44D402CBCCB457CFE60C038328FFCC1D44D40C0BC00FBE8FB60C065AF777FBCD74D4080BC57AD4CFB60C0C7BFCFB870D84D40102DB29DEFF860C0BB490C022BDB4D40242D95B723F760C0E25D2EE23BDD4D402CE7525C55EF60C00B9DD7D825E64D40CC1E680586EB60C0EE9925016ADE4D400C022B8716E860C0B7B9313D61D94D40CC0182397AE760C0FFB7921D1BD94D40C095ECD808E760C0B1389CF9D5D44D40E47E87A240E560C0079E7B0F97D04D401C5036E50AE560C0013ACC9717D04D40C01C3D7E6FE460C03A2861A6EDCF4D40988F6B43C5E360C05665DF15C1CF4D40148733BF9AE360C0252367614FCF4D40D0A5B8AAECE060C040DEAB5626C84D40D4CA845FEAE060C09AB67F65A5C54D40901EBFB7E9E060C01B2FDD2406C54D40B05582C5E1E060C055E3A59BC4BC4D405014E81379E260C0537E52EDD3B94D40483D44A33BE360C08A07944DB9B64D40E8263108ACDF60C09A7CB3CD8DB14D4080F10C1AFAE060C04052448655AC4D40D8D825AAB7DE60C06B65C22FF5A34D40E874594C6CD660C01D5A643BDF9F4D40F82CCF83BBD560C063D68BA19C984D40B0683A3B19D260C046990D32C9904D407047382D78CF60C0CDE9B298D8904D4078978BF84ECE60C017139B8F6B8B4D4008B64AB038CC60C094DE37BEF6844D40303D618907CD60C069CBB914577D4D40140A117008CA60C0E644BB0A297B4D4054E3A59BC4CA60C0763C66A032764D40044CE0D6DDC960C025404D2D5B734D40A818E76F42C860C0FD6F253B366E4D40A41EA2D11DBF60C067F2CD3637624D40D0A92B9FE5BA60C07732384A5E5D4D4030B610E4A0B660C059FFE7305F4E4D40A0BE654E97B560C02CC1E270E64B4D4044813E9127B560C08A5E46B1DC4A4D40C09F1A2FDDB460C044FF04172B4A4D40DCD26A48DCB460C0284EEE77284A4D4028E3DF675CB360C04A29E8F692464D4048D74CBED9B160C05F9D6340F6424D4098395D1613AC60C09F7B0F971C374D40F00390DAC4AE60C0A80018CFA0314D40F8F719170EAB60C0AC730CC85E234D400C5EF415A4A860C01B4CC3F0111D4D4008E1D1C611A760C03208AC1C5A184D40E422BE13B3A660C08221AB5B3D174D404833164D67A660C0FCC6D79E59164D4070641EF983A560C073DC291DAC134D4020E527D53EA260C06B9F8EC70C004D40B0BAD573D29B60C0DEEA39E97DEB4C40F4D6C056099860C07884D38217D94C4064B48EAA269560C0D869A4A5F2CE4C4054C6BFCFB89160C081ECF5EE8FBF4C405CC47762D68B60C02AE8F692C6AC4C40446E861BF08760C0ADA8C1340C9B4C4060C8EA56CF8B60C096CFF23CB88B4C40D005F52D738160C07E5C1B2AC6854C40AC6EF59CF48360C088BF266BD46F4C40D8EBDD1FEF7B60C026CCB4FD2B674C402883A3E4D57C60C040A9F6E978604C40D03FC1C58A7B60C0448B6CE7FB594C40747632384A7B60C07D96E7C1DD554C40D0747632387B60C03815A930B6544C40F8B31F29227B60C074F4F8BD4D534C40D8868A71FE7A60C0FF7DC68503514C40600CE544BB7A60C0F88DAF3DB34C4C40C8D2872EA87960C046F0BF95EC4C4C40E04F8D976E7860C0A2B94E232D4D4C4054910A630B7860C08642041C424D4C40540E2DB29D7760C03ED00A0C594D4C40808B1535987660C005FF5BC98E4D4C40D09B8A54187560C036EA211ADD4D4C406891ED7C3F7460C019ADA3AA094E4C4050EDD3F1987260C059FFE7305F4E4C40446458C51B6F60C02EEC6987BF464C40280AF4893C6A60C0E46BCF2C09404C40E0AFC91AF56960C03A7AFCDEA63F4C408872A25D856960C0ADA8C1340C3F4C4018B2BAD5736960C043EC4CA1F33E4C4044088F368E6560C0C57762D68B394C40CCCCCCCCCC6260C0A4C7EF6DFA334C4058DDEA39E95E60C0613C8386FE314C4034164D67275E60C0709EEA909B314C40C8F99B50885D60C0FE2B2B4D4A314C40E07A14AE475D60C0D4D9C9E028314C4098F56228275C60C0EAEC647094304C40C0D84290835B60C0F246E6913F304C40981C774A075960C0CA1F0C3CF72E4C40900A630B415860C0B1AC3429052D4C40205ED72FD85760C0E44EE960FD2B4C40DC240681955760C0ECDD1FEF552B4C407C74EACA675760C0E6965643E22A4C40B04B546F0D5760C0CBBE2B82FF294C4034936FB6B95660C05B0D897B2C294C40285C8FC2F55560C0C9CD70033E274C40342905DD5E5560C08CA6B393C1254C4098728577B95460C07923F3C81F244C4044C02154A95460C01D9430D3F6234C40A82688BA0F5460C067834C3272224C4030815B77F35360C044FF04172B224C40E422BE13B35360C0DAEBDD1FEF214C40A47EDE54A45260C038A6272CF1204C403C1405FA445260C0079E7B0F97204C40C8681D554D5160C0B3632310AF1F4C4080F10C1AFA4E60C050AA7D3A1E1F4C405C33F9669B4E60C0DE0720B5891B4C409CC420B0724E60C03641D47D001A4C40C0FF56B2634E60C0B7D617096D194C40B46CAD2F124E60C092442FA358164C402891442FA34D60C0AF64C74620124C4090ED7C3F354B60C023F8DF4A76104C405CE15D2EE24760C0C7850321590C4C400CB08F4E5D4760C07177D66EBB0C4C40E097FA79534360C048FE60E0B90F4C40C8D2872EA84260C0EA263108AC0C4C4098395D16134260C052F2EA1C030A4C40902232ACE24160C029D027F224094C40B87EC16ED84160C094DE37BEF6084C40F00703CFBD4160C0EAB298D87C084C40DC9DB5DB2E4160C0DAEBDD1FEF054C40200C3CF71E4160C09AB67F65A5054C40686AD95A5F4060C067F2CD3637024C40A41EA2D11D4060C0A2629CBF09014C40C4724BAB214060C05D8FC2F528004C40F8B31F29224060C00FA14ACD1E004C409C16BCE82B4060C034F9669B1BFF4B40CC457C27664060C04DC3F01131F94B405C5A0D897B4060C0E6ED08A705F74B40DC0720B5894060C0B72DCA6C90F54B40BCD05CA7914060C0EA60FD9FC3F44B4054F146E6914060C07177D66EBBF44B40601A868F884060C07177D66EBBF44B409CF9D51C204060C07177D66EBBF44B409CF9D51C204060C0F20C1AFA27F44B406414CB2DAD4260C077BE9F1A2FE94B40B8533A58FF4360C06D5B94D920E74B40B05582C5E14460C0CBF8F71917E24B40F82CCF83BB4460C0174D672783DB4B40188BA6B3934360C0AC90F2936AD74B4004DD5ED2184460C00B2E56D460CA4B4044D3D9C9E04260C03AB4C876BEBF4B40EC5F5969524160C0E8FBA9F1D2B94B406414CB2DAD4060C05001309E41AB4B40900A630B413F60C0D205F52D73A64B40E4C281902C3F60C096B7239C16A44B4020020EA14A4360C0F870C971A7984B400035B56CAD4460C00BF4893C49924B40E0F3C308E14460C001E31934F48F4B402866BD18CA4560C0B3632310AF8B4B4048ACC5A7004660C0011DE6CB0B884B401881785DBF4860C07FA4880CAB7C4B40B46CAD2F124B60C0B7F3FDD478754B40480C022B874D60C0A553573ECB6F4B40C0D4CF9B8A4E60C0FF60E0B9F76C4B40889D29745E4F60C0F4716DA8186B4B40DC9DB5DB2E5260C0A96F99D365654B4000D9EBDD1F5460C0D678E92631644B4054AEF02E175560C0A81DFE9AAC614B40182FDD24065460C0E06C73637A5E4B403C3F8C101E5460C055E3A59BC45C4B408043A852B35360C0597380608E5A4B40044CE0D6DD9560C0CDCCCCCCCC544B406866666666DE60C01E03B2D7BB1B4B4000000000000061C00100000000004B400000000000E060C01E03B2D7BB5B4A400000000000F862C0132C0E677E614C4000000000002063C00100000000004C4000000000000064C00100000000C04A40F8B31F2922FA64C03433333333B34940F8B31F29221266C0B0C91AF51011494034333333332366401D03B2D7BB1B49402EE7525C555D64409A99999999D946400000000000E063404A63B48EAA0A494000000000002065400100000000004B40000000000040654003F1BA7EC1564B406766666666466540EACF7EA488684B4000000000008066400100000000004E4068666666668665C03433333333035040E8C6F484251F65C00000000000405040E8C6F484251F65C00000000000C0504078A1B94E231F65C00000000000005140') - ) as q(polygon) -) -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; - diff --git a/regress/sfcgal/geography_expected b/regress/sfcgal/geography_expected deleted file mode 100644 index 3359d125d..000000000 --- a/regress/sfcgal/geography_expected +++ /dev/null @@ -1,22 +0,0 @@ -geog_distance_cached_1a|t -geog_distance_cached_1b|t -geog_distance_cached_1c|t -geog_distance_cached_1e|t -geog_distance_cached_1f|t -geog_distance_cached_1g|t -geog_distance_cached_1h|t -geog_dithin_cached_1a|t -geog_dithin_cached_1b|t -geog_dithin_cached_1c|t -geog_dithin_cached_2a|f -geog_dithin_cached_2b|f -geog_dithin_cached_2c|f -geog_dithin_cached_3a|t -geog_dithin_cached_3b|t -geog_dithin_cached_3c|t -geog_precision_savffir|0|0 -geog_precision_savffir|0|0 -geog_precision_savffir|0|0 -geog_precision_savffir|0|0 -geog_precision_pazafir|0|0 -geog_precision_pazafir|0|0 diff --git a/regress/sfcgal/legacy.sql b/regress/sfcgal/legacy.sql deleted file mode 100644 index 61e3cb5ec..000000000 --- a/regress/sfcgal/legacy.sql +++ /dev/null @@ -1,12 +0,0 @@ --- --- These tests serve the purpose of ensuring compatibility with --- old versions of postgis users. --- --- Their use rely on loading the legacy.sql script. --- This file also serves as a testcase for uninstall_legacy.sql --- - -SET postgis.backend = 'sfcgal'; - -\cd :regdir -\i core/legacy.sql diff --git a/regress/sfcgal/legacy_expected b/regress/sfcgal/legacy_expected deleted file mode 100644 index b8bdb364c..000000000 --- a/regress/sfcgal/legacy_expected +++ /dev/null @@ -1,19 +0,0 @@ -Starting up MapServer/Geoserver tests... -Setting up the data table... -public.wmstest.pt SRID:4326 TYPE:POLYGON DIMS:2 -Running Geoserver 2.0 NG tests... -Geoserver1|POLYGON -Geoserver2|4326 -Geoserver3|-500|AAAAAAMAAAABAAA -Geoserver4|1 -Geoserver5|25|AAAAAAMAAAABAAA -Geoserver6|25|AAAAAAMAAAABAAA -MapServer1|id -MapServer2|-9465|AQcAAAABAAAAAQM|-9465 -MapServer2|-9460|AQcAAAABAAAAAQM|-9460 -MapServer3|id -MapServer4|-9465|010700000001000|-9465 -MapServer4|-9460|010700000001000|-9460 -Removing the data table... -Done. -1869|POINT(1 2) diff --git a/regress/sfcgal/measures.sql b/regress/sfcgal/measures.sql deleted file mode 100644 index 9bfb8e08d..000000000 --- a/regress/sfcgal/measures.sql +++ /dev/null @@ -1,247 +0,0 @@ -SET postgis.backend = 'sfcgal'; - -select '113', ST_area2d('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) ) ,( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7, 5 7, 5 5),(1 1,2 1, 2 2, 1 2, 1 1) ) )'::GEOMETRY) as value; - -select '114', ST_perimeter2d('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) ) ,( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7, 5 7, 5 5),(1 1,2 1, 2 2, 1 2, 1 1) ) )'::GEOMETRY) as value; - -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; - -select '134', ST_Distance('POINT(1 2)', 'POINT(1 2)'); -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, - 'POLYGON((11 0, 11 10, 20 10, 20 0, 11 0), - (15 5, 17 5, 17 8, 15 8, 15 5))'::geometry as b - ) as foo; - ---#1502 -SELECT '#1502', ST_Dwithin(a,b,0.0) from -(SELECT 'LINESTRING(-97364 -97364, 9736.4 9736.4)'::geometry a, 'POINT(0 0)'::geometry b ) foo; - ---st_shortestline - -select 'st_shortestline_134', st_astext(st_shortestline('POINT(1 2)', 'POINT(1 2)')); -select 'st_shortestline_135', st_astext(st_shortestline('POINT(5 0)', 'POINT(10 12)')); - -select 'st_shortestline_136', st_astext(st_shortestline('POINT(0 0)', ST_translate('POINT(0 0)', 5, 12, 0))); - --- postgis-users/2006-May/012174.html -select 'st_shortestline_dist', st_astext(st_shortestline(a,b)), st_astext(st_shortestline(b,a)) from ( - select 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))'::geometry as a, - 'POLYGON((11 0, 12 10, 20 10, 20 0, 11 0), - (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)'); -select 'st_maxdistance_135', st_maxdistance('POINT(5 0)', 'POINT(10 12)'); - -select 'st_maxdistance_136', st_maxdistance('POINT(0 0)', ST_translate('POINT(0 0)', 5, 12, 0)); - --- postgis-users/2006-May/012174.html -select 'st_maxdistance_dist', st_maxdistance(a,b), st_maxdistance(b,a) from ( - select 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))'::geometry as a, - 'POLYGON((11 0, 11 10, 20 10, 20 0, 11 0), - (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)')); -select 'st_longestline_135', st_astext(st_longestline('POINT(5 0)', 'POINT(10 12)')); - -select 'st_longestline_136', st_astext(st_longestline('POINT(0 0)', ST_translate('POINT(0 0)', 5, 12, 0))); - --- postgis-users/2006-May/012174.html -select 'st_longestline_dist', st_astext(st_longestline(a,b)), st_astext(st_longestline(b,a)) from ( - select 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))'::geometry as a, - 'POLYGON((11 0, 11 10, 20 10, 20 0, 11 0), - (15 5, 15 8, 17 8, 17 5, 15 5))'::geometry as b - ) as foo; - -select 'distancetest1', - ST_Distance(a, b), - st_maxdistance(a, b), - st_astext(st_shortestline(a,b)), - st_astext(st_shortestline(b,a)), - st_astext(st_longestline(a,b)), - st_astext(st_longestline(b,a)) from ( -select - ST_GeomFromText('MULTILINESTRING((17 16, 16 17, 17 18, 17 17, 17 16), (28 35,29 39, 30 35))') as a, - 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,35 35,35 40,33 40,33 35)))') as b -) as foo; - -select 'distancetest2', - ST_Distance(a, b), - st_maxdistance(a, b), - 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), - st_astext(st_longestline(a,b)), - st_astext(st_longestline(b,a)) from ( -select - ST_GeomFromText('LINESTRING(-40 -20 , 4 2)') as a, - ST_GeomFromText('LINESTRING(-10 20, 1 -2)') as b -) as foo; - -select 'distancepoly1', - ST_Distance(a, b), - st_maxdistance(a, b), - st_astext(st_shortestline(a,b)), - st_astext(st_shortestline(b,a)), - st_astext(st_longestline(a,b)), - st_astext(st_longestline(b,a)) from ( -select - ST_GeomFromText('MULTIPOLYGON(((17 16,16 17,17 18,17 17,17 16)), ((28 35,30 35,29 39,28 35)))') as a, - 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', - ST_Distance(a, b), - st_maxdistance(a, b), - st_astext(st_shortestline(a,b)), - st_astext(st_shortestline(b,a)), - st_astext(st_longestline(a,b)), - st_astext(st_longestline(b,a)) from ( - select ST_GeomFromText('POLYGON((17 14, 16 17, 17 18, 17 17, 17 14))') as a, - 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', - ST_Distance(a, b), - st_maxdistance(a, b), - st_astext(st_shortestline(a,b)), - st_astext(st_shortestline(b,a)), - st_astext(st_longestline(a,b)), - st_astext(st_longestline(b,a)) from ( - select ST_GeomFromText('POLYGON((17 16, 16 17, 17 19, 17 17, 17 16))') as a, - 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', - ST_Distance(a, b), - st_maxdistance(a, b), - st_astext(st_shortestline(a,b)), - st_astext(st_shortestline(b,a)), - st_astext(st_longestline(a,b)), - st_astext(st_longestline(b,a)) from ( - select ST_GeomFromText('POLYGON((17 16, 16 17, 16 20, 18 20, 18 17, 17 16))') as a, - 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', - ST_Distance(a, b), - st_maxdistance(a, b), - st_astext(st_shortestline(a,b)), - st_astext(st_shortestline(b,a)), - st_astext(st_longestline(a,b)), - st_astext(st_longestline(b,a)) from ( - select ST_GeomFromText('POLYGON((17 12, 16 17, 17 18, 17 17, 17 12))') as a, - 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', - ST_Distance(a, b), - st_maxdistance(a, b), - st_astext(st_shortestline(a,b)), - st_astext(st_shortestline(b,a)), - st_astext(st_longestline(a,b)), - st_astext(st_longestline(b,a)) from ( - select ST_GeomFromText('POLYGON((2 2, 2 3, 3 3, 3 2, 2 2))') as a, - 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; - ---3D Distance functions - -SELECT '3dDistancetest1', - ST_3DDistance(a,b), - ST_3DMaxDistance(a,b), - ST_3DDWithin(a,b,5), - ST_3DDFullyWithin(a,b,5), - ST_ASEWKT(ST_3DShortestline(a,b)), - ST_ASEWKT(ST_3DClosestpoint(a,b)), - 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), - ST_3DDWithin(a,b,5), - ST_3DDFullyWithin(a,b,5), - ST_ASEWKT(ST_3DShortestline(a,b)), - ST_ASEWKT(ST_3DClosestpoint(a,b)), - 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), - ST_3DDWithin(a,b,5), - ST_3DDFullyWithin(a,b,5), - ST_ASEWKT(ST_SnapToGrid(ST_3DShortestline(a,b), 1e-14)), - ST_ASEWKT(ST_3DClosestpoint(a,b)), - 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), - ST_3DDWithin(a,b,5), - ST_3DDFullyWithin(a,b,5), - ST_ASEWKT(ST_3DShortestline(a,b)), - ST_ASEWKT(ST_3DClosestpoint(a,b)), - 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), - ST_3DDWithin(a,b,5), - ST_3DDFullyWithin(a,b,5), - ST_ASEWKT(ST_3DShortestline(a,b)), - ST_ASEWKT(ST_3DClosestpoint(a,b)), - ST_ASEWKT(ST_3DLongestline(a,b)) FROM ( - SELECT 'LINESTRING(1 0 5, 11 0 5)'::geometry as a, 'LINESTRING(5 2 0, 5 2 10, 5 0 13)'::geometry as b - ) as foo; - -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; - --- Area of an empty polygon -select 'emptyPolyArea', st_area('POLYGON EMPTY'); - --- Area of an empty linestring -select 'emptyLineArea', st_area('LINESTRING EMPTY'); - --- Area of an empty point -select 'emptyPointArea', st_area('POINT EMPTY'); - --- Area of an empty multipolygon -select 'emptyMultiPolyArea', st_area('MULTIPOLYGON EMPTY'); - --- Area of an empty multilinestring -select 'emptyMultiLineArea', st_area('MULTILINESTRING EMPTY'); - --- Area of an empty multilipoint -select 'emptyMultiPointArea', st_area('MULTIPOINT EMPTY'); - --- Area of an empty collection -select 'emptyCollectionArea', st_area('GEOMETRYCOLLECTION EMPTY'); - --- -select 'spheroidLength1', round(ST_LengthSpheroid('MULTILINESTRING((-118.584 38.374,-118.583 38.5),(-71.05957 42.3589 , -71.061 43))'::geometry,'SPHEROID["GRS_1980",6378137,298.257222101]'::spheroid)::numeric,5); diff --git a/regress/sfcgal/measures_expected b/regress/sfcgal/measures_expected deleted file mode 100644 index f945b1502..000000000 --- a/regress/sfcgal/measures_expected +++ /dev/null @@ -1,45 +0,0 @@ -113|291 -114|140 -115|140 -116|4.24264068711929 -117|4.24264068711929 -118|5.19615242270663 -134|0 -135|13 -136|13 -dist|1|1 -#1502|t -st_shortestline_134|LINESTRING(1 2,1 2) -st_shortestline_135|LINESTRING(5 0,10 12) -st_shortestline_136|LINESTRING(0 0,5 12) -st_shortestline_dist|LINESTRING(10 0,11 0)|LINESTRING(11 0,10 0) -st_maxdistance_134|0 -st_maxdistance_135|13 -st_maxdistance_136|13 -st_maxdistance_dist|22.3606797749979|22.3606797749979 -st_longestline_134|LINESTRING(1 2,1 2) -st_longestline_135|LINESTRING(5 0,10 12) -st_longestline_136|LINESTRING(0 0,5 12) -st_longestline_dist|LINESTRING(0 0,20 10)|LINESTRING(20 10,0 0) -distancetest1|1|50|LINESTRING(17 18,17 19)|LINESTRING(17 19,17 18)|LINESTRING(29 39,-1 -1)|LINESTRING(-1 -1,29 39) -distancetest2|0|50|0.0000000000|0.0000000000|0.0000000000|0.0000000000|LINESTRING(-40 -20,-10 20)|LINESTRING(-10 20,-40 -20) -distancepoly1|1|50|LINESTRING(17 18,17 19)|LINESTRING(17 19,17 18)|LINESTRING(29 39,-1 -1)|LINESTRING(-1 -1,29 39) -distancepoly2|0|26.1725046566048|LINESTRING(17 14,17 14)|LINESTRING(17 14,17 14)|LINESTRING(17 18,-1 -1)|LINESTRING(-1 -1,17 18) -distancepoly3|0|26.9072480941474|LINESTRING(17 19,17 19)|LINESTRING(17 19,17 19)|LINESTRING(17 19,-1 -1)|LINESTRING(-1 -1,17 19) -distancepoly4|0|28.3196045170126|LINESTRING(16 19,16 19)|LINESTRING(16 19,16 19)|LINESTRING(18 20,-1 -1)|LINESTRING(-1 -1,18 20) -distancepoly5|0|26.1725046566048|LINESTRING(17 12,17 12)|LINESTRING(17 12,17 12)|LINESTRING(17 18,-1 -1)|LINESTRING(-1 -1,17 18) -distancepoly6|0|32.5269119345812|LINESTRING(2 2,2 2)|LINESTRING(2 2,2 2)|LINESTRING(2 2,25 25)|LINESTRING(25 25,2 2) -3dDistancetest1|6.40312423743285|6.40312423743285|f|f|LINESTRING(1 1 1,3 2 7)|POINT(1 1 1)|LINESTRING(1 1 1,3 2 7) -3dDistancetest2|0|1.73205080756888|t|t|LINESTRING(1 1 1,1 1 1)|POINT(1 1 1)|LINESTRING(1 1 1,0 0 0) -3dDistancetest3|4.09994192757944|6.48074069840786|t|f|LINESTRING(1 1 1,0.61904761904762 -0.19047619047619 4.90476190476191)|POINT(1 1 1)|LINESTRING(1 1 1,5 2 6) -3dDistancetest4|2|10.0498756211209|t|f|LINESTRING(1 1 3,1 1 1)|POINT(1 1 3)|LINESTRING(5 7 8,1 1 1) -3dDistancetest5|2|10|t|f|LINESTRING(5 0 5,5 2 5)|POINT(5 0 5)|LINESTRING(11 0 5,5 0 13) -3dDistancetest6|0 -emptyPolyArea|0 -emptyLineArea|0 -emptyPointArea|0 -emptyMultiPolyArea|0 -emptyMultiLineArea|0 -emptyMultiPointArea|0 -emptyCollectionArea|0 -spheroidLength1|85204.52077 diff --git a/regress/sfcgal/regress.sql b/regress/sfcgal/regress.sql deleted file mode 100644 index 8670ad461..000000000 --- a/regress/sfcgal/regress.sql +++ /dev/null @@ -1,289 +0,0 @@ -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; -select '2',ST_asewkt('POINT( 1 2 3)'::GEOMETRY) as geom; - -select '3',ST_asewkt('LINESTRING( 0 0, 1 1, 2 2, 3 3 , 4 4)'::GEOMETRY) as geom; -select '4',ST_asewkt('LINESTRING( 0 0 0 , 1 1 1 , 2 2 2 , 3 3 3, 4 4 4)'::GEOMETRY) as geom; -select '5',ST_asewkt('LINESTRING( 1 2 3 , 4 5 6 , 7 8 9 , 10 11 12, 13 14 15)'::GEOMETRY) as geom; - -select '6',ST_asewkt('POLYGON( (0 0, 10 0, 10 10, 0 10, 0 0) )'::GEOMETRY) as geom; -select '7',ST_asewkt('POLYGON( (0 0 1 , 10 0 1, 10 10 1, 0 10 1, 0 0 1) )'::GEOMETRY) as geom; -select '8',ST_asewkt('POLYGON( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) )'::GEOMETRY) as geom; -select '9',ST_asewkt('POLYGON( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5),(1 1,2 1, 2 2, 1 2, 1 1) )'::GEOMETRY) as geom; -select '10',ST_asewkt('POLYGON( (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) )'::GEOMETRY) as geom; -select '11',ST_asewkt('POLYGON( (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 '12',ST_asewkt('GEOMETRYCOLLECTION(POINT( 1 2 ))'::GEOMETRY); -select '13',ST_asewkt('GEOMETRYCOLLECTION(POINT( 1 2 3))'::GEOMETRY); -select '14',ST_asewkt('GEOMETRYCOLLECTION(LINESTRING( 0 0, 1 1, 2 2, 3 3 , 4 4))'::GEOMETRY); -select '15',ST_asewkt('GEOMETRYCOLLECTION(LINESTRING( 1 2 3 , 4 5 6 , 7 8 9 , 10 11 12, 13 14 15))'::GEOMETRY); -select '16',ST_asewkt('GEOMETRYCOLLECTION(POLYGON( (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) ))'::GEOMETRY); -select '17',ST_asewkt('GEOMETRYCOLLECTION(POINT( 1 2 0),POINT( 1 2 3) )'::GEOMETRY); -select '18',ST_asewkt('GEOMETRYCOLLECTION(LINESTRING( 0 0 0, 1 1 0, 2 2 0, 3 3 0, 4 4 0),POINT( 1 2 3) )'::GEOMETRY); -select '19',ST_asewkt('GEOMETRYCOLLECTION(POINT( 1 2 ),LINESTRING( 0 0, 1 1, 2 2, 3 3 , 4 4) )'::GEOMETRY); -select '20',ST_asewkt('GEOMETRYCOLLECTION(POINT( 1 2 0 ),POINT( 1 2 3),LINESTRING( 1 2 3 , 4 5 6 , 7 8 9 , 10 11 12, 13 14 15) )'::GEOMETRY); -select '21',ST_asewkt('GEOMETRYCOLLECTION(POINT( 1 2 0 ),POINT( 1 2 3),LINESTRING( 1 2 3 , 4 5 6 , 7 8 9 , 10 11 12, 13 14 15),POLYGON( (0 0 0, 10 0 0, 10 10 0, 0 10 0, 0 0 0) ) )'::GEOMETRY); -select '22',ST_asewkt('GEOMETRYCOLLECTION(POINT( 1 2 0),POINT( 1 2 3),POLYGON( (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); - -select '23',ST_asewkt('MULTIPOINT( 1 2)'::GEOMETRY) as geom; -select '24',ST_asewkt('MULTIPOINT( 1 2 3)'::GEOMETRY) as geom; -select '25',ST_asewkt('MULTIPOINT( 1 2, 3 4, 5 6)'::GEOMETRY) as geom; -select '26',ST_asewkt('MULTIPOINT( 1 2 3, 5 6 7, 8 9 10, 11 12 13)'::GEOMETRY) as geom; -select '27',ST_asewkt('MULTIPOINT( 1 2 0, 1 2 3, 4 5 0, 6 7 8)'::GEOMETRY) as geom; -select '28',ST_asewkt('MULTIPOINT( 1 2 3,4 5 0)'::GEOMETRY) as geom; - -select '29',ST_asewkt('MULTILINESTRING( (0 0, 1 1, 2 2, 3 3 , 4 4) )'::GEOMETRY) as geom; -select '30',ST_asewkt('MULTILINESTRING( (0 0, 1 1, 2 2, 3 3 , 4 4),(0 0, 1 1, 2 2, 3 3 , 4 4))'::GEOMETRY) as geom; -select '31',ST_asewkt('MULTILINESTRING( (0 0 0, 1 1 0, 2 2 0, 3 3 0, 4 4 0),(0 0 0, 1 1 0, 2 2 0, 3 3 0, 4 4 0),(1 2 3 , 4 5 6 , 7 8 9 , 10 11 12, 13 14 15) )'::GEOMETRY) as geom; -select '32',ST_asewkt('MULTILINESTRING( (1 2 3 , 4 5 6 , 7 8 9 , 10 11 12, 13 14 15),(0 0 0, 1 1 0, 2 2 0, 3 3 0, 4 4 0),(0 0 0, 1 1 0, 2 2 0, 3 3 0 , 4 4 0))'::GEOMETRY) as geom; - -select '33',ST_asewkt('MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)) )'::GEOMETRY) as geom; -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); -select '39',ST_asewkt('GEOMETRYCOLLECTION(MULTILINESTRING( (0 0, 1 1, 2 2, 3 3 , 4 4) ))'::GEOMETRY); -select '40',ST_asewkt('GEOMETRYCOLLECTION(MULTILINESTRING( (1 2 3 , 4 5 6 , 7 8 9 , 10 11 12, 13 14 15),(0 0 0, 1 1 0, 2 2 0, 3 3 0, 4 4 0),(0 0 0, 1 1 0, 2 2 0, 3 3 0, 4 4 0)))'::GEOMETRY); -select '41',ST_asewkt('GEOMETRYCOLLECTION(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); -select '42',ST_asewkt('GEOMETRYCOLLECTION(POINT( 1 2 0),MULTIPOINT( 1 2 3))'::GEOMETRY); -select '43',ST_asewkt('GEOMETRYCOLLECTION(MULTIPOINT( 1 2 0, 3 4 0, 5 6 0),POINT( 1 2 3))'::GEOMETRY); -select '44',ST_asewkt('GEOMETRYCOLLECTION(POINT( 1 2 3),MULTILINESTRING( (0 0 0, 1 1 0, 2 2 0, 3 3 0 , 4 4 0) ))'::GEOMETRY); -select '45',ST_asewkt('GEOMETRYCOLLECTION(MULTILINESTRING( (0 0 0, 1 1 0, 2 2 0, 3 3 0 , 4 4 0) ),POINT( 1 2 3))'::GEOMETRY); -select '46',ST_asewkt('GEOMETRYCOLLECTION(POINT( 1 2 3), 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); -select '47',ST_asewkt('GEOMETRYCOLLECTION(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) ) ),MULTILINESTRING( (0 0 0, 1 1 0, 2 2 0, 3 3 0, 4 4 0),(0 0 0, 1 1 0, 2 2 0, 3 3 0, 4 4 0),(1 2 3 , 4 5 6 , 7 8 9 , 10 11 12, 13 14 15) ),MULTIPOINT( 1 2 3, 5 6 7, 8 9 10, 11 12 13))'::GEOMETRY); - -select '48',ST_asewkt('MULTIPOINT( -1 -2 -3, 5.4 6.6 7.77, -5.4 -6.6 -7.77, 1e6 1e-6 -1e6, -1.3e-6 -1.4e-5 0)'::GEOMETRY) as geom; - -select '49', ST_asewkt('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(POINT(1 1) ))'::GEOMETRY) as geom; ---- basic datatype (incorrect) - -select '50', 'POINT()'::GEOMETRY as geom; -select '51', 'POINT(1)'::GEOMETRY as geom; -select '52', 'POINT(,)'::GEOMETRY as geom; -select '53', 'MULTIPOINT(,)'::GEOMETRY as geom; -select '54', 'POINT(a b)'::GEOMETRY as geom; -select '55', 'MULTIPOINT()'::GEOMETRY as geom; -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); -select '60',ST_asewkt('POINT(1 2 3 4 5 6 7)'::GEOMETRY); -select '61',ST_asewkt('LINESTRING(1 1)'::GEOMETRY); -select '62',regexp_replace(ST_asewkt('POINT( 1e700 0)'::GEOMETRY), E'(Infinity|1\.#INF)', 'inf'); -select '63',regexp_replace(ST_asewkt('POINT( -1e700 0)'::GEOMETRY), E'(Infinity|1\.#INF)', 'inf'); ---select '62',ST_asewkt('POINT( 1e700 0)'::GEOMETRY); ---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; -select '65a',ST_OrderingEquals('POINT(1 1)'::GEOMETRY,'POINT(1 1)'::GEOMETRY) as bool; -select '66','POINT(1 1 0)'::GEOMETRY ~= 'POINT(1 1)'::GEOMETRY as bool; -select '66a',ST_OrderingEquals('POINT(1 1 0)'::GEOMETRY,'POINT(1 1)'::GEOMETRY) as bool; -select '67','POINT(1 1 0)'::GEOMETRY ~= 'POINT(1 1 0)'::GEOMETRY as bool; -select '67a',ST_OrderingEquals('POINT(1 1 0)'::GEOMETRY,'POINT(1 1 0)'::GEOMETRY) as bool; - -select '68','MULTIPOINT(1 1,2 2)'::GEOMETRY ~= 'MULTIPOINT(1 1,2 2)'::GEOMETRY as bool; -select '68a',ST_OrderingEquals('MULTIPOINT(1 1,2 2)'::GEOMETRY,'MULTIPOINT(1 1,2 2)'::GEOMETRY) as bool; -select '69','MULTIPOINT(2 2, 1 1)'::GEOMETRY ~= 'MULTIPOINT(1 1,2 2)'::GEOMETRY as bool; -select '69a',ST_OrderingEquals('MULTIPOINT(2 2, 1 1)'::GEOMETRY,'MULTIPOINT(1 1,2 2)'::GEOMETRY) as bool; - -select '70','GEOMETRYCOLLECTION(POINT( 1 2 3),POINT(4 5 6))'::GEOMETRY ~= 'GEOMETRYCOLLECTION(POINT( 4 5 6),POINT(1 2 3))'::GEOMETRY as bool; -select '70a',ST_OrderingEquals('GEOMETRYCOLLECTION(POINT( 1 2 3),POINT(4 5 6))'::GEOMETRY,'GEOMETRYCOLLECTION(POINT( 4 5 6),POINT(1 2 3))'::GEOMETRY) as bool; -select '71','MULTIPOINT(4 5 6, 1 2 3)'::GEOMETRY ~= 'GEOMETRYCOLLECTION(POINT( 4 5 6),POINT(1 2 3))'::GEOMETRY as bool; -select '71a',ST_OrderingEquals('MULTIPOINT(4 5 6, 1 2 3)'::GEOMETRY,'GEOMETRYCOLLECTION(POINT( 4 5 6),POINT(1 2 3))'::GEOMETRY) as bool; -select '72','MULTIPOINT(1 2 3, 4 5 6)'::GEOMETRY ~= 'GEOMETRYCOLLECTION(POINT( 4 5 6),POINT(1 2 3))'::GEOMETRY as bool; -select '72a',ST_OrderingEquals('MULTIPOINT(1 2 3, 4 5 6)'::GEOMETRY,'GEOMETRYCOLLECTION(POINT( 4 5 6),POINT(1 2 3))'::GEOMETRY) as bool; -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; -select '75a',ST_OrderingEquals('LINESTRING(1 1, 2 2)'::GEOMETRY,'LINESTRING(2 2, 1 1)'::GEOMETRY) as bool; -select '76','LINESTRING(1 1, 2 2)'::GEOMETRY ~= 'LINESTRING(1 1, 2 2, 3 3)'::GEOMETRY as bool; -select '76a',ST_OrderingEquals('LINESTRING(1 1, 2 2)'::GEOMETRY,'LINESTRING(1 1, 2 2, 3 3)'::GEOMETRY) as bool; - ---- operator testing (testing is on the BOUNDING BOX (2d), not the actual geometries) - -select '77','POINT(1 1)'::GEOMETRY &< 'POINT(1 1)'::GEOMETRY as bool; -select '78','POINT(1 1)'::GEOMETRY &< 'POINT(2 1)'::GEOMETRY as bool; -select '79','POINT(2 1)'::GEOMETRY &< 'POINT(1 1)'::GEOMETRY as bool; - -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; - -select '86','POINT(1 1)'::GEOMETRY >> 'POINT(1 1)'::GEOMETRY as bool; -select '87','POINT(1 1)'::GEOMETRY >> 'POINT(2 1)'::GEOMETRY as bool; -select '88','POINT(2 1)'::GEOMETRY >> 'POINT(1 1)'::GEOMETRY as bool; - --- overlap - -select '89','POINT(1 1)'::GEOMETRY && 'POINT(1 1)'::GEOMETRY as bool; -select '90','POINT(1 1)'::GEOMETRY && 'POINT(2 2)'::GEOMETRY as bool; -select '91','MULTIPOINT(0 0, 1 1)'::GEOMETRY && 'MULTIPOINT(1 1, 2 2)'::GEOMETRY as bool; -select '92','MULTIPOINT(0 0, 1 1)'::GEOMETRY && 'MULTIPOINT(1.0001 1, 2 2)'::GEOMETRY as bool; -select '93','MULTIPOINT(0 0, 1 1)'::GEOMETRY && 'MULTIPOINT(1 1.0001, 2 2)'::GEOMETRY as bool; -select '94','MULTIPOINT(0 0, 1 1)'::GEOMETRY && 'MULTIPOINT(1 0, 2 2)'::GEOMETRY as bool; -select '95','MULTIPOINT(0 0, 1 1)'::GEOMETRY && 'MULTIPOINT(1.0001 0, 2 2)'::GEOMETRY as bool; - -select '96','MULTIPOINT(0 0, 1 1)'::GEOMETRY && 'MULTIPOINT(0 1, 1 2)'::GEOMETRY as bool; -select '97','MULTIPOINT(0 0, 1 1)'::GEOMETRY && 'MULTIPOINT(0 1.0001, 1 2)'::GEOMETRY as bool; - ---- contains - -select '98','MULTIPOINT(0 0, 10 10)'::GEOMETRY ~ 'MULTIPOINT(5 5, 7 7)'::GEOMETRY as bool; -select '99','MULTIPOINT(5 5, 7 7)'::GEOMETRY ~ 'MULTIPOINT(0 0, 10 10)'::GEOMETRY as bool; -select '100','MULTIPOINT(0 0, 7 7)'::GEOMETRY ~ 'MULTIPOINT(0 0, 10 10)'::GEOMETRY as bool; -select '101','MULTIPOINT(-0.0001 0, 7 7)'::GEOMETRY ~ 'MULTIPOINT(0 0, 10 10)'::GEOMETRY as bool; - ---- contained by - -select '102','MULTIPOINT(0 0, 10 10)'::GEOMETRY @ 'MULTIPOINT(5 5, 7 7)'::GEOMETRY as bool; -select '103','MULTIPOINT(5 5, 7 7)'::GEOMETRY @ 'MULTIPOINT(0 0, 10 10)'::GEOMETRY as bool; -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 - -select '106',box3d('MULTIPOINT(0 0, 7 7)'::GEOMETRY) as bvol; - --- box3d only type is only used for indexing -- NEVER use one yourself -select '107a',ST_AsEWKT(geometry('BOX3D(1 2 3, 1 2 3 )'::BOX3D)); -select '107b',ST_AsEWKT(geometry('BOX3D(2 3 3, 7 3 3 )'::BOX3D)); -select '107c',ST_AsEWKT(geometry('BOX3D(2 3 5, 6 8 5 )'::BOX3D)); -select '107d',ST_AsEWKT(geometry('BOX3D(1 -1 4, 2 -1 9 )'::BOX3D)); -select '107e',ST_AsEWKT(geometry('BOX3D(-1 3 5, -1 6 8 )'::BOX3D)); -select '107f',ST_AsEWKT(geometry('BOX3D(1 2 3, 4 5 6 )'::BOX3D)); - ---- debug function testing - -select '108',ST_NPoints('MULTIPOINT(0 0, 7 7)'::GEOMETRY) as value; -select '109',ST_NPoints('GEOMETRYCOLLECTION(POINT(1 1), LINESTRING( 1 1 , 2 2, 3 3))'::GEOMETRY) as value; - -select '110', ST_NRings('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) ) ,( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7, 5 7, 5 5),(1 1,2 1, 2 2, 1 2, 1 1) ) )'::GEOMETRY) as value; - -select '111', ST_MemSize(PostGIS_DropBBOX('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) ) ,( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7, 5 7, 5 5),(1 1,2 1, 2 2, 1 2, 1 1) ) )'::GEOMETRY)) as value; - -select '112',ST_NumGeometries('GEOMETRYCOLLECTION(POINT(1 1), LINESTRING( 1 1 , 2 2, 3 3),MULTIPOINT(1 1, 2 2))'::GEOMETRY) as value; - ----selection - ---- TOAST testing - --- create a table with data that will be TOASTed (even after compression) -create table TEST(a GEOMETRY, b GEOMETRY); -\i :regdir/core/regress_biginsert.sql - ----test basic ops on this - -select '121',box3d(a) as box3d_a, box3d(b) as box3d_b from TEST; - -select '122',a <>b from TEST; -select '125',a &>b from TEST; - -select '126',a ~= b from TEST; -select '127',a @ b from TEST; -select '128',a ~ b from TEST; - -select '129', ST_MemSize(PostGIS_DropBBOX(a)), ST_MemSize(PostGIS_DropBBOX(b)) from TEST; - -select '131', ST_X('POINT(1 2)'); -select '132', ST_Y('POINT(1 2)'); -select '133', ST_Z('POINT(1 2)'); -select '133a', ST_Z('POINT(1 2 3)'); -select '133b', ST_Z('POINTM(1 2 3)'); -select '133c', ST_M('POINT(1 2)'); -select '133d', ST_M('POINTM(1 2 4)'); -select '133e', ST_M('POINT(1 2 4)'); - -select '137', box3d('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION EMPTY)'::geometry); -select '138', box3d('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION EMPTY, POINT(0 0))'::geometry); - -select '139', ST_AsEWKT(ST_multi(ST_setsrid('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION EMPTY, POINT(0 0))'::geometry, 2))); -select '140', ST_AsEWKT(ST_multi(ST_setsrid('POINT(2 2)'::geometry, 3))); -select '141', ST_AsEWKT(ST_multi(ST_setsrid('LINESTRING(2 2, 3 3)'::geometry, 4))); -select '142', ST_AsEWKT(ST_multi(ST_setsrid('LINESTRING(2 2, 3 3)'::geometry, 5))); -select '143', ST_AsEWKT(ST_multi(ST_setsrid('POLYGON((0 0, 1 0, 1 1, 0 1, 0 0))'::geometry, 6))); -select '143c1', ST_AsEWKT(ST_multi('CIRCULARSTRING(0 0, 1 1, 2 2)'::geometry)); -select '144', ST_AsEWKT(ST_Force3DM('POINT(1 2 3)')); -select '145', ST_AsEWKT(ST_Force3DZ('POINTM(1 2 3)')); -select '146', ST_AsEWKT(ST_Force4D('POINTM(1 2 3)')); -select '147', ST_AsEWKT(ST_Force4D('POINT(1 2 3)')); - -select '148', ST_AsText(ST_segmentize('LINESTRING(0 0, 10 0)'::geometry, 5)); - -select '149', ST_AsText(ST_segmentize('GEOMETRYCOLLECTION EMPTY'::geometry, 0.5)); - -select '150', ST_AsEWKT(ST_ForceCollection(ST_setsrid('POLYGON((0 0, 1 0, 1 1, 0 1, 0 0))'::geometry, 6))); - -select '151', encode(ST_AsEWKB(ST_MakeEnvelope(0, 0, 1, 1, 4326),'ndr'),'hex'); -select '152', ST_SRID(ST_MakeEnvelope(0, 0, 1, 1, 4326)); -select '152.1', ST_SRID(ST_MakeEnvelope(0, 0, 1, 1)) = ST_SRID('POINT(0 0)'::geometry); -select '152.2', ST_SRID(ST_SetSRID(ST_MakeEnvelope(0, 0, 1, 1), 4326)); - -select '153', ST_AsText(ST_CollectionExtract('GEOMETRYCOLLECTION(POINT(0 0))',1)); -select '154', ST_AsText(ST_CollectionExtract('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(POINT(0 0)))',1)); -select '155', ST_AsText(ST_CollectionExtract('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(POINT(0 0), POINT(1 1)))',1)); -select '156', ST_AsText(ST_CollectionExtract('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(LINESTRING(0 0, 1 1), POINT(1 1)))',1)); -select '157', ST_AsText(ST_CollectionExtract('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(LINESTRING(0 0, 1 1), POINT(1 1)))',2)); -select '158', ST_AsText(ST_CollectionExtract('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(LINESTRING(0 0, 1 1), POINT(1 1)),LINESTRING(2 2, 3 3))',2)); -select '159', ST_AsText(ST_CollectionExtract('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(LINESTRING(0 0, 1 1), POINT(1 1)),LINESTRING(2 2, 3 3))',3)); -select '160', ST_AsText(ST_CollectionExtract('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(LINESTRING(0 0, 1 1), POINT(1 1)),LINESTRING(2 2, 3 3))',1)); -select '161', ST_AsText(ST_CollectionExtract('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(LINESTRING(0 0, 1 1), GEOMETRYCOLLECTION(POINT(1 1))),LINESTRING(2 2, 3 3))',2)); -select '162', encode(ST_AsEWKB(ST_MakeLine(ST_GeomFromText('POINT(-11.1111111 40)'),ST_GeomFromText('LINESTRING(-11.1111111 70,70 -11.1111111)')),'ndr'),'hex') As result; -select '163', ST_AsEWKT('POLYGON((0 0 0, 1 0 0, 1 1 0, 0 1 0, 0 0 0))'); -select '164', ST_AsEWKT('POLYGON((0 0 0, 1 0 0, 1 1 0, 0 1 0, 0 0 1))'); -select '165', ST_AsEWKT('POLYGON((0 0 0, 1 0 0, 1 1 0, 0 1 0, 0 0.1 1))'); -select '166', ST_AsText('POINT EMPTY'); -select '167', ST_AsText('LINESTRING EMPTY'); -select '168', ST_AsText('POLYGON EMPTY'); -select '169', ST_AsText('CIRCULARSTRING EMPTY'); -select '170', ST_AsText('COMPOUNDCURVE EMPTY'); -select '171', ST_AsText('CURVEPOLYGON EMPTY'); -select '172', ST_AsText('MULTIPOINT EMPTY'); -select '173', ST_AsText('MULTILINESTRING EMPTY'); -select '174', ST_AsText('MULTIPOLYGON EMPTY'); -select '175', ST_AsText('TRIANGLE EMPTY'); -select '176', ST_AsText('TIN EMPTY'); -select '177', ST_AsText('POLYHEDRALSURFACE EMPTY'); -select '178', ST_AsText('MULTISURFACE EMPTY'); -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; - --- Make sure all postgis-referencing probin are using the --- same module version and path as expected by postgis_lib_version() --- -SELECT DISTINCT 'unexpected probin', proname || ':' || probin -FROM pg_proc -WHERE probin like '%postgis%' - AND regexp_replace(probin, '(rt)?postgis(_[^-]*)?', '') != -( -SELECT regexp_replace(probin, '(rt)?postgis(_[^-]*)?', '') - FROM pg_proc WHERE proname = 'postgis_lib_version' -) -ORDER BY 2; diff --git a/regress/sfcgal/regress_expected b/regress/sfcgal/regress_expected deleted file mode 100644 index 308f3b252..000000000 --- a/regress/sfcgal/regress_expected +++ /dev/null @@ -1,194 +0,0 @@ -1|POINT(1 2) -2|POINT(1 2 3) -3|LINESTRING(0 0,1 1,2 2,3 3,4 4) -4|LINESTRING(0 0 0,1 1 1,2 2 2,3 3 3,4 4 4) -5|LINESTRING(1 2 3,4 5 6,7 8 9,10 11 12,13 14 15) -6|POLYGON((0 0,10 0,10 10,0 10,0 0)) -7|POLYGON((0 0 1,10 0 1,10 10 1,0 10 1,0 0 1)) -8|POLYGON((0 0,10 0,10 10,0 10,0 0),(5 5,7 5,7 7,5 7,5 5)) -9|POLYGON((0 0,10 0,10 10,0 10,0 0),(5 5,7 5,7 7,5 7,5 5),(1 1,2 1,2 2,1 2,1 1)) -10|POLYGON((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)) -11|POLYGON((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)) -12|GEOMETRYCOLLECTION(POINT(1 2)) -13|GEOMETRYCOLLECTION(POINT(1 2 3)) -14|GEOMETRYCOLLECTION(LINESTRING(0 0,1 1,2 2,3 3,4 4)) -15|GEOMETRYCOLLECTION(LINESTRING(1 2 3,4 5 6,7 8 9,10 11 12,13 14 15)) -16|GEOMETRYCOLLECTION(POLYGON((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))) -17|GEOMETRYCOLLECTION(POINT(1 2 0),POINT(1 2 3)) -18|GEOMETRYCOLLECTION(LINESTRING(0 0 0,1 1 0,2 2 0,3 3 0,4 4 0),POINT(1 2 3)) -19|GEOMETRYCOLLECTION(POINT(1 2),LINESTRING(0 0,1 1,2 2,3 3,4 4)) -20|GEOMETRYCOLLECTION(POINT(1 2 0),POINT(1 2 3),LINESTRING(1 2 3,4 5 6,7 8 9,10 11 12,13 14 15)) -21|GEOMETRYCOLLECTION(POINT(1 2 0),POINT(1 2 3),LINESTRING(1 2 3,4 5 6,7 8 9,10 11 12,13 14 15),POLYGON((0 0 0,10 0 0,10 10 0,0 10 0,0 0 0))) -22|GEOMETRYCOLLECTION(POINT(1 2 0),POINT(1 2 3),POLYGON((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))) -23|MULTIPOINT(1 2) -24|MULTIPOINT(1 2 3) -25|MULTIPOINT(1 2,3 4,5 6) -26|MULTIPOINT(1 2 3,5 6 7,8 9 10,11 12 13) -27|MULTIPOINT(1 2 0,1 2 3,4 5 0,6 7 8) -28|MULTIPOINT(1 2 3,4 5 0) -29|MULTILINESTRING((0 0,1 1,2 2,3 3,4 4)) -30|MULTILINESTRING((0 0,1 1,2 2,3 3,4 4),(0 0,1 1,2 2,3 3,4 4)) -31|MULTILINESTRING((0 0 0,1 1 0,2 2 0,3 3 0,4 4 0),(0 0 0,1 1 0,2 2 0,3 3 0,4 4 0),(1 2 3,4 5 6,7 8 9,10 11 12,13 14 15)) -32|MULTILINESTRING((1 2 3,4 5 6,7 8 9,10 11 12,13 14 15),(0 0 0,1 1 0,2 2 0,3 3 0,4 4 0),(0 0 0,1 1 0,2 2 0,3 3 0,4 4 0)) -33|MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0))) -34|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))) -35|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))) -36|GEOMETRYCOLLECTION(MULTIPOINT(1 2)) -37|GEOMETRYCOLLECTION(MULTIPOINT(1 2 3)) -38|GEOMETRYCOLLECTION(MULTIPOINT(1 2 3,5 6 7,8 9 10,11 12 13)) -39|GEOMETRYCOLLECTION(MULTILINESTRING((0 0,1 1,2 2,3 3,4 4))) -40|GEOMETRYCOLLECTION(MULTILINESTRING((1 2 3,4 5 6,7 8 9,10 11 12,13 14 15),(0 0 0,1 1 0,2 2 0,3 3 0,4 4 0),(0 0 0,1 1 0,2 2 0,3 3 0,4 4 0))) -41|GEOMETRYCOLLECTION(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)))) -42|GEOMETRYCOLLECTION(POINT(1 2 0),MULTIPOINT(1 2 3)) -43|GEOMETRYCOLLECTION(MULTIPOINT(1 2 0,3 4 0,5 6 0),POINT(1 2 3)) -44|GEOMETRYCOLLECTION(POINT(1 2 3),MULTILINESTRING((0 0 0,1 1 0,2 2 0,3 3 0,4 4 0))) -45|GEOMETRYCOLLECTION(MULTILINESTRING((0 0 0,1 1 0,2 2 0,3 3 0,4 4 0)),POINT(1 2 3)) -46|GEOMETRYCOLLECTION(POINT(1 2 3),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)))) -47|GEOMETRYCOLLECTION(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))),MULTILINESTRING((0 0 0,1 1 0,2 2 0,3 3 0,4 4 0),(0 0 0,1 1 0,2 2 0,3 3 0,4 4 0),(1 2 3,4 5 6,7 8 9,10 11 12,13 14 15)),MULTIPOINT(1 2 3,5 6 7,8 9 10,11 12 13)) -48|MULTIPOINT(-1 -2 -3,5.4 6.6 7.77,-5.4 -6.6 -7.77,1000000 0.000001 -1000000,-0.0000013 -0.000014 0) -49|GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(POINT(1 1))) -ERROR: parse error - invalid geometry at character 14 -ERROR: parse error - invalid geometry at character 14 -ERROR: parse error - invalid geometry at character 14 -ERROR: parse error - invalid geometry at character 14 -ERROR: parse error - invalid geometry at character 14 -ERROR: parse error - invalid geometry at character 14 -ERROR: geometry contains non-closed rings at character 24 -ERROR: geometry contains non-closed rings at character 24 -ERROR: parse error - invalid geometry at character 24 -ERROR: geometry has too many points at character 23 -ERROR: parse error - invalid geometry at character 23 -ERROR: geometry requires more points at character 23 -62|POINT(inf 0) -63|POINT(-inf 0) -ERROR: parse error - invalid geometry at character 23 -65|t -65a|t -66|t -66a|f -67|t -67a|t -68|t -68a|t -69|t -69a|f -70|t -70a|f -71|t -71a|f -72|t -72a|f -73|t -73a|f -74|f -74a|f -75|t -75a|f -76|f -76a|f -77|t -78|t -79|f -80|f -81|t -82|f -83|t -84|f -85|t -86|f -87|f -88|t -89|t -90|f -91|t -92|f -93|f -94|t -95|f -96|t -97|f -98|t -99|f -100|f -101|f -102|f -103|t -104|t -105|f -106|BOX3D(0 0 0,7 7 0) -107a|POINT(1 2 3) -107b|LINESTRING(2 3 3,7 3 3) -107c|POLYGON((2 3 5,2 8 5,6 8 5,6 3 5,2 3 5)) -107d|POLYGON((1 -1 4,2 -1 4,2 -1 9,1 -1 9,1 -1 4)) -107e|POLYGON((-1 3 5,-1 6 5,-1 6 8,-1 3 8,-1 3 5)) -107f|POLYHEDRALSURFACE(((1 2 3,1 5 3,4 5 3,4 2 3,1 2 3)),((1 2 6,4 2 6,4 5 6,1 5 6,1 2 6)),((1 2 3,1 2 6,1 5 6,1 5 3,1 2 3)),((4 2 3,4 5 3,4 5 6,4 2 6,4 2 3)),((1 2 3,4 2 3,4 2 6,1 2 6,1 2 3)),((1 5 3,1 5 6,4 5 6,4 5 3,1 5 3))) -108|2 -109|4 -110|6 -111|552 -112|3 -121|BOX3D(1.19894826 1.20265412 0,999.932129 999.692932 0)|BOX3D(1.40486765 1.3484304 0,999.857666 999.936401 0) -122|f -123|f -124|f -125|f -126|f -127|f -128|f -129|48016|48016 -131|1 -132|2 -133| -133a|3 -133b| -133c| -133d|4 -133e| -137| -138|BOX3D(0 0 0,0 0 0) -139|SRID=2;GEOMETRYCOLLECTION(GEOMETRYCOLLECTION EMPTY,POINT(0 0)) -140|SRID=3;MULTIPOINT(2 2) -141|SRID=4;MULTILINESTRING((2 2,3 3)) -142|SRID=5;MULTILINESTRING((2 2,3 3)) -143|SRID=6;MULTIPOLYGON(((0 0,1 0,1 1,0 1,0 0))) -143c1|MULTICURVE(CIRCULARSTRING(0 0,1 1,2 2)) -144|POINTM(1 2 0) -145|POINT(1 2 0) -146|POINT(1 2 0 3) -147|POINT(1 2 3 0) -148|LINESTRING(0 0,5 0,10 0) -149|GEOMETRYCOLLECTION EMPTY -150|SRID=6;GEOMETRYCOLLECTION(POLYGON((0 0,1 0,1 1,0 1,0 0))) -151|0103000020e61000000100000005000000000000000000000000000000000000000000000000000000000000000000f03f000000000000f03f000000000000f03f000000000000f03f000000000000000000000000000000000000000000000000 -152|4326 -152.1|t -152.2|4326 -153|MULTIPOINT(0 0) -154|MULTIPOINT(0 0) -155|MULTIPOINT(0 0,1 1) -156|MULTIPOINT(1 1) -157|MULTILINESTRING((0 0,1 1)) -158|MULTILINESTRING((0 0,1 1),(2 2,3 3)) -159|MULTIPOLYGON EMPTY -160|MULTIPOINT(1 1) -161|MULTILINESTRING((0 0,1 1),(2 2,3 3)) -162|010200000003000000f771d98de33826c00000000000004440f771d98de33826c000000000008051400000000000805140f771d98de33826c0 -163|POLYGON((0 0 0,1 0 0,1 1 0,0 1 0,0 0 0)) -164|POLYGON((0 0 0,1 0 0,1 1 0,0 1 0,0 0 1)) -ERROR: geometry contains non-closed rings -166|POINT EMPTY -167|LINESTRING EMPTY -168|POLYGON EMPTY -169|CIRCULARSTRING EMPTY -170|COMPOUNDCURVE EMPTY -171|CURVEPOLYGON EMPTY -172|MULTIPOINT EMPTY -173|MULTILINESTRING EMPTY -174|MULTIPOLYGON EMPTY -175|TRIANGLE EMPTY -176|TIN EMPTY -177|POLYHEDRALSURFACE EMPTY -178|MULTISURFACE EMPTY -179|MULTICURVE EMPTY -180|GEOMETRYCOLLECTION EMPTY -181|GEOMETRYCOLLECTION(TRIANGLE EMPTY,TIN EMPTY) diff --git a/regress/sfcgal/regress_ogc.sql b/regress/sfcgal/regress_ogc.sql deleted file mode 100644 index d63f8601e..000000000 --- a/regress/sfcgal/regress_ogc.sql +++ /dev/null @@ -1,9 +0,0 @@ ---- ---- SFCGAL backend tests based on GEOS/JTS implemented functions ---- ---- - -SET postgis.backend = 'sfcgal'; - -\cd :regdir -\i core/regress_ogc.sql diff --git a/regress/sfcgal/regress_ogc_expected b/regress/sfcgal/regress_ogc_expected deleted file mode 100644 index 5ab5f91e6..000000000 --- a/regress/sfcgal/regress_ogc_expected +++ /dev/null @@ -1,122 +0,0 @@ -buffer|POLYGON((1 0,0.707107 -0.707107,0 -1,-0.707107 -0.707107,-1 0,-0.707107 0.707107,0 1,0.707107 0.707107,1 0)) -geomunion|MULTIPOINT(0 0,1 1) -convexhull|POLYGON((0 0,0 10,10 10,10 0,0 0)) -relate|F0FFFF102 -relate|t -relate|f -disjoint|f -touches|t -intersects|t -crosses|f -crosses|t -within100|t -within101|f -within102|f -within103|f -within104|f -within105|t -within106|t -within107|t -within108|t -within109|f -within110|f -within111|t -disjoint100|f -disjoint101|f -disjoint102|t -disjoint103|f -disjoint104|t -disjoint105|f -disjoint106|t -disjoint150|f -disjoint151|f -disjoint152|t -disjoint153|f -disjoint154|t -disjoint155|f -disjoint156|t -intersects100|t -intersects101|t -intersects102|f -intersects103|t -intersects104|f -intersects105|t -intersects106|f -intersects111|t -intersects112|f -intersects113|t -intersects114|t -intersects115|f -intersects116|t -intersects117|f -intersects118|t -intersects119|t -intersects120|t -intersects121|t -intersects150|t -intersects151|t -intersects152|f -intersects153|t -intersects154|f -intersects155|t -intersects156|f -contains100|t -contains101|f -contains102|f -contains103|f -contains104|f -contains105|t -contains106|t -contains110|t -contains111|f -contains112|f -contains113|f -contains114|f -contains115|f -contains116|f -contains117|f -contains118|t -contains119|t -within119|f -within120|f -contains120|t -contains121|f -within130|t -within131|f -overlaps|f -isvalid|t -NOTICE: Self-intersection -isvalid|f -isvalid|t -intersection|POINT(0 0) -difference|MULTILINESTRING((0 10,0 2),(0 -2,0 -10)) -boundary|MULTILINESTRING((0 0,0 10,10 10,10 0,0 0),(2 2,2 4,4 4,4 2,2 2)) -symdifference|GEOMETRYCOLLECTION(LINESTRING(2 2,4 4),LINESTRING(10 10,20 20),POLYGON((0 0,0 10,10 10,10 0,0 0),(4 4,2 4,2 2,4 2,4 4))) -issimple|t -equals|t -pointonsurface|t -centroid|POINT(5.08333333333333 5.08333333333333) -centroid2|POINT(0.5 0.8) -centroid3|POINT(0.5 1) -centroid4|POINT(0.5 1) -centroid5|POINT(0.5 1) -exteriorring|LINESTRING(52 18,66 23,73 9,48 6,52 18) -polygonize_garray|GEOMETRYCOLLECTION EMPTY -polygonize_garray|POLYGON((10 0,0 0,0 10,10 10,10 0)) -linemerge149|LINESTRING(-5 -5,0 0,1 1,4 4) -intersects|f -ST_GeometryN|LINESTRING(0 0,1 1) -ST_NumGeometries|1 -ST_Union1|POLYGON((0 0,0 1,0.5 1,0.5 1.5,1.5 1.5,1.5 0.5,1 0.5,1 0,0 0)) -ST_StartPoint1|POINT(0 0) -ST_EndPoint1|POINT(2 2) -ST_PointN1|POINT(1 1) -ST_PointN2|POINT(2 2) -ST_PointN3| -ST_PointN4| -ST_PointN5|POINT(0 0) -ST_PointN6| -ST_PointN7|POINT(3 3) -ST_PointN8| -ST_PointN9|POINT Z (1 1 1) -ST_Buffer(empty)|POLYGON EMPTY diff --git a/regress/sfcgal/regress_ogc_prep.sql b/regress/sfcgal/regress_ogc_prep.sql deleted file mode 100644 index 0ba042432..000000000 --- a/regress/sfcgal/regress_ogc_prep.sql +++ /dev/null @@ -1,296 +0,0 @@ ---- ---- 9DIM Tests based on GEOS/JTS ones ---- ---- - -SET postgis.backend = 'sfcgal'; - -SELECT c, ST_Intersects(ply, pt) FROM -( VALUES --- PIP - point within polygon (no cache) -('intersects099', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POINT(5 5)'), --- PIP - point within polygon -('intersects100', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POINT(5 5)'), --- PIP - point on polygon vertex -('intersects101', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POINT(0 0)'), --- PIP - point outside polygon -('intersects102', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POINT(-1 0)'), --- PIP - point on polygon edge -('intersects103', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POINT(0 5)'), --- PIP - point in line with polygon edge -('intersects104', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POINT(0 12)') -) AS v(c,ply,pt); - -SELECT c, ST_Contains(ply, pt) FROM -( VALUES --- PIP - point within polygon (no cache) -('contains099', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POINT(5 5)'), --- PIP - point within polygon -('contains100', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POINT(5 5)'), --- PIP - point on polygon vertex -('contains101', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POINT(0 0)'), --- PIP - point outside polygon -('contains102', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POINT(-1 0)'), --- PIP - point on polygon edge -('contains103', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POINT(0 5)'), --- PIP - point in line with polygon edge -('contains104', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POINT(0 12)') -) AS v(c,ply,pt); - -SELECT c, ST_Covers(ply, pt) FROM -( VALUES --- PIP - point within polygon (no cache) -('covers099', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POINT(5 5)'), --- PIP - point within polygon -('covers100', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POINT(5 5)'), --- PIP - point on polygon vertex -('covers101', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POINT(0 0)'), --- PIP - point outside polygon -('covers102', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POINT(-1 0)'), --- PIP - point on polygon edge -('covers103', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POINT(0 5)'), --- PIP - point in line with polygon edge -('covers104', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POINT(0 12)') -) AS v(c,ply,pt); - -SELECT c, ST_ContainsProperly(ply, pt) FROM -( VALUES --- PIP - point within polygon (no cache) -('containsproperly099', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POINT(5 5)'), --- PIP - point within polygon -('containsproperly100', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POINT(5 5)'), --- PIP - point on polygon vertex -('containsproperly101', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POINT(0 0)'), --- PIP - point outside polygon -('containsproperly102', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POINT(-1 0)'), --- PIP - point on polygon edge -('containsproperly103', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POINT(0 5)'), --- PIP - point in line with polygon edge -('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 - (ST_GeomFromText('POLYGON((521526 5377783, 521481 5377811, 521494 5377832, 521539 5377804, 521526 5377783))', 32631)), - (ST_GeomFromText('POLYGON((521526 5377783, 521481 5377811, 521494 5377832, 521539 5377804, 521526 5377783))', 32631)), - (ST_GeomFromText('POLYGON((521526 5377783, 521481 5377811, 521494 5377832, 521539 5377804, 521526 5377783))', 32631)) -) AS v(p); --- PIP - point vertically aligned with polygon vertex, point first -SELECT 'intersects106', ST_Intersects(ST_GeomFromText('POINT(521513 5377804)', 32631), p) FROM -( VALUES - (ST_GeomFromText('POLYGON((521526 5377783, 521481 5377811, 521494 5377832, 521539 5377804, 521526 5377783))', 32631)), - (ST_GeomFromText('POLYGON((521526 5377783, 521481 5377811, 521494 5377832, 521539 5377804, 521526 5377783))', 32631)), - (ST_GeomFromText('POLYGON((521526 5377783, 521481 5377811, 521494 5377832, 521539 5377804, 521526 5377783))', 32631)) -) AS v(p); --- PIP - repeated vertex, poly first -SELECT 'intersects107', ST_Intersects(p, ST_GeomFromText('POINT(521543 5377804)', 32631)) FROM -( VALUES - (ST_GeomFromText('POLYGON((521526 5377783, 521482 5377811, 521494 5377832, 521539 5377804, 521526 5377783))', 32631)), - (ST_GeomFromText('POLYGON((521526 5377783, 521482 5377811, 521494 5377832, 521539 5377804, 521526 5377783))', 32631)), - (ST_GeomFromText('POLYGON((521526 5377783, 521482 5377811, 521494 5377832, 521539 5377804, 521526 5377783))', 32631)) -) AS v(p); --- PIP - repeated vertex, point first -SELECT 'intersects108', ST_Intersects(ST_GeomFromText('POINT(521543 5377804)', 32631), p) FROM -( VALUES - (ST_GeomFromText('POLYGON((521526 5377783, 521482 5377811, 521494 5377832, 521539 5377804, 521526 5377783))', 32631)), - (ST_GeomFromText('POLYGON((521526 5377783, 521482 5377811, 521494 5377832, 521539 5377804, 521526 5377783))', 32631)), - (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 - (ST_GeomFromText('POLYGON((521526 5377783, 521481 5377811, 521494 5377832, 521539 5377804, 521526 5377783))', 32631)), - (ST_GeomFromText('POLYGON((521526 5377783, 521481 5377811, 521494 5377832, 521539 5377804, 521526 5377783))', 32631)), - (ST_GeomFromText('POLYGON((521526 5377783, 521481 5377811, 521494 5377832, 521539 5377804, 521526 5377783))', 32631)) -) AS v(p); --- PIP - point vertically aligned with polygon vertex, point first -SELECT 'contains106', ST_Contains(ST_GeomFromText('POINT(521513 5377804)', 32631), p) FROM -( VALUES - (ST_GeomFromText('POLYGON((521526 5377783, 521481 5377811, 521494 5377832, 521539 5377804, 521526 5377783))', 32631)), - (ST_GeomFromText('POLYGON((521526 5377783, 521481 5377811, 521494 5377832, 521539 5377804, 521526 5377783))', 32631)), - (ST_GeomFromText('POLYGON((521526 5377783, 521481 5377811, 521494 5377832, 521539 5377804, 521526 5377783))', 32631)) -) AS v(p); --- PIP - repeated vertex, poly first -SELECT 'contains107', ST_Contains(p, ST_GeomFromText('POINT(521543 5377804)', 32631)) FROM -( VALUES - (ST_GeomFromText('POLYGON((521526 5377783, 521482 5377811, 521494 5377832, 521539 5377804, 521526 5377783))', 32631)), - (ST_GeomFromText('POLYGON((521526 5377783, 521482 5377811, 521494 5377832, 521539 5377804, 521526 5377783))', 32631)), - (ST_GeomFromText('POLYGON((521526 5377783, 521482 5377811, 521494 5377832, 521539 5377804, 521526 5377783))', 32631)) -) AS v(p); --- PIP - repeated vertex, point first -SELECT 'contains108', ST_Contains(ST_GeomFromText('POINT(521543 5377804)', 32631), p) FROM -( VALUES - (ST_GeomFromText('POLYGON((521526 5377783, 521482 5377811, 521494 5377832, 521539 5377804, 521526 5377783))', 32631)), - (ST_GeomFromText('POLYGON((521526 5377783, 521482 5377811, 521494 5377832, 521539 5377804, 521526 5377783))', 32631)), - (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 'containsproperly105', ST_ContainsProperly(p, ST_GeomFromText('POINT(521513 5377804)', 32631)) FROM -( VALUES - (ST_GeomFromText('POLYGON((521526 5377783, 521481 5377811, 521494 5377832, 521539 5377804, 521526 5377783))', 32631)), - (ST_GeomFromText('POLYGON((521526 5377783, 521481 5377811, 521494 5377832, 521539 5377804, 521526 5377783))', 32631)), - (ST_GeomFromText('POLYGON((521526 5377783, 521481 5377811, 521494 5377832, 521539 5377804, 521526 5377783))', 32631)) -) AS v(p); --- PIP - point vertically aligned with polygon vertex, point first -SELECT 'containsproperly106', ST_ContainsProperly(ST_GeomFromText('POINT(521513 5377804)', 32631), p) FROM -( VALUES - (ST_GeomFromText('POLYGON((521526 5377783, 521481 5377811, 521494 5377832, 521539 5377804, 521526 5377783))', 32631)), - (ST_GeomFromText('POLYGON((521526 5377783, 521481 5377811, 521494 5377832, 521539 5377804, 521526 5377783))', 32631)), - (ST_GeomFromText('POLYGON((521526 5377783, 521481 5377811, 521494 5377832, 521539 5377804, 521526 5377783))', 32631)) -) AS v(p); --- PIP - repeated vertex, poly first -SELECT 'containsproperly107', ST_ContainsProperly(p, ST_GeomFromText('POINT(521543 5377804)', 32631)) FROM -( VALUES - (ST_GeomFromText('POLYGON((521526 5377783, 521482 5377811, 521494 5377832, 521539 5377804, 521526 5377783))', 32631)), - (ST_GeomFromText('POLYGON((521526 5377783, 521482 5377811, 521494 5377832, 521539 5377804, 521526 5377783))', 32631)), - (ST_GeomFromText('POLYGON((521526 5377783, 521482 5377811, 521494 5377832, 521539 5377804, 521526 5377783))', 32631)) -) AS v(p); --- PIP - repeated vertex, point first -SELECT 'containsproperly108', ST_ContainsProperly(ST_GeomFromText('POINT(521543 5377804)', 32631), p) FROM -( VALUES - (ST_GeomFromText('POLYGON((521526 5377783, 521482 5377811, 521494 5377832, 521539 5377804, 521526 5377783))', 32631)), - (ST_GeomFromText('POLYGON((521526 5377783, 521482 5377811, 521494 5377832, 521539 5377804, 521526 5377783))', 32631)), - (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 'covers105', ST_Covers(p, ST_GeomFromText('POINT(521513 5377804)', 32631)) FROM -( VALUES - (ST_GeomFromText('POLYGON((521526 5377783, 521481 5377811, 521494 5377832, 521539 5377804, 521526 5377783))', 32631)), - (ST_GeomFromText('POLYGON((521526 5377783, 521481 5377811, 521494 5377832, 521539 5377804, 521526 5377783))', 32631)), - (ST_GeomFromText('POLYGON((521526 5377783, 521481 5377811, 521494 5377832, 521539 5377804, 521526 5377783))', 32631)) -) AS v(p); --- PIP - point vertically aligned with polygon vertex, point first -SELECT 'covers106', ST_Covers(ST_GeomFromText('POINT(521513 5377804)', 32631), p) FROM -( VALUES - (ST_GeomFromText('POLYGON((521526 5377783, 521481 5377811, 521494 5377832, 521539 5377804, 521526 5377783))', 32631)), - (ST_GeomFromText('POLYGON((521526 5377783, 521481 5377811, 521494 5377832, 521539 5377804, 521526 5377783))', 32631)), - (ST_GeomFromText('POLYGON((521526 5377783, 521481 5377811, 521494 5377832, 521539 5377804, 521526 5377783))', 32631)) -) AS v(p); --- PIP - repeated vertex, poly first -SELECT 'covers107', ST_Covers(p, ST_GeomFromText('POINT(521543 5377804)', 32631)) FROM -( VALUES - (ST_GeomFromText('POLYGON((521526 5377783, 521482 5377811, 521494 5377832, 521539 5377804, 521526 5377783))', 32631)), - (ST_GeomFromText('POLYGON((521526 5377783, 521482 5377811, 521494 5377832, 521539 5377804, 521526 5377783))', 32631)), - (ST_GeomFromText('POLYGON((521526 5377783, 521482 5377811, 521494 5377832, 521539 5377804, 521526 5377783))', 32631)) -) AS v(p); --- PIP - repeated vertex, point first -SELECT 'covers108', ST_Covers(ST_GeomFromText('POINT(521543 5377804)', 32631), p) FROM -( VALUES - (ST_GeomFromText('POLYGON((521526 5377783, 521482 5377811, 521494 5377832, 521539 5377804, 521526 5377783))', 32631)), - (ST_GeomFromText('POLYGON((521526 5377783, 521482 5377811, 521494 5377832, 521539 5377804, 521526 5377783))', 32631)), - (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))'), -('intersects201', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POLYGON((2 2, 2 3, 3 3, 3 2, 2 2))'), -('intersects202', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POLYGON((0 0, 2 0, 2 2, 0 2, 0 0))'), -('intersects203', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POLYGON((-5 -5, 5 -5, 5 5, -5 5, -5 -5))'), -('intersects204', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POLYGON((-2 -2, -2 -3, -3 -3, -3 -2, -2 -2))'), -('intersects205', 'POLYGON((0 0, 0 10, 10 11, 10 0, 0 0))', 'POLYGON((2 2, 2 3, 3 3, 3 2, 2 2))'), -('intersects206', 'POLYGON((0 0, 0 10, 10 11, 10 0, 0 0))', 'POLYGON((2 2, 2 3, 3 3, 3 2, 2 2))'), -('intersects207', 'POLYGON((0 0, 0 10, 10 11, 10 0, 0 0))', 'POLYGON((0 0, 2 0, 2 2, 0 2, 0 0))'), -('intersects208', 'POLYGON((0 0, 0 10, 10 11, 10 0, 0 0))', 'POLYGON((-5 -5, 5 -5, 5 5, -5 5, -5 -5))'), -('intersects209', 'POLYGON((0 0, 0 10, 10 11, 10 0, 0 0))', 'POLYGON((-2 -2, -2 -3, -3 -3, -3 -2, -2 -2))') -) AS v(c,p1,p2); - -SELECT c, ST_Contains(p1, p2) AS contains_p1p2, ST_Contains(p2, p1) AS contains_p2p1 FROM -( VALUES -('contains200', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POLYGON((2 2, 2 3, 3 3, 3 2, 2 2))'), -('contains201', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POLYGON((2 2, 2 3, 3 3, 3 2, 2 2))'), -('contains202', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POLYGON((0 0, 2 0, 2 2, 0 2, 0 0))'), -('contains203', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POLYGON((-5 -5, 5 -5, 5 5, -5 5, -5 -5))'), -('contains204', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POLYGON((-2 -2, -2 -3, -3 -3, -3 -2, -2 -2))'), -('contains205', 'POLYGON((0 0, 0 10, 10 11, 10 0, 0 0))', 'POLYGON((2 2, 2 3, 3 3, 3 2, 2 2))'), -('contains206', 'POLYGON((0 0, 0 10, 10 11, 10 0, 0 0))', 'POLYGON((2 2, 2 3, 3 3, 3 2, 2 2))'), -('contains207', 'POLYGON((0 0, 0 10, 10 11, 10 0, 0 0))', 'POLYGON((0 0, 2 0, 2 2, 0 2, 0 0))'), -('contains208', 'POLYGON((0 0, 0 10, 10 11, 10 0, 0 0))', 'POLYGON((-5 -5, 5 -5, 5 5, -5 5, -5 -5))'), -('contains209', 'POLYGON((0 0, 0 10, 10 11, 10 0, 0 0))', 'POLYGON((-2 -2, -2 -3, -3 -3, -3 -2, -2 -2))') -) AS v(c,p1,p2); - -SELECT c, ST_ContainsProperly(p1, p2) AS containsproperly_p1p2, ST_ContainsProperly(p2, p1) AS containsproperly_p2p1 FROM -( VALUES -('containsproperly200', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POLYGON((2 2, 2 3, 3 3, 3 2, 2 2))'), -('containsproperly201', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POLYGON((2 2, 2 3, 3 3, 3 2, 2 2))'), -('containsproperly202', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POLYGON((0 0, 2 0, 2 2, 0 2, 0 0))'), -('containsproperly203', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POLYGON((-5 -5, 5 -5, 5 5, -5 5, -5 -5))'), -('containsproperly204', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POLYGON((-2 -2, -2 -3, -3 -3, -3 -2, -2 -2))'), -('containsproperly205', 'POLYGON((0 0, 0 10, 10 11, 10 0, 0 0))', 'POLYGON((2 2, 2 3, 3 3, 3 2, 2 2))'), -('containsproperly206', 'POLYGON((0 0, 0 10, 10 11, 10 0, 0 0))', 'POLYGON((2 2, 2 3, 3 3, 3 2, 2 2))'), -('containsproperly207', 'POLYGON((0 0, 0 10, 10 11, 10 0, 0 0))', 'POLYGON((0 0, 2 0, 2 2, 0 2, 0 0))'), -('containsproperly208', 'POLYGON((0 0, 0 10, 10 11, 10 0, 0 0))', 'POLYGON((-5 -5, 5 -5, 5 5, -5 5, -5 -5))'), -('containsproperly209', 'POLYGON((0 0, 0 10, 10 11, 10 0, 0 0))', 'POLYGON((-2 -2, -2 -3, -3 -3, -3 -2, -2 -2))') -) AS v(c,p1,p2); - -SELECT c, ST_Covers(p1, p2) AS covers_p1p2, ST_Covers(p2, p1) AS covers_p2p1 FROM -( VALUES -('covers200', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POLYGON((2 2, 2 3, 3 3, 3 2, 2 2))'), -('covers201', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POLYGON((2 2, 2 3, 3 3, 3 2, 2 2))'), -('covers202', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POLYGON((0 0, 2 0, 2 2, 0 2, 0 0))'), -('covers203', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POLYGON((-5 -5, 5 -5, 5 5, -5 5, -5 -5))'), -('covers204', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POLYGON((-2 -2, -2 -3, -3 -3, -3 -2, -2 -2))'), -('covers205', 'POLYGON((0 0, 0 10, 10 10, 11 0, 0 0))', 'POLYGON((2 2, 2 3, 3 3, 3 2, 2 2))'), -('covers206', 'POLYGON((0 0, 0 10, 10 10, 11 0, 0 0))', 'POLYGON((2 2, 2 3, 3 3, 3 2, 2 2))'), -('covers207', 'POLYGON((0 0, 0 10, 10 10, 11 0, 0 0))', 'POLYGON((0 0, 2 0, 2 2, 0 2, 0 0))'), -('covers208', 'POLYGON((0 0, 0 10, 10 10, 11 0, 0 0))', 'POLYGON((-5 -5, 5 -5, 5 5, -5 5, -5 -5))'), -('covers209', 'POLYGON((0 0, 0 10, 10 10, 11 0, 0 0))', 'POLYGON((-2 -2, -2 -3, -3 -3, -3 -2, -2 -2))') -) AS v(c,p1,p2); - --- UNEXPECTED GEOMETRY TYPES -- - -SELECT c, ST_Contains(p1, p2) AS contains_p1p2, ST_Contains(p2, p1) AS contains_p2p1, - ST_Covers(p1, p2) AS covers_p1p2, ST_Covers(p2, p1) AS covers_p2p1, - ST_Intersects(p1, p2) AS intersects_p1p2, ST_Intersects(p2, p1) AS intersects_p2p1, - ST_ContainsProperly(p1, p2) AS containsproper_p1p2, ST_ContainsProperly(p2, p1) AS containsproper_p2p1 - FROM -( VALUES -('types100', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POINT(5 5)'), -('types101', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POINT(5 5)'), -('types102', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POINT(5 5)'), -('types103', 'LINESTRING(0 0, 0 10, 10 10, 10 0)', 'POINT(5 5)'), -('types104', 'LINESTRING(0 0, 0 10, 10 10, 10 0)', 'POINT(5 5)'), -('types105', 'LINESTRING(0 0, 0 10, 10 10, 10 0)', 'POINT(5 5)'), -('types106', 'POINT(5 5)', 'POINT(5 5)'), -('types107', 'POINT(5 5)', 'POINT(5 5)'), -('types108', 'POINT(5 5)', 'POINT(5 5)'), -('types109', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))'), -('types110', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))'), -('types111', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))'), -('types112', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'LINESTRING(0 0, 0 10, 10 10, 10 0)'), -('types113', 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', 'LINESTRING(0 0, 0 10, 10 10, 10 0)'), -('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); -SELECT 'intersects311', ST_intersects('POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', p) FROM ( VALUES -('LINESTRING(1 10, 10 10, 10 8)'),('LINESTRING(1 10, 10 10, 10 8)'),('LINESTRING(1 10, 10 10, 10 8)') -) AS v(p); - -SELECT 'contains310', ST_Contains('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); -SELECT 'contains311', ST_Contains('POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', p) FROM ( VALUES -('LINESTRING(1 10, 10 10, 10 8)'),('LINESTRING(1 10, 10 10, 10 8)'),('LINESTRING(1 10, 10 10, 10 8)') -) AS v(p); - -SELECT 'containsproperly310', ST_ContainsProperly('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); -SELECT 'containsproperly311', ST_ContainsProperly('POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', p) FROM ( VALUES -('LINESTRING(1 10, 10 10, 10 8)'),('LINESTRING(1 10, 10 10, 10 8)'),('LINESTRING(1 10, 10 10, 10 8)') -) AS v(p); - -SELECT 'covers310', ST_Covers('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); -SELECT 'covers311', ST_Covers('POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))', p) FROM ( VALUES -('LINESTRING(1 10, 10 10, 10 8)'),('LINESTRING(1 10, 10 10, 10 8)'),('LINESTRING(1 10, 10 10, 10 8)') -) AS v(p); - diff --git a/regress/sfcgal/regress_ogc_prep_expected b/regress/sfcgal/regress_ogc_prep_expected deleted file mode 100644 index 4600388de..000000000 --- a/regress/sfcgal/regress_ogc_prep_expected +++ /dev/null @@ -1,151 +0,0 @@ -intersects099|t -intersects100|t -intersects101|t -intersects102|f -intersects103|t -intersects104|f -contains099|t -contains100|t -contains101|f -contains102|f -contains103|f -contains104|f -covers099|t -covers100|t -covers101|t -covers102|f -covers103|t -covers104|f -containsproperly099|t -containsproperly100|t -containsproperly101|f -containsproperly102|f -containsproperly103|f -containsproperly104|f -intersects105|t -intersects105|t -intersects105|t -intersects106|t -intersects106|t -intersects106|t -intersects107|f -intersects107|f -intersects107|f -intersects108|f -intersects108|f -intersects108|f -contains105|t -contains105|t -contains105|t -contains106|f -contains106|f -contains106|f -contains107|f -contains107|f -contains107|f -contains108|f -contains108|f -contains108|f -containsproperly105|t -containsproperly105|t -containsproperly105|t -containsproperly106|f -containsproperly106|f -containsproperly106|f -containsproperly107|f -containsproperly107|f -containsproperly107|f -containsproperly108|f -containsproperly108|f -containsproperly108|f -covers105|t -covers105|t -covers105|t -covers106|f -covers106|f -covers106|f -covers107|f -covers107|f -covers107|f -covers108|f -covers108|f -covers108|f -intersects200|t|t -intersects201|t|t -intersects202|t|t -intersects203|t|t -intersects204|f|f -intersects205|t|t -intersects206|t|t -intersects207|t|t -intersects208|t|t -intersects209|f|f -contains200|t|f -contains201|t|f -contains202|t|f -contains203|f|f -contains204|f|f -contains205|t|f -contains206|t|f -contains207|t|f -contains208|f|f -contains209|f|f -containsproperly200|t|f -containsproperly201|t|f -containsproperly202|f|f -containsproperly203|f|f -containsproperly204|f|f -containsproperly205|t|f -containsproperly206|t|f -containsproperly207|f|f -containsproperly208|f|f -containsproperly209|f|f -covers200|t|f -covers201|t|f -covers202|t|f -covers203|f|f -covers204|f|f -covers205|t|f -covers206|t|f -covers207|t|f -covers208|f|f -covers209|f|f -types100|t|f|t|f|t|t|t|f -types101|t|f|t|f|t|t|t|f -types102|t|f|t|f|t|t|t|f -types103|f|f|f|f|f|f|f|f -types104|f|f|f|f|f|f|f|f -types105|f|f|f|f|f|f|f|f -types106|t|t|t|t|t|t|t|t -types107|t|t|t|t|t|t|t|t -types108|t|t|t|t|t|t|t|t -types109|t|t|t|t|t|t|f|f -types110|t|t|t|t|t|t|f|f -types111|t|t|t|t|t|t|f|f -types112|f|f|t|f|t|t|f|f -types113|f|f|t|f|t|t|f|f -types114|f|f|t|f|t|t|f|f -intersects310|t -intersects310|t -intersects310|t -intersects311|t -intersects311|t -intersects311|t -contains310|t -contains310|t -contains310|t -contains311|f -contains311|f -contains311|f -containsproperly310|f -containsproperly310|f -containsproperly310|f -containsproperly311|f -containsproperly311|f -containsproperly311|f -covers310|t -covers310|t -covers310|t -covers311|t -covers311|t -covers311|t diff --git a/regress/sfcgal/regress_sfcgal.sql b/regress/sfcgal/regress_sfcgal.sql index bd64b38bf..6597b3696 100644 --- a/regress/sfcgal/regress_sfcgal.sql +++ b/regress/sfcgal/regress_sfcgal.sql @@ -29,13 +29,3 @@ SELECT 'ST_Orientation_1', ST_Orientation(ST_ForceLHR('POLYGON((0 0,0 1,1 1,1 0, SELECT 'ST_Orientation_2', ST_Orientation(ST_ForceRHR('POLYGON((0 0,0 1,1 1,1 0,0 0))')); SELECT 'ST_MinkowskiSum', ST_AsText(ST_MinkowskiSum('LINESTRING(0 0,4 0)','POLYGON((0 0,1 0,1 1,0 1,0 0))')); SELECT 'ST_StraightSkeleton', ST_AsText(ST_StraightSkeleton('POLYGON((1 1,2 1,2 2,1 2,1 1))')); - --- Backend switch tests -SET postgis.backend = 'geos'; -SELECT 'intersection_geos', ST_astext(ST_intersection('LINESTRING(0 10, 0 -10)', 'LINESTRING(0 0, 1 1)')); - -SET postgis.backend = 'sfcgal'; -SELECT 'intersection_sfcgal', ST_astext(ST_intersection('LINESTRING(0 10, 0 -10)', 'LINESTRING(0 0, 1 1)')); - -SET postgis.backend = 'foo'; -SET postgis.backend = ''; diff --git a/regress/sfcgal/regress_sfcgal_expected b/regress/sfcgal/regress_sfcgal_expected index d2427b51d..9d2ce151d 100644 --- a/regress/sfcgal/regress_sfcgal_expected +++ b/regress/sfcgal/regress_sfcgal_expected @@ -9,7 +9,3 @@ ST_Orientation_1|-1 ST_Orientation_2|1 ST_MinkowskiSum|MULTIPOLYGON(((0 0,1 0,5 0,5 1,4 1,0 1,0 0))) ST_StraightSkeleton|MULTILINESTRING((1 1,1.5 1.5),(2 1,1.5 1.5),(2 2,1.5 1.5),(1 2,1.5 1.5)) -intersection_geos|POINT(0 0) -intersection_sfcgal|POINT(0 0) -ERROR: Can't find foo geometry backend -ERROR: Can't find geometry backend diff --git a/regress/sfcgal/wmsservers.sql b/regress/sfcgal/wmsservers.sql deleted file mode 100644 index 38f1a6371..000000000 --- a/regress/sfcgal/wmsservers.sql +++ /dev/null @@ -1,38 +0,0 @@ -SET postgis.backend = 'sfcgal'; -SET client_min_messages TO warning; -SELECT 'Starting up MapServer/Geoserver tests...'; --- Set up the data table -SELECT 'Setting up the data table...'; -CREATE TABLE wmstest ( id INTEGER, pt GEOMETRY(Polygon,4326) ); -INSERT INTO wmstest SELECT lon * 100 + lat AS id, st_setsrid(st_buffer(st_makepoint(lon, lat),1.0),4326) AS pt -FROM (select lon, generate_series(-80,80, 5) AS lat FROM (SELECT generate_series(-175, 175, 5) AS lon) AS sq1) AS sq2; ---INSERT INTO geometry_columns (f_table_catalog, f_table_schema, f_table_name, f_geometry_column, coord_dimension, srid, type) VALUES ('', 'public','wmstest','pt',2,4326,'POLYGON'); -ALTER TABLE wmstest add PRIMARY KEY ( id ); -CREATE INDEX wmstest_geomidx ON wmstest using gist ( pt ); - --- Geoserver 2.0 NG tests -SELECT 'Running Geoserver 2.0 NG tests...'; --- Run a Geoserver 2.0 NG metadata query -SELECT 'Geoserver1', upper(TYPE) As TYPE FROM GEOMETRY_COLUMNS WHERE F_TABLE_SCHEMA = 'public' AND F_TABLE_NAME = 'wmstest' AND F_GEOMETRY_COLUMN = 'pt'; -SELECT 'Geoserver2', SRID FROM GEOMETRY_COLUMNS WHERE F_TABLE_SCHEMA = 'public' AND F_TABLE_NAME = 'wmstest' AND F_GEOMETRY_COLUMN = 'pt'; --- Run a Geoserver 2.0 NG WMS query -SELECT 'Geoserver3', "id",substr(encode(ST_AsBinary(ST_Force2d("pt"),'XDR'),'base64'),0,16) as "pt" FROM "public"."wmstest" WHERE "pt" && ST_GeomFromText('POLYGON ((-6.58216065979069 -0.7685569763184591, -6.58216065979069 0.911225433349509, -3.050569931030911 0.911225433349509, -3.050569931030911 -0.7685569763184591, -6.58216065979069 -0.7685569763184591))', 4326); --- Run a Geoserver 2.0 NG KML query -SELECT 'Geoserver4', count(*) FROM "public"."wmstest" WHERE "pt" && ST_GeomFromText('POLYGON ((-1.504017942347938 24.0332272532341, -1.504017942347938 25.99364254836741, 1.736833353559741 25.99364254836741, 1.736833353559741 24.0332272532341, -1.504017942347938 24.0332272532341))', 4326); -SELECT 'Geoserver5', "id",substr(encode(ST_AsBinary(ST_Force2d("pt"),'XDR'),'base64'),0,16) as "pt" FROM "public"."wmstest" WHERE "pt" && ST_GeomFromText('POLYGON ((-1.504017942347938 24.0332272532341, -1.504017942347938 25.99364254836741, 1.736833353559741 25.99364254836741, 1.736833353559741 24.0332272532341, -1.504017942347938 24.0332272532341))', 4326); -SELECT 'Geoserver6', "id",substr(encode(ST_AsBinary(ST_Force2d("pt"),'XDR'),'base64'),0,16) as "pt" FROM "public"."wmstest" WHERE "pt" && ST_GeomFromText('POLYGON ((-1.507182836191598 24.031312785172446, -1.507182836191598 25.995557016429064, 1.7399982474034008 25.995557016429064, 1.7399982474034008 24.031312785172446, -1.507182836191598 24.031312785172446))', 4326); - --- MapServer 5.4 tests -select 'MapServer1', attname from pg_attribute, pg_constraint, pg_class where pg_constraint.conrelid = pg_class.oid and pg_class.oid = pg_attribute.attrelid and pg_constraint.contype = 'p' and pg_constraint.conkey[1] = pg_attribute.attnum and pg_class.relname = 'wmstest' and pg_table_is_visible(pg_class.oid) and pg_constraint.conkey[2] is null; -select 'MapServer2', "id",substr(encode(ST_AsBinary(ST_ForceCollection(ST_Force2d("pt")),'NDR'),'base64'),0,16) as geom,"id" from wmstest where pt && ST_GeomFromText('POLYGON((-98.5 32,-98.5 39,-91.5 39,-91.5 32,-98.5 32))',find_srid('','wmstest','pt')); - --- MapServer 5.6 tests -select * from wmstest where false limit 0; -select 'MapServer3', attname from pg_attribute, pg_constraint, pg_class where pg_constraint.conrelid = pg_class.oid and pg_class.oid = pg_attribute.attrelid and pg_constraint.contype = 'p' and pg_constraint.conkey[1] = pg_attribute.attnum and pg_class.relname = 'wmstest' and pg_table_is_visible(pg_class.oid) and pg_constraint.conkey[2] is null; -select 'MapServer4', "id",substr(encode(ST_AsBinary(ST_ForceCollection(ST_Force2d("pt")),'NDR'),'hex'),0,16) as geom,"id" from wmstest where pt && ST_GeomFromText('POLYGON((-98.5 32,-98.5 39,-91.5 39,-91.5 32,-98.5 32))',find_srid('','wmstest','pt')); - --- Drop the data table -SELECT 'Removing the data table...'; -DROP TABLE wmstest; ---DELETE FROM geometry_columns WHERE f_table_name = 'wmstest' AND f_table_schema = 'public'; -SELECT 'Done.'; diff --git a/regress/sfcgal/wmsservers_expected b/regress/sfcgal/wmsservers_expected deleted file mode 100644 index 0eab9398d..000000000 --- a/regress/sfcgal/wmsservers_expected +++ /dev/null @@ -1,17 +0,0 @@ -Starting up MapServer/Geoserver tests... -Setting up the data table... -Running Geoserver 2.0 NG tests... -Geoserver1|POLYGON -Geoserver2|4326 -Geoserver3|-500|AAAAAAMAAAABAAA -Geoserver4|1 -Geoserver5|25|AAAAAAMAAAABAAA -Geoserver6|25|AAAAAAMAAAABAAA -MapServer1|id -MapServer2|-9465|AQcAAAABAAAAAQM|-9465 -MapServer2|-9460|AQcAAAABAAAAAQM|-9460 -MapServer3|id -MapServer4|-9465|010700000001000|-9465 -MapServer4|-9460|010700000001000|-9460 -Removing the data table... -Done. -- 2.40.0