[SCM] PostGIS branch master updated. 3.6.0rc2-354-g163620225
git at osgeo.org
git at osgeo.org
Thu Mar 5 07:50:52 PST 2026
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, master has been updated
via 1636202258b8e3aa41784b57191400c7d4509f08 (commit)
from 032bbd6237c705c4c5a3bc53a5e366f62e6d88ab (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 1636202258b8e3aa41784b57191400c7d4509f08
Author: Darafei Praliaskouski <me at komzpa.net>
Date: Thu Mar 5 19:21:40 2026 +0400
CI: stabilize topology error locations and fix FreeBSD raster make race
diff --git a/liblwgeom/topo/lwgeom_topo.c b/liblwgeom/topo/lwgeom_topo.c
index ae60d2132..ba42f592c 100644
--- a/liblwgeom/topo/lwgeom_topo.c
+++ b/liblwgeom/topo/lwgeom_topo.c
@@ -37,17 +37,29 @@
#include <inttypes.h>
+static bool
+_lwt_describe_point(const LWPOINT *pt, char *buf, size_t bufsize)
+{
+ POINT2D p;
+
+ if (!pt || !pt->point || !pt->point->npoints)
+ return false;
+
+ getPoint2d_p(pt->point, 0, &p);
+ snprintf(buf, bufsize, " at POINT(%.15g %.15g)", p.x, p.y);
+ return true;
+}
+
/*
- * Report a human readable location along with topology errors so callers can
- * narrow down robustness issues such as #5886/#5889 without further tracing.
- * Using a point-on-surface keeps the message compact while remaining
- * representative for any dimensionality of the offending intersection.
+ * Report a deterministic GEOS-derived location for topology errors.
+ * Normalize the intersection geometry so PointOnSurface is stable
+ * across operand-order and platform differences.
*/
static bool
_lwt_describe_intersection_point(const GEOSGeometry *g1, const GEOSGeometry *g2, char *buf, size_t bufsize)
{
unsigned int n = 0;
- POINT2D pt;
+ POINT2D p;
GEOSGeometry *isect;
GEOSGeometry *surface_pt;
const GEOSCoordSequence *seq;
@@ -56,6 +68,12 @@ _lwt_describe_intersection_point(const GEOSGeometry *g1, const GEOSGeometry *g2,
if (!isect)
return false;
+ if (GEOSNormalize(isect) != 0)
+ {
+ GEOSGeom_destroy(isect);
+ return false;
+ }
+
surface_pt = GEOSPointOnSurface(isect);
GEOSGeom_destroy(isect);
if (!surface_pt)
@@ -74,26 +92,13 @@ _lwt_describe_intersection_point(const GEOSGeometry *g1, const GEOSGeometry *g2,
return false;
}
- if (!GEOSCoordSeq_getX(seq, 0, &pt.x) || !GEOSCoordSeq_getY(seq, 0, &pt.y))
+ if (!GEOSCoordSeq_getX(seq, 0, &p.x) || !GEOSCoordSeq_getY(seq, 0, &p.y))
{
GEOSGeom_destroy(surface_pt);
return false;
}
GEOSGeom_destroy(surface_pt);
- snprintf(buf, bufsize, " at POINT(%.15g %.15g)", pt.x, pt.y);
- return true;
-}
-
-static bool
-_lwt_describe_point(const LWPOINT *pt, char *buf, size_t bufsize)
-{
- POINT2D p;
-
- if (!pt || !pt->point || !pt->point->npoints)
- return false;
-
- getPoint2d_p(pt->point, 0, &p);
snprintf(buf, bufsize, " at POINT(%.15g %.15g)", p.x, p.y);
return true;
}
@@ -796,9 +801,10 @@ _lwt_CheckEdgeCrossing( LWT_TOPOLOGY* topo,
match = GEOSRelatePatternMatch(relate, "1FFF*FFF2");
if ( match ) {
char locinfo[128] = "";
- const char *locsuffix = match == 2 ? ""
- : _lwt_describe_intersection_point(edgegg, eegg, locinfo, sizeof(locinfo)) ? locinfo
- : "";
+ const char *locsuffix = match == 2 ? ""
+ : _lwt_describe_intersection_point(edgegg, eegg, locinfo, sizeof(locinfo))
+ ? locinfo
+ : "";
GEOSGeom_destroy(eegg);
GEOSGeom_destroy(edgegg);
_lwt_release_edges(edges, num_edges);
@@ -817,9 +823,10 @@ _lwt_CheckEdgeCrossing( LWT_TOPOLOGY* topo,
match = GEOSRelatePatternMatch(relate, "1********");
if ( match ) {
char locinfo[128] = "";
- const char *locsuffix = match == 2 ? ""
- : _lwt_describe_intersection_point(edgegg, eegg, locinfo, sizeof(locinfo)) ? locinfo
- : "";
+ const char *locsuffix = match == 2 ? ""
+ : _lwt_describe_intersection_point(edgegg, eegg, locinfo, sizeof(locinfo))
+ ? locinfo
+ : "";
GEOSGeom_destroy(eegg);
GEOSGeom_destroy(edgegg);
_lwt_release_edges(edges, num_edges);
@@ -838,9 +845,10 @@ _lwt_CheckEdgeCrossing( LWT_TOPOLOGY* topo,
match = GEOSRelatePatternMatch(relate, "T********");
if ( match ) {
char locinfo[128] = "";
- const char *locsuffix = match == 2 ? ""
- : _lwt_describe_intersection_point(edgegg, eegg, locinfo, sizeof(locinfo)) ? locinfo
- : "";
+ const char *locsuffix = match == 2 ? ""
+ : _lwt_describe_intersection_point(edgegg, eegg, locinfo, sizeof(locinfo))
+ ? locinfo
+ : "";
GEOSGeom_destroy(eegg);
GEOSGeom_destroy(edgegg);
_lwt_release_edges(edges, num_edges);
@@ -860,9 +868,10 @@ _lwt_CheckEdgeCrossing( LWT_TOPOLOGY* topo,
match = GEOSRelatePatternMatch(relate, "*T*******");
if ( match ) {
char locinfo[128] = "";
- const char *locsuffix = match == 2 ? ""
- : _lwt_describe_intersection_point(edgegg, eegg, locinfo, sizeof(locinfo)) ? locinfo
- : "";
+ const char *locsuffix = match == 2 ? ""
+ : _lwt_describe_intersection_point(edgegg, eegg, locinfo, sizeof(locinfo))
+ ? locinfo
+ : "";
GEOSGeom_destroy(eegg);
GEOSGeom_destroy(edgegg);
_lwt_release_edges(edges, num_edges);
@@ -883,9 +892,10 @@ _lwt_CheckEdgeCrossing( LWT_TOPOLOGY* topo,
match = GEOSRelatePatternMatch(relate, "***T*****");
if ( match ) {
char locinfo[128] = "";
- const char *locsuffix = match == 2 ? ""
- : _lwt_describe_intersection_point(edgegg, eegg, locinfo, sizeof(locinfo)) ? locinfo
- : "";
+ const char *locsuffix = match == 2 ? ""
+ : _lwt_describe_intersection_point(edgegg, eegg, locinfo, sizeof(locinfo))
+ ? locinfo
+ : "";
GEOSGeom_destroy(eegg);
GEOSGeom_destroy(edgegg);
_lwt_release_edges(edges, num_edges);
diff --git a/topology/test/regress/st_addedgemodface_expected b/topology/test/regress/st_addedgemodface_expected
index d55e6ce19..29aef17ce 100644
--- a/topology/test/regress/st_addedgemodface_expected
+++ b/topology/test/regress/st_addedgemodface_expected
@@ -8,7 +8,7 @@ ERROR: SQL/MM Spatial exception - curve not simple
ERROR: Invalid edge (no two distinct vertices exist)
ERROR: Invalid edge (no two distinct vertices exist)
ERROR: SQL/MM Spatial exception - coincident edge 8 at POINT(35 22)
-ERROR: SQL/MM Spatial exception - geometry crosses edge 5 at POINT(48.0714285714286 41.9285714285714)
+ERROR: SQL/MM Spatial exception - geometry crosses edge 5 at POINT(57 33)
ERROR: SQL/MM Spatial exception - geometry crosses edge 4 at POINT(45 32)
ERROR: Spatial exception - geometry intersects edge 4 at POINT(36 38)
L1
diff --git a/topology/test/regress/st_addedgenewfaces_expected b/topology/test/regress/st_addedgenewfaces_expected
index bb2a7a572..df23f1044 100644
--- a/topology/test/regress/st_addedgenewfaces_expected
+++ b/topology/test/regress/st_addedgenewfaces_expected
@@ -8,7 +8,7 @@ ERROR: SQL/MM Spatial exception - curve not simple
ERROR: Invalid edge (no two distinct vertices exist)
ERROR: Invalid edge (no two distinct vertices exist)
ERROR: SQL/MM Spatial exception - coincident edge 8 at POINT(35 22)
-ERROR: SQL/MM Spatial exception - geometry crosses edge 5 at POINT(48.0714285714286 41.9285714285714)
+ERROR: SQL/MM Spatial exception - geometry crosses edge 5 at POINT(57 33)
ERROR: SQL/MM Spatial exception - geometry crosses edge 4 at POINT(45 32)
ERROR: Spatial exception - geometry intersects edge 4 at POINT(36 38)
L1
diff --git a/utils/Makefile.in b/utils/Makefile.in
index 329bbd3b1..090bbedfd 100644
--- a/utils/Makefile.in
+++ b/utils/Makefile.in
@@ -68,7 +68,7 @@ $(top_builddir)/sfcgal/uninstall_sfcgal.sql:
$(top_builddir)/raster/rt_pg/uninstall_rtpostgis.sql:
$(MAKE) -C ../raster/rt_pg uninstall_rtpostgis.sql
-$(top_builddir)/raster/rt_pg/rtpostgis_upgrade.sql:
+$(top_builddir)/raster/rt_pg/rtpostgis_upgrade.sql: $(top_builddir)/raster/rt_pg/uninstall_rtpostgis.sql
$(MAKE) -C ../raster/rt_pg rtpostgis_upgrade.sql
$(top_builddir)/topology/topology_upgrade.sql:
-----------------------------------------------------------------------
Summary of changes:
liblwgeom/topo/lwgeom_topo.c | 78 +++++++++++++----------
topology/test/regress/st_addedgemodface_expected | 2 +-
topology/test/regress/st_addedgenewfaces_expected | 2 +-
utils/Makefile.in | 2 +-
4 files changed, 47 insertions(+), 37 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list