DbSpatialServices.Distance Method
Computes the distance between the closest points in two specified values.
Assembly: EntityFramework (in EntityFramework.dll)
Name | Description | |
---|---|---|
![]() | 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. |
DbSpatialServices.Distance Method (DbGeography, DbGeography)
Computes the distance between the closest points in two DbGeography values.
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.DoubleA double value that specifies the distance between the two closest points in geographyValue and otherGeography.
Exception | Condition |
---|---|
ArgumentNullException | geographyValue or otherGeography is null. |
ArgumentException | geographyValue or otherGeography is not compatible with this spatial services implementation. |
DbSpatialServices.Distance Method (DbGeometry, DbGeometry)
Computes the distance between the closest points in two DbGeometry values.
Parameters
- geometryValue
-
Type:
System.Data.Entity.Spatial.DbGeometry
The first geometry value.
- otherGeometry
-
Type:
System.Data.Entity.Spatial.DbGeometry
The second geometry value.
Return Value
Type: System.DoubleA double value that specifies the distance between the two closest points in geometryValue and otherGeometry.
Exception | Condition |
---|---|
ArgumentNullException | geometryValue or otherGeometry is null. |
ArgumentException | geometryValue or otherGeometry is not compatible with this spatial services implementation. |