[postgis-tickets] [SCM] PostGIS branch stable-3.1 updated. 3.1.8-9-gf65305406
git at osgeo.org
git at osgeo.org
Thu Mar 9 09:24:55 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.1 has been updated
via f6530540615d210b74bc34abef0185530f56270f (commit)
via db40f6e8e3f263a2590d98f627cf89003fc2f9ed (commit)
from a90ca05ed440bf27e5b682bb6667460e9bab0ec4 (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 f6530540615d210b74bc34abef0185530f56270f
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date: Thu Mar 9 09:24:51 2023 -0800
NEWS entry for #5288
diff --git a/NEWS b/NEWS
index e5e2c5fe9..8e890a436 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,8 @@ xxxx/xx/xx
- #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.1.8
2022/11/12
commit db40f6e8e3f263a2590d98f627cf89003fc2f9ed
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 | 2 ++
liblwgeom/lwalgorithm.c | 7 ++++++-
2 files changed, 8 insertions(+), 1 deletion(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list