Forces the orientation of polygon vertices to follow the right-hand rule, where the bounded area lies to the right of the boundary.
Syntax
geometry ST_ForceRHR(geometry g);Parameters
| Parameter | Description |
|---|---|
g | The geometry object. |
Description
Exterior rings are oriented clockwise; interior rings are oriented counterclockwise.
ST_ForceRHRis a synonym forST_ForcePolygonCW.Supports polyhedral surfaces.
Supports 3D objects and preserves z coordinates.
Examples
SELECT ST_AsText(ST_ForceRHR(ST_GeomFromText('POLYGON((1 1,2 1,2 2,1 2,1 1))')));
st_astext
--------------------------------
POLYGON((1 1,1 2,2 2,2 1,1 1))
(1 row)该文章对您有帮助吗?