Table of Contents

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

line GeoLine2

The line segment.

point GeoPoint2

The target point.

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

line GeoLine2

The line segment.

point GeoPoint2

The target point.

tolerance Tolerance

The tolerance.

Returns

GeoPoint2

The closest point on the line segment.