Skip to content
Calculate the geographical distance between 2 points with extreme accuracy.
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
vincenty PEP 8 fixes Apr 26, 2015
.gitignore Create vincenty Jan 29, 2015
LICENSE
README.rst Update link in README Jan 3, 2016
setup.py Update author_email in setup.py Jul 19, 2016

README.rst

Vincenty

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

You can’t perform that action at this time.