Reverses the order of the vertices of a geometry.
Syntax
geometry ST_Reverse(geometry g1);Parameters
| Parameter | Description |
|---|---|
| g1 | The input geometry. |
Description
Reverses the vertex order of all geometry types.
Supports polyhedral surfaces.
Supports 3D geometry and preserves Z coordinates.
Examples
SELECT ST_AsText(ST_Reverse(ST_GeomFromText('LINESTRING(2 1,1 1)')));
st_astext
---------------------
LINESTRING(1 1,2 1)
(1 row)该文章对您有帮助吗?