3 ms·
Services like Google's geocoding API (http://code.google.com/apis/maps/documentation/geocoding/ http://code.google.com/apis/maps/documentation/geocoding/) can h
by mtoddh 15y ago
Services like Google's geocoding API (http://code.google.com/apis/maps/documentation/geocoding/ http://code.google.com/apis/maps/documentation/geocoding/) can help with this; it's pretty good about figuring out the address you mean and returning it in a normalized format:
>>> from geopy import geocoders
>>> g = geocoders.Google()
>>> place, (lat, lng) = g.geocode("10900 Euclid Ave in Cleveland")
>>> print place
10900 Euclid Ave, Case Western Reserve University, Cleveland, OH 44106, USA
- ma2rten 15y agoThe only problem, is that the TOS do not allow you to use it if you do not show the information on a map and there is a usage limit (it's per IP, so you could do it client side).