treeIDW
treeIDW is a Python library for performing Inverse Distance Weighting (IDW) interpolation using an efficient KD-tree-based selection strategy.
It is designed to be easy to use for newcomers while offering fine-grained control and performance-oriented options for advanced users in numerical methods and spatial data analysis.
Key Features
- Efficient IDW interpolation using KD-tree nearest-neighbor selection
- Automatic exclusion of boundary nodes with negligible contribution
- Optimized numerical kernels powered by
numba - Scalable to large datasets (millions of interpolation points)
- Simple API with expert-level tunable parameters
Installation
treeIDW is available on PyPI.
pip install treeIDW
Development installation (from source)
git clone https://github.com/Dorian210/treeIDW
cd treeIDW
pip install -e .
Dependencies
The core dependencies are:
numpyscipynumba
These are automatically installed when using pip.
Package Structure
-
treeIDW.treeIDW
Core IDW interpolation engine.
Uses a KD-tree to select only boundary nodes with significant influence, improving both accuracy and performance. -
treeIDW.helper_functions
Low-level, performance-critical routines for IDW weight computation.
Implemented withnumba, including vectorized and parallelized variants. -
treeIDW.weight_function
Definition of the IDW weight function.
The default implementation uses inverse squared distance, but custom weight laws can be implemented if needed.
Examples
Example scripts are provided in the examples/ directory:
-
Graphical demonstration
Interpolation of a rotating vector field inside a square domain. -
Large-scale computation
Propagation of a scalar field from 1,000 boundary nodes to 1,000,000 internal points, highlighting scalability. -
Logo generation
The generation process of the treeIDW logo itself, where the letters “IDW” are encoded as a vector field and interpolated on a 2D grid.
Documentation
- Online documentation: https://dorian210.github.io/treeIDW/
- API reference is also available in the
docs/directory of the repository.
Contributions
This project is currently not open to active development contributions.
However, bug reports and suggestions are welcome via the issue tracker.
License
This project is distributed under the CeCILL License.
See LICENSE.txt for details.
Metadata
Release files for treeIDW 1.0.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 | |
|---|---|---|---|
| treeidw-1.0.2.tar.gz | 8.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| treeidw-1.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.2 kB
Release files / treeidw-1.0.2.tar.gz
| Download URL | treeidw-1.0.2.tar.gz |
|---|---|
| Size | 8.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0dadadec414f9f74cab72d76a7d8f281609187cd0112f16570ba9d696f18470b
|
|
BLAKE2b-256 checksum How to use checksums |
1855826e2543811c94a31aebe961a848b1b58d304f7244eecd72821f9485dfee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.23
|
Release files / treeidw-1.0.2-py3-none-any.whl
| Download URL | treeidw-1.0.2-py3-none-any.whl |
|---|---|
| Size | 8.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4880e677d1c1d2d58ee3b69893f351c6241167405f729b224d155c7bf4f029a2
|
|
BLAKE2b-256 checksum How to use checksums |
f750cf22aadc95e2af251effe199ae1decdb4edcd22da9af9eefdb85c94191ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.23
|