Returns the normalized form of a geometry object.
Syntax
geometry ST_Normalize(geometry geom);Parameters
| Parameter | Description |
|---|---|
geom | The input geometry object. |
Description
ST_Normalize may reorder the following components of the input geometry to produce its canonical form:
Vertices of rings in a polygon object
Rings within a polygon object
Elements in a MULTI geometry object
Examples
Normalize a LINESTRING to put coordinates in canonical order:
SELECT ST_AsText(ST_Normalize(ST_GeomFromText('LINESTRING(2 1,1 1)')));Output:
st_astext
---------------------
LINESTRING(1 1,2 1)
(1 row)该文章对您有帮助吗?