[postgis-tickets] [SCM] PostGIS branch master updated. 3.1.0beta1-2-g846d74b

git at osgeo.org git at osgeo.org
Thu Dec 10 03:43:00 PST 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  846d74b2a733b2f6016c20ac2e7f0b23d22fa376 (commit)
      from  a4c1ccbb1f983adf3cdd5e8e8c848d711bd120d6 (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 846d74b2a733b2f6016c20ac2e7f0b23d22fa376
Author: Sandro Santilli <strk at kbt.io>
Date:   Thu Dec 10 12:42:19 2020 +0100

    Do not drop empty geometry components when converting to GEOS
    
    References #4814 in master branch (3.1.0dev)

diff --git a/liblwgeom/lwgeom_geos.c b/liblwgeom/lwgeom_geos.c
index 10b17e1..647de60 100644
--- a/liblwgeom/lwgeom_geos.c
+++ b/liblwgeom/lwgeom_geos.c
@@ -532,7 +532,7 @@ LWGEOM2GEOS(const LWGEOM* lwgeom, uint8_t autofix)
 		{
 			GEOSGeometry* g;
 
-			if (lwgeom_is_empty(lwc->geoms[i])) continue;
+			/* if (lwgeom_is_empty(lwc->geoms[i])) continue; */
 
 			g = LWGEOM2GEOS(lwc->geoms[i], 0);
 			if (!g)
diff --git a/regress/core/geos_noop.sql b/regress/core/geos_noop.sql
index f38d9f3..4157814 100644
--- a/regress/core/geos_noop.sql
+++ b/regress/core/geos_noop.sql
@@ -7,6 +7,6 @@ SELECT
 ('SRID=4326;MULTILINESTRING EMPTY'),
 ('SRID=4326;POLYGON EMPTY'),
 ('SRID=4326;MULTIPOLYGON EMPTY'),
-('SRID=4326;GEOMETRYCOLLECTION EMPTY')
---,('SRID=4326;GEOMETRYCOLLECTION(POINT EMPTY, LINESTRING EMPTY, POLYGON EMPTY, GEOMETRYCOLLECTION EMPTY)')
+('SRID=4326;GEOMETRYCOLLECTION EMPTY'),
+('SRID=4326;GEOMETRYCOLLECTION(POINT EMPTY, LINESTRING EMPTY, POLYGON EMPTY, GEOMETRYCOLLECTION EMPTY)')
 ) as foo(g);
diff --git a/regress/core/geos_noop_expected b/regress/core/geos_noop_expected
index 843d29f..d4f1b92 100644
--- a/regress/core/geos_noop_expected
+++ b/regress/core/geos_noop_expected
@@ -5,3 +5,4 @@ SRID=4326;MULTILINESTRING EMPTY
 SRID=4326;POLYGON EMPTY
 SRID=4326;MULTIPOLYGON EMPTY
 SRID=4326;GEOMETRYCOLLECTION EMPTY
+SRID=4326;GEOMETRYCOLLECTION(POINT EMPTY,LINESTRING EMPTY,POLYGON EMPTY,GEOMETRYCOLLECTION EMPTY)

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

Summary of changes:
 liblwgeom/lwgeom_geos.c         | 2 +-
 regress/core/geos_noop.sql      | 4 ++--
 regress/core/geos_noop_expected | 1 +
 3 files changed, 4 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list