Table of Contents

Class VectorPipeline

Namespace
EncDotNet.S100.Pipelines.Vector
Assembly
EncDotNet.S100.Core.dll

Vector portrayal pipeline (S-100 Part 9). The pipeline composes one or more IVectorRuleExecutor engines, concatenates their typed drawing instructions, and applies the shared post-processing stage:

  1. XSLT rule execution — a built-in XsltRuleExecutor (Part 9 §9.4) handles FeatureXML acquisition, rule selection, transformation, and display-list assembly.
  2. Lua rule execution — an optional injected IVectorRuleExecutor (Part 9A).
  3. Viewing-group filtering, display-plane filtering, and priority sorting of the merged instruction list.
public class VectorPipeline
Inheritance
VectorPipeline
Inherited Members

Remarks

The two engines are honest siblings under IVectorRuleExecutor: the XSLT executor is built in (it is the default vector engine), while the Lua executor is supplied per product. Executor output is merged in construction order — XSLT instructions first, then Lua — and then re-sorted by (Plane, DrawingPriority, TypeSortOrder). The sort is stable, so that construction order is the tie-breaker for instructions that share an identical sort key.

Constructors

VectorPipeline(IVectorRuleExecutor?)

Creates a vector pipeline.

public VectorPipeline(IVectorRuleExecutor? luaExecutor = null)

Parameters

luaExecutor IVectorRuleExecutor

Optional Lua rule executor (S-100 Part 9A) whose instructions are appended after the built-in XSLT executor's. When null only XSLT rules run.

Methods

ApplyDisplayFilters(IReadOnlyList<DrawingInstruction>, IVectorPortrayalCatalogue)

Applies the catalogue's current viewing-group and display-plane state to a display list from ExecuteRulesAsync(IFeatureXmlSource, IVectorPortrayalCatalogue, Viewport?, MarinerSettings?, CancellationToken), keeping its order.

public static IReadOnlyList<DrawingInstruction> ApplyDisplayFilters(IReadOnlyList<DrawingInstruction> instructions, IVectorPortrayalCatalogue catalogue)

Parameters

instructions IReadOnlyList<DrawingInstruction>

The unfiltered, priority-sorted rule output.

catalogue IVectorPortrayalCatalogue

The catalogue whose ViewingGroups and DisplayPlanes decide what is shown.

Returns

IReadOnlyList<DrawingInstruction>

The visible instructions, in their original order.

Exceptions

ArgumentNullException

instructions or catalogue is null.

ExecuteRulesAsync(IFeatureXmlSource, IVectorPortrayalCatalogue, Viewport?, MarinerSettings?, CancellationToken)

Runs the portrayal rules for source and returns the priority-sorted display list before viewing-group and display-plane filtering.

public Task<IReadOnlyList<DrawingInstruction>> ExecuteRulesAsync(IFeatureXmlSource source, IVectorPortrayalCatalogue catalogue, Viewport? viewport = null, MarinerSettings? mariner = null, CancellationToken cancellationToken = default)

Parameters

source IFeatureXmlSource

Supplies the dataset's FeatureXML to the XSLT rules.

catalogue IVectorPortrayalCatalogue

The portrayal catalogue supplying the rules.

viewport Viewport

Optional display area; when supplied its ScaleDenominator is passed to the XSLT rules as the displayScale parameter.

mariner MarinerSettings

Mariner display preferences passed to the rule executors; when null a default MarinerSettings is used.

cancellationToken CancellationToken

Signals that the render has been cancelled.

Returns

Task<IReadOnlyList<DrawingInstruction>>

The merged XSLT and Lua instructions, sorted by display plane, drawing priority and instruction type, with nothing filtered out.

Remarks

Filtering is a pure function of the rule output and the catalogue's ViewingGroups and DisplayPlanes state, so a host can keep this list and pass it to ApplyDisplayFilters(IReadOnlyList<DrawingInstruction>, IVectorPortrayalCatalogue) when only the ECDIS display state changes (display category, viewing groups, display planes) instead of running the rules again. ApplyDisplayFilters(await ExecuteRulesAsync(…), catalogue) equals the instructions ProcessAsync(IFeatureXmlSource, IVectorPortrayalCatalogue, Viewport?, MarinerSettings?, CancellationToken) returns.

The XSLT rules receive the active display mode as a parameter, so when RuleOutputDependsOnDisplayMode(IVectorPortrayalCatalogue) is true the list is only reusable under the same display mode.

Exceptions

ArgumentNullException

source or catalogue is null.

OperationCanceledException

cancellationToken was cancelled.

ProcessAsync(IFeatureXmlSource, IVectorPortrayalCatalogue, Viewport?, MarinerSettings?, CancellationToken)

Runs the portrayal rules for source and returns the filtered, priority-sorted display list.

public Task<IVectorLayer> ProcessAsync(IFeatureXmlSource source, IVectorPortrayalCatalogue catalogue, Viewport? viewport = null, MarinerSettings? mariner = null, CancellationToken cancellationToken = default)

Parameters

source IFeatureXmlSource

Supplies the dataset's FeatureXML to the XSLT rules.

catalogue IVectorPortrayalCatalogue

The portrayal catalogue supplying the rules, and whose ViewingGroups and DisplayPlanes controllers filter the output.

viewport Viewport

Optional display area; when supplied its ScaleDenominator is passed to the XSLT rules as the displayScale parameter.

mariner MarinerSettings

Mariner display preferences passed to the rule executors; when null a default MarinerSettings is used.

cancellationToken CancellationToken

Signals that the render has been cancelled.

Returns

Task<IVectorLayer>

A layer whose Instructions are the merged XSLT and Lua instructions, filtered by viewing group and display plane and sorted by display plane, drawing priority and instruction type.

Exceptions

ArgumentNullException

source or catalogue is null.

OperationCanceledException

cancellationToken was cancelled.

RuleOutputDependsOnDisplayMode(IVectorPortrayalCatalogue)

Returns whether the output of ExecuteRulesAsync(IFeatureXmlSource, IVectorPortrayalCatalogue, Viewport?, MarinerSettings?, CancellationToken) for catalogue can depend on the active display mode. Only XSLT rules receive it (as the displayMode parameter); Lua rules don't, so a Lua-only catalogue such as S-101's yields the same rule output in every display mode.

public static bool RuleOutputDependsOnDisplayMode(IVectorPortrayalCatalogue catalogue)

Parameters

catalogue IVectorPortrayalCatalogue

The portrayal catalogue.

Returns

bool

true when the catalogue has any XSLT rule.

Exceptions

ArgumentNullException

catalogue is null.