rayzon
rayzon is a ray project to execute zonal statistics on zarr arrays.
It is designed for workflows where:
- Raster data is stored as chunked arrays with optional non-spatial dimensions e.g.
(time, band, y, x). - Vector features may overlap.
- Relevant raster chunks are read once, and statistics are computed in a distributed manner with Ray.
The project uses a chunk-first execution model:
- Read a raster chunk once.
- Find candidate features that intersect that chunk.
- Rasterize only the local polygon window (not the full chunk unless required).
- Emit pyarrow blocks of flattened pixel data per intersecting block and leverages Ray's
AggregateFnV2to group and reduce those blocks into final statistics.
This architecture keeps memory usage bounded, avoids repeated raster reads, and makes distributed execution with Ray straightforward.
Features
- Zarr as the storage contract: Zarr gives us chunked, cloud-friendly storage today, while preserving flexibility to plug in VirtualiZarr-backed datasets later without changing the core chunk-first pipeline.
- Ray
AggregateFnV2for extensible reductions: Chunk work emits PyArrow blocks for features intersecting each chunk, then Ray cangroupbyand reduce those blocks withAggregateFnV2. This keeps reduction logic composable and makes new statistics easy to add as new aggregate definitions. - GeoArrow-native geometry transport: GeoArrow lets us read and move geometry types directly in PyArrow form, reducing conversion overhead and keeping feature transport efficient across Ray tasks.
Current Scope
- Chunk/grid utilities for deterministic chunk addressing.
- Feature-to-chunk indexing.
- Windowed rasterization backend.
- Partial stats and reduction pipeline.
- End-to-end pipeline entry points and benchmark hooks.
Installation
Install the base package from PyPI:
pip install rayzon
Install optional extras as needed:
pip install "rayzon[xarray]"
pip install "rayzon[geopandas]"
pip install "rayzon[xarray,geopandas]"
Development
- Install dependencies:
uv sync --extra dev --extra geopandas --extra xarray - Run lint:
uv run ruff check . - Run format check:
uv run ruff format --check . - Run type check:
uv run mypy src - Run tests:
uv run pytest
Release
Releases are cut automatically from main after the CI workflow passes. Use Conventional
Commits for changes that should trigger a release, and semantic-release will:
- compute the next version
- update
pyproject.toml - create the version tag and GitHub release
- build and publish the package to PyPI via GitHub Actions trusted publishing
Metadata
Release files for rayzon 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| rayzon-0.1.0.tar.gz | 203.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rayzon-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 237.3 kB
Release files / rayzon-0.1.0.tar.gz
| Download URL | rayzon-0.1.0.tar.gz |
|---|---|
| Size | 203.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d3ae20f721b8e1a244f4677f7593e210c0d8bf28707525fd3fc5dd84fb167c2d
|
|
BLAKE2b-256 checksum How to use checksums |
7f8fc3fe6d598d8915d908ad136d4b92db93f0ba4a095cf1feae5ed4087ef379
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 17, 2026.
Transparency logRelease files / rayzon-0.1.0-py3-none-any.whl
| Download URL | rayzon-0.1.0-py3-none-any.whl |
|---|---|
| Size | 33.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1ff1f71f35f18005baa0645831d9e3267779178ed46960d4b750c5cdfdadd1de
|
|
BLAKE2b-256 checksum How to use checksums |
51966a34c5d6ec9279c024f397873f76ff7eb4e0a4b2730ff24bc34704b2c55d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 17, 2026.
Transparency log