Skip to main content

BAG Bathymetry

Stream BAG (Bathymetric Attributed Grid) HDF5 products as one record per grid cell.

Overview

PropertyValue
Format idbag
ClassBAGIterable
Extensions.bag
ReadYes
WriteNo
Extrahdf5 (h5py)
Maturityexperimental

Record shape

{"row": 0, "col": 0, "value": 1.0}

By default the first elevation dataset under /BAG_root is used. Override with dataset or table.

Usage

from iterable import open_iterable

with open_iterable("survey.bag", format="bag") as source:
for cell in source:
print(cell["row"], cell["col"], cell["value"])

with open_iterable(
"survey.bag",
format="bag",
iterableargs={"dataset": "/BAG_root/elevation"},
) as source:
for cell in source:
print(cell)

Requires a filename (not a stream). Install with pip install iterabledata[hdf5].

See also