Table of Contents

Class MapPresentationState

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

Immutable, renderer-neutral snapshot of the presentation choices shared by every dataset on an S-100 map.

public sealed class MapPresentationState
Inheritance
MapPresentationState
Inherited Members

Remarks

The ECDIS snapshot includes the cross-product category, viewing-group and display-plane overrides, and product-specific S-100 Part 9 §11.7 display modes. Collection values are defensively copied so later mutations of the source settings cannot affect an in-flight render.

Viewport, time-step, basemap, and output-filter choices remain on RenderContext because they vary by dataset or render request.

Constructors

MapPresentationState(PaletteType, double, double, EcdisDisplaySettings, MarinerSettings)

Creates an immutable map presentation snapshot.

public MapPresentationState(PaletteType palette, double symbolScale, double textScale, EcdisDisplaySettings ecdisDisplay, MarinerSettings mariner)

Parameters

palette PaletteType

The S-100 colour palette.

symbolScale double

Global symbol scale factor.

textScale double

Global text scale factor.

ecdisDisplay EcdisDisplaySettings

Cross-product ECDIS settings, including product-specific display modes.

mariner MarinerSettings

Mariner-configurable portrayal settings.

Exceptions

ArgumentNullException

ecdisDisplay or mariner is null.

Properties

Default

The standard Day-palette presentation with default scales, ECDIS settings, and mariner selections.

public static MapPresentationState Default { get; }

Property Value

MapPresentationState

DepthAdjustment

The water level added to charted depths across the map (S-98 Appendix D), or null when depths are portrayed as charted.

public IDepthAdjustment? DepthAdjustment { get; }

Property Value

IDepthAdjustment

EcdisDisplay

Cross-product ECDIS settings, including product-specific S-100 Part 9 §11.7 display-mode selections.

public EcdisDisplaySettings EcdisDisplay { get; }

Property Value

EcdisDisplaySettings

Mariner

Mariner-configurable portrayal settings.

public MarinerSettings Mariner { get; }

Property Value

MarinerSettings

Palette

The S-100 colour palette applied across the map.

public PaletteType Palette { get; }

Property Value

PaletteType

SymbolScale

Global symbol scale factor, where 1.0 is the default.

public double SymbolScale { get; }

Property Value

double

TextScale

Global text scale factor, where 1.0 is the default.

public double TextScale { get; }

Property Value

double

Methods

ApplyTo(RenderContext, SpecRef)

Applies this map-wide snapshot to a dataset-specific render context.

public RenderContext ApplyTo(RenderContext context, SpecRef portrayalSpec)

Parameters

context RenderContext

The context carrying dataset- or request-specific choices to preserve.

portrayalSpec SpecRef

The specification whose portrayal catalogue processes the dataset.

Returns

RenderContext

A copy of context containing this presentation and the product-specific display mode selected for portrayalSpec.

Exceptions

ArgumentNullException

context is null.

ArgumentException

portrayalSpec is unset.

CreateRenderContext(IDatasetProcessor, DateTime?)

Creates the render context for a processor and applies this map-wide presentation snapshot.

public RenderContext CreateRenderContext(IDatasetProcessor processor, DateTime? timeStep = null)

Parameters

processor IDatasetProcessor

The processor whose portrayal specification selects the per-spec display settings.

timeStep DateTime?

The selected sample for a time-aware product, or null for an unset map clock. Static products ignore it.

Returns

RenderContext

A render context carrying this presentation and the requested time step.

Exceptions

ArgumentNullException

processor is null.

ArgumentException

The processor's portrayal specification is unset.

WithDepthAdjustment(IDepthAdjustment?)

Returns a copy with a different depth adjustment.

public MapPresentationState WithDepthAdjustment(IDepthAdjustment? depthAdjustment)

Parameters

depthAdjustment IDepthAdjustment

The adjustment, or null for charted depths.

Returns

MapPresentationState

A new presentation state.

WithEcdisDisplay(EcdisDisplaySettings)

Returns a copy of this snapshot with EcdisDisplay replaced. The supplied settings are defensively snapshotted, matching the constructor.

public MapPresentationState WithEcdisDisplay(EcdisDisplaySettings ecdisDisplay)

Parameters

ecdisDisplay EcdisDisplaySettings

The ECDIS display settings to apply.

Returns

MapPresentationState

Exceptions

ArgumentNullException

ecdisDisplay is null.

WithMariner(MarinerSettings)

Returns a copy of this snapshot with Mariner replaced.

public MapPresentationState WithMariner(MarinerSettings mariner)

Parameters

mariner MarinerSettings

The mariner-configurable portrayal settings.

Returns

MapPresentationState

Exceptions

ArgumentNullException

mariner is null.

WithPalette(PaletteType)

Returns a copy of this snapshot with Palette replaced.

public MapPresentationState WithPalette(PaletteType palette)

Parameters

palette PaletteType

The colour palette to apply.

Returns

MapPresentationState

WithSymbolScale(double)

Returns a copy of this snapshot with SymbolScale replaced.

public MapPresentationState WithSymbolScale(double symbolScale)

Parameters

symbolScale double

The global symbol scale factor.

Returns

MapPresentationState

WithTextScale(double)

Returns a copy of this snapshot with TextScale replaced.

public MapPresentationState WithTextScale(double textScale)

Parameters

textScale double

The global text scale factor.

Returns

MapPresentationState