Given a coordinate point, find a very close point given a set of coordinate points.
Project description
GeoKDTree
A Geo KD Tree package for Python
Quick Start:
from geokdtree import GeoKDTree
example_points = [
(34.0522, -118.2437), # Los Angeles
(40.7128, -74.0060), # New York
(37.7749, -122.4194), # San Francisco
(51.5074, -0.1278), # London
(48.8566, 2.3522), # Paris
]
geo_kd_tree = GeoKDTree(points = example_points)
test_point = (47.6062, -122.3321) # Seattle
closest_idx = geo_kd_tree.closest_idx(test_point) # Expect San Francisco to be closest
print(f"Closest point to {test_point} is {example_points[closest_idx] }")
Documentation
- Docs: https://connor-makowski.github.io/geokdtree/geokdtree.html
- Git Repo: https://github.com/connor-makowski/geokdtree
Development
Running Tests, Prettifying Code, and Updating Docs
Make sure Docker is installed and running on a Unix system (Linux, MacOS, WSL2).
-
Create a docker container and drop into a shell
./run.sh
-
Run all tests (see ./utils/test.sh)
./run.sh test
-
Prettify the code (see ./utils/prettify.sh)
./run.sh prettify
-
Update the docs (see ./utils/docs.sh)
./run.sh docs
-
Note: You can and should modify the
Dockerfileto test different python versions.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file geokdtree-1.0.0.tar.gz.
File metadata
- Download URL: geokdtree-1.0.0.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee38b4eafbc4911c79206478e5f985ad4c360ac0c3ffb6fc56c4ca30537a9fed
|
|
| MD5 |
31ed4668c72cfa36bea6fff75c30194a
|
|
| BLAKE2b-256 |
b9af7b0eec78f3ee1127a37b2590749c926d14641acede65fdb882c4d3a2acf6
|
File details
Details for the file geokdtree-1.0.0-py3-none-any.whl.
File metadata
- Download URL: geokdtree-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34a35ae3db8e9cd840a361e85d6016b2ef4609a6fb632151bfb7862f3f98f57a
|
|
| MD5 |
06734cb532dea2d2af7b4b067eff1220
|
|
| BLAKE2b-256 |
819c11d0641d5fe4f673b50e407c6661041ecfee06c213df18ad7a2383401775
|