Method GetClosestPointOnBoundary
- Namespace
- GeometryHelper.Geometry
- Assembly
- GeometryHelper.dll
GetClosestPointOnBoundary(GeoPoint2)
Gets the point of the loop nearest a point.
public GeoPoint2 GetClosestPointOnBoundary(GeoPoint2 point)
Parameters
pointGeoPoint2
Returns
GetClosestPointOnBoundary(GeoPoint2, Tolerance)
Gets the point of the loop nearest a point, within a tolerance.
public GeoPoint2 GetClosestPointOnBoundary(GeoPoint2 point, Tolerance tolerance)
Parameters
Returns
Remarks
A point within the tolerance of the centre of an arc is read as at the centre, which has no direction, and is carried to the arc's start; the distance to the point is the exact one, so the line can be longer than it, by at most twice the point's offset from the centre. At a tolerance of a thousandth, the point (0, -0.0009) and the arc of radius 50 about the origin from (-50, 0) to (50, 0) through (0, -50): the closest point is (-50, 0), 50.00000001 away, where the distance is 49.9991.
A straight side offers its nearest point as the side it is however short, as the distance measures it, where a segment no longer than the tolerance on its own is read as its start: at a hundredth, the loop (0, 0), (10, 0), (10, 0.006), (0, 10) is 0.03 from (10.03, 0.003), and the closest point is (10, 0.003), 0.03 away, where it was (10, 0), 0.0301496 away.