Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have got an Excel spreadsheet with roundabout 15,000 locations, which are only identified by the towns or villages name and the country. I am intending to present these on a world map.

Therefore, I need to know, whether there is a tool, which can find the coordinates for me based on the location's name.

Pasting every name into Google maps is no solution due to the high number of locations.

share|improve this question

The GeoNames API would be a good place to start if you are able to write a script to pull the data for you. There is a nice example, written in Python, in this github project.

You can also download the GeoNames data set here. Natural Earth also provides a data download.

share|improve this answer
The only issue that would be left is disambiguation - try searching for Washington in the USA and see how many hits you get. – iant Dec 24 '12 at 8:45
Download it where? Was there supposed to be a link? – Hack-R Jul 13 at 14:09
Yes, there are three links in the answer. – katahdin Jul 13 at 14:21
up vote 4 down vote accepted

I decided to develop a python script using the Nominatim tool by Open Streetmap to find the coordinates of the locations and it is working pretty good.

I made a screenshot, because for some reason, I am not able to add the code here:

enter image description here

There are some things you should not forget, when using this script:

  • According to the rules of Nominatim you should have a 1 second time out between every request (included in the script)
  • Add your mail adress in the request, thus you can be contacted as soon as problems appear
  • You will need to create an infile and an outfile .txt file and fix the paths in the script
  • The infile should be formatted in "UTF-8 no BOM" (you can use editors like notepad++ for this)

A friend developed the script for me, therefore I am not able to answer you that much questions about it. Nevertheless, if there is a question, I will do my best and also ask him.

share|improve this answer

There are a lot of options here. While GeoNames is a good option, and you may be able to use the google maps API (depends on your legal needs - read the small print to know how the google terms apply to your particular circumstance), you also may be able to use one of the OSM options:

Again, for 15k locations, please consider the terms of use for public servers.

share|improve this answer

Or if you've knowledge of the R language Here is one of many examples using the rjson package and the google maps api:

require(rjson) # load rjson package
getCoordinates <- function(address) {
url <- paste("",address,"&output=json",sep="")
map_data <- fromJSON(paste(readLines(url),collapse=""))
coord <- map_data$Placemark[[1]]$Point$coordinates[1:2]

# example query
address <- paste(data$zip[1],"+",data$city[1],"+",data$state[1],sep="")
share|improve this answer

While there are many good geocoders out there, most require a bit familiarity and alot of patience with programming and other computer wizardry. But I think for this specific user (indeed the average computer user) a more ideal solution would be the "Easy Georeferencer" software that I created this summer (that is, I'm the author of this program). I created it precisely to be user-friendly for people who, like the original poster here, do not have much or any programming background.

You simply download the program and double-click it, and a simple GUI will guide through the rest, no installation required. It would literally take you one minute to point the program to your data and specify which fields contain the country/village names, and then you can relax for 10-20 minutes while the program geocodes your data. All happens offline, so no need to worry about timeouts or webgeocoding limits.

You can download it for free from its official website:

And here's a screenshot:

enter image description here

Hope it's useful :)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.