ApsGis.dll

Cartesian.IsValidCartesianXInM Method

Checks if the provided Cartesian X (in meters) is valid, i.e. if it can be used in GIS calculations in the Cartesian coordinate system.

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

Parameters

xInM
a Cartesian X (in meters) to validate
errorMessage
an error message, passed by reference (out), that contains detailed information in case of the invalid Cartesian X

Return Value

true - if the Cartesian X is valid, false - if the Cartesian X is invalid

Remarks

The valid Cartesian X is a real number.

Example

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

string errorMessage = String.Empty;
double xInM = 1234567.98765;
            
if (Cartesian.IsValidCartesianXInM(xInM, out errorMessage))
{
    Console.WriteLine("Cartesian X is valid.");
}
else
{
    Console.WriteLine(errorMessage);
}

See Also

Cartesian Class | ApsGis Namespace