Class CellScaleRanking
Ranks overlapping chart cells by scale, finest first. One rule for every consumer that has to choose between cells covering the same place: the display's cross-cell overlap suppression (issue #438), the headless compositor (#859) and the charted depth used by the passage check and the pick report (#938).
public static class CellScaleRanking
- Inheritance
-
CellScaleRanking
- Inherited Members
Remarks
A cell's ranking scale is its compilation scale denominator when it has one
(S-57 DSPM CSCL, Appendix B.1 §7.3.1.1), and otherwise its
minimum display scale (S-101 FC §3.1.1 DataCoverage.minimumDisplayScale,
the coarsest scale at which the cell is meant to be shown). A smaller
denominator is the finer cell. A cell with no ranking scale ranks below every
cell that has one.
Only a strictly finer cell beats another: cells of the same scale are peers, so consumers combine them (the display draws both; the depth rules take the shoalest).
Methods
Compare(int?, int?)
Orders ranking scales finest first, with unranked cells last.
public static int Compare(int? x, int? y)
Parameters
Returns
- int
A negative value when
xis finer, zero for the same rank.
FinestBand<T>(IEnumerable<T>, Func<T, int?>)
The cells that share the finest ranking scale among
cells, in their original order.
public static IReadOnlyList<T> FinestBand<T>(IEnumerable<T> cells, Func<T, int?> rankingScale)
Parameters
cellsIEnumerable<T>The candidate cells, for example those covering one point.
rankingScaleFunc<T, int?>Reads a cell's ranking scale (see RankingScale(int?, int?)).
Returns
- IReadOnlyList<T>
The finest cells; empty when
cellsis empty.
Type Parameters
TThe cell type.
IsFiner(int?, int?)
Whether a cell ranked at candidate is strictly finer
than one ranked at other. An unranked cell is never
finer, and every ranked cell is finer than an unranked one.
public static bool IsFiner(int? candidate, int? other)
Parameters
Returns
RankingScale(int?, int?)
The scale denominator a cell is ranked by: its compilation scale when present, otherwise its minimum display scale.
public static int? RankingScale(int? compilationScale, int? minimumDisplayScale)
Parameters
compilationScaleint?The compilation scale denominator, or null.
minimumDisplayScaleint?The minimum display scale denominator, or null.