Name

ST_ForceRHR — 폴리곤 안에 있는 꼭짓점들의 방향(orientation)이 오른손 법칙(Right-Hand Rule)을 따르도록 강제합니다.

Synopsis

geometry ST_ForceRHR(geometry g);

설명

Forces the orientation of the vertices in a polygon to follow a Right-Hand-Rule, in which the area that is bounded by the polygon is to the right of the boundary. In particular, the exterior ring is orientated in a clockwise direction and the interior rings in a counter-clockwise direction. This function is a synonym for ST_ForcePolygonCW

[Note]

The above definition of the Right-Hand-Rule conflicts with definitions used in other contexts. To avoid confusion, it is recommended to use ST_ForcePolygonCW.

개선 사항: 2.0.0 버전부터 다면체 표면(polyhedral surface)을 지원합니다.

This function supports 3d and will not drop the z-index.

This function supports Polyhedral surfaces.

예시

SELECT ST_AsEWKT(
  ST_ForceRHR(
        'POLYGON((0 0 2, 5 0 2, 0 5 2, 0 0 2),(1 1 2, 1 3 2, 3 1 2, 1 1 2))'
  )
);
                                                  st_asewkt
--------------------------------------------------------------
 POLYGON((0 0 2,0 5 2,5 0 2,0 0 2),(1 1 2,3 1 2,1 3 2,1 1 2))
(1 row)