Expand description
Scoped HDF container reader for Whitebox Next Gen.
The crate targets known product layouts first and does not attempt full HDF4/HDF5 coverage.
§Examples
Read a bounded contiguous f32 window when a known byte offset is available:
use std::path::Path;
use wbhdf::dataset::{read_contiguous_f32_window_in_file, resolve_dataset_in_file};
use wbhdf::datatypes::Endianness;
let file_path = Path::new("/data/sample.h5");
let _descriptor = resolve_dataset_in_file(file_path, "/BEAM0000/elev_lowestmode")?;
let values = read_contiguous_f32_window_in_file(file_path, 1_012_683, 4, Endianness::Little)?;
assert_eq!(values.len(), 4);Read a bounded i16 window from an HDF4 SDS dataset path:
use std::path::Path;
use wbhdf::hdf4::decode_hdf4_sds_i16_window_at_in_file;
let file_path = Path::new("/data/MOD09A1.example.hdf");
let values = decode_hdf4_sds_i16_window_at_in_file(
file_path,
"/mod09a1_sur_refl/Data Fields/sur_refl_b01",
0,
256,
)?;
assert!(!values.is_empty());Re-exports§
pub use crate::error::WbhdfError;pub use crate::error::WbhdfResult;
Modules§
Structs§
- Reader
- A placeholder reader entry point for early integration plumbing.