示例#1
0
        private static void TestComputeDistance0()
        {
            // zero distance
            System.Console.WriteLine(ToolsGeoLocation.ComputeDistanceHaversine(new GeoLocationDecimalDegree(), new GeoLocationDecimalDegree()));
            // utrecht Groningen 156.49Km
            System.Console.WriteLine(ToolsGeoLocation.ComputeDistanceHaversine(new GeoLocationDecimalDegree((AngleDegree)52.107995, (AngleDegree)5.119632), new GeoLocationDecimalDegree((AngleDegree)53.213763, (AngleDegree)6.555392)));
            // utrecht Groningen 234.31Km
            System.Console.WriteLine(ToolsGeoLocation.ComputeDistanceHaversine(new GeoLocationDecimalDegree((AngleDegree)52.107995, (AngleDegree)5.119632), new GeoLocationDecimalDegree((AngleDegree)52.043364, (AngleDegree)8.546902)));

            // zero distance
            System.Console.WriteLine(ToolsGeoLocation.ComputeDistanceEquirectangular(new GeoLocationDecimalDegree(), new GeoLocationDecimalDegree()));
            // utrecht Bieleveld 156.49Km
            System.Console.WriteLine(ToolsGeoLocation.ComputeDistanceEquirectangular(new GeoLocationDecimalDegree((AngleDegree)52.107995, (AngleDegree)5.119632), new GeoLocationDecimalDegree((AngleDegree)53.213763, (AngleDegree)6.555392)));
            // utrecht Bieleveld 234.31Km
            System.Console.WriteLine(ToolsGeoLocation.ComputeDistanceEquirectangular(new GeoLocationDecimalDegree((AngleDegree)52.107995, (AngleDegree)5.119632), new GeoLocationDecimalDegree((AngleDegree)52.043364, (AngleDegree)8.546902)));
        }
示例#2
0
 public Meter Compute(GeoLocationDecimalDegree value_0, GeoLocationDecimalDegree value_1)
 {
     return(ToolsGeoLocation.ComputeDistanceHaversine(value_0, value_1));
 }