https://github.com/volfpeter/great-circle-distance
Simple great circle distance calculation package
https://github.com/volfpeter/great-circle-distance
Last synced: 10 months ago
JSON representation
Simple great circle distance calculation package
- Host: GitHub
- URL: https://github.com/volfpeter/great-circle-distance
- Owner: volfpeter
- License: mit
- Created: 2021-02-16T09:12:57.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2025-05-07T10:24:28.000Z (about 1 year ago)
- Last Synced: 2025-05-07T11:30:24.363Z (about 1 year ago)
- Language: Python
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/psf/black)
[](http://mypy-lang.org/)
# Great circle distance
Simple great circle distance calculation package
## Usage
```python
from great_circle_distance import PlanetRadius, great_circle_distance
stonehenge = (51.178939, -1.825941)
great_pyramid_of_giza = (29.979123, 31.134234)
print(
"Distance between Stonehenge and the Great Pyramid of Giza is "
f"{great_circle_distance(stonehenge, great_pyramid_of_giza)} kilometers or "
f"{great_circle_distance(stonehenge, great_pyramid_of_giza, radius=PlanetRadius.earth_mi)} miles."
)
```
## Installation
Pip: `pip install git+https://github.com/volfpeter/great-circle-distance.git#egg=great-circle-distance`
Pipenv: `pipenv install git+https://github.com/volfpeter/great-circle-distance.git#egg=great-circle-distance`
## License - MIT
The library is open-sourced under the conditions of the MIT [license](https://choosealicense.com/licenses/mit/).