[SCM] PostGIS branch stable-3.1 updated. 3.1.11-2-g4425662aa
git at osgeo.org
git at osgeo.org
Thu Feb 29 08:37:50 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 4425662aaaa720f023a0ea8fcc0d348b5f6251d5 (commit)
from 8ec72f9a6d99067535de0a4bc54e3473c9a954f1 (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 4425662aaaa720f023a0ea8fcc0d348b5f6251d5
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date: Thu Feb 29 08:37:42 2024 -0800
ST_3DDistance error for shared first point, references #5589
diff --git a/NEWS b/NEWS
index 98fa5da00..d4ac31f10 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,8 @@ xxxx/xx/xx
* Bug Fixes *
+ - #5589, ST_3DDistance error for shared first point (Paul Ramsey)
+
PostGIS 3.1.11
2024/02/06
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 | 2 ++
liblwgeom/measures3d.c | 7 +++++++
2 files changed, 9 insertions(+)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list