Join
Namespace: Digi21.DigiNG.Entities.Relations
Assembly: Digi21.DigiNG
Indicates whether two areas have a joining point: they touch at common vertices without sharing an edge.


public static bool Join(ReadOnlyLine a, ReadOnlyLine b)
public static bool Join(ReadOnlyLine a, ReadOnlyPolygon b)
public static bool Join(ReadOnlyPolygon a, ReadOnlyLine b)
public static bool Join(ReadOnlyPolygon a, ReadOnlyPolygon b)
| Parameter | Description |
|---|---|
a |
First area: a closed ReadOnlyLine or a ReadOnlyPolygon. |
b |
Second area. |
Return value
true if all three conditions are met:
- No vertex of
ais insideband no vertex ofbis insidea. - The two areas have at least one common vertex.
- No edge of a ring of
ais also an edge of a ring ofb. If they share an edge, Adjacent returnstrue.
If all vertices of one area are common or lie on the other area's edges, the result depends on an interior point of that area: if the point is inside the other area, the method returns false and Within returns true.
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. |