Within
Namespace: Digi21.DigiNG.Entities.Relations
Assembly: Digi21.DigiNG
Indicates whether the point is inside the area.

public static bool Within(ReadOnlyPoint point, ReadOnlyLine area)
public static bool Within(ReadOnlyPoint point, ReadOnlyPolygon area)
| Parameter | Description |
|---|---|
point |
Point, of type ReadOnlyPoint. |
area |
Area: a closed ReadOnlyLine or a ReadOnlyPolygon. In the installed assembly, this parameter is named line or polygon. |
Return value
true if the point's coordinate is inside the area. Returns false if the point is on the boundary (a vertex or edge of the outer ring or a hole), inside a hole or outside the area. Always returns false for an unclosed ReadOnlyLine.
With a Point created in memory, the method always returns false; see the note in PointArea.
Exceptions
| Exception | When |
|---|---|
ArgumentNullException |
point or area is null. |
Example
See the PointArea example.