次の方法で共有


SqlGeometry.STDistance メソッド

任意の SqlGeometry インスタンスの地点と指定した SqlGeometry インスタンスの地点との最短距離を返します。

名前空間:  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
    STDistance を呼び出したインスタンスまでの距離が測定される、SqlGeometry インスタンスです。 other が空集合の場合、STDistance は NULL を返します。

戻り値

型: System.Data.SqlTypes.SqlDouble
呼び出し元の SqlGeometry の地点と指定した SqlGeometry の地点との最短距離を表す SqlDouble 値です。

説明

2 つの SqlGeometry インスタンスの SRID (spatial reference ID) が一致しない場合、STDistance は常に NULL を返します。

関連項目

参照

SqlGeometry クラス

Microsoft.SqlServer.Types 名前空間