Disjoint
Namespace: Digi21.DigiNG.Entities.Relations
Assembly: Digi21.DigiNG
Indicates whether the line and area are disjoint.

public static bool Disjoint(ReadOnlyLine line, ReadOnlyLine area)
public static bool Disjoint(ReadOnlyLine line, ReadOnlyPolygon area)
| Parameter | Description |
|---|---|
line |
Line. |
area |
Area: a closed ReadOnlyLine or a ReadOnlyPolygon. |
Return value
Disjoint(ReadOnlyLine, ReadOnlyLine)
true if both conditions are met:
- No vertex of
linecoincides with a vertex ofarea, or their bounding boxes in the XY plane do not touch. - Not all vertices of
lineare insidearea.
This overload only excludes lines whose vertices are all inside the area. The method also returns true if the line has some vertices inside the area and others outside, without any vertices in common with the area.
Disjoint(ReadOnlyLine, ReadOnlyPolygon)
Uses the same criterion as the previous overload, accounting for holes:
- If the bounding boxes of
lineandareain the XY plane do not touch, returnstrue. - If a vertex of
linecoincides with a vertex of the outer ring or a hole, returnsfalse. - Otherwise, returns
trueunless all vertices oflineare inside the polygon. A vertex inside a hole is outside the polygon.
Exceptions
| Exception | When |
|---|---|
ArgumentNullException |
line or area is null. |