Personal tools

Convert an Address to Latitude and Longitude

From Wired How-To Wiki

Jump to: navigation, search

You can pinpoint any place on Earth using a single set of coordinates: latitude and longitude.

These coordinates, often called a lat-long or latlon, look like a string of numbers. At first glance, it's confounding that anyone would take a human-readable address and turn it into a bunch of numbers that are nonsensical to most people outside the field of cartography. But once you have those numbers, you'll be able to plug them into a web map, GPS or other mapping device and find what you're looking for in an instant -- no matter where on the planet it is.

Image:latlong grid.png

The coordinates are similar to the Xs and Ys you used to plot in algebra class. Imagine if the surface of the Earth could be stretched flat. The horizontal x-axis is the equator, while the vertical y-axis is the Prime Meridian, which runs through the Greenwich Observatory in England.

This article's address is on the How-To wiki. If you have something to add, log in and edit this page.


Convert Using a Website

There are many websites that will take an address and convert it to a point. Google Maps, for example, has to do this whenever you type a location into its search box. It, however, does not make it easy to get the latitude and longitude of the resulting location. Instead, we'll use GetLatLon, a simple site made for this explicit purpose.

Image:latlong address.png

The website asks for a "place name," such as a city, but you can type in many things. You can use a postal code, an airport code or a full address. When you click the "Zoom to place" button, the map below will update to show the location.

Even better, the text below the map will update with the coordinates you were after.

Ditch the Address, Use a Map

You can also use GetLatLon to find coordinates without an address. First, enter a place name to begin, or zoom in manually (which can be tedious). As in the previous section, there are many things you can type in, so use something near your location.

Next, I like to switch the map to satellite or hybrid mode by clicking the map type. That shows some non-street features.

Image:latlong maptype.png

Once you've switched map types, click and drag the map around, zeroing the cross-hairs (plus sign) on the spot you want. I chose home plate of a baseball diamond, something that has no address. Yet, the text below the map updates to the correct latitude and longitude of that exact point.

Get Results in XML

Are you a little more technically inclined and want a solution that's a bit more automated? You can find the latitude and longitude of an address with an URL that will send XML back to you. You can view the markup in a browser, or write a program to parse it for you.

Again, there are several options, but the most prominent are solutions from Google and Yahoo. In each case, you'll need an API key, which is a special code to track your usage (the services only allow a certain number of thousands of queries per day).

Since this method is a little more complicated than the others, we'll point to Webmonkey, our web developer resource, for more detail:

Geohashing and Geolinking

A geohash is a hashed version of a Latitude and Longitude and results in a reversible string that identifies a position on the planet. provides one means of a geohash, and uses a bit interleave method that actually defines a region of accuracy based on the length of the hash.

A geolink is a geohash as part of a URL. is a slightly different and new service that uses a geohash combined with a short URL to both identify the location, and provide a map, data, and other information about that linked region. Since is a linking service it's usefulness grows as more people use it. also optimizes the 1st character to identify an approximate sudo timezone first so time based analytics can be performed.

With both geohashes and geolinks allow for locations to be grouped hierarchically so for example the geohash #abcde & #abcdg are both related to their parent area #abcd.

In The Future

Will we still need these crazy latitude and longitude points in the future? Certainly, there will always be the need to understand how to plot the locations around us. However, we are already seeing a movement toward maps that allow you to explore the world without needing to know the underlying details.

GPS is coming on more phones and other computerlike devices now. We'll soon be able to mark places we've been and share those with others. And you'll need to know nothing about latitudes and longitudes. But aren't you glad you learned anyway?

This page was last modified 17:32, 30 December 2009 by jdavid. Based on work by ralfred and howto_admin.

All text and artwork shared under a Creative Commons License.



Create an Article