Table of Contents

Class MinReducer

Namespace
EncDotNet.S100.Pipelines.Coverage.Pyramid
Assembly
EncDotNet.S100.Core.dll

Shoal-biased minimum reducer for depth fields (S-102 BathymetryCoverage.depth; S-100 Part 10c §11).

public sealed class MinReducer : IPyramidReducer
Inheritance
MinReducer
Implements
Inherited Members

Remarks

Safety invariant: the reduced value is always ≤ the minimum valid source cell in the window (i.e. the shoalest / shallowest depth). Downsampling a coverage with MinReducer therefore never makes a region appear safer (deeper) than the raw survey; a pyramid cell reports at least the shoalest hazard it pools. This matches GDAL's -r min resampler and is the safety story called out in issue #486.

NODATA cells are excluded from the reduction. A window whose cells are entirely NODATA reduces to NODATA (the sentinel is propagated through coarser levels so genuinely unsurveyed regions stay distinguishable from surveyed shoal water).

Fields

Instance

Shared instance; the reducer holds no state.

public static readonly MinReducer Instance

Field Value

MinReducer

Methods

Reduce(ReadOnlySpan<float>, float)

Reduces a window of up to four source cells to one coarser-level cell value.

public float Reduce(ReadOnlySpan<float> window, float noDataValue)

Parameters

window ReadOnlySpan<float>

The source cells in the current 2×2 window, in row-major order. Length is 1..4 (edge windows may be short).

noDataValue float

The coverage's NODATA sentinel (e.g. S-102 1_000_000f). Source cells equal to this value are excluded from the reduction; if every cell in the window is NODATA the reducer returns the sentinel too.

Returns

float