Table of Contents

Class SpatialRelate

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

Represents the ST_Relate spatial function that tests if two geometries satisfy a DE-9IM pattern.

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

Remarks

Warning

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

The ST_Relate function tests whether two spatial objects satisfy a specific spatial relationship defined by a Dimensionally Extended 9-Intersection Model (DE-9IM) pattern matrix. The mask parameter is a 9-character string representing the intersection patterns between interior, boundary, and exterior of both geometries. Values can be: T (true/non-empty), F (false/empty), * (don't care), 0 (point), 1 (line), 2 (area). This is the most flexible spatial predicate, allowing custom relationship definitions beyond the standard predicates. OGC-compliant.

SpatialRelate diagram showing DE-9IM matrix

Return Type: Boolean (true/false) when testing a pattern, or String (9-char matrix) when computing.

DE-9IM PatternEquivalent Predicate
T*F**FFF*ST_Contains
T*T***T**ST_Crosses (for lines)
T*T***FF*ST_Within
FF*FF****ST_Disjoint
FT*******ST_Touches
T*T***T**ST_Overlaps (for polygons)

Constructors

SpatialRelate(Geometry, Column, string)

Initializes a new instance of ST_Relate with a geometry literal, column, and DE-9IM mask.

SpatialRelate(Column, Geometry, string)

Initializes a new instance of ST_Relate with a column, geometry literal, and DE-9IM mask.

SpatialRelate(Column, Column, string)

Initializes a new instance of ST_Relate with two columns and a DE-9IM mask for cross-table spatial joins.

SpatialRelate(Column, Geography, string)

Initializes a new instance of ST_Relate with a column, geography literal, and DE-9IM mask.

SpatialRelate(Geography, Column, string)

Initializes a new instance of ST_Relate with a geography literal, column, and DE-9IM mask.