Class RenderContext
The render options passed to dataset processors. One record serves every product; each processor reads the options it honours and ignores the rest.
public sealed record RenderContext : IEquatable<RenderContext>
- Inheritance
-
RenderContext
- Implements
- Inherited Members
Remarks
Use CreateRenderContext(IDatasetProcessor, DateTime?) to create a context carrying map-wide palette, scale, ECDIS, mariner, and product-display choices. Use ApplyTo(RenderContext, SpecRef) when projecting those choices onto a caller-constructed request context.
Properties
Basemap
Basemap drawn beneath the chart data in the headless render path (issue #411). When Offline, the bundled Natural Earth 1:10m land layer is composited under the dataset, projected with the dataset's own auto-fitted viewport so it registers exactly. Defaults to None (no basemap; output unchanged).
public BasemapKind Basemap { get; init; }
Property Value
Remarks
Honoured by the headless render path (HeadlessVectorRenderer.Render
for vector products and CoverageHeadlessRenderer.Render for
coverage products); the Mapsui viewer path selects its basemap
independently via BasemapMode.
DepthAdjustment
The water level to add to charted depths (S-98 Appendix D), or null to portray depths as charted. The S-102 and S-101 processors honour it; other products ignore it.
public IDepthAdjustment? DepthAdjustment { get; init; }
Property Value
DisplayModeId
The S-100 Part 9 §11.7 display-mode id to activate for this render,
or null to leave the catalogue's current/default mode in place.
Unlike EcdisDisplay's ECDIS category (which maps to a
display mode only for specs that declare the canonical DisplayBase /
StandardDisplay / OtherInformation ids), this is an explicit,
spec-native mode id — used by products whose modes select a
portrayal rather than a viewing-group filter. S-411 uses it to
choose between its concentration
(IceScientificIceactDisplayMode), stage-of-development
(IceScientificIcesodDisplayMode) and navigational
(IceNavigationalDisplayMode) portrayals. When set, it wins over
the ECDIS-category-derived mode. Ignored by processors whose catalogue
does not declare the id.
public string? DisplayModeId { get; init; }
Property Value
EcdisDisplay
Cross-spec ECDIS display settings (S-100 Part 9 §11.7
display-mode selection plus per-spec viewing-group overrides).
When null processors render with no mode filter and no
user overrides — equivalent to "All" with an empty hidden set.
public EcdisDisplaySettings? EcdisDisplay { get; init; }
Property Value
HiddenFeatures
Ids of this dataset's features the host doesn't want drawn, or
null for none. A host sets it from
HiddenFeatures.
public IReadOnlySet<string>? HiddenFeatures { get; init; }
Property Value
Remarks
Honoured by S-124, where the host hides navigational warning parts that aren't in force at the view time (S-98 Edition 2.0.0 §12.12; see IsDrawnAt(NavigationalWarningInfo, DateTimeOffset, bool)). The processor drops the features before portrayal, together with the features only they reference, so the portrayal rules see the dataset as if they weren't there. Other products ignore it for now.
HiddenInstructionCategories
Bitmask of DrawingInstruction categories to suppress from the rendered output (S-100 Part 9 instruction types — areas, lines, points, text). Hiding text is the canonical use case: at preview scales, label-dense products such as S-411 sea-ice draw the full "egg-code" labels which obscure the underlying fills, and a flag-driven suppression delivers a BSIS-style "clean fill" preview without re-running the portrayal pipeline. Defaults to None (render everything).
public DrawingInstructionCategory HiddenInstructionCategories { get; init; }
Property Value
Remarks
Honoured by the headless render path
(HeadlessVectorRenderer.Render); the Mapsui path is not yet
affected. The filter is applied after the portrayal pipeline produces
the display list, so suppressing one category never re-flows the
remaining instructions (areas → lines → points → text ordering and
scale visibility are preserved).
Mariner
Mariner-configurable display preferences (S-100 Part 9 §4.2 —
safety/shallow/deep contours, S-101 boolean toggles, depth display
unit, etc.). When null processors fall back to
Default. Only consumed by processors
whose portrayal pipeline honours mariner selections (S-101, S-102,
S-104, S-111 today); other processors carry it transparently for
future use.
public MarinerSettings? Mariner { get; init; }
Property Value
Palette
The color palette (Day/Dusk/Night) to use for rendering.
public PaletteType Palette { get; init; }
Property Value
PortrayalTime
The time the map shows, for drawing instructions valid only at some
times (S-100 Part 9 timeValid), or null to draw every
instruction whatever its time intervals. A host sets it from
PortrayalTime.
public PortrayalTime? PortrayalTime { get; init; }
Property Value
Remarks
Honoured by S-101 and S-401 (see IDateDependentDatasetProcessor), which filter the portrayed display list without running the portrayal rules again (Apply(IReadOnlyList<DrawingInstruction>, PortrayalTime?)). Other products ignore it.
SymbolScale
Global symbol scale factor (1.0 = default).
public double SymbolScale { get; init; }
Property Value
TextScale
Global text scale factor (1.0 = default).
public double TextScale { get; init; }
Property Value
TimeStep
The time step to portray, or null for none. Static products ignore it.
public DateTime? TimeStep { get; init; }
Property Value
Remarks
S-104 and S-111 select the matching time step, or the nearest available
one, and render their first time step when this is null. Each
S-411 file is a single snapshot, so S-411 hides the dataset while this
is earlier than its issue date and always renders it when this is
null.
ViewingGroups
This dataset's own narrowing of viewing-group visibility, applied on
top of EcdisDisplay, or null for none. A host sets
it from ViewingGroups.
public ViewingGroupFilter? ViewingGroups { get; init; }
Property Value
Remarks
Honoured by the XSLT (GML) vector processors, such as S-421, S-122 and S-124. S-101 and S-57 ignore it for now.
Viewport
An explicit display window (geographic bounds + pixel size + scale
denominator) to render, or null to auto-fit the viewport to the
dataset extent (the historical single-dataset headless behaviour).
public Viewport? Viewport { get; init; }
Property Value
Remarks
Supplying a viewport brings the single-dataset headless render path into
alignment with the composite/GUI paths, which have always accepted an
explicit viewport (CLI --bbox / --center+--scale).
It lets a caller frame an exact window — e.g. to reproduce a viewer
screenshot or capture a fixed scene — instead of the padded auto-fit.
Honoured by the vector headless path
(HeadlessVectorRenderer.Render) for S-101, S-57 and the GML
products. Because an explicit viewport carries a meaningful
ScaleDenominator, the vector path additionally
enables S-100 Part 9 scale-visibility culling when it is set (the
auto-fit path leaves culling disabled, as the fitted scale is not a real
compilation scale). The coverage processors (S-102/S-104/S-111) forward
the viewport (and, for non-EPSG:4326 grids, a WGS-84 → native transform)
to CoveragePipeline so
only the cells that fall inside the viewport at the viewport's ground
resolution are sampled (issue #487). Coverage sampling applies on the
initial dataset load; live pan/zoom re-sampling of the Mapsui coverage
layer is a follow-up (see issue #486).