Parses longitude from the provided string, assuming that the DecimalDegrees (DD) format is in use.
true - the function has succeeded, false - it has failed
The function verifies validity of its arguments before running parsing. The function recognizes the DecimalDegrees (DD) format, for example: -77.049. The function verifies the validity of the parsed result also. The valid longitude (in degrees) is a real number in the range from -180.0 (inclusive) to 180.0 (inclusive).
This sample shows how to call the TM.ParseLongitudeInDeg method from C# code:
string errorMessage = String.Empty;
string str = "-77.049";
double lonInDeg = Double.NaN;
if (TM.ParseLongitudeInDeg(str, out lonInDeg, out errorMessage))
{
Console.WriteLine("LonInDeg: " + lonInDeg.ToString());
}
else
{
Console.WriteLine(errorMessage);
}