DbSpatialServices.Distance 方法

定義

計算兩個值中最近點之間的距離。

多載

名稱 Description
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

適用於