ApsGis.dll

UTM.ParseSemiMajorAxisAInM Method

Parses semi major axis A of a reference ellipsoid from the provided string.

public static bool ParseSemiMajorAxisAInM(
   string str,
   out double semiMajorAxisAInM,
   out string errorMessage
);

Parameters

str
a string to be parsed
semiMajorAxisAInM
the parsed semi major axis A, passed by reference (out)
errorMessage
an error message, passed by reference (out), that contains detailed error / warning information

Return Value

true - the function has succeeded, false - it has failed

Remarks

The function verifies validity of the parsing result. The valid semi major axis A (in meters) is a real number greater than 0.

Example

This sample shows how to call the UTM.ParseSemiMajorAxisAInM method from C# code:

 string errorMessage = String.Empty;
 
 string str = "6378137";
 double semiMajorAxisAInM = Double.NaN;

 if (UTM.ParseSemiMajorAxisAInM(str, out semiMajorAxisAInM, out errorMessage))
 {
     Console.WriteLine("Semi major axis A, in m: " + semiMajorAxisAInM.ToString());
 }
 else
 {
     Console.WriteLine(errorMessage);
 }
 

See Also

UTM Class | ApsGis Namespace