Converts a latitude in DMS (degrees, minutes, seconds) to decimal degrees.
true - the function has succeeded, false - it has failed
The function verifies validity of its arguments. The valid degree part is an integer number in the range from 0 (inclusive) to 90 (inclusive). The valid minutes part is an integer number in the range from 0 (inclusive) to 60 (exclusive). The valid seconds part is a real number in the range from 0 (inclusive) to 60 (exclusive).
This sample shows how to call the Geodetic.Latitude.LatInDmsToDeg method from C# code:
string errorMessage = String.Empty;
LatitudeDirection latDirection = LatitudeDirection.Northern;
int degreesPart = 34;
int minutesPart = 45;
double secondsPart = 56.789;
double latInDeg = Double.NaN;
if (Geodetic.Latitude.LatInDmsToDeg(degrees, minutes, seconds, latDirection, out latInDeg, out errorMessage))
{
Console.WriteLine("Latitude in degrees: " + latInDeg.ToString());
}
else
{
Console.WriteLine(errorMessage);
}