SqlGeometry.STDistance 方法 (SqlGeometry)

 

返回一个 SqlGeometry 实例中的点与指定的 SqlGeometry 实例中的点之间的最短距离。

命名空间:   Microsoft.SqlServer.Types
程序集:  Microsoft.SqlServer.Types(位于 Microsoft.SqlServer.Types.dll)

语法

[SqlMethodAttribute(IsDeterministic = true, IsPrecise = false)]
public SqlDouble STDistance(
    SqlGeometry other
)
public:
[SqlMethodAttribute(IsDeterministic = true, IsPrecise = false)]
SqlDouble STDistance(
    SqlGeometry^ other
)
[<SqlMethodAttribute(IsDeterministic = true, IsPrecise = false)>]
member STDistance : 
        other:SqlGeometry -> SqlDouble
<SqlMethodAttribute(IsDeterministic := True, IsPrecise := False)>
Public Function STDistance (
    other As SqlGeometry
) As SqlDouble

参数

返回值

Type: System.Data.SqlTypes.SqlDouble

一个 SqlDouble 值,该值表示调用 SqlGeometry 中的某个点与指定的 SqlGeometry 中的某个点之间的最短距离。

备注

如果 SqlGeometry 实例的空间引用 ID (SRID) 不匹配,则 STDistance 始终返回 Null。

另请参阅

SqlGeometry 类
Microsoft.SqlServer.Types 命名空间

返回页首