xoak.IndexAdapter

class xoak.IndexAdapter(**kwargs)[source]

Base class for reusing a custom index to select data in xarray.DataArray or xarray.Dataset objects with xoak.

Subclasses must implement the build() and query() methods, which are called to build a new index and query this index, respectively.

If any options are necessary, they should be implemented as arguments to the __init__() method.

__init__(**kwargs)[source]

Methods

__init__(**kwargs)

build(points)

Build the index from a set of points/samples and their coordinate labels.

query(index, points)

Query points/samples,