Table of Contents

Class InteroperabilityAuthority

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

Default IInteroperabilityAuthority implementation. Resolves the per-product default plane through an IDisplayPlaneAuthority (the product registry's table, derived from S-98 Main §9.2.1 / MSC.530(106)/Rev.1 §Appendix 2 "priority of information"); sorts entries by (Plane, WithinPlanePriority, scale denominator descending, input order).

public sealed class InteroperabilityAuthority : IInteroperabilityAuthority
Inheritance
InteroperabilityAuthority
Implements
Inherited Members

Remarks

PR-L1 deliberately ships no inter-product suppression, replacement, or hybridisation logic. The five v1 rules described in docs/design/s98-interoperability.md §3 are expressed purely as default plane assignments — no IC parsing, no per-feature filters, no Level 2 predefined combinations. Those land in PR-L2 once a normative S-100 Part 16 schema is available.

Recognised featureTypeOrLayerKind values for products that emit multiple layer kinds:

  • S-101: "area" → BaseChartUnder for area fills; anything else (or null) → BaseChartOver for line work, points, symbols, text.
  • S-104: "s104.isolines" → OnDemandSurface; "s104.stations" → OtherChartOverlays. S-111: grid arrows ("s111.arrows") and station / mesh arrows ("s111.stations") → DynamicArrows. (S-111 Ed 2.0.0 has no colour-band sub-layer: the bundled portrayal catalogue at content/S111/pc/Rules/select_arrow.xsl defines arrow symbology only.)

Constructors

InteroperabilityAuthority()

Creates an authority that knows no product's default planes (Empty): every GetDefaultPlane(string, string?) answer is OtherChartOverlays. Sub-layers carry their own plane, so sorting is unaffected; hosts that ask for default planes pass the product registry's authority instead.

public InteroperabilityAuthority()

InteroperabilityAuthority(IDisplayPlaneAuthority)

Creates an authority whose GetDefaultPlane(string, string?) delegates to planes, usually ProductRegistry.DisplayPlanes.

public InteroperabilityAuthority(IDisplayPlaneAuthority planes)

Parameters

planes IDisplayPlaneAuthority

The default-plane table.

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.

public 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.

public 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.

public 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.