https://github.com/petercorke/gcdist
https://github.com/petercorke/gcdist
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/petercorke/gcdist
- Owner: petercorke
- Created: 2022-12-07T04:51:32.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-07T05:01:31.000Z (over 2 years ago)
- Last Synced: 2025-02-01T08:45:41.818Z (3 months ago)
- Language: Python
- Size: 1000 Bytes
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Great circle distance calculator
```shell
$ gcdist start end
```
will display the great-circle distance in kilometres between the two places. For example:```shell
$ python gcdist.py "albany, west australia" "hobart"
Albany, City Of Albany, Western Australia, Australia: lat=-35.0247822, lon=117.883608
Hobart, City of Hobart, Tasmania, 7000, Australia: lat=-42.8825088, lon=147.3281233
2675.6 km
```Place geolocation is done using OpenStreetMap's Nominatum service. The display name of the looked up place is displayed as a check that the name is not aliased.
Uses a spherical world model so probably good to 1% accuracy.