[SCM] PostGIS branch stable-3.4 updated. 3.4.2-8-g94e5b95d5

git at osgeo.org git at osgeo.org
Thu Feb 29 08:19:29 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.4 has been updated
       via  94e5b95d506a157d4190ba6faf86dfd3cd258163 (commit)
      from  1d1d8d83a1d139c06a9f4069430a86f3e00e2596 (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 94e5b95d506a157d4190ba6faf86dfd3cd258163
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Thu Feb 29 08:19:11 2024 -0800

    ST_3DDistance error for shared first point, references #5589

diff --git a/NEWS b/NEWS
index 000fc4dc0..86be2e979 100644
--- a/NEWS
+++ b/NEWS
@@ -13,6 +13,7 @@ To take advantage of all SFCGAL featurs, SFCGAL 1.4.1+ is needed.
           (Sandro Santilli, Loïc Bartoletti)
  - #5680, Fix populate_topology_layer with standard_conforming_strings
           set to off (Sandro Santilli)
+ - #5589, ST_3DDistance error for shared first point (Paul Ramsey)
 
 
 PostGIS 3.4.2
diff --git a/liblwgeom/measures3d.c b/liblwgeom/measures3d.c
index 6f2996be5..49889bf31 100644
--- a/liblwgeom/measures3d.c
+++ b/liblwgeom/measures3d.c
@@ -1155,6 +1155,13 @@ lw_dist3d_seg_seg(POINT3DZ *s1p1, POINT3DZ *s1p2, POINT3DZ *s2p1, POINT3DZ *s2p2
 		dl->twisted = ((dl->twisted) * (-1));
 		return lw_dist3d_pt_seg(s2p1, s1p1, s1p2, dl);
 	}
+	/*s2p1 and s1p1 are the same point */
+	if ((s2p1->x == s1p1->x) && (s2p1->y == s1p1->y) && (s2p1->z == s1p1->z))
+	{
+		dl->distance = 0.0;
+		dl->p1 = dl->p2 = *s2p1;
+		return LW_TRUE;
+	}
 
 	/*
 		Here we use algorithm from softsurfer.com

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

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


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list