xoak
xoak copied to clipboard
Return distance to the nearest neighbor in query results
This has been suggested in #11 and might be useful for further processing.
The API could look like this:
ds_sel = ds.xoak.sel(..., distances=None)
where distances may also accept a string that would then correspond to the name of a new data variable in ds_sel holding distance values.
Alternatively, we could add another method to the accessor if we want to keep xarray.Dataset.xoak.sel() close to the original xarray.Dataset.sel().