Skip to main content

Calculate the distance bewteen 2 points on Earth.

Project description

Calculate the distance (in km or in miles) bewteen two points on Earth, located by their latitude and longitude.

Example: distance bewteen Lyon and Paris

>>> from haversine import haversine
>>> lyon = (45.7597, 4.8422)
>>> paris = (48.8567, 2.3508)
>>> haversine(lyon, paris)
392.00124794121825  # in kilometers
>>> haversine(lyon, paris, miles=True)
243.589575470673  # in miles

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

haversine-0.4.3.tar.gz (1.6 kB view details)

Uploaded Source

File details

Details for the file haversine-0.4.3.tar.gz.

File metadata

  • Download URL: haversine-0.4.3.tar.gz
  • Upload date:
  • Size: 1.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for haversine-0.4.3.tar.gz
Algorithm Hash digest
SHA256 44d8b7f246e0dc318fcd27763d3ecfb30814858c8241b995ee7bfc6b70c411c8
MD5 f31a7ec74950d1f809c9359f6aa516f7
BLAKE2b-256 39fe2f4fbd8dbfc0668b20af0a49ac96d4e7a7c8e6e726585a016b1dd9b571b6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page