제목

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

요약

geometry ST_FlipCoordinates(geometry geom);

설명

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

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

예시

Code
SELECT ST_FlipCoordinates(GeomFromEWKT('POINT(1 2)'));
래스터 출력
POINT(2 1)
Figure
Geometry figure for visual-st-flipcoordinates-01