Cython implementation of Vincenty distance.
Project description
Cyvincenty
A fast Cython implementation of the Vincenty algorithm for calculating the distance in kilometers between 2 co-ordinates.
This module is heavily inspired by uvincenty and vincenty. It is just as fast if not slightly faster than uvincenty which is a pure C Python extension despite being written in Python! (technically Cython).
Installation
pip install cyvincenty
Usage
>> from cyvincenty import vincenty
>> boston = (42.3541165, -71.0693514)
>> newyork = (40.7791472, -73.9680804)
>> cyvincenty(*boston, *newyork)
Benchmarks
from cyvincenty import vincenty
import uvincenty
from vincenty import vincenty
import geopy.distance
boston = (42.3541165, -71.0693514)
newyork = (40.7791472, -73.9680804)
%timeit uvincenty.vincenty(*boston, *newyork)
%timeit cyvincenty(*boston, *newyork)
%timeit vincenty(boston, newyork)
%timeit geopy.distance.geodesic(boston, newyork)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for cyvincenty-1.0.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef6134d6afffe8f4d446d774faddb3de9f1b3b228ae99ab7f25264fae940e439 |
|
MD5 | 1f676d15d3ed1bca67d12801ad739270 |
|
BLAKE2b-256 | de4d6ac26fb8323a29772ca8824314d09bb633facd8775a55237b349e88272bc |