Table of Contents

Interface IVectorPyramidReducer

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

Marker interface for reducers that operate on a paired (u, v) decomposition rather than a single scalar field. Used by VectorMeanReducer for S-111 surface currents.

public interface IVectorPyramidReducer

Remarks

A vector reducer is not a drop-in for IPyramidReducer because the target and paired-field spans must be pooled together (mean of directions computed via the pooled sin/cos). Coverage sources that carry a vector-magnitude+angle pair invoke this reducer explicitly (see CoveragePyramidBuilder).

Methods

Reduce(ReadOnlySpan<float>, ReadOnlySpan<float>, float, float)

Reduces two paired windows to a single (speed, direction) pair.

(float Speed, float Direction) Reduce(ReadOnlySpan<float> speeds, ReadOnlySpan<float> directions, float noDataSpeed, float noDataDirection)

Parameters

speeds ReadOnlySpan<float>

Speed samples for this window (row-major).

directions ReadOnlySpan<float>

Direction samples for this window, in degrees clockwise from north (S-111 ยง10.5.1).

noDataSpeed float

NODATA sentinel for the speed field.

noDataDirection float

NODATA sentinel for the direction field.

Returns

(float X, float Y)

The pooled speed and direction. NODATA in either paired field excludes the cell from the reduction; if every cell is NODATA in either field the corresponding NODATA sentinel is returned.