Converts a Lat/Lon formatted coordinate to an UTM formatted coordinate.
Use WGS84LatLonToUTM when using the WGS84 datum.
Syntax: LatLonToUTM (a As Double, f As Double, Lat As Double, Lon As Double) As
Double()
a - The semi-major axis of the ellipsoid.
f - The flattening of the ellipsoid.
Lat - The Latitude of the coordinate. (dd.dddd)
Lon - The Longitude of the coordinate. (ddd.dddd)
The function returns an array of four numbers:
0 - The X zone.
1 - The X value.
2 - The ASCII code of the Y zone.
3 - The Y value.
Example:
Sub Globals
dim utm(0) as double
End Sub
Sub App_Start
converter.New1
lat = 32.5555
lon = 35.2222
utm() = converter.LatLonToUTM(6378388,1/297,lat,lon)
msgbox("XZone: " & utm(0) & " X: " & utm(1)
& " YZone: " & chr(utm(2)) & " Y: " & utm(3))
End Sub