Skip to main content

Function for geographical distances calculation that can run on GPU using CUDA.

Project description

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).

CUDA-friendly

This repo is modification of vincenty package. Since CUDA has some limitations (it doesn’t understand try…except, for example) original code can’t run on GPU.

Example: distance between Boston and New York City

>>> from cuda_friendly_vincenty import vincenty
>>> boston = (-71.0693514, 42.3541165)
>>> newyork = (-73.9680804, 40.7791472)
>>> vincenty(*boston, *newyork)
298396.06

Installation

$ pip install cuda-friendly-vincenty

Project details


Download files

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

Files for cuda-friendly-vincenty, version 0.1.2
Filename, size File type Python version Upload date Hashes
Filename, size cuda_friendly_vincenty-0.1.2-py3-none-any.whl (3.3 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size cuda-friendly-vincenty-0.1.2.tar.gz (2.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page