Reverse Geocoding | What it is and how to do it
Reverse Geocoding is the process of converting a set of coordinates, like latitude & longitude coordinates into the nearest street address and sometimes into the nearest place name or landmark. Reverse geocoders usually provide a list of the closest address candidates with each set of coordinates.
Reverse geocoding is useful in many cases, such as delivery updates, location-based advertising, emergency response systems, and movement behavior-based analysis.
Ready to reverse geocode? Enter your latitude and longitude coordinates into the fields on the US Reverse Geocoding API Demo page, click “View API Response” and see the closest 10 address matches to your coordinates sorted by distance (in meters). The “coordinates” section after each address also provides the most accurate geocode we have available for the structure. No programming knowledge is required. More detailed instructions with screenshots can be found below.
|US Reverse Geocoding API Demo||US Forward Geocoding Demo||Reverse Geocode API Docs|
In this article, we'll cover:
- What Is the Difference between Address Geocoding and Reverse Geocoding?
- Accuracy Location Types
- How to Get an Address from Latitude and Longitude Coordinates (Reverse Geocoding)
- Batch Reverse Geocoding
- Batch Reverse Geocoding and API Services
What Is the Difference Between Address Geocoding and Reverse Geocoding?
Address Geocoding or geocoding starts with address components and returns the most accurate geographic coordinates. Reverse geocoding starts with a geocode, and returns the single nearest address or maybe even a list of the nearest addresses in the reverse geocoding response
For example let’s say we are doing international geocoding and you live on Mount Everest. Which, first of all, is very cool. Way to get a place with a view.
Your address would be formatted something like this:
111 Summit Circle, Apt. 32A Mt. Everest, Nepal
Address Geocoding would take this street address and return the corresponding geocode (latitude and longitude coordinates). 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 is reverse geocoding?
Reverse geocoding is the process of converting a geocode into an address.
If we started 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 say, “Awesome. Got it. But who cares? What does address geocoding and reverse geocoding accomplish for me?” To which we would reply, “Welcome to the next section of this document. You’re asking the exact question you should 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 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 web services that you’re using.
Accuracy Location Types
Geocoding’s helpfulness is contingent on the accuracy of the geocoding service that you’re using. Within the geocoding industry, there are different location match types. So, we would advise checking whatever service you’re using to ensure that they are matching the level that you need. The different levels are:
- Rooftop Geocoding: The highest level of 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.
- 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 reverse geocode 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 service or reverse geocoding API, we suggest running several sample street addresses to ensure the level of accuracy matches what you need. Take note: many reverse geocoders will advertise they are “rooftop level accurate” when they aren’t. Rather than believing the hype, test a sampling of your addresses and compare.
How to Get an Address from Latitude and Longitude Coordinates (Reverse Geocoding)
Here's how to get the closest street address to a set of GPS or lat-long coordinates. The address will be broken up by address components including building number, street name, city name, state abbreviation, and ZIP Code (postal code). Here are the basic steps.
- Make sure your geocode coordinates are properly formatted. e.g. 27.987850, 86.925026
- Go to the reverse geocode API page.
- Enter your geocode into the latitude and longitude fields.
- Click the “View API Response” button.
- View a list of closest addresses to your coordinates in “API Response” field.
- (Optional) Format reverse geocoded address list into CSV or Excel spreadsheet format.
And here is each step in greater detail. We included screenshots for clarity too.
Make sure your geocode coordinates are properly formatted. e.g. 27.987850, 86.925026
Coordinates commonly show up in one of two formats. First, as latitude and longitude in the way that humans understand. These contain the degree symbol (°) and include indicators for North, East, South, and West. The other displays as a numeric shorthand that a computer better understands.
For example, the human-readable address format for Mt. Everest would look like this:
The machine-readable address format looks like this:
Not a huge difference but not all geocode systems can interpret the human understandable format. So, make sure you start with machine-readable coordinates.
Go to Smarty's reverse geocode API page.
Enter your geocode into the latitude and longitude fields without the comma.
For the example, we will use these coordinates:
View a list of closest addresses to your coordinates in the "API Response" field.
A list of the 10 closest address results will show on the right in the “API Response” field, sorted by distance (in meters) from your geocode. The addresses displayed are all validated and standardized.
Smarty also provides the best available geocode for the nearest addresses. The level of accuracy attained will also be listed. In this case, the geocode is rooftop accurate.
Here is the original geocode we entered and the geocode that Smarty gave back in the API's reverse geocoding response. This is an improvement of 38.4 meters (126 Feet).
(Optional) Format reverse geocoded address list into CSV or Excel spreadsheet format.
Would you prefer to format the address results as a CSV or for a spreadsheet program like Excel or Google sheets? No problem, just copy the code in the “API Response” field and paste it into this tool that converts JSON to CSV or Excel format.
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 if you want to search thousands of geocodes at once?
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 geocodes more effectively, 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 or Excel spreadsheet. You might also want to find a provider that accepts batch requests via reverse geocode API.
Batch Reverse Geocoding and API Services
There are a few 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 web-based providers: Google and OpenStreetMaps.
The Google Reverse Geocoder
Google's reverse geocoding is well known. After all, who hasn’t heard of Google Maps? And, because they do maps, they also have a reverse geocoding API. The API doesn't allow spreadsheet or CSV uploads to batch geocode or batch reverse geocode. However, batch geocoding is possible via their API with some custom coding.
Like many online reverse geocoding providers, Google provides coverage for over 200 countries and territories, but geocoding accuracy varies from country to country. The quality of geocodes is dependent on the data available in each country. For example, geocoding spatial data for the United States facilitates “rooftop” level precision. On the other hand, geocodes for China are notoriously inaccurate and can often only verify down to the administrative or state/province level.
It’s worth noting that Google’s reverse geocoding API doesn’t gather as many data types about specific coordinates as their user-facing reverse geocoder built into Google Maps. So, the Google Geocoding API tends to be less accurate than the freely offered Google Maps. So, we recommend you take the API for an accuracy test drive before committing. If you were only to test their public-facing reverse geocoder, you would only get part of the story. You can also check out our article, where we compare a few of the best geocoding APIs.
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. This 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 the Google Geocoding API is that you’re not getting the same accuracy that Google Maps provides. And Google doesn’t validate that the address provided in their reverse geocoding response is an actual, real address. While Google recently launched an address validation product, Google Address Validation is noticeably absent from other Google Maps Platform APIs , including Google's address autocomplete API, geocoding API, places API, and others.
OpenStreetMap Reverse Geocoding
OpenStreetMaps is another prominent provider of geocoding data. The OpenStreetMap project is built by a community of mapping professionals who 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.
Smarty Reverse Geocoding
The Smarty US Reverse Geocode API is world-class. You can submit single reverse geocoding requests through our demo or batch reverse geocode addresses via the US Reverse Geocoding API. Our reverse geocoder offers several advantages. Here are key reasons people choose Smarty.
Speed - Remember how Google rate limits you to 50 reverse geocodes per second? That is great if you only need a handful of geocodes for your neighborhood picnic. What if you had 200 billion geocodes like telecom providers get every few weeks? It would take 127 years to geocode all those coordinates. By then, the data would no longer be useful.
Smarty offers plans that include speeds exceeding 100,000+ reverse geocode lookups per second. As in, 2,000 times faster than Google's 50 lookups per second. If Google was “Around the World in 80 Days”, Smarty would be “Around the World in Less Time Than It Takes to Watch Lord of the Rings: The Return of the King, and No, Not the Extended Edition, Just the Regular One”. Maybe that is a long title, but it is accurate.
Accuracy - Accuracy matters. Hyper-accuracy rocks. When Smarty reverse geocodes, we give you the nearest addresses to your coordinates. We also provide the most precise geocode we have for your addresses. So, you give us a geocode, and we give you back the nearest address and a rooftop geocode when possible.
Cascading Resolution - When we reverse geocode, we provide the most accurate addresses available. We offer rooftop accuracy for the vast majority of geocodes. If we can’t find a requested geocode, we cascade down to the next levels of accuracy until we have a geocode. Most importantly, we tell you what level of accuracy we achieved; you aren’t left guessing.
We Don't Guess - Guessing and geocodes don’t play well together. Even still, there are online geocoding providers whose geocodes are about as accurate as dropping darts from space while blindfolded. These providers do their best to give you a geocode for your requested addresses where possible. When they fail to provide the requested geocode, they give their best guess which can be hundreds of miles off.
Geocoders who guess cause business decisions based on bad data. You would prefer that a provider say “we don’t know” rather than taking shots in the dark.
Like other providers, Smarty does everything possible to give you the most accurate geocode possible. When we aren’t sure, we won’t guess. Instead, we tell you that we don’t know. That way, you aren’t making business decisions based on bad data.
Valid, Standardized Address - Smarty was born as an online provider of address validation software. Because validation is our first love, we baked it into our Geocoding and Reverse Geocoding products.
Forward geocoding an address with Smarty, we standardize the address and verify each of the address components to make sure the address is real and correctly formatted. Then, we give you the Geocode. With reverse geocoding, we only match your geocode with valid addresses. And of course, we also give you the address in that same standardized format.
The best geocoding originates with top-notch address validation. If a provider doesn’t do address validation or relies on open source data, you will frequently receive false positives. That is why we chose to develop our geocoding tools. We are the industry leader in address validation. And as such, we can provide some of the most accurate geocodes available.
GIS buffs can even use our free QGIS Geocoding Plugin to standardize, validate, and geocode addresses one at a time before plotting them on maps for spatial analysis. With a paid subscription to our Rooftop Geocoding API, batch geocoding and plotting via CSV upload is easy to do. A speed of 600-700 geocodes per second is possible through the QGIS plugin. If the fully interactive geocoding tools in QGIS aren't fast enough, just consume our APIs directly with US Rooftop Geocoding Plans capable of 100,000+ addresses per second in the cloud.
Easy, Reliable Implementation - When you write the code to consume our APIs, you want it to work correctly all the time.
We are so dependable that the Greenwich Royal Observatory sets its clocks based on our uptime. The 1988 Toyota Hilux uses Smarty as its powertrain. Our software was a crucial component of the flux capacitor ( we were not consulted on the DeLorean though). We were used in the development of the Nokia 3210. Our APIs have even been shown to violate the second law of thermodynamics and exhibit “reverse entropy”. Many scientific papers are forthcoming.
How did we become so reliable? Here’s how:
- Redundant data centers operating in multiple regions of the US
- Redundant server monitoring
- Data centers that scale to near infinite levels based on load
- Employees that are exclusively descended from George Washington
So, when you start using our APIs, don’t be surprised when you find them to be the most trusted components of your systems too.
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-accurate down to the administrative area. By knowing this, you can seek out the right reverse geocoder services 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, start using our reverse geocoding API and start converting lat-long to addresses!