Interface IHdf5Group
Abstraction over an HDF5 group, providing navigation and typed data access.
public interface IHdf5Group
- Extension Methods
Properties
GroupNames
Gets the names of all child groups.
IReadOnlyList<string> GroupNames { get; }
Property Value
Methods
AttributeExists(string)
Returns true if an attribute with the given name exists on this group.
bool AttributeExists(string name)
Parameters
namestring
Returns
OpenGroup(string)
Opens a child group by name.
IHdf5Group OpenGroup(string name)
Parameters
namestring
Returns
ReadAttribute<T>(string)
Reads a scalar unmanaged attribute value.
T ReadAttribute<T>(string name) where T : unmanaged
Parameters
namestring
Returns
- T
Type Parameters
T
ReadDataset<T>(string)
Reads an entire dataset as a flat array of unmanaged values. For compound datasets the struct layout must match the HDF5 field offsets.
T[] ReadDataset<T>(string name) where T : unmanaged
Parameters
namestring
Returns
- T[]
Type Parameters
T
ReadDoubleAttribute(string)
Reads a floating-point attribute as double, accepting
either H5T_IEEE_F32* or H5T_IEEE_F64* on disk. The
S-100 specs leave the on-disk width of many grid-georef attributes
(origin, spacing) to producer choice, so readers should not hard-code
the width.
double ReadDoubleAttribute(string name)
Parameters
namestring
Returns
ReadInt64Attribute(string)
Reads a fixed-point attribute as long, accepting any
of the 8/16/32/64-bit signed or unsigned integer types on disk. The
S-100 specs leave the on-disk width of many count attributes
(numPointsLatitudinal, numberOfTimes, …) to producer
choice, so readers should not hard-code the width.
long ReadInt64Attribute(string name)
Parameters
namestring
Returns
ReadRawCompoundDataset(string)
Reads a compound dataset as raw bytes plus member metadata. Callers project rows into product-specific value types so that small spec-conforming variations between producers (member renames, numeric width changes) can be tolerated without changing public value-struct layouts.
RawCompoundDataset ReadRawCompoundDataset(string name)
Parameters
namestring
Returns
ReadStringAttribute(string)
Reads a string attribute value. Trailing NUL characters from
fixed-length H5T_STR_NULLPAD strings are stripped so that the
returned value is suitable for direct parsing.
string ReadStringAttribute(string name)
Parameters
namestring
Returns
TryReadCompoundMember(string, string)
Reads one numeric member of every record of an optional compound dataset, as double. Unlike ReadRawCompoundDataset(string), the compound may hold variable-length members (such as a name string) besides the one read.
IReadOnlyList<double>? TryReadCompoundMember(string datasetName, string memberName)
Parameters
datasetNamestringThe dataset's name in this group.
memberNamestringThe member to read (case-insensitive).
Returns
- IReadOnlyList<double>
The member's values, one per record, or
nullwhen the dataset or the member is absent or isn't numeric. The default implementation returnsnull.