Table of Contents

Class HeadlessCompositeScene

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

A headless composite whose S-98 ordering, suppression and scene lowering are already done, ready to paint against any number of viewports. Build one with Prepare(IReadOnlyList<HeadlessCompositeInput>, HeadlessCompositeOptions?) when rendering the same datasets many times, as a tile pyramid does.

public sealed class HeadlessCompositeScene
Inheritance
HeadlessCompositeScene
Inherited Members

Remarks

A scene is immutable, and Render(Viewport) and Draw(SKCanvas, Viewport, IReadOnlyList<double>) may be called concurrently from several threads.

Properties

Background

The background Render(Viewport) clears to.

public RgbaColor Background { get; }

Property Value

RgbaColor

Basemap

The basemap drawn beneath the chart layers.

public BasemapKind Basemap { get; }

Property Value

BasemapKind

HonorScaleVisibility

Whether the vector layers apply scale-visibility culling.

public bool HonorScaleVisibility { get; }

Property Value

bool

Layers

The lowered layers, bottom-most first.

public IReadOnlyList<CompositeLayer> Layers { get; }

Property Value

IReadOnlyList<CompositeLayer>

Methods

Draw(SKCanvas, Viewport, IReadOnlyList<double>)

Paints the basemap and the layers onto canvas against viewport, without clearing it. Each layer is also drawn shifted by each of longitudeOffsets (in degrees, for example −360 and +360), so data stored one world east or west of the viewport shows up in it; layer order is kept across the copies.

public void Draw(SKCanvas canvas, Viewport viewport, IReadOnlyList<double> longitudeOffsets)

Parameters

canvas SKCanvas

The canvas to paint onto.

viewport Viewport

A north-up viewport.

longitudeOffsets IReadOnlyList<double>

Extra world copies to draw, in degrees; may be empty.

Render(Viewport)

Renders the scene into a new bitmap of the viewport's pixel size, cleared to Background.

public SKBitmap Render(Viewport viewport)

Parameters

viewport Viewport

The viewport to render.

Returns

SKBitmap

A newly allocated bitmap owned by the caller.

TryGetWorldBounds(out double, out double, out double, out double)

Gets the EPSG:3857 union extent of the active layers. The extent is seam-aware: for data crossing the antimeridian, maxX may lie east of +180° (see SeamAwareBoundsAccumulator).

public bool TryGetWorldBounds(out double minX, out double minY, out double maxX, out double maxY)

Parameters

minX double

The western edge, in metres.

minY double

The southern edge, in metres.

maxX double

The eastern edge, in metres.

maxY double

The northern edge, in metres.

Returns

bool

true when any layer has geometry; otherwise false.