UPDATE: I have increased the number of points to trigger this feature from 100 to 500.
Publishing a map with hundreds or even thousands of markers can be problematic. Your maps may look like they are drowning in a sea of markers. Yesterday we rolled out a new feature that will help publishers with this problem.
Maps containing over 300 points with no groups assigned will have marker clustering enabled. This feature is thanks to the Google Maps Utility library. Below is an example.
Please post feedback on this feature here. I am still trying to sort out when is the appropriate time to have this feature turn on. I would rather not have to make it a toggle as I am interested in keeping things as simple as possible from an end user standpoint.
Most of us have access to our exact location at any moment through the GPS on our smartphones. However, the location that’s calculated comes in the form of geographic coordinates: latitude and longitude, a pair of numbers that describe a precise point on Earth. The process of converting coordinates to more human-friendly addresses is called reverse geocoding.
BatchGeo does not support reverse geocoding, although we can help you plot latitude and longitude as markers on a map or use forward geocoding if you already have addresses. However, if you’re looking for reverse geocoding, you have plenty of options. Whether you have a single pair of coordinates or a spreadsheet full of them, you can reverse geocode them into addresses.
In the remainder of this post, we’ll cover how reverse geocoding is different from forward geocoding, how you can use reverse geocoding to find an address on a map, and where you can find reverse geocoding APIs.
Forward vs Reverse Geocoding
Typical geocoding is also called forward geocoding, which is converting an address into latitude/longitude coordinates. For example, BatchGeo takes multiple addresses from a spreadsheet to batch geocode addresses on a map. One by one, each address is forward geocoded into coordinates, which are then plotted.
By contrast, reverse geocoding goes the other direction. Mappable and machine-readable geographic coordinates are converted into human-readable addresses. Specifically, a reverse geocoder will find the nearest, best address for a particular set of coordinates.
Many geocoders work with databases accessing segments of streets. Based upon known locations of specific nodes (often located at each intersection), latitude and longitude can be estimated. With reverse geocoding, nearby nodes are queried, then addresses approximated. Some geocoders use more accurate parcel centroid algorithms. In both cases, the output is the same: forward geocoders produce coordinates from addresses; reverse geocoders produce addresses from coordinates.
Find an Address on a Map
The map software on your smartphone may already have reverse geocoding built-in (see what is my location right now?). However, if you often want to find an address from coordinates, you’ll want to use a reverse geocoder.
Reverse geocoding is a quick three-step process:
Find latitude and longitude coordinates for a location
Send the coordinates to a reverse geocoder API
View the response directly or parse the data with a programming language
While some open source geocoders may be able to run locally, the absolute easiest way to reverse geocode is to find an API. For small numbers of reverse geocoding requests, it may even be free. Some options are covered in the next section.
Find a Reverse Geocoder API
Once familiar with the general approach of reverse geocoding, you may want to convert latitude/longitude coordinates to nearby addresses yourself. To do this, you’ll need to use a reverse geocoder API.
BatchGeo uses Google Maps to visualize your spreadsheet data locations. To turn addresses into coordinates, BatchGeo uses the Google Maps forward geocoder. Google Maps also has a reverse geocoder API, which accepts latitude and longitude as input.
The Google Maps documentation has details that you’ll want to check out, but here’s the quick overview that you can try right in your web browser:
Copy and paste the above URL, replacing YOUR_API_KEY with your own from the Google Cloud Console. You should be able to make a minimum number of calls to the reverse geocoder for free. Once your API key is enabled and included in the above URL, you’ll get a result like the following:
While many of the details have been removed from the response, you can see the most important part: the full address is available as formatted_address within each result. In this case, we see the latitude and longitude coordinates are at the headquarters of another large tech company, Apple.
The address_components field includes the individual pieces of the address, such as street number, street name, and city.
You can follow a similar process for other reverse geocoding APIs. Here is a full list for your research and consideration:
Using any of these services, you can convert your latitude and longitude coordinates—from mobile devices, GPS logs, or other sources—into the nearest addresses. These more human-readable locations provide a better user experience and match the expectations of a place.
Now that you’ve seen geocoding done the hard way, see how quickly you can make a map using BatchGeo. Simply copy and paste any locations—street addresses, latitude/longitude coordinates, or even city names—and get an interactive map in almost an instant.