parq_blockmodel.blockmodel

Contents

parq_blockmodel.blockmodel#

blockmodel.py

High-level API for working with regular 3D block models backed by Parquet.

Main entry point#

ParquetBlockModel is a convenience wrapper around a canonical .pbm Parquet file. A .pbm file is just a Parquet table with:

  • arbitrary attribute columns (grades, density, rock type, …),

  • optional centroid columns x, y, z (for backwards compatibility and interoperability), and

  • embedded geometry metadata under the "parq-blockmodel" key.

The geometry metadata encodes a regular logical grid in terms of (i, j, k) indices via parq_blockmodel.geometry.RegularGeometry. That geometry is the single source of truth for the grid:

  • shape (number of blocks along each logical axis),

  • block_size and corner in world coordinates,

  • axis_u, axis_v, axis_w as an orthonormal basis describing the orientation of the logical i, j, k axes in world space.

Centroid coordinates (x, y, z) are therefore a derived view of (i, j, k) + geometry. They may still be persisted as columns in the Parquet file today, but the long‑term design treats them as secondary to the ijk‑first representation.

Classes

ParquetBlockModel(blockmodel_path[, name, ...])

A class to represent a regular Parquet block model.