Flips the x-axis and y-axis of an input object.
Syntax
meshgeom ST_FlipCoordinates(meshgeom geom);
sfmesh ST_FlipCoordinates(sfmesh sfmeshObject);Parameters
| Parameter | Type | Description |
|---|---|---|
geom | meshgeom | The meshgeom object. |
sfmeshObject | sfmesh | The sfmesh object. |
Return values
| Input type | Return type |
|---|---|
| meshgeom | meshgeom |
| sfmesh | sfmesh |
Examples
The following example flips the x-axis and y-axis of a meshgeom object and returns the result as text.
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}]}')));Expected output:
{"version" : 1, "root" : 0, "meshgeoms" : ["MESHGEOM(PATCH(INDEXSURFACE Z (VERTEX(0 0 2,10 0 3,10 10 1,0 10 1),INDEX((0,1,2),(1,2,3)))))"], "primitives" : [{"meshgeom" : 0}], "nodes" : [{"primitive" : 0}]}