Python 3 Reverse Geolocation Script to Convert Address or Location to Latitude or Longitude Using Geopy

Python 3 Reverse Geolocation Script to Convert Address or Location to Latitude or Longitude Using Geopy

Python 3 Reverse Geolocation Script to Convert Address or Location to Latitude or Longitude Using Geopy

# 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)
Share on:

Hi, I'm Ranjith a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coding Diksha. Here, I post about programming to help developers.

Leave a Comment