[SCM] PostGIS branch stable-3.2 updated. 3.2.6-19-g790c7bdff

git at osgeo.org git at osgeo.org
Thu Jan 11 13:51: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.2 has been updated
       via  790c7bdffda0afd6c1f9ad615b58312e5a6b4aca (commit)
      from  4a05e74f3ec34ca49c598d25edb5b4a9c2f17a0d (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 790c7bdffda0afd6c1f9ad615b58312e5a6b4aca
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Thu Jan 11 13:51:36 2024 -0800

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

diff --git a/NEWS b/NEWS
index 6178b9624..70430f2de 100644
--- a/NEWS
+++ b/NEWS
@@ -15,6 +15,7 @@ Proj 6.1+, and PostgreSQL 14+.
  - #5635, Handle NaN points in ST_Split (Regina Obe)
  - Logic error in ST_Covers(geography) (Paul Ramsey)
  - #5646, Crash on collections with empty members (Paul Ramsey)
+ - #5580, Handle empty collection components in 3d distance (Paul Ramsey)
 
 
 PostGIS 3.2.6
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