Skip to content
jhconning edited this page Jun 5, 2015 · 1 revision

Matt's notes on geocoding:

Here is the little block of code that I used:

from geopy.geocoders import Nominatim geolocator=Nominatim() location=geolocator.geocode("695 Park Avenue, NYC", timeout=1000) print(location.address)

I've found that the "timeout" function is kind of critical. In fact, now that my memory is coming back, I found it was good to write a wrapper if one is doing a whole bunch of these sequentially, as then one can do a try, except block and handle the timeouts.

Clone this wiki locally