html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue https://github.com/pydata/xarray/issues/2028#issuecomment-1422518769,https://api.github.com/repos/pydata/xarray/issues/2028,1422518769,IC_kwDOAMm_X85Uyenx,4160723,2023-02-08T12:29:27Z,2023-02-08T12:41:00Z,MEMBER,"@gewitterblitz there is a kdtree-based index example in #7041 that works with multi-dimensional coordinates. You could also have a look at https://xoak.readthedocs.io/en/latest/ (it doesn't use Xarray indexes - soon hopefully - so the current API is via Xarray accessors). EDIT: seeing your previous https://github.com/pydata/xarray/issues/2028#issuecomment-921926536, not sure how you could use slices for label selection using those indexes as I don't think the wrapped scipy / sklearn kdtree objects support range queries. Other spatial indexes may support it (e.g., there's an example in https://github.com/martinfleis/xvec of selecting points using a `shapely.box`, although currently it only supports 1-d geometry coordinates).","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,309691307 https://github.com/pydata/xarray/issues/2028#issuecomment-1421222703,https://api.github.com/repos/pydata/xarray/issues/2028,1421222703,IC_kwDOAMm_X85UtiMv,4160723,2023-02-07T18:01:39Z,2023-02-07T18:01:39Z,MEMBER,"@aberges-grd If your non-index coordinate supports it (I guess it does?), you could assign a default index to the coordinate with `set_xindex` and then use slices for selection like any other (dimension) coordinate backed by a pandas index.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,309691307 https://github.com/pydata/xarray/issues/2028#issuecomment-1265252754,https://api.github.com/repos/pydata/xarray/issues/2028,1265252754,IC_kwDOAMm_X85LajmS,4160723,2022-10-03T10:38:57Z,2022-10-03T16:45:35Z,MEMBER,"With the last release v2022.09.0, this is now possible via `.set_xindex()`: ```python a = a.set_xindex(""currency"") a.sel(currency=""EUR"") # # array([20, 30]) # Coordinates: # * country (country)