MathUtilDistance Method (IListLatLon, Int32, Int32, Int32, LatLon) | |
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.99.0.0
Syntax public static double Distance(
IList<LatLon> points,
int first,
int last,
out int segment,
LatLon p
)
Public Shared Function Distance (
points As IList(Of LatLon),
first As Integer,
last As Integer,
<OutAttribute> ByRef segment As Integer,
p As LatLon
) As Double
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:
DoubleThe 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