Table of Contents

Method GetClosestPointOnBoundary

Namespace
GeometryHelper.Geometry
Assembly
GeometryHelper.dll

GetClosestPointOnBoundary(GeoPoint2)

Gets the point of the chain nearest a point.

public GeoPoint2 GetClosestPointOnBoundary(GeoPoint2 point)

Parameters

point GeoPoint2

Returns

GeoPoint2

GetClosestPointOnBoundary(GeoPoint2, Tolerance)

Gets the point of the chain nearest a point, within a tolerance.

public GeoPoint2 GetClosestPointOnBoundary(GeoPoint2 point, Tolerance tolerance)

Parameters

point GeoPoint2
tolerance Tolerance

Returns

GeoPoint2

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 edge offers its nearest point as the edge it is however short, as the distance measures it, where on its own one no longer than the tolerance is read as its start: at a hundredth, the hairpin from (0, 0) to (10, 0), on to (10, 0.006) and back to (0, 0.006) 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.