| Crates.io | ploc |
| lib.rs | ploc |
| version | 0.1.2 |
| created_at | 2025-01-03 19:39:35.372252+00 |
| updated_at | 2025-06-22 07:39:24.875168+00 |
| description | Point location library |
| homepage | |
| repository | https://github.com/bluthej/ploc |
| max_upload_size | |
| id | 1502811 |
| size | 138,091 |
ploc
Ploc is a Rust library for efficient point location queries.
The implementation is strongly influenced by matplotlib's C++ implementation, but differentiates itself by being able to handle arbitrary planar subdivisions instead of only triangulations, and by leveraging parallelism with rayon to accelerate the queries.
Python bindings will soon be available at ploc-py.
This crate is currently in a pretty early stage, and the code does need some cleanup. Also, it would probably need some more documentation.
The goal is to provide a drop-in replacement for matplotlib's TrapezoidMapTriFinder, but the following items are not done yet:
However, we already go a little further in a few respects and there are other things coming:
f32 in addition to f64 for the point coordinatesContributions are welcome!
Feel free to open an issue or a PR if you find a bug or want something to be improved.
This work has been greatly influenced by the following:
matplotlib's C++ implementation: this is where I first learned about this algorithm, and the present project is very much indebted to this implementation. There was a comment that mentioned the De Berg book which I mention below.