Table of Contents

Interface IHdf5Group

Namespace
EncDotNet.S100.Hdf5
Assembly
EncDotNet.S100.Core.dll

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

IReadOnlyList<string>

Methods

AttributeExists(string)

Returns true if an attribute with the given name exists on this group.

bool AttributeExists(string name)

Parameters

name string

Returns

bool

OpenGroup(string)

Opens a child group by name.

IHdf5Group OpenGroup(string name)

Parameters

name string

Returns

IHdf5Group

ReadAttribute<T>(string)

Reads a scalar unmanaged attribute value.

T ReadAttribute<T>(string name) where T : unmanaged

Parameters

name string

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

name string

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

name string

Returns

double

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

name string

Returns

long

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

name string

Returns

RawCompoundDataset

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

name string

Returns

string

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

datasetName string

The dataset's name in this group.

memberName string

The member to read (case-insensitive).

Returns

IReadOnlyList<double>

The member's values, one per record, or null when the dataset or the member is absent or isn't numeric. The default implementation returns null.