User Guide#
The purpose of this guide is to walk the user through how-to use the package. It is complemented by the examples.
Note
This is a work in progress and not all features are documented yet. Please check back later for updates.
Geometry, ijk indexing, and .pbm files#
parq-blockmodel works with regular 3D block models that are stored in
Parquet files and wrapped by the parq_blockmodel.blockmodel.ParquetBlockModel
class.
The canonical on-disk container for a block model is a file with a
.pbm extension. A .pbm file is just a Parquet table that:
stores block attributes (grades, density, rock type, …),
may include centroid columns
x,y,zfor convenience and interoperability, andalways carries embedded geometry metadata under a reserved key (
"parq-blockmodel").
The geometry metadata encodes a regular logical grid in terms of
(i, j, k) indices via parq_blockmodel.geometry.RegularGeometry.
This ijk grid is the single source of truth for the model layout:
shapegives the number of blocks along each axis,block_sizeandcornerdescribe the local lattice (withblock_sizegiving spacing along the locali/j/kaxes, not necessarily world X/Y/Z), andoriginplus optional axis vectors (axis_u,axis_v,axis_w) define the orientation of the logical axes in 3D space.
World coordinates (x, y, z) are therefore a derived view of
(i, j, k) + geometry rather than the primary index. Existing
xyz-centric Parquet files remain supported, and ParquetBlockModel can
promote them into canonical .pbm containers with embedded geometry.
For a deeper, developer-oriented discussion of how geometry and metadata are encoded, see Developer notes: geometry & metadata.