[postgis-tickets] [SCM] PostGIS branch master updated. 3.1.0alpha2-46-gfdf3262

git at osgeo.org git at osgeo.org
Sun Aug 9 22:55:26 PDT 2020


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  fdf3262eb1c30ba83f034886604421e1faf15db6 (commit)
      from  b81beb8d319b103692e5a954d77223ba3b94b346 (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 fdf3262eb1c30ba83f034886604421e1faf15db6
Author: Regina Obe <lr at pcorp.us>
Date:   Mon Aug 10 01:55:08 2020 -0400

    Normalize cunit output for split and wrapx tests so pass on all versions of GEOS.  References #4730 for PostGIS 3.1.0 master

diff --git a/liblwgeom/cunit/cu_split.c b/liblwgeom/cunit/cu_split.c
index 0a81bdf..3bee364 100644
--- a/liblwgeom/cunit/cu_split.c
+++ b/liblwgeom/cunit/cu_split.c
@@ -129,10 +129,12 @@ static void test_lwgeom_split(void)
 	geom = lwgeom_from_wkt("SRID=1;POLYGON((0 1, 10 1, 10 10, 0 10, 0 1))", LW_PARSER_CHECK_NONE);
 	CU_ASSERT(geom != NULL);
 	blade = lwgeom_from_wkt("LINESTRING(7 0,7 20)", LW_PARSER_CHECK_NONE);
-	ret = lwgeom_split(geom, blade);
+	ret = lwgeom_normalize(lwgeom_split(geom, blade));
 	CU_ASSERT(ret != NULL);
 	wkt = lwgeom_to_ewkt(ret);
-	in_wkt = "SRID=1;GEOMETRYCOLLECTION(POLYGON((7 1,0 1,0 10,7 10,7 1)),POLYGON((7 10,10 10,10 1,7 1,7 10)))";
+	in_wkt = lwgeom_to_ewkt(lwgeom_normalize(lwgeom_from_wkt(
+	    "SRID=1;GEOMETRYCOLLECTION(POLYGON((7 1,0 1,0 10,7 10,7 1)),POLYGON((7 10,10 10,10 1,7 1,7 10)))",
+	    LW_PARSER_CHECK_NONE)));
 	ASSERT_STRING_EQUAL(wkt, in_wkt);
 	lwfree(wkt);
 	lwgeom_free(ret);
diff --git a/liblwgeom/cunit/cu_wrapx.c b/liblwgeom/cunit/cu_wrapx.c
index 78c757a..50bb553 100644
--- a/liblwgeom/cunit/cu_wrapx.c
+++ b/liblwgeom/cunit/cu_wrapx.c
@@ -78,10 +78,13 @@ static void test_lwgeom_wrapx(void)
 		"LINESTRING(0 0,10 0)",
 		LW_PARSER_CHECK_NONE);
 	CU_ASSERT_FATAL(geom != NULL);
-	ret = lwgeom_wrapx(geom, 8, -10);
+	ret = lwgeom_normalize(lwgeom_wrapx(geom, 8, -10));
 	CU_ASSERT_FATAL(ret != NULL);
 	obt_wkt = lwgeom_to_ewkt(ret);
-	exp_wkt = "MULTILINESTRING((0 0,8 0),(-2 0,0 0))";
+	exp_wkt = lwgeom_to_ewkt(
+	    lwgeom_normalize(lwgeom_from_wkt(
+					"MULTILINESTRING((0 0,8 0),(-2 0,0 0))",
+					LW_PARSER_CHECK_NONE)));
 	ASSERT_STRING_EQUAL(obt_wkt, exp_wkt);
 	lwfree(obt_wkt);
 	lwgeom_free(ret);
@@ -91,10 +94,17 @@ static void test_lwgeom_wrapx(void)
 		"MULTILINESTRING((-5 -2,0 0),(0 0,10 10))",
 		LW_PARSER_CHECK_NONE);
 	CU_ASSERT_FATAL(geom != NULL);
-	ret = lwgeom_wrapx(geom, 0, 20);
+	ret = lwgeom_normalize(lwgeom_wrapx(geom, 0, 20));
 	CU_ASSERT_FATAL(ret != NULL);
 	obt_wkt = lwgeom_to_ewkt(ret);
-	exp_wkt = "MULTILINESTRING((15 -2,20 0),(0 0,10 10))";
+	exp_wkt = lwgeom_to_ewkt(
+							lwgeom_normalize(
+								lwgeom_from_wkt(
+								"MULTILINESTRING((15 -2,20 0),(0 0,10 10))"
+									, LW_PARSER_CHECK_NONE
+								)
+						)
+				);
 	ASSERT_STRING_EQUAL(obt_wkt, exp_wkt);
 	lwfree(obt_wkt);
 	lwgeom_free(ret);
@@ -107,19 +117,21 @@ static void test_lwgeom_wrapx(void)
 		")",
 		LW_PARSER_CHECK_NONE);
 	CU_ASSERT_FATAL(geom != NULL);
-	ret = lwgeom_wrapx(geom, 2, 20);
+	ret = lwgeom_normalize(lwgeom_wrapx(geom, 2, 20));
 	CU_ASSERT_FATAL(ret != NULL);
 	obt_wkt = lwgeom_to_ewkt(ret);
-	exp_wkt = "GEOMETRYCOLLECTION("
-						"MULTIPOLYGON("
-						"((22 0,20 0,20 10,22 10,22 4,22 2,22 0)),"
-						"((2 10,10 10,10 0,2 0,2 2,4 2,4 4,2 4,2 10))"
-						"),"
-						"MULTIPOLYGON("
-						"((22 11,20 11,20 21,22 21,22 15,22 13,22 11)),"
-						"((2 21,10 21,10 11,2 11,2 13,4 13,4 15,2 15,2 21))"
-						")"
-						")";
+	exp_wkt =
+	    lwgeom_to_ewkt(lwgeom_normalize(lwgeom_from_wkt("GEOMETRYCOLLECTION("
+							    "MULTIPOLYGON("
+							    "((22 0,20 0,20 10,22 10,22 4,22 2,22 0)),"
+							    "((2 10,10 10,10 0,2 0,2 2,4 2,4 4,2 4,2 10))"
+							    "),"
+							    "MULTIPOLYGON("
+							    "((22 11,20 11,20 21,22 21,22 15,22 13,22 11)),"
+							    "((2 21,10 21,10 11,2 11,2 13,4 13,4 15,2 15,2 21))"
+							    ")"
+							    ")",
+							    LW_PARSER_CHECK_NONE)));
 	ASSERT_STRING_EQUAL(obt_wkt, exp_wkt);
 	lwfree(obt_wkt);
 	lwgeom_free(ret);
@@ -133,19 +145,21 @@ static void test_lwgeom_wrapx(void)
 		")",
 		LW_PARSER_CHECK_NONE);
 	CU_ASSERT_FATAL(geom != NULL);
-	ret = lwgeom_wrapx(geom, 0, 20);
+	ret = lwgeom_normalize(lwgeom_wrapx(geom, 0, 20));
 	CU_ASSERT_FATAL(ret != NULL);
 	obt_wkt = lwgeom_to_ewkt(ret);
-	exp_wkt = "GEOMETRYCOLLECTION("
-						"MULTILINESTRING((15 -2,20 0),(0 0,10 10)),"
-						"POINT(15 0),"
-						"POLYGON EMPTY"
-						")";
+	exp_wkt = lwgeom_to_ewkt(
+			lwgeom_normalize(lwgeom_from_wkt(
+	    "GEOMETRYCOLLECTION("
+	    "MULTILINESTRING((15 -2,20 0),(0 0,10 10)),"
+	    "POINT(15 0),"
+	    "POLYGON EMPTY"
+	    ")",
+	    LW_PARSER_CHECK_NONE)) );
 	ASSERT_STRING_EQUAL(obt_wkt, exp_wkt);
 	lwfree(obt_wkt);
 	lwgeom_free(ret);
 	lwgeom_free(geom);
-
 }
 
 static int

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

Summary of changes:
 liblwgeom/cunit/cu_split.c |  6 +++--
 liblwgeom/cunit/cu_wrapx.c | 58 ++++++++++++++++++++++++++++------------------
 2 files changed, 40 insertions(+), 24 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list