Click or drag to resize

MathUtilDistance Method (IListLatLon, Int32, Int32, Int32, LatLon)

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
Calculates the segment in the 'points' array that lies closest to 'p'.

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

Parameters

points
Type: System.Collections.GenericIListLatLon
The points that make up the line.
first
Type: SystemInt32
The index of the point in the points array that defines the start of the line.
last
Type: SystemInt32
The index of the point in the points array that defines the end of 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