Nearest neighbor search on Earth's surface with a GPU
Project description
Vincenty nearest neighbor search using CUDA
Nearest neighbor search algorithm on Earth's surface that runs on a GPU and uses Vincenty's formula
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
from vincenty_cuda_nns import CudaTree
df = gpd.read_file('points.geojson')
# data is array of points like [longitude, latitude]
data = np.stack(df['geometry']).astype(np.float32)
# build tree for the data
cuda_tree = CudaTree(data, leaf_size=4)
# query over the tree for nearest neighbor (including itself)
distances, indices = cuda_tree.query(n_neighbors=2)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for vincenty_cuda_nns-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8aeebd0db77e24f3ae462b588ee865d24fad5249175e71b22a4593374674265c |
|
MD5 | 50ab74eb78b658dc79d41dec381a9225 |
|
BLAKE2b-256 | 5a111dbe8b61507880039a796ef6cb77ad1c3435227538fc89d224903a6a0d55 |