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.
Return Types by Input:
| Input Type | Convex Hull Result |
|---|---|
| POINT | POINT (same as input) |
| LINESTRING | LINESTRING (if collinear) or POLYGON |
| Convex POLYGON | POLYGON (same as input) |
| Concave POLYGON | POLYGON (larger than input) |
| MULTIPOINT | POLYGON enclosing all points |
Example Results (using test geometries):
| Shape | Convex 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.