AnalyzePointPosition
Namespace: Digi21.DigiNG.Entities
Assembly: Digi21.DigiNG
Indicates a coordinate's position relative to the area enclosed by the entity, in the XY plane. Method of ICloseable.
PointPosition AnalyzePointPosition(Point3D coordinate)
Parameters
| Parameter | Description |
|---|---|
coordinate |
Coordinate to analyze. Z is not used. |
Return value
A PointPosition value: Exterior, Interior or Tangent (on the boundary).
| Type | Calculation |
|---|---|
ReadOnlyLine, Line |
Counts intersections of a ray starting at coordinate with line segments. Returns Exterior if the line has fewer than 4 vertices or coordinate is outside the line's minimum and maximum coordinates, and Tangent if coordinate lies on a segment. |
ReadOnlyPolygon, Polygon |
Analyzes the outer boundary first, as for a line. If coordinate is inside, analyzes each hole: returns Tangent if it lies on a hole's boundary and Exterior if it is inside a hole. |
In the reference package, the ReadOnlyPolygon.AnalyzePointPosition parameter is named point; in the installed assembly, it is named coordinate.
Exceptions
| Exception | When |
|---|---|
InvalidOperationException |
The entity is a line not closed in X and Y (Closed is false) or has fewer than 2 vertices. |
Example
The ICloseable example analyzes three coordinates relative to a polygon with a hole.