Vincenty nearest neighbor search using CUDA
Nearest neighbor search algorithm on Earth's surface that runs on a GPU and uses Vincenty's formula
Application
Nearest Neighbour Search is the key component of location data analysis:
- Nearest Neighbour Index is based on measuring distances between points
- Both global pattern analysis algorithms (Global Moran’s I, Getis-Ord General G), as well as local pattern analysis algorithms (Anselin Local Moran's I, Getis Ord GI *) with the k-nn approach to define neighbours are based on measuring distances between points
Using Vincenty’s formula allows performing location analysis on any location using geographic coordinates.
Requirements
- CUDA-enabled GPU with compute capability 2.0 or above with an up-to-data Nvidia driver.
- CUDA toolkit
Installation
pip install vincenty-cuda-nns
Usage example
import geopandas as gpd # here just for example
import numpy as np
from vincenty_cuda_nns import CudaTree
df = gpd.read_file('points.geojson')
# data is array of points like [longitude, latitude]
points = np.stack(df['geometry']).astype(np.float32)
# build tree for the data
cuda_tree = CudaTree(points, leaf_size=4)
# query over the tree for tree nearest neighbors (+1 for itself)
distances, indices = cuda_tree.query(points, n_neighbors=4)
# you can also find distances from andother dataset
from_points = (np.random.random((100, 2)) * 180) - 90
distances, indices = cuda_tree.query(from_points)
Metadata
Release files for vincenty-cuda-nns 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vincenty-cuda-nns-0.2.2.tar.gz | 5.5 kB | Without provenance | Details for vincenty-cuda-nns-0.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vincenty_cuda_nns-0.2.2-py3-none-any.whl | Python 3 | none | any | Details for vincenty_cuda_nns-0.2.2-py3-none-any.whl |
Total release size: 24.4 kB
Release files / vincenty-cuda-nns-0.2.2.tar.gz
| Download URL | vincenty-cuda-nns-0.2.2.tar.gz |
|---|---|
| Size | 5.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ba43d4fde7773986a860d00b66ec54cad5e0a8a23fdb6b479243047c9f936977
|
|
BLAKE2b-256 checksum How to use checksums |
ab167b48f18bf32d390a0318c83136218dba3e92bf605b9b11514b61e972dd29
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.5
|
Release files / vincenty_cuda_nns-0.2.2-py3-none-any.whl
| Download URL | vincenty_cuda_nns-0.2.2-py3-none-any.whl |
|---|---|
| Size | 19.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d3801c661e19ae43d55c5822ef9dcfabaf6042c09a09629b61bc226ea357018d
|
|
BLAKE2b-256 checksum How to use checksums |
a68f14fe385f03529827a1aa01b1feb7012a57c87ad31afaca56579a697c01b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.5
|
Security for vincenty-cuda-nns 0.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.