Click or drag to resize

MathUtilQuickClosestPointOnLine Method (LatLon, LatLon, LatLon, Double)

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
Calculates the closest point on the line lineStart->lineEnd to the point given using a Pythagorean approximation.

Namespace:  Telogis.GeoBase
Assembly:  geobase.net (in geobase.net.dll) Version: 4.99.0.0
Syntax
public static LatLon QuickClosestPointOnLine(
	LatLon point,
	LatLon lineStart,
	LatLon lineEnd,
	out double interpolationConstant
)

Parameters

point
Type: Telogis.GeoBaseLatLon
The point to find the closest point to.
lineStart
Type: Telogis.GeoBaseLatLon
The point at the beginning of the line.
lineEnd
Type: Telogis.GeoBaseLatLon
The point at the end of the line.
interpolationConstant
Type: SystemDouble
The interpolation constant for the point along the line start->end where point is closest.

Return Value

Type: LatLon
The point between lineStart and lineEnd that is closest to point.
Remarks
This is a quick but approximate calculation for distances less than 10km, otherwise use ClosestPoint .
See Also