[SCM] PostGIS branch stable-3.2 updated. 3.2.6-16-g9f1e041ad
git at osgeo.org
git at osgeo.org
Tue Jan 9 12:47: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.2 has been updated
via 9f1e041ad246e3e993c6f9569850d05133fb383d (commit)
from fba51938dfccd836e05ad8e2566218d145b60a4a (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 9f1e041ad246e3e993c6f9569850d05133fb383d
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date: Tue Jan 9 12:47:44 2024 -0800
Fix logic mistake in ST_Covers for geography
diff --git a/NEWS b/NEWS
index 613539f66..b01e9fa46 100644
--- a/NEWS
+++ b/NEWS
@@ -13,6 +13,7 @@ Proj 6.1+, and PostgreSQL 14+.
- #5629, Handling EMPTY components in repeated point removal (Paul Ramsey)
- #5604, Handle distance between collections with empty elements (Paul Ramsey)
- #5635, Handle NaN points in ST_Split (Regina Obe)
+ - Logic error in ST_Covers(geography) (Paul Ramsey)
PostGIS 3.2.6
diff --git a/liblwgeom/lwgeodetic.c b/liblwgeom/lwgeodetic.c
index 87b4c1316..dea725c7d 100644
--- a/liblwgeom/lwgeodetic.c
+++ b/liblwgeom/lwgeodetic.c
@@ -2625,23 +2625,10 @@ int lwpoly_covers_lwpoly(const LWPOLY *poly1, const LWPOLY *poly2)
/* check if all vertices of poly2 are inside poly1 */
for (i = 0; i < poly2->nrings; i++)
{
-
- /* every other ring is a hole, check if point is inside the actual polygon */
- if ( i % 2 == 0)
+ if (LW_FALSE == lwpoly_covers_pointarray(poly1, poly2->rings[i]))
{
- if (LW_FALSE == lwpoly_covers_pointarray(poly1, poly2->rings[i]))
- {
- LWDEBUG(4,"returning false, geometry2 has point outside of geometry1");
- return LW_FALSE;
- }
- }
- else
- {
- if (LW_TRUE == lwpoly_covers_pointarray(poly1, poly2->rings[i]))
- {
- LWDEBUG(4,"returning false, geometry2 has point inside a hole of geometry1");
- return LW_FALSE;
- }
+ LWDEBUG(4,"returning false, geometry2 has point outside of geometry1");
+ return LW_FALSE;
}
}
-----------------------------------------------------------------------
Summary of changes:
NEWS | 1 +
liblwgeom/lwgeodetic.c | 19 +++----------------
2 files changed, 4 insertions(+), 16 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list