ApsGis.dll

UTM.ParseUtmZone Method

Parses / determines the UTM zone from the provided string.

public static bool ParseUtmZone(
   string str,
   out UtmZone utmZone,
   out string errorMessage
);

Parameters

str
a string to be parsed
utmZone
the parsed UTM zone, 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

Example

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

 string errorMessage = String.Empty;
 
 string str = "18 - 78W to 72W";
 
 UtmZone utmZone = UtmZone.NotDefined;

 if (UTM.ParseUtmZone(str, out utmZone, out errorMessage))
 {
     Console.WriteLine(utmZone);
 }
 else
 {
     Console.WriteLine(errorMessage);
 }
 

See Also

UTM Class | ApsGis Namespace