Parses latitude from the provided string for the user defined reference ellipsoid, 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 valid semi major axis A (in meters) is a real number greater than 0. The valid inverse flattening is a real number greater than 0. The function recognizes the DecimalDegrees (DD) format, for example: 38.889139;. The function verifies the validity of the parsed result also. The valid latitude is a real number in the range from -MaxLat (exclusive) to MaxLat (exclusive), where MaxLat is the function of the reference ellipsoid.
This sample shows how to call the TM.ParseLatitudeInDeg method from C# code:
string errorMessage = String.Empty;
double semiMajorAxisA = 6378137;
double inverseFlattening = 298.257223563;
string str = "38.889139;";
double latInDeg = Double.NaN;
if (TM.ParseLatitudeInDeg(str, out latInDeg, out errorMessage))
{
Console.WriteLine("LatInDeg: " + latInDeg.ToString());
}
else
{
Console.WriteLine(errorMessage);
}
TM Class | ApsGis Namespace | TM.ParseLatitudeInDeg Overload List