Method ProjectToLine
- Namespace
- GeometryHelper.Core
- Assembly
- GeometryHelper.dll
ProjectToLine(GeoLine2, GeoPoint2)
Projects a point orthogonally onto a line segment using default tolerance, clamping the result to [StartPoint, EndPoint].
public static GeoPoint2 ProjectToLine(GeoLine2 line, GeoPoint2 point)
Parameters
Returns
- GeoPoint2
The closest point on the line segment.
ProjectToLine(GeoLine2, GeoPoint2, Tolerance)
Projects a point orthogonally onto a line segment within tolerance, clamping the result to [StartPoint, EndPoint]. The result never lies beyond either endpoint.
public static GeoPoint2 ProjectToLine(GeoLine2 line, GeoPoint2 point, Tolerance tolerance)
Parameters
lineGeoLine2The line segment.
pointGeoPoint2The target point.
toleranceToleranceThe tolerance.
Returns
- GeoPoint2
The closest point on the line segment.