UTMy: Converting UTM Geodata to Latitude / Longitude

UTM, or Universal Transverse Mercator, encoded geodata seems to be very common in some of the datasets I am playing around with from data.gov.  In order to make that data useful to me and play well with the other data I have gathered I need it in the more standard lat / lng format we web people are used to.

While I found several open source packages that look like they handle UTM data, I didn’t find all that much that was suited to simple conversions.  Thus was born UTMy, a small set of Ruby scripts that convert UTM to Lat / Lng points.

I won’t try and type out a full UTM tutorial as there are several found with a quick search, but one thing that needs to be noted if you are new to it is that there are many different types of UTM.  (insert groan here)

UTM geodata consists of points on a gird of a Mercator projection.  There are lots of different Mercator projections that can be used in this roll, and organizations will often pick one more suited to their needs or specific geography.  Therefore, before using this or any other script to convert your data you will need to know what projection you are dealing with.

UTMy offers support for NAD 27 and NAD 83.  WGS84 is another common format, and it appears to be functionally equivalent to NAD 83 so the scripts should be safe with that data as well.

NAD 27 and NAD 83 are two common flavors of UTM used in North America, and you will frequently find them used in data released by the US Federal Government.  The “27” in NAD 27 refers to a 1927 standard based on a projection calculated in 1866.  Yeah.

Much of the math in UTMy is based on Sami Salkosuo’s excellent article on the IBM website at http://www.ibm.com/developerworks/java/library/j-coordconvert/

UTMy is modular, so other projection systems should be easy to incorporate.  I haven’t added any others because I am not working with any other datasets at the moment.

Its up on Github: https://github.com/mschwar99/UTMy

If you aren’t familiar with Github and are just looking for a download, just look in the upper right hand corner of the page for the download link.

Happy geocoding.

Posted in Geekery, Hackery
0 comments on “UTMy: Converting UTM Geodata to Latitude / Longitude
1 Pings/Trackbacks for "UTMy: Converting UTM Geodata to Latitude / Longitude"
  1. […] make use of this data I built a few ruby scripts that carry out the conversion between UTM and our standard, loveable lat / […]

Leave a Reply

Your email address will not be published. Required fields are marked *