ApsGis.dll

UTM.FindUtmZone(Double, Double, Double, Double, List, String) Method

Finds UTM zone/s of the specified geodetic coordinate on a reference ellipsoid.

public static bool FindUtmZone(
   double semiMajorAxisAInM,
   double inverseFlattening,
   double latInDeg,
   double lonInDeg,
   out List<UtmZoneutmZoneList,
   out string errorMessage
);

Parameters

semiMajorAxisAInM
a semi major axis A (in meters) of the user defined reference ellipsoid
inverseFlattening
an inverse flattening of the user defined reference ellipsoid
latInDeg
the latitude (in decimal degrees) of the original Geodetic coordinate
lonInDeg
the longitude (in decimal degrees) of the original Geodetic coordinate
utmZoneList
the list of the UTM zones, 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.FindUtmZone method from C# code:

 string errorMessage = String.Empty;
 
 double semiMajorAxisA = 6378137;
 double inverseFlattening = 298.257223563;

 double latInDeg = 38.889139;
 double lonInDeg = -77.049;
 
 List<UtmZone> utmZoneList = new List<UtmZone>();
 
 if (UTM.FindUtmZone(semiMajorAxisAInM, inverseFlattening, latInDeg, lonInDeg, out utmZoneList, out errorMessage))
 {
     Console.WriteLine("Find succeeded.");
 }
 else
 {
     Console.WriteLine("Find failed. " + errorMessage);
 }
 

See Also

UTM Class | ApsGis Namespace | UTM.FindUtmZone Overload List