LatLon-UTM Conversions
LatLon-UTM Conversions
0. ABSTRACT
The purpose of this worksheet is to convert geographic coordinates between latitude/
longitude (Lat/Lon) and Universal Transverse Mercator (UTM). This worksheet provides
separate program functions to convert Lat/Lon coordinates to UTM and UTM coordinates to
Lat/Lon. These two programs and the preliminary calculations for them use a truncated
version of the Transverse Mercator flattening series derived by Johann Heinrich Louis Krüger
in 1912. [1] Results are accurate to about one millimeter within 3,000 km of a UTM Zone's
central meridian. The ellipsoid data in this worksheet is for
(WGS 84), which is very close to (NAD 83). [2,3] This
worksheet provides two data entry methods: internal tables and external Excel spreadsheets.
1. INTRODUCTION
In my work as a civil engineer, I usually control a design with an arbitrary, project-specific
horizontal coordinate system that is tied to section corners, property corners, and/or street
centerlines, but is otherwise independent of a larger, external coordinate system. {1} I have
used the State Plane Coordinate System a few times and sometimes I need to provide a
project's approximate latitude and longitude on some regulatory paperwork. {2} However,
until recently, I had never used UTM coordinates, either professionally or personally, or even
given them much thought. {3}
That changed not long ago when I wanted to plot a set of UTM coordinates in Google Earth.
Although Google Earth can use either Lat/Lon or UTM, Lat/Lon (especially in decimal degrees)
is faster to enter because it only requires two pieces of data, while UTM requires four.
Besides, I find it easier to think in terms of Lat/Lon when working with a globe. So, I began
searching for ways to convert UTM to Lat/Lon. {4} In my search, I found several online
calculators that can handle one coordinate point at a time, a downloadable Excel Spreadsheet
that can handle bulk data, and a nifty little freeware program called that can
handle both individual and bulk data for coordinate conversions in both directions. {5}
But, where is the fun in that? This task cried out for a Mathcad worksheet. As part of my
research into this subject, I learned that several mathematical methods have been published
over the years for converting between Lat/Lon and UTM. All of these methods provide
millimeter or greater accuracy, which is far better than I need for Google Earth and is even
sufficient for most field surveying. I chose the truncated Krüger series primarily because the
presentation of it in Wikipedia [1] made for the easiest translation into a Mathcad worksheet.
I found one slightly simpler mathematical method, but the only source I found for it neglected
to define one of the variables. I found more accurate methods (a moot point for my
purposes), but the sources were mostly academic papers, which required plowing through
page after page of text and intermediate derivations to extract the relevant formulas. Kudos
to the author of [1] for a clean and concise presentation and a good list of references.
1
Flattening: r ≔ 298.257223563 f ≔ ―= 0.0033528
r
Central meridian scale factor: k0 ≔ 0.9996
False Northing: 7
[ N0 = 0 m or N0 = 10 m , see programs below ]
Calculated Constants
The results for these formulas are diplayed for information only. These results were useful for debugging the
worksheet, but can otherwise be ignored.
f a ⎛ 1 2 1 4⎞
n ≔ ―― A ≔ ――⋅ ⎜1 + ―⋅ n + ― ⋅ n ⎟
2−f 1+n ⎝ 4 64 ⎠
−3
n = 1.67922039 ⋅ 10 A = 6367449.146
1 2 2 5 3 13 2 3 3 61 3
α ≔ ―⋅ n − ―⋅ n + ― ⋅ n α ≔ ― ⋅ n − ―⋅ n α ≔ ―― ⋅n
1 2 3 16 2 48 5 3 240
−4 −7 −9
α = 8.37731819 ⋅ 10 α = 7.60849696 ⋅ 10 α = 1.20348779 ⋅ 10
1 2 3
1 2 2 37 3 1 2 1 3 17 3
β ≔ ―⋅ n − ―⋅ n + ― ⋅ n β ≔ ―⋅ n + ―⋅ n β ≔ ―― ⋅n
1 2 3 96 2 48 15 3 480
−4 −8 −10
β = 8.37732164 ⋅ 10 β = 5.90611086 ⋅ 10 β = 1.67699118 ⋅ 10
1 2 3
2 2 3 7 2 8 3 56 3
δ ≔ 2 ⋅ n − ―⋅ n − 2 ⋅ n δ ≔ ―⋅ n − ―⋅ n δ ≔ ―⋅ n
1 3 2 3 5 3 15
−3 −6 −8
δ = 3.35655145 ⋅ 10 δ = 6.57191319 ⋅ 10 δ = 1.76774600 ⋅ 10
1 2 3
Please note that the following two program functions for converting between Lat/Long and UTM do not check for
erroneous data. In some cases, erroneous data will return an error, but in other cases it won't. Remember the
GiGo principle and double-check your data entries. For example, latitudes must be between 84°N and 80°S, zones
are numbered 1–60, etc. In addition, a bug in Mathcad Prime 3.0 ( asin ( ) = 0 instead of ) means that
a missing UTM coordinate defined as [ ] produces a latitude of zero (incorrect) and a longitude of
(correct). My sample waterfall data includes such a condition. I chose to not error-trap for erroneous data
and so as to keep the program functions as short and simple as possible.
‖ ⎛ Lon_λ + 180 ⎞ |
LL2UTM (Lat_ϕ , Lon_λ)) ≔ ‖ Zone ← 1 + floor ⎜―――――― ⎟⎠ |
‖ ⎝ 6 |
‖ Hemi ← if Lat_ϕ ≥ 0 | |
‖ ‖ Hemi ← 1 | |
‖ |
‖ else |
‖ | |
‖ Hemi ← −1
‖ ‖ | |
‖ N0 ← if Lat_ϕ ≥ 0 | |
‖ ‖N ←0 | |
‖ ‖ 0 | |
‖ else | |
‖ ‖ 7 |
‖ ‖ N0 ← 10 | |
‖ λ0 ← Zone ⋅ 6 − 183 |
‖ ⎛ ⎛ ⎞⎞ |
‖ t ← sinh ⎜atanh (sin (Lat_ϕ))) − ――― 2 ⋅ ‾‾n 2 ⋅ ‾‾
n
⋅ atanh ⎜――― ⋅ sin (Lat_ϕ))⎟⎟ |
‖ ⎝ 1+n ⎝ 1+n ⎠⎠ |
‖ ⎛ t ⎞ |
‖ ξ' ← atan ⎜―――――― ⎛ ⎞ ⎟ |
⎝ cos ⎝Lon_λ − λ0⎠ ⎠
‖ |
sin ⎛⎝Lon_λ − λ0⎞⎠ ⎞
‖ η' ← atanh ⎛―――――― |
‖ ⎜ ⎟
‾‾‾‾‾2 |
‖ ⎜⎝ 1+t ⎟⎠
3
|
‖ |
σ ← 1 + ∑ ⎛2 ⋅ j ⋅ α ⋅ cos (2 ⋅ j ⋅ ξ')) ⋅ cosh (2 ⋅ j ⋅ η'))⎞
‖ j= 1 ⎝ j ⎠ |
‖ 3 |
‖ τ ← ∑ ⎛2 ⋅ j ⋅ α ⋅ sin (2 ⋅ j ⋅ ξ')) ⋅ sinh (2 ⋅ j ⋅ η'))⎞ |
j=1 ⎝ ⎠
j
‖ |
⎛ 3 ⎞
‖ |
‖ E ← E0 + k0 ⋅ A ⋅ ⎜η' + ∑ ⎛⎝αj ⋅ cos (2 ⋅ j ⋅ ξ')) ⋅ sinh (2 ⋅ j ⋅ η'))⎞⎠⎟ |
⎝ j= 1 ⎠
‖ 3 |
⎛ ⎞
‖ N ← N + k ⋅ A ⋅ ξ' + ∑ ⎛α ⋅ sin (2 ⋅ j ⋅ ξ')) ⋅ cosh (2 ⋅ j ⋅ η'))⎞ |
0 0 ⎜ ⎟
j=1 ⎝ ⎠⎠
‖ ⎝ j
|
‖ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
⎛ 2⎞ 2 2 |
k0 ⋅ A
‖ k ← ―― ⎛1−n ⎞ σ +τ
⋅ ⎜1 + ――⋅ tan (Lat_ϕ)) ⎟ ⋅ ――――――――|
‖ a ⎝ ⎜⎝ 1 + n ⎟⎠ ⎠ 2 2 |
‖ t + ⎝⎛cos ⎝⎛Lon_λ − λ0⎠⎞⎠⎞
|
‖ ⎛ ‾‾‾‾‾ 2 ⎞ |
τ ⋅ 1 + t + σ ⋅ t ⋅ tan ⎛⎝Lon_λ − λ0⎞⎠ ⎟
‖ γ ← atan ⎜――――――――――― |
‖ ⎜ ‾‾‾‾‾ 2 ⎟ |
‖ ⎝ σ ⋅ 1 + t + τ ⋅ t ⋅ tan ⎝⎛Lon_λ − λ0⎠⎞ ⎠
|
‖ [ Zone Hemi E N ] |
NOTE: In both preceding program functions, the Point Scale Factor ( k ) and the Meridian Convergence ( γ ) are
calculated, but are not included in the output. This is because [ Lat_ϕ Lon_λ ] and [ Zone Hemi E N ] are all
I need. The calculations for k and γ are provided for those who may want them. To include these two additional
results in the output, simply insert their variables into the arrays in the last line of each program function. Also,
some of the following procedures would need to be modified if k and γ are included in the ouput array.
UTM_ErrCN2Hyp ≔ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
2 2
⎛UTM_ErrCN2 ⎞ + ⎛UTM_ErrCN2 ⎞ = 0.2724
1,1 1,2
⎝ ⎠ ⎝ ⎠
Excellent results that are almost 4x
better than the promised 1 mm.
UTM to Lat/Lon to UTM (double conversion error by program function)
UTM_Err (Z , H , E , N) ≔ ‖ L ← UTM2LL (Z , H , E , N)
‖ U ← LL2UTM ⎛L , L ⎞
‖ ⎝ 1 , 1 1 , 2⎠
‖ ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
2 2
‖ Err ← ⎛U1 , 3 − E⎞ + ⎛U1 , 4 − N⎞
‖ ⎝ ⎠ ⎝ ⎠
84 −180 180
90
60
30
0
-180 -150 -120 -90 -60 -30 0 30 60 90 120 150 180 LatGE ( )
-30
−80 -60
-90
LonGE ( )
Calculations
――――――――――→
Lat/Lon from GE placemark UTM: LLGE ≔ UTM2LL ⎛⎝ZGE , HGE , EGE , NGE⎞⎠
――――――――→
UTM from GE placemark Lat/Lon: UTMGE ≔ LL2UTM ⎛⎝LatGE , LonGE⎞⎠
⟨3⟩⟩ ⟨4⟩⟩
Google Earth UTM conversion "error": UTM_ErrGE1 ≔ ⎡ EGE NGE ⎤ − ⎡ ⎛UTMGE ⎞ ⎛UTMGE ⎞ ⎤
i
⎣ i i
⎦ ⎢ ⎜⎝ i ⎟⎠1 ⎜⎝ i ⎟⎠1 ⎥
⎣ ⎦
―――――――→
Lat/Lon double conversion error: LL_ErrGE2 ≔ LL_Err ⎛⎝LatGE , LonGE⎞⎠
――――――――――→
UTM double conversion error: UTM_ErrGE2 ≔ UTM_Err ⎛⎝ZGE , HGE , EGE , NGE⎞⎠
Results
GE placemark Lat/Lon Lat/Lon from GE placemark UTM
⎡ “MI” ⎤ ⎡ ⎡⎣ 4.7873 −1.3401 ⎤⎦ ⎤ Google Earth's conversions between Lat/Lon and UTM
⎢ “DH” ⎥ ⎢ ⎡⎣ −13.6667 26.2056 ⎤⎦ ⎥ are very close to my own calculations using the
⎢ “CV” ⎥ ⎢ ⎡⎣ −4.3460 −2.0571 ⎤⎦ ⎥ truncated Krüger series. The "error" between the two
⎢ “GL” ⎥ ⎢ [ 2.3403 1.1463 ] ⎥ isn't really an error, just a difference between my
⎢ “ST” ⎥ ⎢ [ 0.0588 4.2593 ] ⎥
method and Google Earth's method, and is measured
⎢ “G1” ⎥ ⎢ ⎡⎣ 2.0645 −2.1155 ⎤⎦ ⎥
PGE = ⎢ UTM_ErrGE1 = ⎢ in tiny fractions of a degree and in millimeters. Part of
“G2” ⎥ [ 2.1460 0.7248 ]
⎥
this "error" is no doubt due to Google Earth's rounded
⎢ ⎥ ⎢ ⎥
⎢
“KR”
⎥ ⎢
[ 3.0970 3.4366 ]
⎥ off values for Lat/Lon and UTM. BTW, I used the word
“RE” [ 0.5652 1.8305 ] "error" (in quotes) because it's shorter than
⎢ ⎥ ⎢ ⎥
⎡⎣ ⎤⎦
⎢ “SP” ⎥ ⎢ 4.2826 −3.4221 ⎥ "difference" and thus fit better where I needed to use
⎢ “MC” ⎥ ⎢ ⎡⎣ −2.4612 3.9112 ⎤⎦ ⎥ it in this worksheet.
⎣ “KF” ⎦ ⎣ ⎡⎣ 0.7783 −4.5629 ⎤⎦ ⎦
The double conversion errors from these somewhat randomly selected points are nearly as
good as to better than those produced with Wikipedia's single data point. At this point, I can
confidently state the obvious: the truncated Krüger series handles Lat/Lon to UTM and UTM
to Lat/Long conversions extremely well and with much more accuracy than I need for use
with Google Earth. Now on to the waterfall data.
Data
Table 1-01-01 (Falls 01-05)
The Frontcountry, Lower Loop, West Thumb to Madison Junction
No10101 Name10101 Zone10101 Hemi10101 East10101 North10101
( ) ( )
1 “Kepler Cascades” 12 1 515460 4921222
2 “Cascade Falls” 12 1 512470 4924431
3 “Unfaithfull Falls” 12 1 510320 4924426
4 “Cascades of the Firehole” 12 1 511515 4940171
5 “Firehole Falls” 12 1 510858 4941739
――――――――――――――――→
N10102 ≔ ⎡⎣ No10102 Name10102 ⎤⎦ LL10102 ≔ UTM2LL ⎛⎝Zone10102 , Hemi10102 , East10102 , North10102⎞⎠
――――――――――――――――→
N10103 ≔ ⎡⎣ No10103 Name10103 ⎤⎦ LL10103 ≔ UTM2LL ⎛⎝Zone10103 , Hemi10103 , East10103 , North10103⎞⎠
――――――――――――――――→
N10104 ≔ ⎡⎣ No10104 Name10104 ⎤⎦ LL10104 ≔ UTM2LL ⎛⎝Zone10104 , Hemi10104 , East10104 , North10104⎞⎠
――――――――――――――――→
N10105 ≔ ⎡⎣ No10105 Name10105 ⎤⎦ LL10105 ≔ UTM2LL ⎛⎝Zone10105 , Hemi10105 , East10105 , North10105⎞⎠
Results
Results
This horse has now been slowly beaten to demise. For those of you who need to perform
Lat/Lon–UTM coordinate conversions, I hope you find this worksheet useful.
NOTES
{1} Project elevations, conversely, are almost always based on an established external
vertical datum using official benchmarks or at worst a good estimate based on a USGS
1:24,000 quad sheet. This is necessary for evaluation of flood plain issues and to properly
control the site grading and storm drainage designs so that adjoining properties are not
adversely affected.
{2} Lat/Lon is easily estimated using either a USGS 1:24,000 quad sheet or Google Earth.
The USGS quad sheets published after about 1992 also include a UTM grid.
{3} Even though USGS quad sheets have a UTM grid and my Garmin Oregon 450T GPS has
the ability to work in UTM, I have always used Lat/Lon with my GPS. My recent researches
indicate that most emergency services use UTM, so it appears that using UTM with my GPS
makes more sense from here on out.
{4} For years, I have been able to ignore the UTM system and its coordinates, but then a
book about waterfalls forced my hand. You see, one of hobbies is waterfalls. Waterfalls are
my favorite destination for a hike and one of my favorite subjects to photograph. As a life-
long geography buff and a practicing civil engineer specializing in hydraulics, my attraction to
waterfalls is natural.
When I was in college in the late 1970s, I decided to begin a list of waterfalls in California,
augmented by major waterfalls elsewhere. I started in the map library at Fresno State, where
I quickly learned how daunting a task this would be. It takes approximately 2,700 USGS quad
sheets (1:24,000, 7.5x7.5 arcmin) to cover the entire state and the printed USGS gazatteer
for California is inches thick. For the time being, I decided to limit myself to the maps and
atlases in my modest, but growing collection (by 1980, I had about 1,000 printed maps in my
collection, but relatively few topographic maps; today, I estimate my collection at about
3,000 printed maps).
By the late 1980s, I had a personal computer (which made list keeping much easier) and the
Internet was gaining traction. Eventually, the quad sheets and state gazatteers were made
available online, but free time for this project was at a premium due to family and work.
However, I plugged away at it as time permitted and my waterfall tally grew into the
hundreds.
Then came Google Earth, which afforded me the opportunity to make placemarkers for the
waterfalls in my list as well as to cruise around and find waterfalls all over the Earth (often
using Panaramio images as locators). I now have several thousand waterfalls located in
Google Earth. However, my here-and-there project to tally waterfalls pales in comparison to
the World Waterfall Database (http://www.worldwaterfalldatabase.com/), which is the most
extensive waterfall database on the planet (although I have a few waterfalls they don't have).
{4, cont.} So, what does this have to with UTM to Lat/Lon conversions? Well, about six
years ago, while on a trip to Yellowstone National Park, I purchased a most excellent book
titled, "The Guide to Yellowstone Waterfalls and Their Discovery," by Paul Rubenstein, Lee H.
Whittlesey, and Mike Stevens [12]. This book begged to have all 291 waterfalls placemarked
in Google Earth. Unfortunately, the authors used UTM and I prefer to use Lat/Lon in Google
Earth. By the time I purchased the book, I had already placemarked more than half of these
waterfalls based on my own knowledge of Yellowstone and by just poking around in Google
Earth. Thus the real purpose for creating this worksheet: to convert waterfall UTMs to Lat/
Lon so I can find the rest of them and placemark them in Google Earth. Those of you with
more important reasons to make Lat/Lon–UTM conversions will also benefit.
{6} The list of Backcountry waterfalls is so long that splitting the list at the third outline level
would be necessary to keep the tables from being too long to fit on a single page. So, for
consistency, I am using the third outline level here, even though the Frontcountry waterfalls
could just as easily be grouped at the second outline level (21 waterfalls, followed by 11
waterfalls). Another reason to break up the data into smaller chunks is that short tables are
easier than long tables to work with when it comes to page breaks . Here and in my Excel
spreadsheet, I have labeled the tables (and ultimately the waterfalls) using a four-part
numeric system based on the three outline levels in [12], plus the waterfalls. I did not use a
potentially shorter alphanumeric code because I wanted to avoid certain mid-alphabet letters.
{7} The first column read in from the Excel spreadsheet is my four-part code of identifying
the waterfalls in accordance with the organization of [12].
REFERENCES
[1] Universal Transverse Mercator Coordinate System:
http://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate_system
[4] United States Geological Survey, Professional Paper 1395, "Map Projections, A Working
Manual," 1987.
[5] Defense Mapping Agency (United States), DMATM 8358.2, DMA Technical Manual, "The
Universal Grids: Universal Transverse Mercator (UTM) and Universal Polar Stereographic
(UPS)," September 1989.
[6] Ordinance Survey (United Kingdom), "The ellipsoid and the Transverse Mercator
projection," Geodetic information paper No. 1, Version 2.2, February 1998.
[8] Kawase, Kazushige, "A General Formula for Calculating Meridian Arc Length and its
Application to Coordinate Conversion in the Gauss-Krüger Projection," 2012 (?).
[9] Karney, Charles F.F., "Transverse Mercator with an accuracy of a few nanometer," SRI
International, February 3, 2011.
[10] European Petroleum Survey Group, "Guidance Note Number 7, Coordinate Conversions
and Transformations including Formulas," 2003.
[11] Osborne, Peter, "The Mercator Projections, The Normal and Transverse Mercator
Projections on the Sphere and the Ellipsoid with Full Derivation of all Formulae," 2013.
[12] Rubenstein, Paul, Whittlesey, Lee H., and Stevens, Mike, "The Guide to Yellowstone
Waterfalls and Their Discovery," Westcliffe Publishers, Englewood, CO, 2000.
GLOBAL DEFINITIONS
Note: the angular definitions are not used in the worksheet, but are provided in case the user
needs to convert from decimal degrees to degrees–arcminutes–arcseconds.
1 1
≡1 ≡ ≡― ≡―
60 60