Share via


SqlGeometry.STDistance(SqlGeometry) Method

Definition

Returns the shortest distance between a point in a SqlGeometry instance and a point in the specified SqlGeometry instance.

[Microsoft.SqlServer.Server.SqlMethod(IsDeterministic=true, IsPrecise=false)]
public System.Data.SqlTypes.SqlDouble STDistance (Microsoft.SqlServer.Types.SqlGeometry other);
[<Microsoft.SqlServer.Server.SqlMethod(IsDeterministic=true, IsPrecise=false)>]
member this.STDistance : Microsoft.SqlServer.Types.SqlGeometry -> System.Data.SqlTypes.SqlDouble
Public Function STDistance (other As SqlGeometry) As SqlDouble

Parameters

other
SqlGeometry

The SqlGeometry instance from which to measure the distance between the instance on which STDistance(SqlGeometry) is invoked. If other is an empty set, STDistance(SqlGeometry) returns null.

Returns

A SqlDouble value that represents the shortest distance between a point in the calling SqlGeometry and a point in the specified SqlGeometry.

Attributes

Applies to