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.

The two areas share a point

The two areas share a point

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 a is inside b and no vertex of b is inside a.
  • The two areas have at least one common vertex.
  • No edge of a ring of a is also an edge of a ring of b. If they share an edge, Adjacent returns true.

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.