Geo Coding

May 29, 2019 3 min read

Geo Coding

What is geocoding?

Geocoding is the process of translating between the way humans communicate locations and the way machines communicate location.

 

So here is what I mean by that. We humans also most never talk about location in terms of geographic coordinates. Hey, meet me at 36 degrees, 12 minutes and 34.6 seconds N, 115 degrees, 11 minutes and 55 seconds W this would be significantly less helpful than saying meet me at North Las Vagas Airport if you were talking to a fellow human. But if you are giving a machine, let us say a GPS, a destination that you wanted to navigate to then using geographic coordinates would be appropriate.

The first thing we need to understand is that people talk about the location at many different scales, or abstraction levels and there is not one right answer. For instance, I am on the planet, in the northern hemisphere, in Europe, in Denmark. These are all correct, answers to the question of what is my location. Add to the mix different langures, addressing systems and maybe even local landmarks and you have a lot of very different way of talking about where the location of something is.

 

But this is not the way machines talk about location. Devices that we use to collect and process location data do so in terms of X and Y coordinates. X and Y coordinates are an extremely effective way for machines to store, collect and communicate location to other machines, however when it comes time to translate that information into something we humans can understand we need a  middle man.

 

This is where geocoding comes in. Geocoders are software that converts human-readable address to machine understandable X and Y geographic coordinates. This is called forward geocoding. The also transform geographic coordinates into human-friendly addresses or a description of a location(reverse geocoding). 

Geocoders are often online services that receive a request and send a response, in much the same way as a web browser sends a requestion to a server in the form of a URL and receives a response in the form a webpage.

Here is an example of what that might look like.

This is an example of forward geocoding. Here the geocoder returns the latitude, longitude and complete address details of 200 S Mathilda Ave, Sunnyvale, CA 

Request URL

https://geocoder.cit.api.here.com/6.2/geocode.json?searchtext=200%20S%20Mathilda%20Sunnyvale%20CA&app_ id=DemoAppId01082013GAL&app_code=AJKnXv84fjrb0KIHawS0Tg&gen=8

 

 

 So now that we have established what geocoding is let's take a look at where it might be used. 

Imagine you are a retail store owner and you want to understand more about your customers. One way of doing this might be to convert the addresses of all of your customers into geographic locations and plot them on a map. It is unlikely you collected address data from them in the form of X, Y geographic coordinates so you might want to use a geocoder for this conversion. 

Think about how you might use your phone for navigation. You type in an address you want to navigate to and your phone geocodes that address to a geographic location. 

 

So now we know what geocoding is and why it might be useful. Here is a list of geocoders you can try for free!

If you are familiar with QGIS you might want to try these plugins

https://plugins.qgis.org/plugins/mmqgis/

https://plugins.qgis.org/plugins/GeoCoding/

The Geocoder Python library can also assist in retrieving addresses from lat-long coordinates. https://pypi.org/project/geocoder/

Canada & USA: https://geocoder.ca
World: https://geocode.xyz

https://locationiq.com offers a free version of there geocoder which lets you send

10,000 requests /day 
60 requests /minute 
2 requests /second 
street maps only 
limited commercial use

https://geocode.localfocus.nl/

https://pelias.io/

https://www.geocod.io offers 2,500 free lookups/requests every day