Skip to main content

wxylib/design

Design notes, surveys and staging plans for wxylib: Rust tooling that takes the modular concepts GDAL already contains, gives each one its own home, and builds an ecosystem of crates, bindings and documentation around them.

New to wxylib? Start at https://wxylib.org/docs/: what works, how-tos, explainers and how to help. These documents are rendered there too, under Design.

Nothing here is code. Each document ends in a gate: a decision to accept, revise or reject before the next document starts.

The R0 to R6 raster-vector spectrum that doc 02 builds the data model on

Principles

  • Slow incremental steps that are productive, consistent, modular and extensible.
  • Separate planning, reading and computing. A plan can be inspected, serialised and costed before any pixel is touched (the rwarp model).
  • Leverage existing crates (object_store, async-tiff, zarrs, proj, proj4rs, vaster) where they fit. Build only what has no good home.
  • GDAL is the inspiration, the test oracle and, for now, a workaround we may call, never the basis. If we reach for functionality before we have the foundation for it, we stop and build the foundation. Nothing we publish carries “gdal” in its name.
  • Virtualisation is the default pathway for formats. A format we need gets a scanner that emits chunk references (byte ranges plus codecs) readable as virtual Zarr, rather than a reader of its own. This bridges to future format standardisation and defers legacy complexity; GDAL and other tools may serve as scanners where nothing else exists.
  • Every module, design choice and stage carries a rationale: what we get, what it costs, and what happens if we don’t do it.

Plan

Step Document Gate
1 Module survey Agree the module map (passed 2026-10-16)
2 One data model, from raster to vector Accept core types and traits (provisional)
3 Architecture and staged roadmap Pick the first implementation stage (S1 chosen, provisional)
4 The landscape: related work, what to leverage, what to track Upstream-first, Icechunk refs, browser CRS, conventions work (passed 2026-10-16)
5 Pain points in GDAL, R and Python S4b mdim warp, curvilinear after S5, an extraction stage, no global state (passed 2026-10-16)

Whether wxylib earns a long-term commitment is tested by four commit criteria, with their live status.

Which stages are built is kept in one place, doc 03’s stages section; what they add up to for a user is on the capability map.

Musings

Side notes, not plans and not gated. A musing becomes work only by being picked up into a numbered document. Some end in questions; where those have been answered, the status says so and the musing records the decisions.

Status says how much of a musing is built, checked against the merged work in core, fixtures, docs and web (2026-10-28). Each musing repeats its line, with links, under its own status:

  • Implemented: what the musing proposed for wxylib is merged.
  • Partly implemented: some of it is merged; the rest is listed.
  • Decided, not built: its questions are answered; no stage has started.
  • Open: nothing proposed is built yet.
  • Assessment: a review or measurement that proposes no build of its own.
Musing About Status
m01: Downstream UX, blue sky What front ends (a modular QGIS among them) could build from the core, and which doors the core keeps open for them Partly implemented: plans you can see, rendering as a warp (web demos); catalogue, map document and navigator open
m02: Pilot, a byte-reference table as a wxy-virtual source The mdim-refs/0.2 table (OISST) through wxy-virtual into Icechunk, checked against GDAL Implemented: fixtures #1, core #2, walk-through on the docs site
m03: Presentation on raw data, and the map as a document Image scaling that travels with untouched values, and a map that references its sources (doc 05, X1 and X2) Open; nothing built
m04: The loftier goals, reassessed Doc 03 section 5 and m01 to m03 checked against what had landed by 2026-10-17 Assessment; three of the four items in its section 5 order done
m05: The chunk cache as a growing implicit store Keeping the encoded bytes of every chunk a run reads beside the byte-reference rows, so a store accumulates without dictating a format Implemented (pilot C1, wxy-cache, inside S3c); T1 and the copy state open
m06: Response to the foundation assessment An outside review of wxylib checked point by point; proposes the flat refs store with the cache inside, and a Bluelink-shaped fixture Partly implemented: section 6 built as S3c (wxy-refs); Bluelink CI fixture, binding pins and scale open (section 8)
m07: Index space and coordinate space The playproj grids placed on the ladder, the gaps they show, and five small Zarr fixtures to pin them Partly implemented: fixtures I1 and I3; I2, I4, I5 and the vertical mapping open
m08: Point clouds, lidar and PDAL on the ladder Point clouds as R6 on an R1 lattice with an R4 octree chunk scheme (COPC), the Rust crates, and a stance: ladder moves, PDAL as oracle, no processing toolkit Decided 2026-10-18 (all six as recommended); not built
m09: The modules that don’t exist yet The CLI as an operation registry, VSI through object_store, byte views and a chain grammar as the real gaps, a crate check before each stage, and GDAL’s other infrastructure Open: five questions with recommended answers; none taken up
m10: Overlapping COG mosaics, measured on REMA v2 and COP30 Overlap, variable chunk sizes and padded tiles as three problems; tile-edge and origin cuts as duals; the predictor codec as the first blocker Open, measured; one prerequisite in (wxy-predictor, core #13); requirements in section 8
m11: Quiet operations What composite raster readers do without saying so, a ladder from hidden to separated, and REMA v2, COP30 and Sentinel-2 as the fixtures that expose it Open; COP30 source table in measurements/cop30
m12: An adaptive densify engine (bigcurve in Rust) Where a Rust port of bigcurve’s adaptive densify belongs, how it fits the non-affine grid front ends, and the one change it needs (a pluggable edge model) Partly implemented, outside wxylib: hypertidy/bigcurve-rs stage 1 (#1)
m13: Four views of one byte table The mdim VRT, flat table, kerchunk and Icechunk views of the live BRAN2023 store; where the proofs sit; next steps by value; uses for learning, analysis and teaching Partly implemented: three views read identically to GDAL, BRAN2023 and GHRSST examples; public home, CI fixture and plan gaps open
m14: What is missing Survey of widely used ocean, sea ice, reanalysis and topography datasets with no cloud copy or published byte-reference index, ranked by value and harvest difficulty Open, for review; nothing harvested yet
m15: mdim-refs/0.2 reconciliation The spec against its R reference implementation, the fixtures and the BRAN2023 and MUR stores: placements and info encodings settled, placement-first chunk lookup, rank and codec rules, SQLite vs Parquet roles Implemented on the wxylib side: spec edits, fixtures #9; per-axis edges open
m16: A versioned byte-ref table Lance, Parquet fragments with a create-only manifest commit, and Icechunk, each holding the same GHRSST MUR 2024 history; Icechunk features as table operations, measured; then the chunk bytes held in Lance (versioned, and mixed with refs in one blob column); bytes checked against GDAL Assessment, measured: Lance not adopted for refs, as recommended; Lance first for held bytes
m17: Self-describing reference stores A description contract (what a published store must state, what may stay open) against mdim-refs/0.2 and the wxy readers; two BRAN2023 builds and the fixtures checked, a rounded scale_factor (about 0.5 C) and a fill conflict found; a one-file check with a GDAL oracle Partly implemented: fill handling (core #17), the one-file check; producer packing fix and CI check open
m18: An editing canvas with CAD control A personal canvas for drawing and editing vector data exactly: Manifold, QGIS, CAD and web drawing libraries as prior art; snapping, typed locks and an operation log as a small headless engine; the edit frame, an underlay warped by wxy-warp, and input and output left as slots; a prototype in wxylib/web Partly implemented: prototype in wxylib/web (web #11 to #14); section 8 next steps open
m19: The exact footprint What controlledburn does inside rwarp’s exact footprint for average and mode, how it compares with GDAL’s box and what densify buys; where the time goes (burn setup and per-cell records, and transforms the approximate transformer cannot reach); a shared lattice, a coverage window and a boundary integral over row prefix sums, measured; patches for controlledburn-rs and rwarp; adaptive densify with bigcurve as the next step Open, measured: patches in review as controlledburn-rs#13 and rwarp#10, #11
m20: rwarp, controlledburn and bigcurve as the movement layer What is left in each crate, what each could become (a conservative regridder, one exact coverage engine, adaptive edges), the boundaries and seam between them, what wxy-warp carries that belongs below, a short roadmap per crate, and conservative weights in wxylib (Parquet, ESMF netCDF, wxy weights) Partly implemented: rwarp 0.3 on crates.io with the chunk planner, backmap inverse and weights (rwarp#22), core #24 and #25; wxylib weights files and verb open
m21: Conservative regridding in wxylib Examples for rwarp’s conservative weights in stage order (GHRSST MUR to a quarter degree, BRAN2023 to polar stereographic, an ACCESS-OM2 tripolar grid, a swath, polygons as a mesh, a browser page), measured weight counts and conservation, separable weights for axis-aligned pairs, a drop tolerance, the docs pages it touches, and its use in wxy-warp, the CLI, the bindings and the browser Open: plan; builds on m20 section 8
m22: An array plan IR beside wxylib ArrIR’s most abstract ideas (plans as values over bound datasets, logical plan / storage layout / physical plan, effects and footprints, no silent approximation, grids as schema entities) placed against wxy-domain, Explain plans, wxy-refs and the movement layer; the purity rules held against wxylib; two grid models compared; what adopting costs (no large refactor); comparison points for a later merge plan Open: musing; ArrIR developed independently
m23: Byte-reference harvesting with few dependencies Whether to write HDF5, TIFF and GRIB harvesters or reuse Rust crates (async-hdf5, hdf5-pure, async-tiff, gribberish); both HDF5 crates byte-identical to libhdf5 on OISST and BRAN; the cost is sequential index walks (a level-parallel walk harvests a 5.3 GB BRAN file in 13 to 22 s); a small refharvest foundation (row contract, fetch plan, codec map, oracle harness) and a research track per format Decided (sec 8): refharvest in wxylib, async-hdf5 first with rhdf5 parity, walk cost recorded as metadata; upstream issue pending
m24: Hardening controlledburn, bigcurve and rwarp Audit of the three foundation crates and their seams; two defects fixed (controlledburn-rs crop never compiled; the C++ core had no record-level check against the Rust canon, now 240 cases, all agree); restructure inside repositories (rwarp mesh module without CRS, warp.rs split), not across them; bigcurve stage 2 shipped as the seam; order of work towards controlledburn on curvilinear grids through rwarp Open (sec 9): bindings onto the Rust crate, bigcurve 0.2.0 release
m25: A VRT engine outside GDAL Classic raster VRT, vrt://, multidimensional and vector VRT as four families; who else reads them (deck.gl-raster and maplibre-gl-raster: classic mosaics only; terrio: classic, inside its crate; GDAL wasm builds at 3.8); recommends an I/O-free model and planner crate, vrt:// keys as translate flags for all families (vector prototype lowered to OGR VRT, 5 of 5 read by GDAL 3.12.4), and a shared conformance corpus Open (sec 6): approach, crate home, new vrt:// forms, corpus offer
m26: R and Python bindings on the Rust crates Where each R and Python package over controlledburn, bigcurve and rwarp stands (Python controlledburn already on the crate, rwarp-r born on it, R controlledburn one native call); a gated route for R (0.3.2 on C++, rwarp-r clears CRAN first, then controlledburn R in parity mode, then f64 fractions once, then bigcurve R); retiring the C++ cores; wxy packages separate, meeting the others through data; shared extendr, PyO3, vendoring and PROJ conventions Decided (sec 9): gated R route (option A); C++ retirement open
m27: An oracle harness The GDAL oracle harness of m09 sec 6: a format (oracle-case/0) that keeps questions (cases.json) apart from per-version answers, a generic osgeo.gdal recorder with diff and adopt, and a geo-free Rust reader crate oracle-case; cog/ adopted (GDAL 3.8.4 and 3.12.2 byte-identical, wxy-tiff matches both); hosts the VRT corpus in place (31 of 32 reads identical on 3.8.4, vrt:// a_nodata refused) Open (sec 8): name, home, which GDAL versions answer
m28: Warp output-grid defaults Which of CRS, extent, cell size and cell count a warp’s caller gives and what is inferred; gdalwarp’s matrix and GDALSuggestedWarpOutput2 measured on 28 pairs (GDAL 3.8.4) beside odc-geo; recommends an area-keeping suggestion rule that finds tears and drops singular cells (prototype holds at least 90 % of every footprint), aligned extents when a cell size is given, errors instead of silent edge moves, a cell budget; vaster resolves, rwarp suggests Open (sec 9): thresholds on curvilinear sources, recentring offer, cell size plus size
m29: VRT, reimagined A conceptual rework of VRT: its six lasting properties (closure, names, placement, assertion, deferral, emission) against what Zarr, Icechunk, table formats, query engines, JAX, Arrow, wasm and shared memory have built since; one model on three levels (steps, placements, refs) with every existing form a projection, so no new format; measured lowering tiers (GHRSST mdim.vrt 100 % regular refs, COP30 45 % cut and 55 % resampled, USGS 3DEP every placement resampled by a rounded pixel size); the plan as a table; open modes as a named view; a name mapping across GDAL, fsspec, object_store and Icechunk; first corner: VRT in, virtual Zarr out where exact Open (sec 10): tier classifier, classic placements in mdim-refs, VirtualiZarr reader
m30: The rasterwise legacy corpus in modern terms Plan for the rasterwise problem-file archive (31 cases, 143 files by sha256): a check ladder per file (identity, scan, read, refs, wxy read, view, assertion) recorded as oracle-case/0 questions with GDAL as oracle; each costume letter and finding code mapped to its modern expression (mostly an assertion over unchanged bytes); assertion records keyed by sha256 with evidence, emitted as VRT, vrt://, mdim.vrt, Zarr attributes or STAC; usage pipelines; nine browser pages grouped by shared problem; pilot: 28 of 29 data files of release v0.0.12 open in each GDAL 3.8.4 API, and both refusals are expected Open (sec 10): assertion record home, bytes for pages
m31: A view-to-chunk planner for browser viewers Which chunks at which level a view in any CRS needs, as one no-I/O function in rwarp (beside source_window, exported in rwarp-wasm) that any viewer can call; per-screen-tile levels from the local scale instead of one box and one mean scale; measured on a MUR-shaped pyramid: 5.6x fewer bytes for a polar view, 8.5x across the antimeridian, while overviews themselves cut 49x for a globe view and 17x for a polar one; a thin zarr.html viewer and shared pole, seam and horizon test cases Open (sec 8): curvilinear sources, time and depth read-ahead, reduced copies for stores without overviews
m32: wxylib’s position on byterefs The table piloted as mdim-refs/0.2 is now byterefs/0.1 in byterefs/spec; wxylib as reader (wxy-refs), second producer (refharvest), fixtures and oracle harness, owning no format; choices for the implementers’ meeting: fix the three-file Parquet export for 0.1, a draft identifier until the tag, refharvest as the gate’s second implementation, fixtures moved to the spec, accept overview levels (0006) with two clarifications, raise (source, etag) identity and a CF CRS statement Open: all of sec 3 awaits the meeting
m33: Warp meshes, one contract and one engine The triangle mesh that carries a raster into a view, for the GPU or the CPU: a contract (target position, source coordinate, per-triangle error and unit) as a mesh spec annex, one engine with a screen strategy (wgis-style refinement plus cut metadata) and a source-tile strategy (conforming edges, one screen-pixel unit), domain and cut tables ported from playproj and allboa 0005, in rwarp beside m31’s planner; measured with the trianglewins casebook: igh gap tips stay 16 px off in screen space and close exactly when tiles split at the lobe meridians Open: sec 11 decisions (contract, home, first stage)

Reference specs

Specs from adjacent work that the design documents refer to. Not wxylib formats.

Spec About Status
mdim-refs/0.2 A byte-reference table built from a gdal mdim mosaic VRT (SQLite; Parquet and kerchunk exports) Superseded by byterefs/0.1 (m32); frozen

License

MIT OR Apache-2.0, matching rwarp and the crates we build on.