ApsGis.dll

Cartesian.ParseGeodeticHeightInM Method

Parses Geodetic height from the provided string.

public static bool ParseGeodeticHeightInM(
   string str,
   out double hInM,
   out string errorMessage
);

Parameters

str
a string to be parsed
hInM
the parsed Geodetic height, 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 Geodetic height is a real number.

Example

This sample shows how to call the Cartesian.ParseGeodeticHeightInM method from C# code:

 string errorMessage = String.Empty;
 
 string str = "100";
 double hInM = Double.NaN;

 if (Cartesian.ParseGeodeticHeightInM(str, out hInM, out errorMessage))
 {
     Console.WriteLine("Height, in m: " + hInM.ToString());
 }
 else
 {
     Console.WriteLine(errorMessage);
 }
 

See Also

Cartesian Class | ApsGis Namespace