Advertisements

Archive

Tag Archives: geocoding

Need to geocode some addresses? Here’s a five-lines-of-code solution based on “An A-Z of useful Python tricks” by Peter Gleeson:

from geopy import GoogleV3
place = "Krems an der Donau"
location = GoogleV3().geocode(place)
print(location.address)
print("POINT({},{})".format(location.latitude,location.longitude))

For more info, check out geopy:

geopy is a Python 2 and 3 client for several popular geocoding web services.
geopy includes geocoder classes for the OpenStreetMap Nominatim, ESRI ArcGIS, Google Geocoding API (V3), Baidu Maps, Bing Maps API, Yandex, IGN France, GeoNames, Pelias, geocode.earth, OpenMapQuest, PickPoint, What3Words, OpenCage, SmartyStreets, GeocodeFarm, and Here geocoder services.

Advertisements

I used to go to batchgeo.com for geocoding address lists, but last time I visited, I couldn’t find where to download the resulting list with lat/lon values.

Luckily, there’s another service available that will do: GPSVisualizer.com. They offer several options for geocoding: single address, address list, and a service for tabular data. Like batchgeo.com, they use Yahoo’s geocoding API to do the actual work.

%d bloggers like this: