Beispiel #1
0
        public void Verify_DbGeography_Distance_method()
        {
            var distance = spatialServices.Distance(
                spatialServices.GeographyFromText("POINT (1 2)"),
                spatialServices.GeographyFromText("POINT (2 1)"));

            Assert.True(distance > 156876.149075896D && distance < 156876.149075897D);
        }
Beispiel #2
0
 /// <summary> Computes the distance between the closest points in this DbGeometry value and another DbGeometry value. </summary>
 /// <returns>A double value that specifies the distance between the two closest points in this geometry value and other.</returns>
 /// <param name="other">The geometry value for which the distance from this value should be computed.</param>
 /// <exception cref="T:System.ArgumentNullException">other</exception>
 public double?Distance(DbGeometry other)
 {
     Check.NotNull(other, "other");
     return(_spatialProvider.Distance(this, other));
 }