ST_ConvexHull
Signature
GEOMETRY ST_ConvexHull(GEOMETRY geom)
Description
Computes the smallest convex POLYGON that contains all the points of geom.
geom can be a set of POINTs, LINESTRINGs, POLYGONs or a
GEOMETRYCOLLECTION.
Note
Implements the OpenGIS Simple Features Implementation Specification for SQL version 1.2.1
Examples
SELECT ST_ConvexHull('GEOMETRYCOLLECTION(
POINT(1 2),
LINESTRING(1 4, 4 7),
POLYGON((3 1, 7 1, 7 6, 3 1)))');
-- Answer: POLYGON((3 1, 7 1, 7 6, 4 7, 1 4, 1 2, 3 1))
