parq_blockmodel.io.ingest_utils.validate_geometry#
- parq_blockmodel.io.ingest_utils.validate_geometry(filepath, geometry=None, chunk_size=1000000, tol=1e-06)[source]#
Validate centroid columns against a
RegularGeometry.This helper enforces that a Parquet file has well-formed centroid columns
x,y,zand that these centroids lie on the dense grid implied by aRegularGeometryinstance.- Parameters:
filepath (Path) – Path to the Parquet file to validate (typically a
.pbmcontainer or its source.parquetfile).geometry (RegularGeometry, optional) – Geometry of the logical ijk grid. If omitted, it is inferred from
filepathviaRegularGeometry.from_parquet().chunk_size (int, default 1_000_000) – Batch size for reading Parquet data.
tol (float, default 1e-6) – Tolerance for xyz to ijk conversion.
- Raises:
ValueError – If any centroid column is missing or contains null values, if their lengths differ, or if the resulting sparse centroids are not a subset of the dense grid implied by
geometry.- Return type:
None