Click or drag to resize

MathUtilDistance Method (IListLatLon, Int32, LatLon)

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
Returns the length (measured in radians) to the line segment of the 'points' array that lies closest to 'p'.

Namespace:  Telogis.GeoBase
Assembly:  geobase.net (in geobase.net.dll) Version: 4.99.0.0
Syntax
public static double Distance(
	IList<LatLon> points,
	out int segment,
	LatLon p
)

Parameters

points
Type: System.Collections.GenericIListLatLon
The points that make up the line.
segment
Type: SystemInt32
Set to indicate which line segment is closest to 'p'. This is zero-based.
p
Type: Telogis.GeoBaseLatLon
The point to query against the line.

Return Value

Type: Double
The distance to the line in radians.
Remarks
The LatLon array points represents a series of line segments, for example points[0] -> points[1], points[1] -> points[2]. Given the LatLon point p, segment is set to indicate which line segment from the points array lies closest to p.
See Also