Tutorial: Batch Geocoding Location Information

Tutorial: Batch Geocoding Location Information

Originally posted October 10, 2017. Updated November 20, 2024

One of the challenges working with maps is getting latitude and longitude coordinates when you only have a city name or address. This method of batch geocoding follows Steve Morse’s directions and uses his extremely handy tool. It requires having a Mapquest API key to query the latitude and longitude, however. When I originally posted about this, getting a Mapquest Developer account was completely free. At the time of update, it does remain free up to a certain threshold, but it requires entering a credit card in order to create a key. You may or may not be comfortable with this. If you aren’t working with a large number of locations, you can alternately gather latitude and longitude directly through Google Maps. This method remains useful, with the caveat about the credit card requirement.

Get Mapquest api key

Create a new account (this is free): https://developer.mapquest.com/account/user/login/sign-up. Then confirm the new account and login.

Screenshot of sign up field for Mapquest Developer

On the left, click “manage keys”. You will need to attach a credit card to your account to proceed. At the moment, it’s free to use MapQuest Developer keys up to 15,000 transactions for free. Click “update it here” to go through the process of adding a credit card. Then click “Create a new key”

Screenshot showing Manage keys page

Give the key a name and then copy the consumer key (which is blacked out in the image below)

Batch Geocode

Go to https://stevemorse.org/jcal/latlonbatch.html

Paste your consumer key in the field called “Enter Mapquest Application Key”

Screenshot of api key on Steve Morse site

Copy location information from your spreadsheet

Screenshot of spreadsheet with locations in several rows

Click ‘Generate Coordinates’

Screenshot of Steve Morse site for entering location info

You will see the coordinates as below

Screenshot of Steve Morse site with coordinates given for locations

Click ‘Show points on a map’ to check that things look how you expect

Map with geolocated points displayed

Copy the coordinates given

Paste coordinates into your spreadsheet

Screenshot of spreadsheet with coordinates and location information in several rows

Leave a Reply

Your email address will not be published. Required fields are marked *