[SCM] PostGIS branch stable-3.0 updated. 3.0.10-13-g96b786387

git at osgeo.org git at osgeo.org
Thu Jan 11 13:52:41 PST 2024


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, stable-3.0 has been updated
       via  96b7863871f96bfd091ed33784ce646f3584b0ad (commit)
      from  0996738e29377a379b228622de175670167b4170 (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 96b7863871f96bfd091ed33784ce646f3584b0ad
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Thu Jan 11 13:52:37 2024 -0800

    Handle empty collection components in 3d distance, references #5580

diff --git a/NEWS b/NEWS
index 51042034e..5b011fda5 100644
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,7 @@ xxxx/xx/xx
  - #5604, Handle distance between collections with empty elements (Paul Ramsey)
  - #5635, Handle NaN points in ST_Split (Regina Obe)
  - #5646, Crash on collections with empty members (Paul Ramsey)
+ - #5580, Handle empty collection components in 3d distance (Paul Ramsey)
 
 
 PostGIS 3.0.10
diff --git a/liblwgeom/measures3d.c b/liblwgeom/measures3d.c
index 30b71f0d6..6f2996be5 100644
--- a/liblwgeom/measures3d.c
+++ b/liblwgeom/measures3d.c
@@ -515,7 +515,7 @@ lw_dist3d_recursive(const LWGEOM *lwg1, const LWGEOM *lwg2, DISTPTS3D *dl)
 			g1 = (LWGEOM *)lwg1;
 
 		if (lwgeom_is_empty(g1))
-			return LW_TRUE;
+			continue;
 
 		if (lwgeom_is_collection(g1))
 		{
@@ -531,6 +531,9 @@ lw_dist3d_recursive(const LWGEOM *lwg1, const LWGEOM *lwg2, DISTPTS3D *dl)
 			else
 				g2 = (LWGEOM *)lwg2;
 
+			if (lwgeom_is_empty(g2))
+				continue;
+
 			if (lwgeom_is_collection(g2))
 			{
 				LWDEBUG(3, "Found collection inside second geometry collection, recursing");

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

Summary of changes:
 NEWS                   | 1 +
 liblwgeom/measures3d.c | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list