Adjacent
Namespace: Digi21.DigiNG.Entities.Relations
Assembly: Digi21.DigiNG
Indicates whether the line is adjacent to the area: it follows part of the boundary without entering the area.

public static bool Adjacent(ReadOnlyLine line, ReadOnlyLine area)
public static bool Adjacent(ReadOnlyLine line, ReadOnlyPolygon area)
| Parameter | Description |
|---|---|
line |
Line. |
area |
Area: a closed ReadOnlyLine or a ReadOnlyPolygon. |
Return value
true if both conditions are met:
- The line shares at least one edge with the area: two consecutive line vertices coincide with two consecutive area vertices. With a
ReadOnlyPolygon, the edge can belong to the outer ring or a hole. - No line vertex is inside the area. Vertices outside the area or on its boundary are allowed.
Exceptions
| Exception | When |
|---|---|
ArgumentNullException |
line or area is null. |
Example
See the LineArea example.