Checks if the provided longitude (in decimal degrees) is valid, i.e. if it can be used in GIS calculations in the Cartesian coordinate system.
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 Cartesian.IsValidLongitudeInDeg method from C# code:
string errorMessage = String.Empty;
double lonInDeg = 38.889139;
if (Cartesian.IsValidLongitudeInDeg(lonInDeg, out errorMessage))
{
Console.WriteLine("Longitude is valid.");
}
else
{
Console.WriteLine(errorMessage);
}