mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-07 00:15:48 -04:00
These are recommended for use instead of the existing force_rhr function, due to the variability in definition of the "right hand rule" between different software applications. Using an explicit force_polygon_cw/ccw function removes user confusion when the results vary between different applications.
10 lines
534 B
Plaintext
10 lines
534 B
Plaintext
{
|
|
"name": "force_polygon_ccw",
|
|
"type": "function",
|
|
"groups": ["GeometryGroup"],
|
|
"description": "Forces a geometry to respect the convention where exterior rings are counter-clockwise, interior rings are clockwise.",
|
|
"arguments": [ {"arg":"geometry","description":"a geometry. Any non-polygon geometries are returned unchanged."}],
|
|
"examples": [ { "expression":"geom_to_wkt(force_polygon_ccw(geometry:=geom_from_wkt('Polygon ((-1 -1, 0 2, 4 2, 4 0, -1 -1)))')))", "returns":"'Polygon ((-1 -1, 4 0, 4 2, 0 2, -1 -1))'"}]
|
|
}
|
|
|