Class VectorPipeline
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:
- XSLT rule execution — a built-in XsltRuleExecutor (Part 9 §9.4) handles FeatureXML acquisition, rule selection, transformation, and display-list assembly.
- Lua rule execution — an optional injected IVectorRuleExecutor (Part 9A).
- 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
luaExecutorIVectorRuleExecutorOptional 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
instructionsIReadOnlyList<DrawingInstruction>The unfiltered, priority-sorted rule output.
catalogueIVectorPortrayalCatalogueThe catalogue whose ViewingGroups and DisplayPlanes decide what is shown.
Returns
- IReadOnlyList<DrawingInstruction>
The visible instructions, in their original order.
Exceptions
- ArgumentNullException
instructionsorcatalogueis 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
sourceIFeatureXmlSourceSupplies the dataset's FeatureXML to the XSLT rules.
catalogueIVectorPortrayalCatalogueThe portrayal catalogue supplying the rules.
viewportViewportOptional display area; when supplied its ScaleDenominator is passed to the XSLT rules as the
displayScaleparameter.marinerMarinerSettingsMariner display preferences passed to the rule executors; when null a default MarinerSettings is used.
cancellationTokenCancellationTokenSignals 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
sourceorcatalogueis null.- OperationCanceledException
cancellationTokenwas 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
sourceIFeatureXmlSourceSupplies the dataset's FeatureXML to the XSLT rules.
catalogueIVectorPortrayalCatalogueThe portrayal catalogue supplying the rules, and whose ViewingGroups and DisplayPlanes controllers filter the output.
viewportViewportOptional display area; when supplied its ScaleDenominator is passed to the XSLT rules as the
displayScaleparameter.marinerMarinerSettingsMariner display preferences passed to the rule executors; when null a default MarinerSettings is used.
cancellationTokenCancellationTokenSignals 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
sourceorcatalogueis null.- OperationCanceledException
cancellationTokenwas 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
catalogueIVectorPortrayalCatalogueThe portrayal catalogue.
Returns
Exceptions
- ArgumentNullException
catalogueis null.