Skip to main content

Calculate the geographical distance (in kilometers or miles) between 2 points with extreme accuracy.

This library implements Vincenty’s solution to the inverse geodetic problem. It is based on the WGS 84 reference ellipsoid and is accurate to within 1 mm (!) or better.

This formula is widely used in geographic information systems (GIS) and is much more accurate than methods for computing the great-circle distance (which assume a spherical Earth).

Example: distance between Boston and New York City

>>> from vincenty import vincenty
>>> boston = (42.3541165, -71.0693514)
>>> newyork = (40.7791472, -73.9680804)
>>> vincenty(boston, newyork)
298.396057
>>> vincenty(boston, newyork, miles=True)
185.414657

Installation

$ pip install vincenty

References

Release files for vincenty 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vincenty 0.1.4
File Size Uploaded
vincenty-0.1.4.tar.gz 2.8 kB Details

Release files / vincenty-0.1.4.tar.gz

Download URL vincenty-0.1.4.tar.gz
Size 2.8 kB
Tags Source
SHA-256 checksum
How to use checksums
eaa2f2de835f369cbd71c1a01ccd4e0d412da0f4aeef7c9692242b9ce182785a
BLAKE2b-256 checksum
How to use checksums
c4de296372fde237fdda627fb6127a34689a3c1b25b6531a180060bf8e11457f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.4 This release

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page