Table of Contents

Class SpatialX

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

Represents the ST_X spatial accessor function that returns the X coordinate of a point geometry.

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

Remarks

Warning

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

The ST_X function returns the X coordinate (longitude or easting) of a point geometry. For non-point geometries, the result is typically null or undefined. The X coordinate represents the horizontal position in the coordinate reference system. For geographic coordinates, X is longitude. For projected coordinates, X is the easting value. For Geometry types in planar coordinate systems, this is useful for extracting coordinates, coordinate transformations, or point analysis. OGC-compliant.

SpatialX and SpatialY diagram showing coordinate extraction

Return Type: Double (X coordinate value).

Point GeometryST_X Result
POINT(200 100)200
POINT(-98.5 38.2)-98.5 (longitude)
LineString, PolygonNULL

Constructors

SpatialX(Geometry)

Initializes a new instance of ST_X with a point geometry literal.

SpatialX(Column)

Initializes a new instance of ST_X with a point geometry column.

SpatialX(Function)

Initializes a new instance of ST_X for a function result.

SpatialX(Geography)

Initializes a new instance of ST_X with a point geography literal.