GeoPy is a Python library that makes geographical calculations easier for the users. In this article, we will see how to calculate the distance between 2 points on the earth in two ways.
How to Install GeoPy ?
pip install geopy
It is the length of the shortest path between 2 points on any surface. In our case, the surface is the earth. Below program illustrates how to calculate geodesic distance from latitude-longitude data.
Great Circle Distance:
It is the length of the shortest path between 2 points on a sphere. In this case, the earth is assumed to be a perfect sphere. Below program illustrates how to calculate great-circle distance from latitude-longitude data.
- Python | Calculate distance and duration between two places using google distance matrix API
- Python | Calculate geographic coordinates of places using google geocoding API
- Python | Get a set of places according to search query using Google Places API
- Calculate n + nn + nnn + ... + n(m times) in Python
- Python program to calculate age in year
- Minkowski distance in Python
- Python | Calculate difference between adjacent elements in given list
- Python | Distance-time GUI calculator using Tkinter
- Python | Pandas Series.mad() to calculate Mean Absolute Deviation of a Series
- Program to Calculate Body Mass Index (BMI)
- Program to calculate the Round Trip Time (RTT)
- Rearrange a string so that all same characters become d distance away
- Reading Python File-Like Objects from C | Python
- Python | Index of Non-Zero elements in Python list
- Important differences between Python 2.x and Python 3.x with examples
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.