Table of Contents

Class S101LuaRuleExecutor

Namespace
EncDotNet.S100.Datasets.S101
Assembly
EncDotNet.S100.Datasets.S101.dll

Executes the S-101 Lua portrayal stage (S-100 Part 9A) by composing the product-agnostic LuaRuleExecutor with the S-101-specific seams: an S101LuaDataProvider host bridge, the S-101 context parameter bindings (mapping MarinerSettings onto the declared catalogue parameters), a feature-anchor provider for augmented line tessellation, a spatial-reference resolver for edge lines, and the SAFCON contour-label post-parse transform.

public sealed class S101LuaRuleExecutor : ILuaVectorRuleExecutor, IVectorRuleExecutor
Inheritance
S101LuaRuleExecutor
Implements
Inherited Members

Remarks

This is a thin wrapper that preserves the historic S-101 construction signature (luaEngine, dataset, catalogue, featureCatalogue) while delegating the full Lua pass to the shared Core executor. S-57 reuses this executor after translating to an S101Dataset.

Constructors

S101LuaRuleExecutor(ILuaEngine, S101Dataset, S101PortrayalCatalogue, FeatureCatalogue)

Initialises the S-101 Lua rule executor.

public S101LuaRuleExecutor(ILuaEngine luaEngine, S101Dataset dataset, S101PortrayalCatalogue catalogue, FeatureCatalogue featureCatalogue)

Parameters

luaEngine ILuaEngine

The sandboxed Lua engine (S-100 Part 9A).

dataset S101Dataset

The S-101 dataset to portray.

catalogue S101PortrayalCatalogue

The S-101 portrayal catalogue (Lua rule source).

featureCatalogue FeatureCatalogue

The S-101 feature catalogue (ISO 19110).

S101LuaRuleExecutor(ILuaEngine, S101Dataset, S101PortrayalCatalogue, FeatureCatalogue, S101DepthShift?)

Creates an executor whose rules read depths with a water level added (chart-wide water level adjustment).

public S101LuaRuleExecutor(ILuaEngine luaEngine, S101Dataset dataset, S101PortrayalCatalogue catalogue, FeatureCatalogue featureCatalogue, S101DepthShift? depthShift)

Parameters

luaEngine ILuaEngine

The Lua engine.

dataset S101Dataset

The S-101 dataset.

catalogue S101PortrayalCatalogue

The S-101 portrayal catalogue.

featureCatalogue FeatureCatalogue

The S-101 feature catalogue.

depthShift S101DepthShift

The water level to add, or null for charted depths.

Methods

ExecuteAsync(MarinerSettings, CancellationToken)

Runs the rule stage and returns typed drawing instructions ready for the renderer.

public Task<IReadOnlyList<DrawingInstruction>> ExecuteAsync(MarinerSettings mariner, CancellationToken cancellationToken = default)

Parameters

mariner MarinerSettings

Mariner-configurable display preferences (S-100 Part 9 §4.2).

cancellationToken CancellationToken

Signals that the render has been cancelled. Script interpreters are generally not interruptible mid-evaluation, so implementations honour the token at coarse boundaries; the asynchronous shape exists to allow implementations to await catalogue asset loads (compiled XSLT, Lua source) before driving the synchronous engine.

Returns

Task<IReadOnlyList<DrawingInstruction>>

ExecuteRawAsync(MarinerSettings, CancellationToken)

Runs the Lua portrayal pass and returns the raw emitted drawing-instruction strings keyed by feature reference, without parsing or post-processing.

public Task<IReadOnlyList<EmittedInstruction>> ExecuteRawAsync(MarinerSettings mariner, CancellationToken cancellationToken = default)

Parameters

mariner MarinerSettings

Mariner-configurable display preferences (S-100 Part 9 §4.2).

cancellationToken CancellationToken

Honoured at coarse boundaries before Lua invocation.

Returns

Task<IReadOnlyList<EmittedInstruction>>

OpenSessionAsync(MarinerSettings, CancellationToken)

Opens a Lua state ready to portray chosen features (Portray(IReadOnlyCollection<string>)), for re-portraying a few features without running the whole dataset.

public Task<LuaPortrayalSession> OpenSessionAsync(MarinerSettings mariner, CancellationToken cancellationToken = default)

Parameters

mariner MarinerSettings

The mariner settings, for the context parameters.

cancellationToken CancellationToken

Cancels loading the rules.

Returns

Task<LuaPortrayalSession>

The session; the caller disposes it.