[SCM] PostGIS branch stable-3.6 updated. 3.6.0-24-g58b4e2571

git at osgeo.org git at osgeo.org
Wed Oct 15 10:21:06 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.6 has been updated
       via  58b4e2571588b4aace175431f2ff33445c230ee4 (commit)
      from  aca123684d92189659756a00d93a97398447f229 (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 58b4e2571588b4aace175431f2ff33445c230ee4
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Wed Oct 15 10:20:41 2025 -0700

    ST_ForcePolygonCCW should not flip lines, closes #5754

diff --git a/NEWS b/NEWS
index 476d10cfe..4dec87f2a 100644
--- a/NEWS
+++ b/NEWS
@@ -13,6 +13,7 @@ PostGIS 3.6.1
   - #5998, [tiger_geocoder] [security] CVE-2022-2625, make sure tables requires
               by extension are owned by extension
               authored: Andrey Borodin (Yandex), reported by Sergey Bobrov (Kaspersky)
+  - #5754, ST_ForcePolygonCCW reverses lines (Paul Ramsey)
 
 
 PostGIS 3.6.0
diff --git a/postgis/postgis.sql.in b/postgis/postgis.sql.in
index 03a7fdde8..c4177edb9 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
@@ -5477,6 +5456,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