[postgis-tickets] [SCM] PostGIS branch master updated. 3.2.0-784-g6ba156f5b

git at osgeo.org git at osgeo.org
Mon May 2 17:36:30 PDT 2022


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".

The branch, master has been updated
       via  6ba156f5bdeb3cc31a4fc640ff75259edbee0861 (commit)
      from  0428945693d284ae085f2fe3d4ea2764eba2c62c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 6ba156f5bdeb3cc31a4fc640ff75259edbee0861
Author: Regina Obe <lr at pcorp.us>
Date:   Mon May 2 20:34:57 2022 -0400

    CHANGES:
    Closes #5136
    Change cunit tests that fail on GDAL 3.2 to do perimeter test instead of
    area test
    Change postgresql tests that fail on GDAL 3.2 to do ST_MakeValid before
    testing

diff --git a/raster/test/cunit/cu_raster_geometry.c b/raster/test/cunit/cu_raster_geometry.c
index 4eee17dc4..7118d90e8 100644
--- a/raster/test/cunit/cu_raster_geometry.c
+++ b/raster/test/cunit/cu_raster_geometry.c
@@ -322,7 +322,7 @@ static void test_raster_surface() {
 	gexpected = lwgeom_from_wkt(
 	    "MULTIPOLYGON(((1 -1,1 0,5 0,5 -5,4 -5,0 -5,0 -1,1 -1),(1 -1,1 -2,2 -2,2 -1,1 -1),(2 -2,2 -3,3 -3,3 -2,2 -2)))",
 	    LW_PARSER_CHECK_NONE);
-	CU_ASSERT_DOUBLE_EQUAL(lwgeom_area(gobserved), lwgeom_area(gexpected), FLT_EPSILON);
+	CU_ASSERT_DOUBLE_EQUAL(lwgeom_perimeter(gobserved), lwgeom_perimeter(gexpected), FLT_EPSILON);
 	lwmpoly_free(mpoly);
 	mpoly = NULL;
 
@@ -336,7 +336,7 @@ static void test_raster_surface() {
 	gexpected = lwgeom_from_wkt(
 	    "MULTIPOLYGON(((1 -1,1 0,5 0,5 -5,4 -5,0 -5,0 -1,1 -1),(1 -1,1 -2,2 -2,2 -1,1 -1),(2 -2,2 -3,3 -3,3 -2,2 -2),(3 -3,3 -4,4 -4,4 -3,3 -3)))",
 	    LW_PARSER_CHECK_NONE);
-	CU_ASSERT_DOUBLE_EQUAL(lwgeom_area(gobserved), lwgeom_area(gexpected), FLT_EPSILON);
+	CU_ASSERT_DOUBLE_EQUAL(lwgeom_perimeter(gobserved), lwgeom_perimeter(gexpected), FLT_EPSILON);
 	lwmpoly_free(mpoly);
 	mpoly = NULL;
 
diff --git a/raster/test/regress/rt_polygon.sql b/raster/test/regress/rt_polygon.sql
index 454f28fa9..111f089fa 100644
--- a/raster/test/regress/rt_polygon.sql
+++ b/raster/test/regress/rt_polygon.sql
@@ -57,8 +57,9 @@ FROM (
 	FROM raster_polygon
 ) foo;
 
+-- TODO: Only GDAL 3.2 fails without ST_MakeValid, remove ST_MakeValid when GDAL 3.2 is no longer supported
 SELECT
-	ST_Equals( ST_Polygon(rast), 'MULTIPOLYGON(((1 -1,1 0,5 0,5 -5,4 -5,0 -5,0 -1,1 -1),(1 -1,1 -2,2 -2,2 -1,1 -1),(2 -2,2 -3,3 -3,3 -2,2 -2)))'::geometry)
+	ST_Equals( ST_MakeValid(ST_Polygon(rast)), 'MULTIPOLYGON(((1 -1,1 0,5 0,5 -5,4 -5,0 -5,0 -1,1 -1),(1 -1,1 -2,2 -2,2 -1,1 -1),(2 -2,2 -3,3 -3,3 -2,2 -2)))'::geometry)
 FROM (
 	SELECT
 		ST_SetValue(
@@ -74,7 +75,7 @@ FROM (
 ) foo;
 
 SELECT
-	ST_Equals( ST_Polygon(rast) , 'MULTIPOLYGON(((1 -1,1 0,5 0,5 -5,4 -5,0 -5,0 -1,1 -1),(1 -1,1 -2,2 -2,2 -1,1 -1),(2 -2,2 -3,3 -3,3 -2,2 -2),(3 -3,3 -4,4 -4,4 -3,3 -3)))'::geometry)
+	ST_Equals( ST_MakeValid(ST_Polygon(rast)) , 'MULTIPOLYGON(((1 -1,1 0,5 0,5 -5,4 -5,0 -5,0 -1,1 -1),(1 -1,1 -2,2 -2,2 -1,1 -1),(2 -2,2 -3,3 -3,3 -2,2 -2),(3 -3,3 -4,4 -4,4 -3,3 -3)))'::geometry)
 FROM (
 	SELECT
 		ST_SetValue(

-----------------------------------------------------------------------

Summary of changes:
 raster/test/cunit/cu_raster_geometry.c | 4 ++--
 raster/test/regress/rt_polygon.sql     | 5 +++--
 2 files changed, 5 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list