UTMToLatLon
Previous  Next

Converts an UTM formatted coordinate to a Lat/Lon formatted coordinate.
Use WGS84UTMToLatLon when using the WGS84 datum.
Syntax: UTMToLatLon (a As Double, f As Double, UTMXZone As Int32, Easting As Double, NorthHemisphere As Boolean, Northing As Double) As Double()

a - The semi-major axis of the ellipsoid.
f - The flattening of the ellipsoid.
UTMXZone - The X zone.
Easting - The easting (x) value.
NorthHemisphere - True for the northern hemisphere and false for the southern hemisphere.
Northing - The northing (y) value.

The function returns an array of two numbers:
0 - The Latitude value. (dd.dddd)
1 - The Longitude value. (ddd.dddd)

Example:
Sub Globals
      dim ll(0) as double
End Sub

Sub App_Start
      converter.New1
      utmX = 654321
      utmY = 3764322
      ll() = converter.UTMToLatLon(6378388, 1/297, 36, utmX, true, utmY)
      msgbox("Lat: " & ll(0) & " Lon: " & ll(1))
End Sub