Python 3 Reverse Geolocation Script to Convert Address or Location to Latitude or Longitude Using Geopy Full Project For Beginners

 

 

pip install geopy

 

 

app.py

 

# importing modules
from geopy.geocoders import Nominatim

# calling the nominatim tool
geoLoc = Nominatim(user_agent="GetLoc")

# passing the coordinates
locname = geoLoc.reverse("26.7674446, 81.109758")

# printing the address/location name
print(locname.address)

Leave a Reply