ApsGis.dll

UTM.GetCentralMeridianInDegOfUtmZone Method

Finds the central meridian of the specified UTM zone.

public static bool GetCentralMeridianInDegOfUtmZone(
   UtmZone utmZone,
   out double cmInDeg,
   out string errorMessage
);

Parameters

utmZone
a UTM zone
cmInDeg
a 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 the input arguments before running the conversion. It takes into account the 40.0 km overlap with the adjacent UTM zones and 0.5 degree overlap with UPS (Univeral Polar Stereographic) projection.

Example

This sample shows how to call the UTM.GetCentralMeridianInDegOfUtmZone method from C# code:

 string errorMessage = String.Empty;
 
 UtmZone utmZone = UtmZone.Zone_18_from_78W_to_72W;
 
 double cmInDeg = Double.NaN;

 if (UTM.GetCentralMeridianInDegOfUtmZone(utmZone, out cmInDeg, out errorMessage))
 {
     Console.WriteLine("Central meridian, in degrees: " + cmInDeg.ToString());
 }
 else
 {
     Console.WriteLine(errorMessage);
 }
 

See Also

UTM Class | ApsGis Namespace