Class CurrentArrowStyle
Surface current arrows (issue #1228): one arrow per grid cell, pointing the way the water flows, coloured and sized by the speed in S-111's nine speed bands. On by default.
public sealed class CurrentArrowStyle : WeatherCoverageStyle, ICoverageStyle
- Inheritance
-
CurrentArrowStyle
- Implements
- Inherited Members
Remarks
Bands. The bands, colours and sizes follow the S-111 Ed 2.0.0
portrayal catalogue (select_arrow.xsl), so a model current and an
S-111 current of the same speed look the same: below 0.5, 0.5–1, 1–2, 2–3,
3–5, 5–7, 7–10, 10–13 and 13 kn and faster. The three slowest bands draw
at scale 0.4, the next five grow with the speed (0.2 per knot, so 2 kn is
0.4 and 13 kn is 2.6), and the fastest band stays at 2.6. The field is
stored in metres per second, so the bounds and the per-knot factor are
converted.
Direction. current.to_direction is the direction the water
flows to, and the arrow points up (north) at rotation 0, so no offset is
needed.
S-111. The arrows set
YieldsToS111:
where an S-111 dataset is loaded, the S-98 rule R-111-WX-B hides
them inside its coverage, so the official forecast is the one drawn.
Constructors
CurrentArrowStyle()
Creates the style, with the Day palette active.
public CurrentArrowStyle()
Fields
Key
The sub-layer key, "weather.current.arrows".
public const string Key = "weather.current.arrows"
Field Value
NominalSymbolLengthMillimetres
The arrow's length at scale 1 for thinning, in millimetres: 10, as S-111's.
public const double NominalSymbolLengthMillimetres = 10
Field Value
ScaleCeiling
The scale of the fastest band, as S-111's scaleCeiling.
public const float ScaleCeiling = 2.6
Field Value
ScaleFloor
The scale of the three slowest bands, as S-111's scaleFloor.
public const float ScaleFloor = 0.4
Field Value
ScalePerKnot
The scale per knot of the middle bands, as S-111's scaleFactorIntermediate.
public const float ScalePerKnot = 0.2
Field Value
SymbolPrefix
The prefix of the arrow symbols, followed by the band number: WXCURR1 to WXCURR9.
public const string SymbolPrefix = "WXCURR"
Field Value
Properties
Bands
The symbol bands, in metres per second.
public static IReadOnlyList<SymbolBand> Bands { get; }
Property Value
Methods
ResolveSymbolScheme(MarinerSettings)
The symbol bands of a symbol style, or null for a fill.
public override CoverageSymbolScheme ResolveSymbolScheme(MarinerSettings settings)
Parameters
settingsMarinerSettingsUnused: the weather bands don't depend on mariner settings.
Returns
Remarks
The scheme is the same for every palette: the band colours are palette classes in the symbols.
SymbolName(int)
The arrow symbol of band band, 1 (slowest) to 9.
public static string SymbolName(int band)
Parameters
bandintThe band number.