ST_ConvexHull

Determine the smallest convex geometry that contains all of the points of a geometry.

Syntax

ST_ConvexHull(geo);
geo
The input geometry.

Type: VARCHAR(ANY)

Returns

A value of type VARCHAR(ANY) that contains a geometry.

Examples

SELECT inza..ST_AsText(inza..ST_ConvexHull(inza..ST_WKTToSQL('PO INT (0 0)')));

ST_ASTEXT
---------
POINT (0 0)
(1 row)
SELECT inza..ST_AsText(inza..ST_ConvexHull(inza..ST_WKTToSQL('LINESTRIN G (0 0, 10 10, 20 10, 30 10)')));

ST_ASTEXT
---------
POLYGON ((0 0, 10 10, 30 10, 0 0))
(1 row)
SELECT inza..ST_AsText(inza..ST_ConvexHull(inza..ST_WKTToSQL('POLYGON ((10 10, 10 20, 20 20, 20 15, 10 10))')));

ST_ASTEXT
---------
POLYGON ((10 10, 10 20, 20 20, 20 15, 10 10))
(1 row)