UPDATE April 11, 2013: Updated the directions because the “Add delimited text layer” function moved from the Plugins to Layer menu.
UPDATE March 24, 2011: I updated the directions to use GPS Visualizer instead of BatchGeocode.com because BG stopped giving geographic coordinates in its output.
Get directions on geocoding a single address in QGIS with a plugin.
QGIS is an open-source Geographic Information Systems (GIS) application that has been gaining ground since 2004. It runs on all operating systems (it began as a Linux project) and you can download it for free.
I use it often because ESRI doesn’t make the popular ArcGIS software for Mac. That’s unfortunate, but like I said here, software, technology and mapping issues can be easily overcome – we can use QGIS to create maps. QGIS, though, is missing one major feature for basic map building: geocoding.
Here’s a step-by-step tutorial on how to bring in multiple street addresses and their XY coordinates into your QGIS map en masse:
- Go to Plugins>Manage Plugins
- Check the checkbox next to “Add Delimited Text Layer
- Click Okay to add the plugin to your QGIS
- In a spreadsheet, create the following columns in a header row (at a minimum): address, city, state. Other fields you can use: description, name, url, zip, image url
- Input your data into the appropriate columns
- Save the Excel document as a Tab Delimited Text file.
- Open the newly created Tab Delimited Text file in a text-only editor (like Notepad for Windows, TextEdit for Mac, or vi for Linux). Select all the text (including the headers) and copy to clipboard
- Go to GPS Visualizer’s multiple address geocoder.
- In the first text field, paste your text (ideally, you should only process 150 rows at a time)
- Set your options: Select whether your text is tabbed data with a header row, or just one address per line (no header). Then choose your geocoder, either Yahoo! or Google. Select the delimiter.
- Click Start Geocoding.
- Copy your now geocoded data back into your text-only editor and save.*
- In your QGIS document, select Layer>Add delimited text layer.
- In the dialog box, click Browse and find your newly created file.
- Create a layer name – the default is ugly, but you can change it later.
- Since your text file is tab-delimited, make “t” your delimiter for this import
- Click the Parse button to validate your input (Parse will also attempt to find your columns that hold the latitude and longitude)
- Ensure the X and Y fields have selected the appropriate columns in your text.
- Press OK!
Leave a comment if this tutorial worked for you.
*If the text file isn’t saved correctly and the delimiter characters aren’t inserted into the file’s source code properly, QGIS won’t import the text properly – it won’t display on your map. On the Mac, an application called XTabulator can help you correct the text file. The QGIS plugin “Delimited text” prefers tabbed files with records separated by CR+LF (File>Document Settings). You can also use the plain text editor  to sort out the issue.
Alternative: Use GeoCommons to geocode your data and output the results to you as a CSV, KML, or shapefile.