ApsGis.dll

Mercator.IsValidMercatorYInM Method

Checks if the provided Mercator Y (in meters) is valid, i.e. if it can be used in GIS calculations in the Mercator projection.

public static bool IsValidMercatorYInM(
   double yInM,
   out string errorMessage
);

Parameters

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

Return Value

true - if the Mercator Y is valid, false - if the Mercator Y is invalid

Remarks

The valid Mercator Y is a real number.

Example

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

string errorMessage = String.Empty;
double yInM = 1234567.98765;
            
if (Mercator.IsValidMercatorYInM(yInM, out errorMessage))
{
    Console.WriteLine("Mercator Y is valid.");
}
else
{
    Console.WriteLine(errorMessage);
}

See Also

Mercator Class | ApsGis Namespace