Class S101LuaRuleExecutor
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
luaEngineILuaEngineThe sandboxed Lua engine (S-100 Part 9A).
datasetS101DatasetThe S-101 dataset to portray.
catalogueS101PortrayalCatalogueThe S-101 portrayal catalogue (Lua rule source).
featureCatalogueFeatureCatalogueThe 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
luaEngineILuaEngineThe Lua engine.
datasetS101DatasetThe S-101 dataset.
catalogueS101PortrayalCatalogueThe S-101 portrayal catalogue.
featureCatalogueFeatureCatalogueThe S-101 feature catalogue.
depthShiftS101DepthShiftThe 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
marinerMarinerSettingsMariner-configurable display preferences (S-100 Part 9 §4.2).
cancellationTokenCancellationTokenSignals 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
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
marinerMarinerSettingsMariner-configurable display preferences (S-100 Part 9 §4.2).
cancellationTokenCancellationTokenHonoured at coarse boundaries before Lua invocation.
Returns
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
marinerMarinerSettingsThe mariner settings, for the context parameters.
cancellationTokenCancellationTokenCancels loading the rules.
Returns
- Task<LuaPortrayalSession>
The session; the caller disposes it.