Export (0) Print
Expand All
Expand Minimize
0 out of 1 rated this helpful - Rate this topic

SqlGeography::STDistance Method

Returns the shortest distance between a point in a SqlGeography instance and a point in another SqlGeography instance.

Namespace:  Microsoft.SqlServer.Types
Assembly:  Microsoft.SqlServer.Types (in Microsoft.SqlServer.Types.dll)
[SqlMethodAttribute(IsDeterministic = true, IsPrecise = false)]
public:
SqlDouble STDistance(
	SqlGeography^ other
)

Parameters

other
Type: Microsoft.SqlServer.Types::SqlGeography
Is another geography instance from which to measure the distance between the instance on which STDistance is invoked. If an empty set is specified, STDistance will return null.

Return Value

Type: System.Data.SqlTypes::SqlDouble
Returns null if the spatial reference IDs (SRIDs) of the SqlGeography instances do not match.If this method is used to determine distance between antipodal points, or consecutive points on opposite sides of the globe, as in the distance between POINT (0 0) and POINT (180 0), this method will return null.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.