Table of Contents

Interface IInteroperabilityAuthority

Namespace
EncDotNet.S100.Datasets.Pipelines.Interoperability
Assembly
EncDotNet.S100.Core.dll

Cross-dataset interoperability decision point: assigns a default S-98 display plane to a (product, feature-or-layer-kind) pair and sorts the global stack of SubLayerStackItem values into S-98-shaped paint order.

public interface IInteroperabilityAuthority

Remarks

PR-L1 ships a fixed-table S-98 implementation (InteroperabilityAuthority) and a strict load-order alternative (LoadOrderInteroperabilityAuthority). Hosts wire a chosen implementation through DI as an IInteroperabilityAuthorityProvider; consumers (e.g. DatasetLoaderService, GML dataset processors) receive that provider via constructor injection and consult Current on each operation so a runtime swap (e.g. a viewer setting flip from S-98 to strict load-order) takes effect immediately. PR-L1 deliberately ships no IC parsing, suppression, replacement, or hybridisation; those Level 1+ behaviours are owned by PR-L2 once the IHO publishes a normative S-100 Part 16 IC schema and a viewer-side catalogue reader is in place.

The contract is pure — (default plane lookup) and (in entries → out entries); the implementation must be thread-safe and free of viewer dependencies so it can be unit-tested in isolation.

Methods

ApplyRules(IReadOnlyList<SubLayerStackItem>, IReadOnlyList<LoadedDatasetInfo>, MarinerSettings?, IReadOnlyCollection<S98InteroperabilityRule>?)

Applies S-98 inter-product rules to a sorted layer stack. Each rule's Condition is checked against the supplied loadedDatasets (plus optional mariner settings); rules whose condition fires invoke their Effect on the stack. Rules execute in the enumeration order of rules — each rule's output is the next rule's input.

IReadOnlyList<SubLayerStackItem> ApplyRules(IReadOnlyList<SubLayerStackItem> sortedStack, IReadOnlyList<LoadedDatasetInfo> loadedDatasets, MarinerSettings? mariner = null, IReadOnlyCollection<S98InteroperabilityRule>? rules = null)

Parameters

sortedStack IReadOnlyList<SubLayerStackItem>

The layer stack as produced by Sort(IEnumerable<SubLayerStackItem>). The input is not mutated; rules return new lists.

loadedDatasets IReadOnlyList<LoadedDatasetInfo>

Snapshot of every dataset currently known to the loader. Rules inspect product specs and active flags to decide whether to fire.

mariner MarinerSettings

Optional active mariner-settings snapshot. Rules that depend on viewer settings (e.g. R-101-102-B's safety-contour exception per MSC.232(82) §5.8) read it; rules that don't ignore it. null falls back to Default.

rules IReadOnlyCollection<S98InteroperabilityRule>

Optional rule collection. Defaults to Default. Passing an empty collection is a deliberate no-op (rules disabled).

Returns

IReadOnlyList<SubLayerStackItem>

The post-rule layer stack. Layers may be replaced (suppressed features removed) but the count is monotonic per rule — rules cannot add new entries in v1.

GetDefaultPlane(string, string?)

Returns the default S-98 display plane for a given product specification and optional feature-type or sub-layer kind hint. The featureTypeOrLayerKind argument lets callers distinguish e.g. S-104 surface isolines ("s104.isolines") from S-104 station glyphs ("s104.stations"); pass null for products with a single layer.

S98DisplayPlane GetDefaultPlane(string productSpec, string? featureTypeOrLayerKind = null)

Parameters

productSpec string

The product spec name (e.g. "S-101", "S-102").

featureTypeOrLayerKind string

Optional sub-layer kind or feature type code. Recognised values are documented on InteroperabilityAuthority.

Returns

S98DisplayPlane

The default plane for the pair. Unknown products fall back to OtherChartOverlays with a debug warning (S-98 v2.0.0 Annex A §4.1.1 — "other similar products may also be covered on a case-by-case basis").

Sort(IEnumerable<SubLayerStackItem>)

Sorts the supplied entries into S-98-shaped paint order. The result is a new list — the input is not mutated.

IReadOnlyList<SubLayerStackItem> Sort(IEnumerable<SubLayerStackItem> entries)

Parameters

entries IEnumerable<SubLayerStackItem>

Returns

IReadOnlyList<SubLayerStackItem>

Remarks

Sort is stable in the input order: entries with equal plane and within-plane priority preserve their relative position, which the caller (the dataset loader) sets to its load-order tiebreaker.