Назва

ST_SwapOrdinates — Повертає версію заданої геометрії із заміненими значеннями ординат.

Короткий огляд

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).

Приклад

This example scales the M value by 2.

Code
SELECT ST_SwapOrdinates(ST_Scale(ST_SwapOrdinates(g, 'xm'),
      2, 1
    ),
  'xm') FROM ( SELECT 'POINT ZM (0 0 0 2)'::geometry g ) foo;
Вивід растрових зображень
POINT ZM (0 0 0 4)
Figure
Geometry figure for visual-st-swapordinates-01

Див. також

ST_FlipCoordinates