[SCM] PostGIS branch master updated. 3.6.0rc2-432-g7e3d523cd
git at osgeo.org
git at osgeo.org
Wed Apr 8 01:55:45 PDT 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 7e3d523cda37faa3efdb8daed91e73df6a9fe864 (commit)
from 3c92f0325b9fc6b2aa056cc6272cd0acb79626f8 (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 7e3d523cda37faa3efdb8daed91e73df6a9fe864
Author: Sandro Santilli <strk at kbt.io>
Date: Tue Apr 7 23:53:43 2026 +0200
Use long double during signed area computation, improving robustness
Fixes #6065 in 3.7.0dev
Includes regression test
diff --git a/NEWS b/NEWS
index a0a1146c4..5d3de8494 100644
--- a/NEWS
+++ b/NEWS
@@ -36,6 +36,11 @@ This version requires GEOS 3.10 or higher
- #2614, Use GEOSPreparedDistance and caching to accelerate ST_DWithin (Paul Ramsey)
- GH-839, ST_Multi support for TIN and surfaces (Loïc Bartoletti)
+* Enhancements *
+
+ - #6065, Improved winding order computation robustness for rings having collapsed elements
+ (Sandro Santilli)
+
* Bug Fixes *
- Build PostgreSQL extension modules with `-fno-semantic-interposition` when
diff --git a/liblwgeom/ptarray.c b/liblwgeom/ptarray.c
index 54cfe875e..df5782adb 100644
--- a/liblwgeom/ptarray.c
+++ b/liblwgeom/ptarray.c
@@ -1080,7 +1080,7 @@ ptarray_signed_area(const POINTARRAY *pa)
const POINT2D *P1;
const POINT2D *P2;
const POINT2D *P3;
- double sum = 0.0;
+ long double sum = 0.0;
double x0, x, y1, y2;
uint32_t i;
diff --git a/topology/test/regress/validatetopology.sql b/topology/test/regress/validatetopology.sql
index 173e4a5b1..aa852bb0d 100644
--- a/topology/test/regress/validatetopology.sql
+++ b/topology/test/regress/validatetopology.sql
@@ -222,3 +222,24 @@ ROLLBACK;
SELECT NULL FROM topology.DropTopology('city_data');
+-- See https://trac.osgeo.org/postgis/ticket/6065
+BEGIN;
+SELECT NULL FROM topology.CreateTopology ('t6065');
+INSERT INTO t6065.node (node_id, geom) VALUES
+( 1, 'POINT(17.42207545158684 69.11091383590066)' ),
+( 2, 'POINT(17.622976580401446 69.12848944101118)' ),
+( 3, 'POINT(17.42207545158653 69.11091383590062)' ),
+( 4, 'POINT(17.422075702665087 69.11091383235977)' );
+INSERT INTO t6065.face (face_id, mbr)
+VALUES
+( 1, 'POLYGON((17.42207545158684 69.11091383235974,17.42207545158684 69.11091383590066,17.422075702665087 69.11091383590066,17.422075702665087 69.11091383235974,17.42207545158684 69.11091383235974))' ),
+( 2, 'POLYGON((17.42207545158653 69.11091383235974,17.42207545158653 69.12848944101118,17.622976580401446 69.12848944101118,17.622976580401446 69.11091383235974,17.42207545158653 69.11091383235974))' );
+INSERT INTO t6065.edge (edge_id,start_node,end_node,next_left_edge,next_right_edge,left_face,right_face,geom)
+VALUES
+( 1,1,4,3,4,2,1,'LINESTRING(17.42207545158684 69.11091383590066,17.422075702665087 69.11091383235977)' ),
+( 2,3,1,1,2,2,2,'LINESTRING(17.42207545158653 69.11091383590062,17.42207545158684 69.11091383590066)' ),
+( 3,4,2,-3,-4,2,2,'LINESTRING(17.422075702665087 69.11091383235977,17.579930758184094 69.12294910230447,17.622976580401446 69.12848944101118)' ),
+( 4,1,4,-1,-2,1,2,'LINESTRING(17.42207545158684 69.11091383590066,17.42207570266477 69.11091383235974,17.422075702665087 69.11091383235977)' );
+SELECT '#6065', 'invalidities', * FROM topology.ValidateTopology('t6065');
+ROLLBACK;
+
diff --git a/topology/test/regress/validatetopology_expected b/topology/test/regress/validatetopology_expected
index da497ee20..5f667e048 100644
--- a/topology/test/regress/validatetopology_expected
+++ b/topology/test/regress/validatetopology_expected
@@ -46,3 +46,4 @@
#5766.2|no bbox|("face has wrong mbr",0,)
#5766.2|overlapping bbox|("face has wrong mbr",0,)
#5766.2|disjoint bbox|
+#6065|invalidities|hole not in advertised face|-4|
-----------------------------------------------------------------------
Summary of changes:
NEWS | 5 +++++
liblwgeom/ptarray.c | 2 +-
topology/test/regress/validatetopology.sql | 21 +++++++++++++++++++++
topology/test/regress/validatetopology_expected | 1 +
4 files changed, 28 insertions(+), 1 deletion(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list