ST_FlipCoordinates

Updated at:

Swaps the X and Y coordinates of an input object.

Syntax

meshgeom ST_FlipCoordinates(meshgeom geom);
sfmesh   ST_FlipCoordinates(sfmesh sfmeshObject);

Parameters

Parameter Name

Description

geom

The meshgeom object.

sfmeshObject

The sfmesh object.

Examples

SELECT ST_AsText(ST_FlipCoOrdinates(ST_MeshFromText('{"version" : 1, "root" : 0, "meshgeoms" : ["MESHGEOM(PATCH(INDEXSURFACE Z (VERTEX(0 0 2,0 10 3,10 10 1,10 0 1),INDEX((0,1,2),(1,2,3)))))"], "primitives" : [{"meshgeom" : 0}], "nodes" : [{"primitive" : 0}]}')));

-----------------
{"version" : 1, "root" : 0, "meshgeoms" : ["MESHGEOM(PATCH(INDEXSURFACE Z (VERTEX(0 0 2,10 0 3,10 1
0 1,0 10 1),INDEX((0,1,2),(1,2,3)))))"], "primitives" : [{"meshgeom" : 0}], "nodes" : [{"primitive"
: 0}]}