home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 448082431

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
448082431 MDU6SXNzdWU0NDgwODI0MzE= 2986 How to add a custom indexer. 397386 closed 0     4 2019-05-24T09:56:25Z 2023-08-23T12:24:21Z 2023-08-23T12:24:20Z CONTRIBUTOR      

Hello,

I have written a set of indexers for 1D, 2D and 3D geodetic and Cartesian data (up to 5 dimensions for Cartesian data).

I used the Boost/C++ library to write the multidimensional data search algorithm. This tree (R*Tree) is impressive for its performance. It can be built in a few seconds with several million points and made requests for a few seconds with several million points.

```python import numpy as np

Install it with conda, if you want, only for python3.7: conda install pyindex -c fbriol

import pyindex.core as core

lon = np.random.uniform(-180.0, 180.0, 20484096) lat = np.random.uniform(-90.0, 90.0, 20484096)

You can not set an altitude if it is not necessary.

alt = np.random.uniform(-10000, 100000, 2048*4096)

WGS system used

system = core.geodetic.System()

RTree

tree = core.geodetic.RTree(system) %timeit tree.packing(np.asarray((lon, lat, alt)).T)

3.84 s ± 129 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)

coordinates = np.asarray(( np.random.uniform(-180.0, 180.0, 10000), np.random.uniform(-90.0, 90.0, 10000), np.random.uniform(-10000, 100000, 10000))).T %timeit tree.query(coordinates)

18 ms ± 377 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)

``` I'm trying to use these indexes with Xarray, but I didn't quite understand how to interface with xarray.

Is there anyone who could explain to me how to write my own indexer to test these indexers with xarray? Thank you in advance.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/2986/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed 13221727 issue

Links from other tables

  • 1 row from issues_id in issues_labels
  • 3 rows from issue in issue_comments
Powered by Datasette · Queries took 0.675ms · About: xarray-datasette