Table of Contents

Class SpatialDimension

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

Represents the ST_Dimension spatial property function that returns the inherent dimension of a geometry.

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

Remarks

Warning

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

The ST_Dimension function returns the topological dimension of the geometry: 0 for points, 1 for lines and curves, 2 for polygons and surfaces. For geometry collections, returns the maximum dimension of all components. The dimension represents the number of degrees of freedom in the geometry's coordinate space, not the coordinate system dimensions. For Geometry types in planar coordinate systems, this is useful for classifying feature types, validating geometry types, or filtering by dimension. OGC-compliant.

SpatialDimension diagram showing dimension values

Return Type: Integer (0, 1, or 2).

Geometry TypeDimension Value
Point, MultiPoint0
LineString, MultiLineString, LinearRing1
Polygon, MultiPolygon2
GeometryCollectionMaximum of contained geometries
Empty geometry-1

Constructors

SpatialDimension(Geometry)

Initializes a new instance of ST_Dimension with a geometry literal.

SpatialDimension(Column)

Initializes a new instance of ST_Dimension with a geometry column.

SpatialDimension(Function)

Initializes a new instance of ST_Dimension for a function result.

SpatialDimension(Geography)

Initializes a new instance of ST_Dimension with a geography literal.