ST_SwapOrdinates — Returns a version of the given geometry with given ordinate values swapped.
geometry ST_SwapOrdinates(geometry geom, cstring ords);
Returns a version of the given geometry with given ordinates swapped.
The ords parameter is a 2-characters string naming the ordinates to swap. Valid names are: x,y,z and m.
Disponibilità: 2.2.0
Questo metodo supporta le Curve e le Circular String.
Questa funzione supporta il 3d e non distrugge gli z-index.
Questa funzione supporta le coordinate M.
Questa funzione supporta le Polyhedral Surface.
Questa funzione supporta i Triangoli e le 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)