private GeoDistance GetGeoDistance(GeoCoordinate geoCoordinateFrom, GeoCoordinate geoCoordinateTo) { var distanceInLatAxel = GetDistance(geoCoordinateFrom, new GeoCoordinate(geoCoordinateTo.Latitude, geoCoordinateFrom.Longitude)); var distanceInLontAxel = GetDistance(geoCoordinateFrom, new GeoCoordinate(geoCoordinateFrom.Latitude, geoCoordinateTo.Longitude)); var geoDistance = GeoDistance.From(geoCoordinateTo); geoDistance.LatAxel = distanceInLatAxel; geoDistance.LongAxel = distanceInLontAxel; return(geoDistance); }
private const float EARTH_RADIUS = 6378.0f;//6367.45f; // public RunCalculation(string[] args) { GeoCoordinate geoCoordinate = new GeoCoordinate(args[0], args[1]); var quadrantSizeInKm = int.Parse(args[2]); double distanceKm = GetDistance(new GeoCoordinate(0, 0), geoCoordinate); Console.WriteLine($"Distance between points: {distanceKm}Km"); GeoDistance geoDistanceInKm = GetGeoDistance(new GeoCoordinate(0, 0), geoCoordinate); Console.WriteLine($"\nDistance in Lat axel (Y): {geoDistanceInKm.LatAxel}Km"); Console.WriteLine($"Distance in Lon axel (X): {geoDistanceInKm.LongAxel}Km"); }