Name

ST_SwapOrdinates — 입력 도형을 좌표값을 뒤바꾼 상태로 반환합니다.

Synopsis

geometry ST_SwapOrdinates(geometry geom, cstring ords);

설명

입력 도형을 좌표값을 뒤바꾼 상태로 반환합니다.

ords 파라미터는 뒤바꿀 좌표를 명명하는 문자 2개 길이의 스트링입니다. 유효한 명칭은 x, y, z, 그리고 m입니다.

2.2.0 버전부터 사용할 수 있습니다.

This method supports Circular Strings and Curves.

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

This function supports M coordinates.

This function supports Polyhedral surfaces.

This function supports Triangles and Triangulated Irregular Network Surfaces (TIN).

예시

-- Scale M value by 2
SELECT ST_AsText(
  ST_SwapOrdinates(
    ST_Scale(
      ST_SwapOrdinates(g,'xm'),
      2, 1
    ),
  'xm')
) FROM ( SELECT 'POINT ZM (0 0 0 2)'::geometry g ) foo;
     st_astext
--------------------
 POINT ZM (0 0 0 4)