ApsGis.dll

Cartesian.ParseCartesianZInM Method

Parses Cartesian Z from the provided string.

public static bool ParseCartesianZInM(
   string str,
   out double zInM,
   out string errorMessage
);

Parameters

str
a string to be parsed
zInM
the parsed Cartesian Z, 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 Cartesian Z is a real number.

Example

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

 string errorMessage = String.Empty;
 
 string str = "3982807.8497531";
 double zInM = Double.NaN;

 if (Cartesian.ParseCartesianZInM(str, out zInM, out errorMessage))
 {
     Console.WriteLine("Z, in m: " + zInM.ToString());
 }
 else
 {
     Console.WriteLine(errorMessage);
 }
 

See Also

Cartesian Class | ApsGis Namespace