Class SpatialDistance
- Namespace
- YndigoBlue.Velocity.Functions
- Assembly
- YndigoBlue.Velocity.dll
Represents the ST_Distance spatial function that calculates the minimum distance between two geometries or geographies.
public class SpatialDistance : Function, IElement, ICheckItem, IDefaultItem, IFilterItem
- Inheritance
-
SpatialDistance
- Implements
Remarks
The ST_Distance function returns the shortest distance between two spatial objects. For Geometry types (planar), it calculates Euclidean distance in the coordinate system units. For Geography types (spherical), it calculates great-circle distance on the earth's surface, optionally in specified units. This is useful for proximity queries, finding nearest neighbors, or spatial indexing. OGC-compliant.
Constructors
- SpatialDistance(Geometry, Column)
Initializes a new instance of ST_Distance with a Geometry literal and a column.
- SpatialDistance(Column, Geometry)
Initializes a new instance of ST_Distance with a column and a Geometry literal.
- SpatialDistance(Column, Geography)
Initializes a new instance of ST_Distance with a column and a Geography literal.
- SpatialDistance(Column, Geography, UnitOfMeasure)
Initializes a new instance of ST_Distance with a column, Geography, and unit of measure.
- SpatialDistance(Geography, Column)
Initializes a new instance of ST_Distance with a Geography literal and a column.
- SpatialDistance(Geography, Column, UnitOfMeasure)
Initializes a new instance of ST_Distance with a Geography, column, and unit of measure.