Reverse geocoding is available in geophysics 0.97. You can download and install the new version of geophysics from https://github.com/geopy/geopy or clone the git repository.
git clone https://github.com/geopy/geopy.git cd geopy sudo python setup.py install
If you want to download and install for Windows, you can get the latest version https://github.com/geopy/geopy/archive/release-0.97.zip
Unzip and
cd geopy-release-0.97 python setup.py install
To bind a request to an address and coordinates:
>>> from geopy.geocoders import GoogleV3 >>> geolocator = GoogleV3() >>> address, (latitude, longitude) = geolocator.geocode("175 5th Avenue NYC") >>> print(address, latitude, longitude) 175 5th Avenue, New York, NY 10010, USA 40.7410262 -73.9897806
To find the address corresponding to the coordinate set:
>>> from geopy.geocoders import GoogleV3 >>> geolocator = GoogleV3() >>> address, (latitude, longitude) = geolocator.reverse("40.752067, -73.977578") >>> print(address, latitude, longitude) 77 East 42nd Street, New York, NY 10017, USA 40.7520802 -73.9775683
-
source share