Table of Contents

Class OverscaleCurtain

Namespace
EncDotNet.S100.Renderers.Mapsui
Assembly
EncDotNet.S100.Renderers.Mapsui.dll

Computes the on-chart overscale-curtain regions for the current view (issue #441, Form A — the classic S-52 AP(OVERSC01) vertical-line "curtain"). This is the geometric companion to OverscaleEvaluator: the evaluator answers whether and by how much each cell is overscaled (for the status-bar indicator); this class answers where the curtain pattern should be painted.

public static class OverscaleCurtain
Inheritance
OverscaleCurtain
Inherited Members

Remarks

A cell is overscaled when the mariner has zoomed in past its compilation scale (CompilationScaleDenominator, S-101 FC §3.1.1 DataCoverage.maximumDisplayScale). The curtain, however, must only cover the part of an overscaled cell that is actually the topmost data: where a strictly-finer (larger-scale) cell overlaps, that finer cell draws on top — so the coarser cell's curtain is subtracted there (the finer cell, if itself overscaled, contributes its own, smaller-factor, curtain). This mirrors the screen-space coverage clip the renderer already applies (OverlapSuppression / EncDotNet.S100.Renderers.Mapsui.CoverageClip), so the curtain lines up with what is actually drawn.

The result depends only on the loaded cells and the viewport resolution — not on pan — because each region is expressed in world (EPSG:3857) coordinates; the renderer projects and clips it per frame. Callers therefore only need to recompute when the resolution or the set of loaded cells changes. Each cell's region (its coverage minus finer coverages) does not depend on the resolution at all; OverscaleCurtainRegionCache memoises it so a zoom only re-evaluates which cells are overscaled.

Methods

ComputeRegions(IReadOnlyList<OverscaleCellInput>, double)

Computes the overscale-curtain regions for cells at the given EPSG:3857 viewportResolution (Web-Mercator metres per pixel). Each overscaled cell yields at most one OverscaleRegion: its coverage with every strictly-finer overlapping cell's coverage subtracted. Cells that are in-scale (factor at or below EncDotNet.S100.Renderers.Mapsui.OverscaleEvaluator.OverscaleThreshold), carry no usable coverage, or are entirely covered by finer cells yield nothing.

public static IReadOnlyList<OverscaleRegion> ComputeRegions(IReadOnlyList<OverscaleCellInput> cells, double viewportResolution)

Parameters

cells IReadOnlyList<OverscaleCellInput>

The loaded, drawing, scale-bearing cells.

viewportResolution double

The current viewport resolution in Web-Mercator metres per pixel (must be positive and finite; otherwise an empty list is returned).

Returns

IReadOnlyList<OverscaleRegion>

The curtain regions (never null), ordered by descending overscale factor (worst offender first) to match the status-bar list.