This gets us almost all the way: by translating the cell ids (both the input cell ids and the neighbours) to array indices, we can construct a sparse matrix that has a shape of (n_output_cells, n_input_cells). This matrix is only symmetric if we cover the whole earth, otherwise n_output_cells < n_input_cells due to the padding.
To allow chunked sparse matrices (e.g. matrices where coords + data are already bigger than memory), we need to be able to call create_sparse_matrix using dask.array.apply_gufunc / dask.array.map_blocks. This does not work yet (or at least, it has not been tested), so we need to fix that to before closing #19.
This gets us almost all the way: by translating the cell ids (both the input cell ids and the neighbours) to array indices, we can construct a sparse matrix that has a shape of
(n_output_cells, n_input_cells)
. This matrix is only symmetric if we cover the whole earth, otherwisen_output_cells < n_input_cells
due to the padding.To allow chunked sparse matrices (e.g. matrices where coords + data are already bigger than memory), we need to be able to call
create_sparse_matrix
usingdask.array.apply_gufunc
/dask.array.map_blocks
. This does not work yet (or at least, it has not been tested), so we need to fix that to before closing #19.