Class LoadOrderInteroperabilityAuthority
- Namespace
- EncDotNet.S100.Datasets.Pipelines.Interoperability
- Assembly
- EncDotNet.S100.Core.dll
Strict dataset-by-dataset IInteroperabilityAuthority: preserves the order in which Build(IInteroperabilityAuthority, IReadOnlyList<IReadOnlyList<SubLayerStackItem>>) presents entries (top-of-UI dataset wins) and ignores the S-98 display plane entirely.
public sealed class LoadOrderInteroperabilityAuthority : IInteroperabilityAuthority
- Inheritance
-
LoadOrderInteroperabilityAuthority
- Implements
- Inherited Members
Remarks
Use this when the user (or host application) needs the classic GIS "load order is paint order" semantics — every layer of dataset N paints above every layer of dataset N-1, regardless of what S-98 plane its features conceptually belong to. Intended for debugging, comparison studies, and any deployment that has its own non-S-98 stacking policy.
GetDefaultPlane(string, string?) still returns the S-98 default plane for informational purposes (e.g. layer-controls UI that labels each layer with its conceptual plane), but Sort(IEnumerable<SubLayerStackItem>) does not consult it.
Tiebreaker semantics inside a single dataset: entries are emitted
in the order the processor produced them, then by
WithinPlanePriority. The
WithinPlanePriority still serves to express the
"areas underneath line work" ordering within e.g. S-101 so the
dataset's own visual integrity is preserved.
Constructors
LoadOrderInteroperabilityAuthority(IInteroperabilityAuthority)
Constructs a load-order authority that delegates default-plane
lookups to planeOracle. Useful when the
host wants informational plane labels from a custom table
while still using strict load-order stacking.
public LoadOrderInteroperabilityAuthority(IInteroperabilityAuthority planeOracle)
Parameters
planeOracleIInteroperabilityAuthority
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
sortedStackIReadOnlyList<SubLayerStackItem>The layer stack as produced by Sort(IEnumerable<SubLayerStackItem>). The input is not mutated; rules return new lists.
loadedDatasetsIReadOnlyList<LoadedDatasetInfo>Snapshot of every dataset currently known to the loader. Rules inspect product specs and active flags to decide whether to fire.
marinerMarinerSettingsOptional 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.
nullfalls back to Default.rulesIReadOnlyCollection<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.
Remarks
The load-order authority deliberately bypasses S-98 inter-product rules: the contract of this authority is "ignore S-98 entirely", and that includes Level-2 suppression. Returns the stack unchanged regardless of which rule collection is supplied. Hosts that want S-98 rules should use InteroperabilityAuthority instead.
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
productSpecstringThe product spec name (e.g.
"S-101","S-102").featureTypeOrLayerKindstringOptional 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
entriesIEnumerable<SubLayerStackItem>
Returns
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.