ArrowTiles (arrowtiles)
ArrowTiles (pip install arrowtiles) is a deterministic DuckDB + Rust (PyO3) spatial pyramid builder, reference reader, and validator that packs multi-million to billion-row Parquet datasets (such as the 1.8 billion row ESA Gaia DR3 catalogue or 2.84 million LMSys UMAP embeddings) into single-file, HTTP Range-streamable .arrowtiles (v0.1) archives.
- Wire-Format Specification:
docs/SPEC.md - Range & Decode Benchmarks vs. Parquet:
docs/BENCHMARK_parquet_vs_arrowtiles.md - Companion WebGPU Viewer Engine: deepgraph (
npm install deepgraph,CC BY-NC 4.0+ commercial license)
Why .arrowtiles? ("PMTiles for Point Clouds & Embeddings")
Traditional multiscale scatterplots write hundreds of thousands of tiny .feather or .bin files (exhausting S3 PUT budgets and browser HTTP connection pools), while raw remote Parquet files require fetching wide multi-megabyte row groups for coarse overviews.
.arrowtiles packs a multiscale priority quadtree of Zstd-compressed, schema-stripped Apache Arrow IPC RecordBatches inside a standard PMTiles v3 single-file container:
- Single-file CDN/S3 deployment: Zero server logic—any static bucket or HTTP Range server streams tiles directly to WebGPU workers.
- Byte-for-byte deterministic builds: Rebuilding the same Parquet input produces an identical SHA-256
.arrowtilesarchive across runs and--resumecheckpoints. - Zero-copy GPU column alignment: Coordinates quantize to
x_u16/y_u16per tile while categorical dictionaries (UInt8/UInt16) and global columnmin/maxstatistics live in the single PMTiles JSON header.
Architecture: Deterministic 2-Pass Pipeline
flowchart TD
A[("Input Parquet File(s) / Glob")] -->|"Single-Pass SQL Preflight + Priority Order"| B["DuckDB Out-of-Core Stream"]
subgraph "Pass 1: Deterministic 2-Stage Bucketing (Rust PyO3)"
B -->|"Arrow C Data Interface"| C["Stage A (Rayon): Stateless 20-bit Hilbert & Cell Coords"]
C --> D["Stage B (Sequential): Priority Slot Claiming (even_coverage / proportional)"]
D --> E[("Per-Zoom Partitions: partitions/z_00..z_NN.parquet + SHA-256 manifest.json")]
end
subgraph "Pass 2: Per-Zoom Hilbert Sort & Parallel Zstd Packing"
E -->|"Per-Zoom Hilbert Order"| F["DuckDB Per-Level Stream"]
F -->|"Arrow C Data Interface"| G["Rust Rayon Pool: Strip Arrow Schema + Zstd Compress"]
G --> H[("Single .arrowtiles Archive (PMTiles v3)")]
end
- Single-Pass SQL Preflight (
arrowtiles/builder.py): DuckDB computes global bounds, row counts,id_coluniqueness, numericmin/maxstats, and categorical dictionaries in one scan—automatically omitting unrequested Pandas index columns (__index_level_<N>__) and high-cardinality free-text columns (distinct > 4,096), and downcasting finite in-rangeFloat64(DOUBLE) payload columns toFloat32unless--keep-float64is passed. - Pass 1 — Zero-Atomic 2-Stage Bucketer (
arrowtiles-engine/src/lib.rs): DuckDB streams rows ordered by(priority_key, row_id ASC)—either an explicitsort_col(e.g.phot_g_mean_mag ASC) or portableSplitMix64(row_id, seed)—into Rust via the Arrow C Data Interface. Stage A computesfast_hilbertcoordinates across all CPU cores; Stage B assigns zoom levels deterministically without atomic contention and writes per-zoom Parquet partitions (z_00.parquet .. z_NN.parquet) plus a cryptographicmanifest.json(--resume). - Pass 2 — Per-Zoom Packing: Each zoom partition is sorted in memory by
(tile_id, hilbert_20, priority_ord), stripped of redundant per-tile Arrow IPC schema headers (stored once as base64arrow_schemain metadata), Zstd-compressed in parallel via Rayon, and written into a PMTiles v3 archive.
Installation & Source Build
pip install arrowtiles
Building from Source (Python 3.10+ & Rust 1.80+)
git clone https://github.com/kai-erlenbusch/arrowtiles.git
cd arrowtiles
python -m venv .venv
# Windows: .venv\Scripts\activate | Linux/macOS: source .venv/bin/activate
pip install "maturin>=1.4,<2.0"
pip install -e ".[dev]" --no-build-isolation
maturin develop --release
# Run the test suite (53 tests):
pytest -v
CLI Usage (arrowtiles / python -m arrowtiles)
# 1. Generic 2D embedding / point cloud (select active visual columns for fast overview streaming):
arrowtiles build \
--input "embeddings.parquet" \
--output "embeddings.arrowtiles" \
--x-col x_umap --y-col y_umap \
--columns model clusters_14 num_of_tokens \
--categorical-cols clusters_14
# 2. ESA Gaia DR3 Hammer sky preset (phot_g_mean_mag ASC + even_coverage, 100k tile capacity):
arrowtiles build \
--preset gaia \
--input "gaia_batches/*.parquet" \
--output "gaia.arrowtiles"
# 3. Validate an .arrowtiles archive against SPEC.md v0.1 (human report or --json):
arrowtiles validate "embeddings.arrowtiles"
# 4. Inspect PMTiles header, Arrow schema, and JSON metadata:
arrowtiles inspect "embeddings.arrowtiles"
Wide Tables &
--columns: Each.arrowtilesv0.1tile packs all retained columns into one Arrow IPCRecordBatchso browsers fetch an entire tile in 1 HTTP Range request. On wide 30+-column tables, pass--columns <col1> <col2> ...(space- or comma-separated) to retain only the columns needed for visual encoding and keepZ=0..2overview bytes below10 MiB.
Key arrowtiles build Options
| Argument | Description |
|---|---|
--input |
(Required) Path or glob pattern to input Parquet file(s). |
--output |
(Required) Output .arrowtiles archive path. |
--x-col, --y-col |
Source coordinate columns (required for generic builds). |
--columns |
Space- or comma-separated subset of payload columns to retain in tiles. |
--categorical-cols |
Space- or comma-separated columns (including integer cluster IDs) to dictionary-encode as UInt8/UInt16. |
--preset gaia |
Astronomical Galactic Hammer projection (phot_g_mean_mag ASC, even_coverage, 100,000 tile capacity). |
--sampling |
proportional (generic default, 25,000 capacity) or even_coverage (G×G sub-grid occupancy at Z <= 6). |
--tile-capacity |
Max rows per non-leaf tile (25,000 generic default; 100,000 on --preset gaia). |
--max-zoom |
Nominal maximum quadtree zoom level before overflow spilling (default: 14). |
--sort-col, --sort-dir |
Explicit priority column (ASC or DESC); defaults to deterministic SplitMix64(row_id, seed). |
--seed |
Random seed for default SplitMix64 priority ordering (default: 42). |
--id-col |
Optional unique unsigned integer row ID column (defaults to dense 0 .. N-1 Parquet offset). |
--keep-source-xy |
Retain raw Float32/Float64 source X/Y columns alongside quantized x_u16/y_u16. |
--keep-float64 |
Retain Float64 (DOUBLE) payload columns instead of downcasting in-range floats to Float32. |
--temp-dir, --resume |
Persist Pass 1 zoom partitions in --temp-dir and reuse verified SHA-256 manifest.json on --resume. |
Python API Reference
from arrowtiles import ArrowTilesReader, build_gaia, build_generic, validate_file
# 1. Build a v0.1 archive from Parquet:
summary = build_generic(
input_parquet="embeddings.parquet",
output_path="embeddings.arrowtiles",
x_col="x_umap",
y_col="y_umap",
columns=["model", "num_of_tokens"],
sampling="proportional",
)
# 2. Validate SPEC.md v0.1 invariants:
report = validate_file("embeddings.arrowtiles")
assert report.ok, report.errors
# 3. Inspect metadata and read decoded pyarrow.Table tiles:
with ArrowTilesReader("embeddings.arrowtiles") as reader:
header = reader.header() # PMTiles v3 header dict (max_zoom, num_addressed_tiles, ...)
meta = reader.metadata() # ArrowTiles v0.1 JSON metadata (bounds, stats, priority, ...)
schema = reader.schema() # pyarrow.Schema of stored tile columns
coords = reader.list_tiles() # [(z, x, y), ...] non-empty tile coordinates
# Read root tile (0, 0, 0) with dequantized (x_decoded, y_decoded) & string category labels:
root_table = reader.read_tile(0, 0, 0, decode_coords=True, decode_categories=True)
# Stream all non-empty tiles in PMTiles Hilbert order:
for (z, x, y), tile_table in reader.iter_tiles(decode_coords=False):
pass
For contributor invariants and wire-format rules, see AGENTS.md and docs/SPEC.md.
Roadmap
- 2.5D Extrusion & 3D Octree Tiling (
tiling: "octree-3d"): Extending the 53-bit PMTilestile_idcurve andxyz_u16quantization to volumetric 3D point clouds whilev0.1readers cleanly gate on"tiling"and"required_features". - Single-File Column Groups (
v0.2+): Partitioning wide scientific tables into a core geometry group plus on-demand attribute column groups inside a single.arrowtilesarchive. - Python / Jupyter Integration (
pydeepgraph): Interactiveanywidgetembedding powered bydeepgraphandArrowTilesReader. - Loadable DuckDB Extension: Native
COPY (...) TO 'out.arrowtiles' (FORMAT ARROWTILES)SQL sink.
Citing
If you use ArrowTiles in academic or scientific work, please cite:
Erlenbusch, K. (2026). ArrowTiles: Spatial Pyramid Format and DuckDB + Rust Builder for Large-Scale Point Clouds and Embeddings [Computer software]. https://github.com/kai-erlenbusch/arrowtiles
Licensing
Licensed under the Apache License 2.0. See LICENSE and NOTICE.
Data Attribution
- ESA Gaia DR3: Gaia data © ESA/Gaia/DPAC (attribution required).
- LMSys-Chat-1M: Subject to its upstream dataset terms and is not redistributed in this repository.
Metadata
Release files for arrowtiles 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 | Provenance | Actions |
|---|---|---|---|---|
| arrowtiles-0.1.0.tar.gz | 65.0 kB | With provenance | Details for arrowtiles-0.1.0.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| arrowtiles-0.1.0-cp39-abi3-win_amd64.whl | CPython 3.9 | abi3 | Windows x86-64 | Details for arrowtiles-0.1.0-cp39-abi3-win_amd64.whl |
| arrowtiles-0.1.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ x86-64 | Details for arrowtiles-0.1.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
| arrowtiles-0.1.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ ARM64 | Details for arrowtiles-0.1.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl |
| arrowtiles-0.1.0-cp39-abi3-macosx_11_0_arm64.whl | CPython 3.9 | abi3 | macOS 11.0+ ARM64 | Details for arrowtiles-0.1.0-cp39-abi3-macosx_11_0_arm64.whl |
| arrowtiles-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl | CPython 3.9 | abi3 | macOS 10.12+ x86-64 | Details for arrowtiles-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl |
Total release size: 22.7 MB
Release files / arrowtiles-0.1.0.tar.gz
| Download URL | arrowtiles-0.1.0.tar.gz |
|---|---|
| Size | 65.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2d2de6436d6f71e85a13fd959cc273daca65d4f6a1f1514dc4f1e74e72e82c5a
|
|
BLAKE2b-256 checksum How to use checksums |
78185a15e18221ab3ae1f49f7ed98b9dc996f2a2ac55560aa5556b246fced8d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 23, 2026.
Transparency logRelease files / arrowtiles-0.1.0-cp39-abi3-win_amd64.whl
| Download URL | arrowtiles-0.1.0-cp39-abi3-win_amd64.whl |
|---|---|
| Size | 4.2 MB |
| Tags | CPython 3.9 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
270f6b0aef0dcb3b1441dcda6dfded7e72f1a935bc37e9163bfeac874407bf20
|
|
BLAKE2b-256 checksum How to use checksums |
38911b6fb6c38018b650a165b06380446cce63ed06aa49114fa82003c699cbc9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 23, 2026.
Transparency logRelease files / arrowtiles-0.1.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | arrowtiles-0.1.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 4.9 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
e9212d4c735ae1a7d99d264b0ad012765378bee0e5f578884143fd0c9ec072fe
|
|
BLAKE2b-256 checksum How to use checksums |
b0c8bbd08203fd84d3a24102b1eb35b289b5b34d825273f6e26edc9ce413b81d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 23, 2026.
Transparency logRelease files / arrowtiles-0.1.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
| Download URL | arrowtiles-0.1.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl |
|---|---|
| Size | 4.8 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
1d0889104678876eb4d96d9ed2aedf203fc4028fab742064a3aca3d31babb4c4
|
|
BLAKE2b-256 checksum How to use checksums |
94ba1a64011d5799cdc25d6b629fe0c88e66022978020387ff5043943107549c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 23, 2026.
Transparency logRelease files / arrowtiles-0.1.0-cp39-abi3-macosx_11_0_arm64.whl
| Download URL | arrowtiles-0.1.0-cp39-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 4.2 MB |
| Tags | CPython 3.9 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
f0879385011b232e3a74ca863ef51786d9501aef67901e66b6fe3a8b98b8c58b
|
|
BLAKE2b-256 checksum How to use checksums |
1a9f2fcd37f5c5bdcf09e75d934226f23ef9f9bd7fa7dc4877fc6d176f206f51
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 23, 2026.
Transparency logRelease files / arrowtiles-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl
| Download URL | arrowtiles-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 4.5 MB |
| Tags | CPython 3.9 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
8250e1fc5ec81e7293de49e27ebe1c3ff9a32cada28855ebd356a7d48637a801
|
|
BLAKE2b-256 checksum How to use checksums |
3282ad6413a119ee2a6645c36b6f58be468823643a9578101d02339f54c2ed39
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 23, 2026.
Transparency logSecurity for arrowtiles 0.1.0
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.
Full provenance
All 6 files in this release have been uploaded with provenance metadata.
Attestation for arrowtiles-0.1.0.tar.gz
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 Nov 23, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.