If you have a CSV formatted file containing addresses, you can take advantage of QGIS to map out those addresses. This article contains step by step instructions for geocoding addresses using QGIS.
If you prefer a video, you can watch the tutorial about how to geocode addresses using QGIS at the bottom of this page.
To complete this tutorial, you will need to have QGIS already installed on your computer. QGIS is an open source GIS software application that is free to access (Related: Installing QGIS on the Mac).
Before You Start
Before you get started with geocoding using QGIS, make sure that your addresses are stored in a CSV file that is formatted for UTF-8. There are two types of web services available: Google Maps and OpenStreetMap.
If you choose to use Google Maps, it’s highly recommended that you first sign up for a free API by visiting Google’s Get API page. Finally, to complete this tutorial, you will need internet access to run the geocoding process.
Install the MMQGIS Plugin to geocode addresses in QGIS
In order to geocode addresses from a CSV file, you will need to first install the plugin MMQGIS. MMQGIS contains a suite of very useful plugins for manipulating vector GIS data and was developed by Michael Minn. Contained within this set of plugins is the Geocoding plugins which lets users either geocode an address file using Googles or OpenStreetMap APIs or from a street layer.
To install the MMQGIS plugin, you will need to load the QGIS plugin repository by selecting Plugins –> Manage and Install Plugins from the menu bar.
This loads the Official QGIS Plugin Repository where a list of plugins is available. Select MMQGIS for installation by either scrolling down the alphabetical list of plugins or by filtering the list via the search bar at the top.
Check the box next the mmqgis and then click on the install plugin button.
Geocoding an Address File in QGIS
Now that the plugin is installed, you can access the Geocoding function by click on MMQGIS –> Geocoding from the top menu bar.
There are two geocoding options: one for geocoding your address file using either Google or OpenStreetMap geocoding web services or by geocoding from a street layer. For this tutorial, the address file will be geocoded using Google’s geocoding API.
Geocoding using one of the web service options will require an Internet connection.
Once the “Geocode CSV with Google / OpenStreetMap” option has been selected, a GUI for the Web Service Geocode opens. From the window, load the CSV file (if you have the address file in a spreadsheet such as MS Excel or Google Fusion Tables, you will need to export the data out as a CSV file).
Proper address format is required
Within the CSV you must have the proper information for geocoding address. The first line of the CSV file should contain the column names with each separated by a comma. The second and all subsequent lines contain the records for that file with each column again separated by a comma.
Within this file you will need to have a column for the address, a column for the city, and a column for the state (for US records) and/or a column for the countries.
For my geocoding, I am using a CSV file containing the rankings and company information for the Fortune 1000 companies in the United States.
Setting up QGIS to geocode
Now set the parameters for geocoding; select from each section the street address, city, state, and country columns in the CSV file that match. For web service, pick the desired geocoding service. Note: there is a 2,500 record limit within a 24 hour period when using Google’s service.
Lastly, set where you want the resulting shapefile and CSV file that will record any records that were not able to be geocoded.
Once you have set all the parameters, hit the “OK” button to start geocoding. The length of time for geocoding depends on how large your file is.
It took about 7 minutes for my 1,000 record file of addresses to finish geocoding. I selected the Google Maps web service which limits geocoding to five records per second.
Viewing Your Results
The geocoded file will automatically be added to the layers list in QGIS. Once the geocoding is finished, the end result is a geocoded point shapefile. Appended to the table are two tables that describe how each point was determined.
Watch the Video Tutorial
The main points of this tutorial about geocoding using QGIS can be viewed in this video:
This article was originally published on July 22, 2015 and recently updated on January 9, 2018.