SqlSpatialServices.Distance Method

 

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

Namespace:   System.Data.Entity.SqlServer
Assembly:  EntityFramework.SqlServer (in EntityFramework.SqlServer.dll)

NameDescription
System_CAPS_pubmethodDistance(DbGeography, DbGeography)

Computes the distance between the closest points in two DbGeography values.(Overrides DbSpatialServices.Distance(DbGeography, DbGeography).)

System_CAPS_pubmethodDistance(DbGeometry, DbGeometry)

Computes the distance between the closest points in two DbGeometry values.(Overrides DbSpatialServices.Distance(DbGeometry, DbGeometry).)


SqlSpatialServices.Distance Method (DbGeography, DbGeography)

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

public override double Distance(
	DbGeography geographyValue,
	DbGeography otherGeography
)

Parameters

geographyValue
Type: System.Data.Entity.Spatial.DbGeography

The first geography value.

otherGeography
Type: System.Data.Entity.Spatial.DbGeography

The second geography value.

Return Value

Type: System.Double

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


SqlSpatialServices.Distance Method (DbGeometry, DbGeometry)

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

public override double Distance(
	DbGeometry geometryValue,
	DbGeometry otherGeometry
)

Parameters

geometryValue
Type: System.Data.Entity.Spatial.DbGeometry

The first geography value.

otherGeometry
Type: System.Data.Entity.Spatial.DbGeometry

The second geography value.

Return Value

Type: System.Double

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