Share via


SqlSpatialServices.Distance Method

Definition

Overloads

Distance(DbGeography, DbGeography)

Computes the distance between the closest points in two DbGeography values.

Distance(DbGeometry, DbGeometry)

Computes the distance between the closest points in two DbGeometry values.

Distance(DbGeography, DbGeography)

Computes the distance between the closest points in two DbGeography values.

public override double Distance (System.Data.Entity.Spatial.DbGeography geographyValue, System.Data.Entity.Spatial.DbGeography otherGeography);
override this.Distance : System.Data.Entity.Spatial.DbGeography * System.Data.Entity.Spatial.DbGeography -> double
Public Overrides Function Distance (geographyValue As DbGeography, otherGeography As DbGeography) As Double

Parameters

geographyValue
DbGeography

The first geography value.

otherGeography
DbGeography

The second geography value.

Returns

A double value that specifies the distance between the two closest points in geographyValue and otherGeography.

Applies to

Distance(DbGeometry, DbGeometry)

Computes the distance between the closest points in two DbGeometry values.

public override double Distance (System.Data.Entity.Spatial.DbGeometry geometryValue, System.Data.Entity.Spatial.DbGeometry otherGeometry);
override this.Distance : System.Data.Entity.Spatial.DbGeometry * System.Data.Entity.Spatial.DbGeometry -> double
Public Overrides Function Distance (geometryValue As DbGeometry, otherGeometry As DbGeometry) As Double

Parameters

geometryValue
DbGeometry

The first geometry value.

otherGeometry
DbGeometry

The second geometry value.

Returns

A double value that specifies the distance between the two closest points in geometryValue and otherGeometry.

Applies to