ApsGis.dll

UTM.IsValidUtmZone Method

Checks if the provided UTM zone is valid, i.e. it is not undefined and it is not outside its range.

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

Parameters

utmZone
a UTM zone
errorMessage
an error message, passed by reference (out), that contains detailed information in case of the invalid UTM zone

Return Value

true - if the UTM zone is valid, false - if the UTM zone is invalid

Example

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

string errorMessage = String.Empty;
UtmZone utmZone = UtmZone.Zone_03_from_168W_to_162W;
            
if (UTM.IsValidUtmZone(utmZone, out errorMessage))
{
    Console.WriteLine("UTM zone is valid.");
}
else
{
    Console.WriteLine(errorMessage);
}

See Also

UTM Class | ApsGis Namespace