Calculates a destination geodetic coordinate on the surface of the user defined reference ellipsoid, for the specified starting point on the ellipsoid, bearing (in decimal degrees) and distance (in meters).
true - the function has succeeded, false - it has failed
The function verifies validity of its arguments.
This sample shows how to call the Geodetic.CalculateDestination method from C# code:
double semiMajorAxisA = 6378137;
double inverseFlattening = 298.257223563;
string errorMessage = String.Empty;
double startLatInDeg = 38.889139;
double startLonInDeg = -77.049;
double bearingInDeg = 322.506050;
double distanceInM = 140.524904;
double destinationLatInDeg = Double.NaN;
double destinationLonInDeg = Double.NaN;
if (Geodetic.CalculateDestination(semiMajorAxisA, inverseFlattening, startLatInDeg, startLonInDeg, bearingInDeg, distanceInM, out destinationLatInDeg, out destinationLonInDeg, out errorMessage))
{
Console.WriteLine("LatInDeg: " + destinationLatInDeg.ToString());
Console.WriteLine("LonInDeg: " + destinationLonInDeg.ToString());
}
else
{
Console.WriteLine(errorMessage);
}
Geodetic Class | ApsGis Namespace | Geodetic.CalculateDestination Overload List