ApsGis.dll

Mercator.ParseCentralMeridianInDeg Method

Parses central meridian from the provided string, assuming that the DecimalDegrees (DD) format is in use.

public static bool ParseCentralMeridianInDeg(
   string str,
   out double cmInDeg,
   out string errorMessage
);

Parameters

str
a string to be parsed
cmInDeg
the parsed central meridian in decimal degrees, passed by reference (out)
errorMessage
an error message, passed by reference (out), that contains detailed error / warning information

Return Value

true - the function has succeeded, false - it has failed

Remarks

The function verifies validity of its arguments and parsing results. The function recognizes the DecimalDegrees (DD) format, for example: -77.049.

Example

This sample shows how to call the Mercator.ParseCentralMeridianInDeg method from C# code:

 string errorMessage = String.Empty;
 
 string str = "-77.049";
 double cmInDeg = Double.NaN;

 if (Mercator.ParseCentralMeridianInDeg(str, out cmInDeg, out errorMessage))
 {
     Console.WriteLine("CmInDeg: " + cmInDeg.ToString());
 }
 else
 {
     Console.WriteLine(errorMessage);
 }
 

See Also

Mercator Class | ApsGis Namespace