ST_ConvexHull — Berechnet die konvexe Hülle einer Geometrie.


geometry ST_ConvexHull(geometry geomA);


Berechnet die konvexe Hülle einer Geometrie. Die konvexe Hülle stellt die kleinste konvexe Geometrie dar, welche die gesamte Geometrie einschließt.

One can think of the convex hull as the geometry obtained by wrapping an rubber band around a set of geometries. This is different from a concave hull which is analogous to "shrink-wrapping" the geometries. A convex hull is often used to determine an affected area based on a set of point observations.

In the general case the convex hull is a Polygon. The convex hull of two or more collinear points is a two-point LineString. The convex hull of one or more identical points is a Point.

This is not an aggregate function. To compute the convex hull of a set of geometries, use ST_Collect to aggregate them into a geometry collection (e.g. ST_ConvexHull(ST_Collect(geom)).

Wird durch das GEOS Modul ausgeführt

This method implements the OGC Simple Features Implementation Specification for SQL 1.1.


This method implements the SQL/MM specification.

SQL-MM IEC 13249-3: 5.1.16

This function supports 3d and will not drop the z-index.


Konvexe Hülle eines MultiLineString und eines MultiPoint

SELECT ST_AsText(ST_ConvexHull(
        ST_GeomFromText('MULTILINESTRING((100 190,10 8),(150 10, 20 30))'),
            ST_GeomFromText('MULTIPOINT(50 5, 150 30, 50 10, 10 10)')
            )) );
POLYGON((50 5,10 8,10 10,100 190,150 30,150 10,50 5))

Verwendung mit ST_Collect zur Berechnung der konvexen Hüllen einer Geometrie.

--Get estimate of infected area based on point observations
SELECT d.disease_type,
    ST_ConvexHull(ST_Collect(d.geom)) As geom
    FROM disease_obs As d
    GROUP BY d.disease_type;

Siehe auch

ST_Collect, ST_ConcaveHull, ST_MinimumBoundingCircle