Blog


Universal Transverse Mercator (UTM)

A side project that I'm currently working on, involving maps, had a bit of data that I was unfamiliar with. I'll start by saying that I'm very familiar with Latitude/Longitude - it's something that everyone learns in school. However, the data that I was provided with was of an entirely different sort and labeled as 'Easting' and 'Northing'. A couple Google searches later brought me to a an article explaining the concept of something called Universal Transverse Mercator (UTM). The article is very math heavy, but the premise is: The earth is broken down into tiny 'zones' around the ecuator and extending northing and south. Within these zones a measurement, in metres, is taken both to the north and to the east of the ecuator. So your final figure is something like Zone: 17, Easting: 300,000, Northing: 4,000,000 (I just made those numbers up). The reasoning for this is that if your measurements are within a tinier 'slice' of the world, your results immediately become more accurate (especially considering the curvature of the earth). Here's a figure showing all the different zones, taken from this page on different coordinate systems:

Now, using that chart above I determined the zone in which I needed to run all my coordinates through - but the problem is: How to convert them into Lat/Long - which every piece of mapping software understands. There are a number of Java Applets which will do this task, but I wanted something that I could automate. This is where Perl, as always, comes to the rescue - there is a module for it! The module is very lightweight, it simply implements the algorithms specified in the article, mentioned before. Useing that module I was able to quickly run through my data and get perfect numbers out - concluding my UTM adventure. As always, more information can be found on Wikipedia.

Tags: maps, geography, data, conversion, utm, geo

JavaScript Books

Secrets of the JavaScript Ninja

JavaScript Secrets

Secret techniques of top JavaScript programmers.

Pro JavaScript Techniques

Pro JavaScript

The best techniques for professional JavaScript. Published by Apress.

Micro Updates

John Resig Twitter Updates

@jeresig

Infrequent, short, updates and links.

JavaScript Jobs



Hosting provided by: Ruby Hosting by Engine Yard