Checks if the provided longitude (in decimal degrees) is valid, i.e. if it can be used in GIS calculations in the Mercator projection.
true - if the longitude is valid, false - if the longitude is invalid
The valid longitude is a real number in the range from -180.0 (inclusive) to 180.0 (inclusive).
This sample shows how to call the Mercator.IsValidLongitudeInDeg method from C# code:
string errorMessage = String.Empty;
double lonInDeg = 78.0;
if (Mercator.IsValidLongitudeInDeg(lonInDeg, out errorMessage))
{
Console.WriteLine("Longitude is valid.");
}
else
{
Console.WriteLine(errorMessage);
}