ApsGis.dll

Cartesian.ParseCartesianXInM Method

Parses Cartesian X from the provided string.

public static bool ParseCartesianXInM(
   string str,
   out double xInM,
   out string errorMessage
);

Parameters

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

Example

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

 string errorMessage = String.Empty;
 
 string str = "1114120.60285998";
 double xInM = Double.NaN;

 if (Cartesian.ParseCartesianXInM(str, out xInM, out errorMessage))
 {
     Console.WriteLine("X, in m: " + xInM.ToString());
 }
 else
 {
     Console.WriteLine(errorMessage);
 }
 

See Also

Cartesian Class | ApsGis Namespace