[postgis-tickets] [SCM] PostGIS branch stable-3.3 updated. 3.3.2-31-g7094dd160
git at osgeo.org
git at osgeo.org
Thu Mar 9 09:23:32 PST 2023
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.3 has been updated
via 7094dd160a12ea6820fa74f0cea8744d3b01c7d1 (commit)
via 75f4aa5df887e58ef5dce5351b315c8e338ecdb3 (commit)
from 8ec4288dcb810d4f6ae79bc3508a244639904b53 (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 7094dd160a12ea6820fa74f0cea8744d3b01c7d1
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date: Thu Mar 9 09:23:27 2023 -0800
NEWS entry for #5288
diff --git a/NEWS b/NEWS
index 460f196d9..b62738097 100644
--- a/NEWS
+++ b/NEWS
@@ -18,6 +18,7 @@ YYYY/MM/DD
- #5315, #5318, #5319, #5320, #5342 crashes on infinite coordinates
(Regina Obe, Paul Ramsey)
- #5344, Include topology id sequence state in dumps (Sandro Santilli)
+ - #5288, ST_LineCrossingDirection multi-cross error (Paul Ramsey)
PostGIS 3.3.2
commit 75f4aa5df887e58ef5dce5351b315c8e338ecdb3
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date: Thu Mar 9 09:18:11 2023 -0800
Correctly handle multi-cross case in ST_LineCrossingDirection. Closes #5288
diff --git a/liblwgeom/lwalgorithm.c b/liblwgeom/lwalgorithm.c
index eb9febad8..5d2fffb17 100644
--- a/liblwgeom/lwalgorithm.c
+++ b/liblwgeom/lwalgorithm.c
@@ -479,6 +479,11 @@ int lwline_crossing_direction(const LWLINE *l1, const LWLINE *l2)
if ( pa1->npoints < 2 || pa2->npoints < 2 )
return LINE_NO_CROSS;
+ /* Zero length lines don't have a side. */
+ if ( ptarray_length_2d(pa1) == 0 || ptarray_length_2d(pa2) == 0 )
+ return LINE_NO_CROSS;
+
+
#if POSTGIS_DEBUG_LEVEL >= 4
geom_ewkt = lwgeom_to_ewkt((LWGEOM*)l1);
LWDEBUGF(4, "l1 = %s", geom_ewkt);
@@ -523,7 +528,7 @@ int lwline_crossing_direction(const LWLINE *l1, const LWLINE *l2)
LWDEBUG(4,"this_cross == SEG_CROSS_RIGHT");
cross_right++;
if ( ! first_cross )
- first_cross = SEG_CROSS_LEFT;
+ first_cross = SEG_CROSS_RIGHT;
}
/*
-----------------------------------------------------------------------
Summary of changes:
NEWS | 1 +
liblwgeom/lwalgorithm.c | 7 ++++++-
2 files changed, 7 insertions(+), 1 deletion(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list