[postgis-tickets] [SCM] PostGIS branch master updated. 3.1.0rc1-71-g5e310cf

git at osgeo.org git at osgeo.org
Thu Feb 11 10:04:43 PST 2021


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  5e310cf6ad646702e5574eb3aa2391021dcdd8c5 (commit)
      from  08c2363c682ff4c602288adbb90e50a024c56849 (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 5e310cf6ad646702e5574eb3aa2391021dcdd8c5
Author: Regina Obe <lr at pcorp.us>
Date:   Thu Feb 11 13:04:38 2021 -0500

    Fix GEOS 3.10 to agree with GEOS 3.9 by applying normalize. References https://trac.osgeo.org/postgis/ticket/4837 for PostGIS 3.2

diff --git a/liblwgeom/cunit/cu_geos.c b/liblwgeom/cunit/cu_geos.c
index 1e4948e..6518f3a 100644
--- a/liblwgeom/cunit/cu_geos.c
+++ b/liblwgeom/cunit/cu_geos.c
@@ -142,23 +142,27 @@ test_geos_makevalid(void)
 	char* out_ewkt;
 	LWGEOM* geom1;
 	LWGEOM* geom2;
+	LWGEOM* geom3;
 
 	wkb = (uint8_t*) "\001\003\000\000\000\001\000\000\000\011\000\000\000b\020X9 }\366 at 7\211A\340\235I\034A\316\326t18}\366@\306g\347\323\230I\034Ay\351&18}\366@\331\316\367\323\230I\034A\372~j\274\370}\366@\315\314\314LpI\034A\343\245\233\304R}\366 at R\270\036\005?I\034A\315\314\314\314Z~\366@\343\245\233\304\007I\034A\004V\016-\242}\366@\252\361\322M\323H\034A\351&1\010\306{\366 at H\341z\0247I\034Ab\020X9 }\366 at 7\211A\340\235I\034A";
 	geom1 = lwgeom_from_wkb(wkb, 157, LW_PARSER_CHECK_NONE);
 	geom2 = lwgeom_make_valid(geom1);
-	out_ewkt = lwgeom_to_ewkt((LWGEOM*)geom2);
+	geom3 = lwgeom_normalize(geom2); //so GEOS 3.9 and 3.10 agree
+	out_ewkt = lwgeom_to_ewkt((LWGEOM*)geom3);
+
 #if POSTGIS_GEOS_VERSION < 39
 	ASSERT_STRING_EQUAL(
 	    out_ewkt,
-	    "GEOMETRYCOLLECTION(POLYGON((92114.014 463463.469,92115.51207431706 463462.206937429,92115.512 463462.207,92127.546 463452.075,92117.173 463439.755,92133.675 463425.942,92122.136 463412.82600000006,92092.377 463437.77,92114.014 463463.469)),MULTIPOINT(92115.51207431706 463462.2069374289,92122.136 463412.826))");
+	    "GEOMETRYCOLLECTION(POLYGON((92092.377 463437.77,92114.014 463463.469,92115.51207431706 463462.206937429,92115.512 463462.207,92127.546 463452.075,92117.173 463439.755,92133.675 463425.942,92122.136 463412.82600000006,92092.377 463437.77)),MULTIPOINT(92122.136 463412.826,92115.51207431706 463462.2069374289))");
 #else
 	ASSERT_STRING_EQUAL(
 	    out_ewkt,
-	    "POLYGON((92127.546 463452.075,92117.173 463439.755,92133.675 463425.942,92122.136 463412.826,92092.377 463437.77,92114.014 463463.469,92115.512 463462.207,92115.51207431706 463462.2069374289,92127.546 463452.075))");
+	    "POLYGON((92092.377 463437.77,92114.014 463463.469,92115.512 463462.207,92115.51207431706 463462.2069374289,92127.546 463452.075,92117.173 463439.755,92133.675 463425.942,92122.136 463412.826,92092.377 463437.77))");
 #endif
 	lwfree(out_ewkt);
 	lwgeom_free(geom1);
 	lwgeom_free(geom2);
+	lwgeom_free(geom3);
 }
 
 

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

Summary of changes:
 liblwgeom/cunit/cu_geos.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list