This topic describes the ST_ConvexHull function. This function returns the smallest convex hull of the input geometry objects.

Syntax

geometry  ST_ConvexHull(geometry  geomA);

Parameters

Parameter Description
geomA The geometry object that you want to specify.

Description

  • This function is different from the ST_ConcaveHull function. In most cases, this function is used to determine an affected area based on a set of observation points for an input MULTI object or GeometryCollection object.
  • This function supports 3D objects and does not delete z coordinates.

Examples

Comparison between the convex hull and the input geometry object:
SELECT ST_ConvexHull(g),g from
    (select 'MULTIPOLYGON(((0 0,1 0,1 1,0 1,0 0)),((0 6,6 3,6 6,0 6)))'::geometry as g) as test
12