[SCM] PostGIS branch stable-3.1 updated. 3.1.10-17-gda5ca5980

git at osgeo.org git at osgeo.org
Tue Jan 23 14:01:14 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.1 has been updated
       via  da5ca598045c269cf157445ad7523589af7fa53d (commit)
       via  cb1491cc15ddb7b5ae023ae92a02e4dc4a87a6c7 (commit)
      from  003c0548eca4cacf04b7c270c3f9bb83bfdea3e7 (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 da5ca598045c269cf157445ad7523589af7fa53d
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Tue Jan 23 14:01:10 2024 -0800

    Do full ring check always in line/poly maxdist mode, references #5639

diff --git a/NEWS b/NEWS
index f4b61b9a0..ea06dedb9 100644
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,7 @@ xxxx/xx/xx
  - 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)
+ - #5639, ST_DFullyWithin line/poly error case (Paul Ramsey)
 
 
 PostGIS 3.1.10
diff --git a/liblwgeom/measures.c b/liblwgeom/measures.c
index 2484e9d16..ac2ddac46 100644
--- a/liblwgeom/measures.c
+++ b/liblwgeom/measures.c
@@ -742,7 +742,7 @@ lw_dist2d_line_poly(LWLINE *line, LWPOLY *poly, DISTPTS *dl)
 	const POINT2D *pt = getPoint2d_cp(pa, 0);
 
 	/* Line has a pount outside poly. Check distance to outer ring only. */
-	if (ptarray_contains_point(poly->rings[0], pt) == LW_OUTSIDE)
+	if (ptarray_contains_point(poly->rings[0], pt) == LW_OUTSIDE || dl->mode == DIST_MAX)
 		return lw_dist2d_ptarray_ptarray(pa, poly->rings[0], dl);
 
 	for (uint32_t i = 1; i < poly->nrings; i++)

commit cb1491cc15ddb7b5ae023ae92a02e4dc4a87a6c7
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Thu Jan 11 13:52:09 2024 -0800

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

diff --git a/NEWS b/NEWS
index bf408177c..f4b61b9a0 100644
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,7 @@ xxxx/xx/xx
  - #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.1.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                   | 2 ++
 liblwgeom/measures.c   | 2 +-
 liblwgeom/measures3d.c | 5 ++++-
 3 files changed, 7 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list