Condividi tramite


Metodo SqlSpatialServices.Distance (DbGeography, DbGeography)

[Questa pagina è specifica della versione 6 di Entity Framework. La versione più recente è disponibile come pacchetto NuGet per "Entity Framework". Per ulteriori informazioni su Entity Framework, vedere la pagina msdn.com/data/ef.]

Calcola la distanza tra i punti più vicini in due valori DbGeography.

Spazio dei nomi:  System.Data.Entity.SqlServer
Assembly:  EntityFramework.SqlServer (in EntityFramework.SqlServer.dll)

Sintassi

'Dichiarazione
Public Overrides Function Distance ( _
    geographyValue As DbGeography, _
    otherGeography As DbGeography _
) As Double
'Utilizzo
Dim instance As SqlSpatialServices 
Dim geographyValue As DbGeography 
Dim otherGeography As DbGeography 
Dim returnValue As Double 

returnValue = instance.Distance(geographyValue, _
    otherGeography)
public override double Distance(
    DbGeography geographyValue,
    DbGeography otherGeography
)
public:
virtual double Distance(
    DbGeography^ geographyValue, 
    DbGeography^ otherGeography
) override
abstract Distance : 
        geographyValue:DbGeography * 
        otherGeography:DbGeography -> float  
override Distance : 
        geographyValue:DbGeography * 
        otherGeography:DbGeography -> float
public override function Distance(
    geographyValue : DbGeography, 
    otherGeography : DbGeography
) : double

Parametri

Valore restituito

Tipo: System.Double
Valore Double che specifica la distanza tra i due punti più vicini in geographyValue e otherGeography.

Vedere anche

Riferimento

SqlSpatialServices Classe

Overload Distance

Spazio dei nomi System.Data.Entity.SqlServer