使用英语阅读

通过


SqlSpatialServices.Distance 方法 (DbGeometry, DbGeometry)

[本页针对的是实体框架版本 6。最新版本以“实体框架”NuGet 包的形式提供。有关实体框架的更多信息,请参见 msdn.com/data/ef。]

计算两个 DbGeometry 值中最接近的点之间的距离。

命名空间:  System.Data.Entity.SqlServer
程序集:  EntityFramework.SqlServer(在 EntityFramework.SqlServer.dll 中)

语法

声明
Public Overrides Function Distance ( _
    geometryValue As DbGeometry, _
    otherGeometry As DbGeometry _
) As Double
用法
Dim instance As SqlSpatialServices 
Dim geometryValue As DbGeometry 
Dim otherGeometry As DbGeometry 
Dim returnValue As Double 

returnValue = instance.Distance(geometryValue, _
    otherGeometry)

参数

返回值

类型:System.Double
指定 geographyValue 和 otherGeography 中两个最接近的点之间的距离的双精度值。

请参阅

参考

SqlSpatialServices 类

Distance 重载

System.Data.Entity.SqlServer 命名空间