Table of Contents

Class SpatialEnvelope

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

Represents the ST_Envelope spatial analysis function that returns the bounding rectangle of a geometry.

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

Remarks

Warning

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

The ST_Envelope function returns a geometry representing the minimum bounding rectangle (MBR) of the input spatial object. The envelope is always axis-aligned (parallel to coordinate system axes) and is returned as a polygon (or point/line for degenerate cases). This is the same as the bounding box. Useful for quick spatial indexing, extent calculations, or initial filtering in spatial queries. OGC-compliant.

SpatialEnvelope diagram showing bounding rectangles

Return Types by Input:

Input TypeEnvelope Result
POINTPOINT (same as input)
Vertical/horizontal LINELINESTRING (degenerate)
Diagonal LINESTRINGPOLYGON (bounding rectangle)
Axis-aligned POLYGONPOLYGON (same as input)
Rotated/irregular POLYGONPOLYGON (larger bounding rectangle)
MULTIPOINTPOLYGON enclosing all points

Example Results (using test geometries):

ShapeEnvelope
PY0 (rectangle)Same rectangle (already axis-aligned)
PY3 (triangle)Bounding rectangle larger than triangle
LN1 (vertical line)Degenerate line (width = 0)
PT1 (point)Same point (degenerate case)
L-shape (concave)Rectangle enclosing the L
MPT1 (multipoint)Rectangle enclosing all points

Constructors

SpatialEnvelope(Geometry)

Initializes a new instance of ST_Envelope with a geometry literal.

SpatialEnvelope(Column)

Initializes a new instance of ST_Envelope with a spatial column.

SpatialEnvelope(Function)

Initializes a new instance of ST_Envelope for a function result (e.g., from another spatial operation).

SpatialEnvelope(Geography)

Initializes a new instance of ST_Envelope with a geography literal.