Skip to main content

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


Download files

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

Source Distribution

vincenty-cuda-nns-0.1.2.tar.gz (4.3 kB view hashes)

Uploaded Source

Built Distribution

vincenty_cuda_nns-0.1.2-py3-none-any.whl (17.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page