Enum SpatialRelation
The set of spatial relationships. Naming is consistent with OGC spec conventions as seen in SQL/MM and others.
No equality case. If two IShape instances are equal then the result might be CONTAINS (preferred) or WITHIN.
Client logic may have to be aware of this edge condition; Spatial4n testing certainly does.
The "CONTAINS" and "WITHIN" wording here is inconsistent with OGC; these here map to OGC "COVERS" and "COVERED BY", respectively. The distinction is in the boundaries; in Spatial4n there is no boundary distinction -- boundaries are part of the shape as if it was an "interior", with respect to OGC's terminology.
Assembly: Spatial4n.dll
Syntax
public enum SpatialRelation
Fields
Name | Description |
---|---|
CONTAINS | The shape contains the target geometry. It's the converse of WITHIN. Boundaries of shapes count too. OGC specs refer to this relation as "COVERS"; CONTAINS is differentiated thereby not including boundaries. |
DISJOINT | The shape shares no point in common with the target shape. |
INTERSECTS | The shape shares some points/overlap with the target shape, and the relation is not more specifically WITHIN or CONTAINS. |
NOT_SET | Used in .NET for mimicking the ability to set an enum to null in Java. Set to zero explicitly to ensure it will be the default value for an uninitialized SpatialRelation variable. |
WITHIN | The shape is within the target geometry. It's the converse of CONTAINS. Boundaries of shapes count too. OGC specs refer to this relation as "COVERED BY"; WITHIN is differentiated thereby not including boundaries. |