DbSpatialServices.Distance 方法

定义

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

重载

Distance(DbGeography, DbGeography)

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

Distance(DbGeometry, DbGeometry)

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

Distance(DbGeography, DbGeography)

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

public:
 abstract double Distance(System::Data::Spatial::DbGeography ^ geographyValue, System::Data::Spatial::DbGeography ^ otherGeography);
public abstract double Distance (System.Data.Spatial.DbGeography geographyValue, System.Data.Spatial.DbGeography otherGeography);
abstract member Distance : System.Data.Spatial.DbGeography * System.Data.Spatial.DbGeography -> double
Public MustOverride Function Distance (geographyValue As DbGeography, otherGeography As DbGeography) As Double

参数

geographyValue
DbGeography

第一个地理值。

otherGeography
DbGeography

第二个地理值。

返回

geographyValueotherGeography 中指定两个最接近的点之间的距离的双精确值。

例外

geographyValue otherGeography

geographyValue otherGeography

适用于

Distance(DbGeometry, DbGeometry)

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

public:
 abstract double Distance(System::Data::Spatial::DbGeometry ^ geometryValue, System::Data::Spatial::DbGeometry ^ otherGeometry);
public abstract double Distance (System.Data.Spatial.DbGeometry geometryValue, System.Data.Spatial.DbGeometry otherGeometry);
abstract member Distance : System.Data.Spatial.DbGeometry * System.Data.Spatial.DbGeometry -> double
Public MustOverride Function Distance (geometryValue As DbGeometry, otherGeometry As DbGeometry) As Double

参数

geometryValue
DbGeometry

第一个几何图形值。

otherGeometry
DbGeometry

第二个几何图形值。

返回

geometryValueotherGeometry 中指定两个最接近的点之间的距离的双精确值。

例外

geometryValue otherGeometry

geometryValue otherGeometry

适用于