https://github.com/xarray-contrib/xoak
xarray extension that provides tree-based indexes used for selecting irregular, n-dimensional data.
https://github.com/xarray-contrib/xoak
grid indexing mesh xarray
Last synced: 2 months ago
JSON representation
xarray extension that provides tree-based indexes used for selecting irregular, n-dimensional data.
- Host: GitHub
- URL: https://github.com/xarray-contrib/xoak
- Owner: xarray-contrib
- License: mit
- Created: 2020-06-27T12:33:22.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-23T19:22:47.000Z (about 3 years ago)
- Last Synced: 2025-03-28T03:32:42.287Z (11 months ago)
- Topics: grid, indexing, mesh, xarray
- Language: Python
- Homepage: https://xoak.readthedocs.io
- Size: 640 KB
- Stars: 61
- Watchers: 8
- Forks: 5
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# xoak
[](https://github.com/xarray-contrib/xproj/actions/workflows/test.yaml?query=branch%3Amaster+event%3Apush)
[](https://codecov.io/github/xarray-contrib/xoak?branch=master)
[](https://xoak.readthedocs.io/en/latest/?badge=latest)
[](https://mybinder.org/v2/gh/xarray-contrib/xoak/master?filepath=doc%2Fexamples)
Xoak is an Xarray extension that allows point-wise selection of irregular,
n-dimensional data encoded in coordinates with an arbitrary number of
dimensions.
It provides a built-in index adapter for
[Scipy](https://docs.scipy.org/doc/scipy/reference/)'s `cKDTree`, as well as
adapters for index structures implemented in these 3rd-party libraries (optional
dependencies):
- [Scikit-Learn](https://scikit-learn.org): `BallTree` and `KDTree`, which
support various distance metrics.
- [pys2index](https://github.com/benbovy/pys2index): `S2PointIndex` for
efficient indexing of lat/lon point data, based on `s2geometry`.
Xoak also provides a mechanism for easily adding and registering custom index adapters.
## Install
Xoak can be installed using conda (or mamba):
```bash
$ conda install xoak -c conda-forge
```
or pip:
```bash
$ python -m pip install xoak
```
Xoak's optional dependencies can be installed using conda:
```bash
$ conda install scikit-learn pys2index -c conda-forge
```
## Documentation
Documentation is hosted on ReadTheDocs: https://xoak.readthedocs.io/
## License
MIT License, see LICENSE file.