ApsGis.dll

Geodetic.IsValidPrecision Method

Checks if the provided precision is valid, i.e. if it can be used in GIS calculations in the Geodetic coordinate system.

public static bool IsValidPrecision(
   int precision,
   out string errorMessage
);

Parameters

precision
a precison to validate
errorMessage
an error message, passed by reference (out), that contains detailed information in case of the invalid precision

Return Value

true - if the precision is valid, false - if the precision is invalid

Remarks

The valid precision is an integer number in the range from 0 (inclusive) to 15 (inclusive).

Example

This sample shows how to call the Geodetic.IsValidPrecision method from C# code:

string errorMessage = String.Empty;
int precision = 77;
            
if (Geodetic.IsValidPrecision(precision, out errorMessage))
{
    Console.WriteLine("Precision is valid.");
}
else
{
    Console.WriteLine(errorMessage);
}

See Also

Geodetic Class | ApsGis Namespace