ST_ConvexHull()¶
Returns the smallest convex geometry that contains the input geometry.
Syntax¶
ST_ConvexHull(geom)
Arguments¶
Argument |
Description |
|---|---|
|
A GEOMETRY or GEOMETRY32 value. |
Return Value¶
Returns a geometry in the same geometry family as the input.
Usage Notes¶
Examples¶
DROP DATABASE IF EXISTS geo_operation_demo;
CREATE DATABASE geo_operation_demo;
USE geo_operation_demo;
SELECT ST_AsText(ST_ConvexHull(ST_GeomFromText('MULTIPOINT(0 0,4 0,4 4,0 4,2 2)'))) AS hull;
DROP DATABASE geo_operation_demo;