1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
//! 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:
//! ```rust,no_run
//! 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);
//! # Ok::<(), wbhdf::WbhdfError>(())
//! ```
//!
//! Read a bounded i16 window from an HDF4 SDS dataset path:
//! ```rust,no_run
//! 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());
//! # Ok::<(), wbhdf::WbhdfError>(())
//! ```
pub use crate;
/// A placeholder reader entry point for early integration plumbing.
;