grid-indexing: Fast and scalable indexing of grids
inferring grid geometries
For grids that fit into memory, or for datasets that include coordinate bounds, the cell polygons can be inferred:
source_geometries = grid_indexing.infer_cell_geometries(ds)
in-memory index
If the geometries fit comfortably into memory (mostly for small grids), we can use the in-memory implementation:
# geoarrow does not support multiple dimensions, so we need to also pass along the shape
source_shape = ...
index = grid_indexing.RTree(source_geometries, source_shape)
overlapping_cells = index.query_overlap(target_geometries, target_shape)
The result is a sparse boolean matrix with the same shape as the source / target polygons combined (dimension order is (target_dim1, ..., source_dim1, ...)).
distributed index
The distributed index allows searching for overlapping cells, even when the grids are larger than memory. It is currently built using dask.
The procedure is almost the same:
# dask.array objects containing shapely polygons
chunked_source_geoms = ...
chunked_target_geoms = ...
index = grid_indexing.distributed.DistributedRTree(chunked_source_geoms)
overlapping_cells = index.query_overlap(chunked_target_geoms)
Note that this will compute both source and target geometries to determine chunk boundaries. overlapping_cells, however, is truly lazy.
Metadata
Release files for grid-indexing 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 11.8 MB
Release files / grid_indexing-0.1.1-cp313-cp313-manylinux_2_35_x86_64.whl
| Download URL | grid_indexing-0.1.1-cp313-cp313-manylinux_2_35_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.13 Linux glibc 2.35+ x86-64 |
|
SHA-256 checksum How to use checksums |
fac51aa09eb8af438f02ce9aa8a0e8aac865200b7352f4b6e10aa839acafbc84
|
|
BLAKE2b-256 checksum How to use checksums |
5a68889796ee0114e202562f6d40ba805a6628c111102bcf1350ac542675fca4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 20, 2025.
Transparency logRelease files / grid_indexing-0.1.1-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | grid_indexing-0.1.1-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 903.0 kB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
6898ca24f04f653d22fae6469925d390eeecc697e2c51df1b843a4ba837f809b
|
|
BLAKE2b-256 checksum How to use checksums |
8f687b9df74528a488e3e960012e7760e6157853a1bbc199fef0f1a84506aefa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 20, 2025.
Transparency logRelease files / grid_indexing-0.1.1-cp313-cp313-macosx_10_12_x86_64.whl
| Download URL | grid_indexing-0.1.1-cp313-cp313-macosx_10_12_x86_64.whl |
|---|---|
| Size | 944.4 kB |
| Tags | CPython 3.13 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
38bfc3976ff24b58c14beeb70d52977fb9d7a19e9e05eba8aa633c555f195f03
|
|
BLAKE2b-256 checksum How to use checksums |
4006c7b61f78067dfa45eeae603ff7419ee00c28c1082fbfb12cfea15318ab10
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 20, 2025.
Transparency logRelease files / grid_indexing-0.1.1-cp312-cp312-manylinux_2_35_x86_64.whl
| Download URL | grid_indexing-0.1.1-cp312-cp312-manylinux_2_35_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.12 Linux glibc 2.35+ x86-64 |
|
SHA-256 checksum How to use checksums |
09dcdd82e92776f23d1dd2b277da4621e14a15d886cb7e687762e8343115c9ed
|
|
BLAKE2b-256 checksum How to use checksums |
81b33f7efd67d5da8c6c8ffb7fa181555c37fe5f79a804e37de3e48ad35b8e50
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 20, 2025.
Transparency logRelease files / grid_indexing-0.1.1-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | grid_indexing-0.1.1-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 903.4 kB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
c46db8518746acd11c7dcf106c7ac17374c76326d72b6efd9982d58345e2b9bf
|
|
BLAKE2b-256 checksum How to use checksums |
b2ba314c33829abba9f76c269b91f476b1b741946214784e3267105e9491d3e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 20, 2025.
Transparency logRelease files / grid_indexing-0.1.1-cp312-cp312-macosx_10_12_x86_64.whl
| Download URL | grid_indexing-0.1.1-cp312-cp312-macosx_10_12_x86_64.whl |
|---|---|
| Size | 944.4 kB |
| Tags | CPython 3.12 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
4e45bc3e7d411dc0065235eb221fd7f44f39bd2f23d85eb205b2567767516f12
|
|
BLAKE2b-256 checksum How to use checksums |
eb8d7a95253bc9ecc9b5b588bf20b65e7b365f4f069e3b44aa74edaa7779932e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 20, 2025.
Transparency logRelease files / grid_indexing-0.1.1-cp311-cp311-manylinux_2_35_x86_64.whl
| Download URL | grid_indexing-0.1.1-cp311-cp311-manylinux_2_35_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.11 Linux glibc 2.35+ x86-64 |
|
SHA-256 checksum How to use checksums |
bf83f6c54ca7ff19e4483f1013ce5c237da63660144c98f8993a0f0e447622b0
|
|
BLAKE2b-256 checksum How to use checksums |
2b187230de86304345e8e2fc986b2af2f0e903e1284c6d11a7531dd3de8581da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 20, 2025.
Transparency logRelease files / grid_indexing-0.1.1-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | grid_indexing-0.1.1-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 906.7 kB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
1bf6f2c59c816f99862a2005a7b40e7572c11539c9235b4b7cf91535b19f329c
|
|
BLAKE2b-256 checksum How to use checksums |
df284c11101775f8ef9138a3eb9b1b14e5836913bccfb9d70910be1f7c4a3e0a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 20, 2025.
Transparency logRelease files / grid_indexing-0.1.1-cp311-cp311-macosx_10_12_x86_64.whl
| Download URL | grid_indexing-0.1.1-cp311-cp311-macosx_10_12_x86_64.whl |
|---|---|
| Size | 949.6 kB |
| Tags | CPython 3.11 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
7dee8f1054bd9382448c50a30fd4e09b8a2c26ac5820882a128b47269f6a0967
|
|
BLAKE2b-256 checksum How to use checksums |
d464fa23cfeb309dd2d77ef2ea91364d6a6fb22dcf0b44e94fb2b9944dc0c667
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 20, 2025.
Transparency logRelease files / grid_indexing-0.1.1-cp310-cp310-manylinux_2_35_x86_64.whl
| Download URL | grid_indexing-0.1.1-cp310-cp310-manylinux_2_35_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.10 Linux glibc 2.35+ x86-64 |
|
SHA-256 checksum How to use checksums |
46512dede5b3eb57ead75d5413dd84f4406e5d6a626f938a2c9cddac6c358b6a
|
|
BLAKE2b-256 checksum How to use checksums |
a7230c033926a7a690842a1eacb82055a67e48d54d3f57b78e6a39bc4139b35e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 20, 2025.
Transparency logRelease files / grid_indexing-0.1.1-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | grid_indexing-0.1.1-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 907.0 kB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
5bfdb0b184036c01533d669b502791b833fef71392275fe2e9141ec9f1a18c0b
|
|
BLAKE2b-256 checksum How to use checksums |
364d2e634af4ff882187e5da20e41d6dc690a4ff74e37c4dafb14306bb2dc6e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 20, 2025.
Transparency logRelease files / grid_indexing-0.1.1-cp310-cp310-macosx_10_12_x86_64.whl
| Download URL | grid_indexing-0.1.1-cp310-cp310-macosx_10_12_x86_64.whl |
|---|---|
| Size | 950.1 kB |
| Tags | CPython 3.10 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
7f0bbe9269473ccf94d5837c42ccd72f6843220cfe17a3576ae0bd7ad7184c84
|
|
BLAKE2b-256 checksum How to use checksums |
47ff13d4895e45b2cbd23439de4d21fe341fe30c4a5d28fd8fe70ce4c1ddcdc5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 20, 2025.
Transparency log