[SCM] PostGIS branch stable-3.5 updated. 3.5.3-70-gc2ec467e3

git at osgeo.org git at osgeo.org
Wed Oct 15 10:21:14 PDT 2025


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.5 has been updated
       via  c2ec467e307251ffd9cd1a70fe6706732fe8e33b (commit)
      from  64bf79d69cd9730511fae2bab10e328350cdea41 (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 c2ec467e307251ffd9cd1a70fe6706732fe8e33b
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Wed Oct 15 10:19:50 2025 -0700

    ST_ForcePolygonCCW should not flip lines, closes #5754

diff --git a/NEWS b/NEWS
index b41abc6a1..1a6472081 100644
--- a/NEWS
+++ b/NEWS
@@ -33,6 +33,7 @@ PostgreSQL 12-18 required. GEOS 3.8+ required. Proj 6.1+ required.
 - #5994, Null pointer in ST_AsGeoJsonRow (Alexander Kukushkin)
 - #5989, ST_Distance error on CurvePolygon (Paul Ramsey)
 - #5962, Consistent clipping of MULTI/POINT (Paul Ramsey)
+- #5754, ST_ForcePolygonCCW reverses lines (Paul Ramsey)
 
 
 PostGIS 3.5.3
diff --git a/postgis/postgis.sql.in b/postgis/postgis.sql.in
index 4d3fc19c0..0ad1db1e3 100644
--- a/postgis/postgis.sql.in
+++ b/postgis/postgis.sql.in
@@ -1584,27 +1584,6 @@ CREATE OR REPLACE FUNCTION ST_Scroll(geometry, geometry)
 	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
 	_COST_LOW;
 
--- Availability: 2.4.0
-CREATE OR REPLACE FUNCTION ST_ForcePolygonCW(geometry)
-	RETURNS geometry
-	AS 'MODULE_PATHNAME', 'LWGEOM_force_clockwise_poly'
-	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
-	_COST_LOW;
-
--- Availability: 2.4.0
-CREATE OR REPLACE FUNCTION ST_ForcePolygonCCW(geometry)
-	RETURNS geometry
-	AS $$ SELECT @extschema at .ST_Reverse(@extschema at .ST_ForcePolygonCW($1)) $$
-	LANGUAGE 'sql' IMMUTABLE STRICT PARALLEL SAFE
-	_COST_LOW;
-
--- Availability: 1.2.2
-CREATE OR REPLACE FUNCTION ST_ForceRHR(geometry)
-	RETURNS geometry
-	AS 'MODULE_PATHNAME', 'LWGEOM_force_clockwise_poly'
-	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
-	_COST_LOW;
-
 -- Availability: 1.5.0
 CREATE OR REPLACE FUNCTION postgis_noop(geometry)
 	RETURNS geometry
@@ -5470,6 +5449,30 @@ CREATE OR REPLACE FUNCTION ST_GeometryType(geometry)
 	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
 	_COST_DEFAULT;
 
+-- Availability: 2.4.0
+CREATE OR REPLACE FUNCTION ST_ForcePolygonCW(geometry)
+	RETURNS geometry
+	AS 'MODULE_PATHNAME', 'LWGEOM_force_clockwise_poly'
+	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
+	_COST_LOW;
+
+-- Availability: 1.2.2
+CREATE OR REPLACE FUNCTION ST_ForceRHR(geometry)
+	RETURNS geometry
+	AS 'MODULE_PATHNAME', 'LWGEOM_force_clockwise_poly'
+	LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
+	_COST_LOW;
+
+-- Availability: 2.4.0
+CREATE OR REPLACE FUNCTION ST_ForcePolygonCCW(geometry)
+	RETURNS geometry
+	AS $$ SELECT
+	  CASE WHEN @extschema at .ST_GeometryType($1) IN ('ST_Polygon', 'ST_MultiPolygon')
+	  THEN @extschema at .ST_Reverse(@extschema at .ST_ForcePolygonCW($1))
+	  ELSE $1 END $$
+	LANGUAGE 'sql' IMMUTABLE STRICT PARALLEL SAFE
+	_COST_LOW;
+
 -- PostGIS equivalent function: PointN(geometry,integer)
 CREATE OR REPLACE FUNCTION ST_PointN(geometry,integer)
 	RETURNS geometry

-----------------------------------------------------------------------

Summary of changes:
 NEWS                   |  1 +
 postgis/postgis.sql.in | 45 ++++++++++++++++++++++++---------------------
 2 files changed, 25 insertions(+), 21 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list