STDistance 方法
Returns the shortest distance between a point in a SqlGeometry instance and a point in the specified SqlGeometry instance.
命名空间: Microsoft.SqlServer.Types
程序集: Microsoft.SqlServer.Types(在 Microsoft.SqlServer.Types.dll 中)
语法
声明
<SqlMethodAttribute(IsDeterministic := True, IsPrecise := False)> _
Public Function STDistance ( _
other As SqlGeometry _
) As SqlDouble
用法
Dim instance As SqlGeometry
Dim other As SqlGeometry
Dim returnValue As SqlDouble
returnValue = instance.STDistance(other)
[SqlMethodAttribute(IsDeterministic = true, IsPrecise = false)]
public SqlDouble STDistance(
SqlGeometry other
)
[SqlMethodAttribute(IsDeterministic = true, IsPrecise = false)]
public:
SqlDouble STDistance(
SqlGeometry^ other
)
[<SqlMethodAttribute(IsDeterministic = true, IsPrecise = false)>]
member STDistance :
other:SqlGeometry -> SqlDouble
public function STDistance(
other : SqlGeometry
) : SqlDouble
参数
- other
类型:Microsoft.SqlServer.Types. . :: . .SqlGeometry
The SqlGeometry instance from which to measure the distance between the instance on which STDistance is invoked. If other is an empty set, STDistance returns null.
返回值
类型:System.Data.SqlTypes. . :: . .SqlDouble
A SqlDouble value that represents the shortest distance between a point in the calling SqlGeometry and a point in the specified SqlGeometry.
注释
STDistance always returns null if the spatial reference IDs (SRIDs) of the SqlGeometry instances do not match.