제목

ST_Reverse — 꼭짓점들의 순서가 반대인 도형을 반환합니다.

요약

geometry ST_Reverse(geometry g1);

설명

어떤 도형도 입력받을 수 있으며, 꼭짓점들의 순서를 반전시킵니다.

Enhanced: 2.4.0 support for curves was introduced.

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

This function supports Polyhedral surfaces.

예시

Code
WITH data(geom) AS (VALUES (
  ST_MakeLine(ST_Point(1, 2), ST_Point(1, 10))
))
SELECT geom AS input_line,
       ST_Reverse(geom) AS reversed_line
FROM data;
래스터 출력
input_line      |    reversed_line
----------------------+----------------------
 LINESTRING(1 2,1 10) | LINESTRING(1 10,1 2)
(1 row)
Figure
Geometry figure for visual-st-reverse-01