Disjoint
Namespace: Digi21.DigiNG.Entities.Relations
Assembly: Digi21.DigiNG
Indicates whether two areas are disjoint.

public static bool Disjoint(ReadOnlyLine a, ReadOnlyLine b)
public static bool Disjoint(ReadOnlyLine a, ReadOnlyPolygon b)
public static bool Disjoint(ReadOnlyPolygon a, ReadOnlyLine b)
public static bool Disjoint(ReadOnlyPolygon a, ReadOnlyPolygon b)
| Parameter | Description |
|---|---|
a |
First area: a closed ReadOnlyLine or a ReadOnlyPolygon. |
b |
Second area. |
Return value
true if the areas are not equal and either condition is met:
- The two areas' bounding boxes in the XY plane do not touch.
- The areas have no common vertices and neither has a vertex inside the other.
A vertex inside a hole of the other area counts as outside, so an area inside a polygon's hole is disjoint from that polygon if it shares no vertices with the hole.
Because the method only analyzes vertices, two areas crossing without any common vertices or vertices inside the other are also disjoint.
Exceptions
| Exception | When |
|---|---|
ArgumentNullException |
a or b is null. |
SEHException |
An area has an unclosed ring, a ring with zero area or a spike. See AreaArea exceptions. |
Example
See the AreaArea example.