Click or drag to resize

PolygonQuickDistanceTo Method

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
Returns the Pythagorean distance from the given location to the edge of this Polygon, in the specified units. If the given location is inside this Polygon, the distance returned will be zero. See remarks for comments on the accuracy of this method.

Namespace:  Telogis.GeoBase.Geometry
Assembly:  geobase.net (in geobase.net.dll) Version: 4.99.0.0
Syntax
public double QuickDistanceTo(
	LatLon loc,
	DistanceUnit units
)

Parameters

loc
Type: Telogis.GeoBaseLatLon
The location whose distance from the polygon you want to know.
units
Type: Telogis.GeoBaseDistanceUnit
The result will be measured in these units

Return Value

Type: Double
Shortest distance from loc to the edge of this Polygon in units units, or zero if loc is inside the Polygon.
Remarks
The Pythagorean distance assumes that the world is flat between the edge of this Polygon and the given location. This assumption is safe when the Polygon and location are near each other. If the Polygon and location are a significant distance apart the straight line between the Polygon and the point will pass through the interior of the world. To calculate the true shortest distance consider using the DistanceTo method. The DistanceTo method calculates the distance using a great circle which traces an arc over the surface of the earth.
See Also