I'm willing to create an electoral map from the complete list of addresses of a city (Rome, Italy). I have data (.csv) that relate each address (road and civic number) to an electoral section.

I thought that I should group together into a single shapefile all addresses of each section, but I crashed into an obvious problem: geocoding (via a python script) of such a large number of addresses causes all web geocoding services to stop working for the excessive amount of requests. Is there a way work around this, perhaps downloading the whole bunch of address data for the area I need and then geocoding the addresses offline? Which software can I use to geocode offline?

A second problem, that is marginal as long as I don't manage to solve the first one, is this: even if I had said coordinates, I wouldn't be able to join them together into shapefiles. Any advice on this, too?

  • For addresses outside the US, you might try searching for osm2pgsql. There are a few questions related to this. – kttii Jan 27 '17 at 21:33
  • Can you please add some sample rows from the .csv file? – mgri Jan 28 '17 at 9:58

For addresses outside the US, you might try osm2pgsql.

I have not used this but I believe this would entail you to download the Open street maps data for your area of interest and then use osm2pgsql to convert the data a database and finally preform queries on the data.

There are more specific questions on this site related to this process that may help.


I am not totally sure, how many addresses in total you want to geocode but if it's not urgent you also can split your dataset into smaller parts and geocode only one part with 2500 addresses (or whatever the daily limit in the free tier from the service you are using is) per day. Usually you can also pay for a higher limit per day.

Another possibility would be to install Nominatim by your own, see this wiki article for details.

Regarding the second question: If you save the geocoded coordinates in a csv file you can open this file e.g. with QGIS and then directly save it as a shp file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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