Table of Contents

Class SpatialConvexHull

Namespace
YndigoBlue.Velocity.Functions
Assembly
YndigoBlue.Velocity.dll

Represents the ST_ConvexHull spatial analysis function that computes the smallest convex polygon containing a geometry.

public class SpatialConvexHull : Function, IElement, ICheckItem, IDefaultItem, IFilterItem
Inheritance
SpatialConvexHull
Implements

Remarks

Warning

Spatial functions are not available in the Community Edition of Velocity. They require the Full Edition.

The ST_ConvexHull function returns the smallest convex geometry that contains all points of the input geometry. The convex hull is the geometric equivalent of stretching a rubber band around the outermost points of a shape. The result is always a convex polygon (or point/line for degenerate cases). This function is useful for simplifying complex geometries, finding bounding regions, or computational geometry algorithms. For a set of points, the convex hull forms the boundary of the minimal enclosing convex shape. OGC-compliant.

SpatialConvexHull diagram showing convex hulls

Return Types by Input:

Input TypeConvex Hull Result
POINTPOINT (same as input)
LINESTRINGLINESTRING (if collinear) or POLYGON
Convex POLYGONPOLYGON (same as input)
Concave POLYGONPOLYGON (larger than input)
MULTIPOINTPOLYGON enclosing all points

Example Results (using test geometries):

ShapeConvex Hull
PY0 (rectangle)Same rectangle (already convex)
PY3 (triangle)Same triangle (already convex)
LN1 (vertical line)Same line (degenerate case)
PT1 (point)Same point (degenerate case)
MPT1 (multipoint)POLYGON connecting outer points
L-shape (concave)Rectangle enclosing the L

Constructors

SpatialConvexHull(Geometry)

Initializes a new instance of ST_ConvexHull with a geometry literal.

SpatialConvexHull(Column)

Initializes a new instance of ST_ConvexHull with a spatial column.

SpatialConvexHull(Function)

Initializes a new instance of ST_ConvexHull for a function result.

SpatialConvexHull(Geography)

Initializes a new instance of ST_ConvexHull with a geography literal.