[SCM] PostGIS branch master updated. 3.4.0rc1-880-gbf6be27c3

git at osgeo.org git at osgeo.org
Thu Jan 11 13:49:13 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, master has been updated
       via  bf6be27c3ca640c21abfee118863d9bdb58bb02f (commit)
      from  84171366808536a4662976e50af91321147a06f2 (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 bf6be27c3ca640c21abfee118863d9bdb58bb02f
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Thu Jan 11 13:48:58 2024 -0800

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

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:
 liblwgeom/measures3d.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list