Skip to main content

rayzon

CI Release

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:

  1. Read a raster chunk once.
  2. Find candidate features that intersect that chunk.
  3. Rasterize only the local polygon window (not the full chunk unless required).
  4. Emit pyarrow blocks of flattened pixel data per intersecting block and leverages Ray's AggregateFnV2 to 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 AggregateFnV2 for extensible reductions: Chunk work emits PyArrow blocks for features intersecting each chunk, then Ray can groupby and reduce those blocks with AggregateFnV2. 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)

Source distribution for rayzon 0.1.0
File Size Uploaded
rayzon-0.1.0.tar.gz 203.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rayzon 0.1.0
File Interpreter ABI Platform
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 log

Release 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

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page