Click or drag to resize

LineStringDistanceTo Method (LatLon, Int32, DistanceUnit)

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
Calculates the shortest distance (in degrees) from the given point to this LineString.

Namespace:  Telogis.GeoBase.Geometry
Assembly:  geobase.net (in geobase.net.dll) Version: 4.99.0.0
Syntax
public double DistanceTo(
	LatLon point,
	out int segment,
	DistanceUnit unit
)

Parameters

point
Type: Telogis.GeoBaseLatLon
The given point, as a LatLon
segment
Type: SystemInt32
The zero-based index representing the segment of the LineString that is nearest to point
unit
Type: Telogis.GeoBaseDistanceUnit
The unit for the returned distance.

Return Value

Type: Double
Distance in the specified units.
Remarks
This distance is calculated using an arc, as opposed to the (longer) straight-line distance. The use of an arc returns the true shortest distance, taking into account the curvature of the earth's surface.
See Also