Nome

ST_FlipCoordinates — Returns a version of a geometry with X and Y axis flipped.

Sinopse

geometry ST_FlipCoordinates(geometry geom);

Descrição

Returns a version of the given geometry with X and Y axis flipped. Useful for fixing geometries which contain coordinates expressed as latitude/longitude (Y,X).

Disponibilidade: 2.0.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).

Exemplo

Code
SELECT ST_FlipCoordinates(GeomFromEWKT('POINT(1 2)'));
Raster Outputs
POINT(2 1)
Figure
Geometry figure for visual-st-flipcoordinates-01

Veja também

ST_SwapOrdinates