[PostGIS] #5754: ST_ForcePolygonCCW unexpectedly modifies line geometries
PostGIS
trac at osgeo.org
Mon Jul 1 02:06:25 PDT 2024
#5754: ST_ForcePolygonCCW unexpectedly modifies line geometries
---------------------+---------------------
Reporter: nti | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone:
Component: postgis | Version: 3.4.x
Keywords: |
---------------------+---------------------
In constrast to what the documentation states ("Non-polygonal geometries
are returned unchanged"), the function ST_ForcePolygonCCW does modify line
geometries.
Consider this SQL:
{{{
WITH geom AS ( SELECT ST_GeomFromText(
'LINESTRING(0 0, 1 1, 2 0, 3 1, 4 0)'
) AS geom
)
SELECT ST_AsText(geom), ST_AsText(st_forcepolygonccw(geom)),
st_astext(st_forcepolygoncw(st_forcepolygonccw(geom))) FROM geom;
}}}
In addition, using ST_ForcePolygonCW on the output of ST_ForcePolygonCCW
does not modify the geometry. So I currently have no option to return to
the original input line geometry.
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5754>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list