Table of Contents

Method ProjectToPolyline

Namespace
GeometryHelper.Core
Assembly
GeometryHelper.dll

ProjectToPolyline(GeoPolyline3, GeoPoint3)

Projects a point onto a polyline, clamped to the chain.

public static GeoPoint3 ProjectToPolyline(GeoPolyline3 polyline, GeoPoint3 point)

Parameters

polyline GeoPolyline3
point GeoPoint3

Returns

GeoPoint3

ProjectToPolyline(GeoPolyline3, GeoPoint3, Tolerance)

Projects a point onto a polyline, clamped to the chain, within a tolerance.

public static GeoPoint3 ProjectToPolyline(GeoPolyline3 polyline, GeoPoint3 point, Tolerance tolerance)

Parameters

polyline GeoPolyline3

The polyline.

point GeoPoint3

The point.

tolerance Tolerance

The tolerance; every leg is measured as it is, so it changes nothing here.

Returns

GeoPoint3

The point of the polyline nearest the point.

Remarks

A leg offers its nearest point as the leg it is however short, as the distance measures it: at a hundredth, the polyline (0, 0, 0), (10, 0, 0), (10, 0.006, 0), (0, 0.006, 0) is 0.03 from (10.03, 0.003, 0), and the closest point is (10, 0.003, 0), 0.03 away, where its leg 0.006 long, no longer than the tolerance, offered its start (10, 0, 0), 0.0301496 away.

Exceptions

ArgumentNullException

Thrown when the polyline is null.