Name

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

Synopsis

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.

예시

SELECT ST_AsText(geom) as line, ST_AsText(ST_Reverse(geom)) As reverseline
FROM
(SELECT ST_MakeLine(ST_Point(1,2),
                ST_Point(1,10)) As geom) as foo;
--result
                line         |     reverseline
---------------------+----------------------
LINESTRING(1 2,1 10) | LINESTRING(1 10,1 2)