ST_ConvexHull — Returns a geometry that represents the convex hull of the given Geometry.
geometry ST_ConvexHull(
bytea
Geometry)
;
Returns a geometry that represents the convex hull of the given Geometry.
The convex hull represents the boundary of the minimal convex set containing a given geometry. It may be easily visualized by imagining an elastic band stretched open to encompass the given object.
This method supports GeometryCollections |
2D | 3D | M |
---|---|---|
OGC SFS for SQL. 1.1 (1999) | OGC SFS for SQL. 1.1.0 (2005) | OGC SFS for SQL. 1.2.0 (2006) | SQL-MM Part 3 |
---|---|---|---|
2.1.1.3 | 7.2.21.1 | 7.2.8.1 | 5.1.16 |
SELECT ST_asewkt(ST_ConvexHull(ST_GeomfromText( 'GEOMETRYCOLLECTION (POINT (2 2), POINT (2 5), POINT(5 3), POINT (6 5),POLYGON ((3 4, 3.2 6, 2.8 7.4, 5.1 7.1, 4.4 4.5, 3 4)))' ))); st_asewkt ------------------------------------------------------- POLYGON ((2 2, 2 5, 2.8 7.4, 5.1 7.1, 6 5, 5 3, 2 2)) (1 row)