Batch geocoding – assigning coordinates to multiple place-name records

Peder Gammeltoft, Associate Professor, University of Copenhagen

This is the second instalment in a series on geocoding. The first instalment was published in May, and the next instalment will be published later this year.

Batch geocoding?

In my previous feature, I showed how to geocode individual place-names. Most of us, however, have already worked with place-names for a while when we discover that it would be good with a visual element to our research. By then we will usually have collected hundreds and hundreds of place-names and geocoding them individually would often be more than enough for most not to venture into this work.

However, there is a way of remedying this! The website I used last, has a very nifty feature – batch geocoding. Batch geocoding means to geocode one’s data in one go by means of an identifier. There are many batch-geocoding websites about and most use addresses as identifier. Others are really coordinate conversion tools – say if you have a dataset which is encoded with X/Y coordinates, these batch converters will enable you to have your data displayed with Latitude/longitude coordinates.

Virtually every country has had its own means of identifying places by a certain code set besides X/Y or Latitude/Longitude coordinates. And many of us have been using this  by means of the site. Most of us have used such systems to identify on paper maps where our place-names were located. Quite a few batch converters exist that can transform even these into coordinates of various kinds. X/Y coordinates are very useful if you work in a GIS (Geographical Information System) environment, whereas Latitude/Longitude coordinates are primarily used in online map services such as Google Maps and Open Street Maps.

Batch geocoding – an example from Scotland

If you have used a national map location code in your research, I would recommend you to rummage around on the internet to try and see if there is not some sort of conversion tool that will be able to assign coordinates to your dataset from a location code. Alternatively, try your national mapping agency and see if they can help. They may well have some sort of tool for conversion.

Considering that the majority of the readers are from the UK, I have decided to give an example of batch geocoding place-names by means of the National Grid Reference code (NGR). I hope you readers from outside of the UK will find some use of this feature nonetheless.

OK, let’s say that I have developed an interest in genitival of-constructions in Scots and I want to see where they manifest themselves geographically in Shetland. I go to the library and discover this fine book on Shetland place-names by John Stewart which has some 3,000 local place-names with historical forms and interpretations, and not least a National Grid location – just what I am looking for (see Figure 1)!

Figure 1. Example page from John Stewart

Figure 1. Example page from John Stewart

The British National Grid Reference system works by means of a series of letters and numbers. The NGR always starts with two letters, assigning the coordinates to its proper 100 km2 square. Next follows a sequence of letters, usually either four, six, eight and even ten letters. The four letter allows you to locate your place-name within a one-kilometre square (with the marker placed in lower left hand corner of the square), whereas a six-figure series places your name within a 100-m2 square; eight figures within a 10-m2 square, etc. (See Figure 2). The more numbers you have assigned to your NGR code, the more precise the location is.

Figure 2. 4, 6, and 8 figure NGR precision

Figure 2. 4, 6, and 8 figure NGR precision

I copied every of-genitive construction I could find in Stewart’s book and entered the data into a simple one-table access-database. The number of names is just under 110, so a suitably large, but still manageable number for this test. One complication with Stewart’s book, however, is that the first two letters in the NGR code are always omitted. However, since most of Shetland is covered within a single 100 km2 square with only parts outside, it is a relatively easy matter to assign the right numbers to the NGR code. I will not bore you with the process. Suffice to say, this took me a couple of hours extra…

Once the dataset is established, we can geocode it. So, first you select all your data and click ‘copy’. Next, open the webpage and select Batch Convert Tool and follow the six steps for batch conversion (there are seven steps in all, but step 7 is irrelevant for this test). First you paste your data into the empty window. The data will show as tab-delimited data. Then you are asked to indicate which format you wish to convert from – select Grid Reference and in the next step which tab-field the NGR code is found in and in field separator, select Tab. Then you are ready to convert your data. Click the Convert button and in the blink of an eye, your dataset has had been enlarged with X/Y and Latitude/Longitude data. Place the cursor in the top line of the converted dataset, the line that contains field names. Four new tabs (at the end) have been added, in the first, write X, the second Y, the third Latitude, the fourth Longitude. Then select the entire list and copy it.

Then copy your dataset into e.g. a notepad and save it. Next is to find a suitable place to publish your map – of which there are many! I have chosen this time to try out the ZeeMaps online facility. This is one of the easiest online sites from which to publish your maps. What you do is to go to and you are given a two-step menu where you are asked to name your map, describe it and where to center the map. So, I have given the title Of-genitive in Shetland place-names and a small description and stated the starting location as Shetland. Click Create Map and you are taken to an empty map centered on where your data is going to be displayed. There is a dropdown menu called Additions and here you select Add (Upload) Multiple Markers > Copy and Paste. An empty window appears and you paste your dataset into it and click Submit. The system detects such things as Name and Latitude/Longitude itself, so just press Submit once again and there you have your map.

The ZeeMaps system is highly customisable. There are both free customisations and those you pay for. However, the free ones are more than adequate for most purposes. In my own test (, I have added a list view and a search facility. Embedding is also possible – in fact it is as easy as anything and highly customisable. In my own embedding test, I added a list view as well as an advanced search facility. It is very similar to the ZeeMaps view, though –

It is dead easy, really, to batch geocode your data – just find a suitable conversion tool and online publishing facility and then you’re off! Happy geocoding…

Sources and resources used:

John Stewart: Shetland Place-Names, Lerwick 1987.

Comments are closed.