Class S104CoverageSource
ICoverageSource implementation for S-104 Water Level datasets. Provides time-indexed access to water level height and trend grids.
public class S104CoverageSource : ICoverageSource
- Inheritance
-
S104CoverageSource
- Implements
- Inherited Members
Constructors
S104CoverageSource(S104Dataset)
Initializes a new instance of S104CoverageSource from the given dataset.
public S104CoverageSource(S104Dataset dataset)
Parameters
datasetS104DatasetThe S-104 dataset to expose as a coverage source.
Fields
FillValue
S-104 standard fill value for no-data cells.
public const float FillValue = -9999
Field Value
Properties
AvailableTimes
The time steps this coverage can be sampled at, in the order the dataset stores them. Empty for static products (S-102); populated for time-varying products (S-104, S-111).
public IReadOnlyList<DateTime> AvailableTimes { get; }
Property Value
Dataset
The underlying parsed S-104 dataset.
public S104Dataset Dataset { get; }
Property Value
Metadata
File-level metadata: extent, grid geometry, CRS, no-data sentinel and the value fields the source carries. Available immediately after the source is constructed.
public CoverageMetadata Metadata { get; }
Property Value
Remarks
Implementations may build a new instance on every read. The GridMetadata reflects the currently selected overview level (see SelectOverviewLevel(int)).
Spec
The dataset's declared product specification, resolved from DeclaredProductSpecification; the edition is default (unknown) when the file declares none.
public SpecRef Spec { get; }
Property Value
Methods
Sample(GridRegion, CancellationToken)
Copies the requested grid region into a SampledCoverage.
The underlying grid is already resident in memory (the HDF5 read
happens at construction time), so this is a CPU-bound copy rather than
an I/O operation; cancellationToken lets a large
copy be abandoned cooperatively. The method remains synchronous.
public SampledCoverage Sample(GridRegion region, CancellationToken cancellationToken = default)
Parameters
regionGridRegionThe grid subset and stride to sample.
cancellationTokenCancellationTokenSignals that the render has been cancelled.
Returns
- SampledCoverage
The sampled values for every field in ValueFields, at the currently selected time step and overview level. The result's Metadata describes the geometry of the sampled sub-grid itself (output row/column count, origin and spacing in the native CRS), so GetPosition(int, int) locates each output cell. How cells skipped by a stride greater than one are combined (plain decimation or a reduction such as S-102's shoalest-depth minimum) is source-specific. An empty region yields a zero-cell sample.
Exceptions
- OperationCanceledException
cancellationTokenwas cancelled during the copy.
SelectTime(DateTime)
Selects the time step served by subsequent Sample(GridRegion, CancellationToken) calls.
public void SelectTime(DateTime time)
Parameters
timeDateTimeThe requested time. Time-varying sources select the exact match in AvailableTimes when present, otherwise the nearest available time step. Static sources treat the call as a no-op.