Поделиться через


Метод 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)]
public:
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