SqlGeometry.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)]
SqlDouble STDistance(
    SqlGeometry^ other
[<SqlMethodAttribute(IsDeterministic = true, IsPrecise = false)>]
member STDistance : 
        other:SqlGeometry -> SqlDouble
public function STDistance(
    other : SqlGeometry
) : SqlDouble

매개 변수

반환 값

유형: 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.

참고 항목


SqlGeometry 클래스

Microsoft.SqlServer.Types 네임스페이스