Reverse Geocoding | How to Convert Lat Long to an Address
Geocoding starts with a street address and gives you back the corresponding latitude & longitude point (a geocode). Reverse geocoding starts with a latitude & longitude point, and gives you back the corresponding street address. Even though reverse geocoding can come with challenges, we’re going to answer all your questions so that you become a certified geocoding guru.
Table of Contents
- What is the difference between geocoding and reverse geocoding?
- Levels of accuracy
- How to reverse geocode a geocode into an address
- Batch reverse geocoding
- Service providers for batch and API
What Is the Difference Between Geocoding and Reverse Geocoding?
Geocoding starts with an address and gives you back a latitude/longitude point (a geocode). Reverse geocoding starts with a latitude/longitude point, and gives you back an address.
For example let’s say that you live at the top of Mount Everest. Which, first of all, is very cool - way to get a place with a view.
Your address would be formatted something like:
111 Summit Circle, Apt. 32A, Mt. Everest, Nepal.
Geocoding would take this address and replace it with the corresponding geocode, which is the latitude and longitude coordinates of the address. The geocode for your address on Mt Everest would be:
This geocode represents an exact point on the earth. A mailing address is not an exact point on the earth. Consequently, a geocode can be a much more accurate description of where you live. The process of converting an address into a geocode, is called ‘geocoding’. So, what then is reverse geocoding?
Reverse geocoding is the process of converting a geocode into an address.
If we started off with your geographic latitude and longitude coordinates (or geocode) of:
reverse geocoding this geocode would give us back your address of
111 Summit Circle, Mt. Everest, Nepal.
This address data would then be referred to as your ‘reverse geocode’.
You might be saying, “Awesome. Got it. But who cares? What does geocoding and reverse geocoding do for me?” To which I would reply, “Welcome to the next section of this document. You’re asking the exact question I wanted you to ask.”
Geocodes can give accuracy for geographic information that a regular address may not be able to provide. For instance, let’s imagine that your Mt. Everest home is actually part of a spread out apartment complex.
If someone were to try to deliver a package to your apartment, the address would lead them to the address of the complex but not the location of your unit. To make matters worse, addresses don’t prominently display unit numbers. Now, it becomes difficult to locate the address.
A geocode provides additional location-based accuracy. Having the latitude and longitude would pinpoint the exact location. Higher level of accuracy better guarantees you are getting the right addresses and the most correct geocodes. Of course, this depends on the accuracy of the reverse geocoding web services that you’re using.
Levels of Accuracy
Geocoding’s helpfulness is contingent on the accuracy of the geocoding service that you’re using. Within the geocoding industry there are different levels of accuracy. So, we would advise checking whatever service you’re using to ensure that they are parsing to the level that you need. The different levels of reverse geocoding accuracy are:
- Rooftop: The highest level of geocode accuracy available. Just as the name implies, these coordinates have been verified as the rooftop of the location in question. This data is often obtained via interpolation. Rooftop location is calculated based on known coordinates of nearby roads. Learn more geographically interpolated data.
- Parcel Centroid: Locates the center of the parcel or property. This is not rooftop accuracy, but it at least has been verified to hit the property, and the geocodes are likely close to the middle of the parcel.
- Thoroughfare: The geographic data has been verified down to the thoroughfare or street-level. The exact location of the property is not identified. Rather, this level of data means that you are ‘close’ But, its exact location cannot be verified.
- Locality: The data is verified to the level of the city or town. The lookup in question has been determined to be in a particular city or town, but the location cannot be specified any more precisely.
- Administrative Area: The lowest level of geocoding accuracy. The location in question can only be parsed to be in a particular state or province.
Before you commit to a particular bulk geocode service or API service provider, we suggest running several sample street addresses to ensure the level of accuracy matches what you need. Take note: many reverse geocoding companies will advertise they are “rooftop level accurate” when they aren’t. Rather than believing their sales copy, test a sampling of your addresses and see for yourself.
How to reverse geocode a geocode into an address
We know what a geocode is and how geocodes can help us. We have learned about the differing levels of accuracy with geocoding. Let’s dive into how you can reverse geocode a geocode into a street address with house number, street name, city name, postal code, country code, geonames, and other Geo place names. This gives us the location intelligence needed.
Step 1: Get your geocode
Coordinates commonly display in two formats. First as latitude and longitude the way a human understands and contain the degree symbol (°) and includes indicators for North, East, South and West. The other displays as a numeric shorthand that a computer better understands.
The more human understandable format for Mt. Everest would look like this: 27°59’16.3”N 86°55’30.1”E.
The more the computer understandable format looks like this: 27.987850, 86.925026.
Not a huge difference but not all geocode systems can interpret the human understandable format. So, make sure you get the computer understandable coordinates.
Step 2: Enter the geocode into a reverse geocoding engines
Geocoding engines are oftentimes referred to as a lookup, a converter, or as a finder service. For this example, we’ll use Nominatim OpenStreetMap.org’s reverse geocoding lookup service. In 5 easy steps you will have your reverse geocode.
1. Visit their website
2. Enter the geocode obtained previously. For this example, we will use “39.999344, -76.637082”
3. Click “Search”
4. The results will show up on the left. Just click “Details” below the desired result.
5. You will be able to see everything you need in the “Address” section.
Now, you’ll notice in the above example, OpenStreetMap was able to parse to the level of the correct street rather than the actual rooftop of the house we were trying to pinpoint. This would be an example of ‘Thoroughfare’ accuracy.
And there you have it! We just reverse geocoded. It feels good, doesn’t it?
Batch Reverse Geocoding
It’s simple enough to reverse geocode one address, but what do you do if you want to convert a lot of geocodes into addresses?
You could manually process each geocode one at a time, but at that rate you might as well just rack up your sky miles and go visit each location in person. I mean, who has the time to reverse geocode hundreds, thousands or even hundreds of thousands of geocodes into addresses, individually?
To process many geocodes quickly, you’ll want to perform batch reverse geocoding. To do that, you’ll need to use a batch reverse geocode service provider that allows uploads with a CSV file. You might also want to find a provider of a reverse geocode API.
Service providers for batch and API
There are a number of notable companies that provide batch reverse geocoding. The services from these companies range in cost and quality, but we’ll discuss the positives and negatives of two of the more prominent providers: Google and OpenStreetMaps.
Google Reverse Geocoding
One of the most famous reverse geocode converters is, of course, Google. After all, who hasn’t heard of Google Maps? And, because they do maps, Google also does batch geocodes and reverse geocoding via API.
Like most geocoding providers, Google provides coverage for over 200 countries and territories, but the level of geocoding accuracy varies from country to country. For example, geocoding spatial data for the United States can often be ‘rooftop’ level precision. Geocodes for China are notoriously inaccurate and can often only be verified to the administrative, or state/province level.
It is worth noting that Google’s reverse geocoding API does not gather as many data types about certain coordinates as their user-facing reverse geocoder built into Google Maps. This means the Google API, which you can purchase, tends to be less accurate than their internal Google Maps. So, we would recommend that you take the API for an accuracy test drive before committing to it. If you were to only test their user facing reverse geocoder, you would only get part of the story.
In addition to geocodes from their mapping service, Google provides a data source for ‘Routes’ and ‘Places’. But, this data does come with some limitations. Specifically, users are limited to only 50 server-side requests per second. Which means crunching through a lot of data can be time-consuming.
So the benefit of using Google is that you’re using the company behind Google Maps - a product known for its usefulness and accuracy. The downside of using Google’s API is that you’re not getting the same accuracy that Google Maps provides. And, Google doesn’t validate that the address they return to you is an actual, real address.
OpenStreetMaps is another prominent provider of geocoding data. The OpenStreetMap project is built by a community of mapping professionals that all collaborate to provide geographical data from around the world.
The nice thing about OpenStreetMap is that it is kind of a Wiki: it’s free and it’s maintained by individuals who are dedicated to the cause. The downside is that it requires you to credit OpenStreetMap and its contributors if you use the web service. So, if you need reverse geocodes for any type of proprietary business process, you are going to need to look for another provider.
Additionally, when dealing with volunteers on an enormous project like reverse geocoding the world, geographic data accuracy can vary greatly from coordinate to coordinate. So, test out several addresses before committing to a batch or API service provider.
To sum up, reverse geocoding is the practice of putting in a set of latitude and longitude coordinates and getting the corresponding address. Accuracy levels can range from rooftop down to administrative area. By knowing this, you can seek out the right reverse geocode service provider for your needs, and even find one that provides batch or API services. We recommend testing the product first to guarantee that the level of accuracy provided matches the level of accuracy needed.
Now, get out there, and find the best reverse geocoding address locator service (single address, batch or API) that fits your needs and start converting lat long to addresses!