Class SpatialDifference
- Namespace
- YndigoBlue.Velocity.Functions
- Assembly
- YndigoBlue.Velocity.dll
Represents the ST_Difference spatial analysis function that computes the spatial difference of two geometries.
public class SpatialDifference : Function, IElement, ICheckItem, IDefaultItem, IFilterItem
- Inheritance
-
SpatialDifference
- Implements
Remarks
Warning
Spatial functions are not available in the Community Edition of Velocity. They require the Full Edition.
The ST_Difference function returns a geometry representing the point set difference of two spatial objects (the set of points in the first geometry that are not in the second). This operation effectively "subtracts" one geometry from another, removing the overlapping portion. Useful for finding the portion of a parcel not covered by a building, removing exclusion zones, or clipping operations. The result geometry type depends on the inputs and their spatial relationship. OGC-compliant.
Return Type: Geometry (the portion of A not covered by B).
| Relationship | ST_Difference(A, B) Result |
|---|---|
| A and B overlap partially | A minus the overlapping region (L-shape or similar) |
| A and B are disjoint | A unchanged (no overlap to remove) |
| B fully contains A | EMPTY geometry |
| A fully contains B | A with a hole where B was |
Constructors
- SpatialDifference(Geometry, Column)
Initializes a new instance of ST_Difference with a geometry literal and column.
- SpatialDifference(Geometry, Function)
Initializes a new instance of ST_Difference with a Geometry literal and function result for function chaining.
- SpatialDifference(Column, Geometry)
Initializes a new instance of ST_Difference with a column and geometry literal.
- SpatialDifference(Column, Column)
Initializes a new instance of ST_Difference with two columns for spatial joins.
- SpatialDifference(Column, Function)
Initializes a new instance of ST_Difference with a column and function result for function chaining.
- SpatialDifference(Column, Geography)
Initializes a new instance of ST_Difference with a column and geography literal.
- SpatialDifference(Function, Geometry)
Initializes a new instance of ST_Difference with a function result and Geometry literal for function chaining.
- SpatialDifference(Function, Column)
Initializes a new instance of ST_Difference with a function result and column for function chaining.
- SpatialDifference(Function, Function)
Initializes a new instance of ST_Difference with two function results for function chaining.
- SpatialDifference(Function, Geography)
Initializes a new instance of ST_Difference with a function result and Geography literal for function chaining.
- SpatialDifference(Geography, Column)
Initializes a new instance of ST_Difference with a geography literal and column.
- SpatialDifference(Geography, Function)
Initializes a new instance of ST_Difference with a Geography literal and function result for function chaining.