Class CapWarningSet
Every area of a CAP file, resolved to outlines and timed: what a CAP processor draws and picks.
public sealed class CapWarningSet
- Inheritance
-
CapWarningSet
- Inherited Members
Properties
Areas
Every area of every alert, in document order.
public IReadOnlyList<CapWarningArea> Areas { get; }
Property Value
Changes
The instants (UTC, ascending, distinct) at which the set of areas in force can change: each drawable warning's start, the tick after its end, and when it is superseded.
public IReadOnlyList<DateTime> Changes { get; }
Property Value
Document
The file read.
public CapDocument Document { get; }
Property Value
UnmatchedZoneCodes
Every zone code no area could resolve, sorted, each once.
public IReadOnlyList<string> UnmatchedZoneCodes { get; }
Property Value
Methods
Build(CapDocument, MarineZoneLayer?)
Resolves every area of document.
public static CapWarningSet Build(CapDocument document, MarineZoneLayer? zones = null)
Parameters
documentCapDocumentThe CAP file read.
zonesMarineZoneLayerThe marine zones to resolve zone codes against; Default when null.
Returns
DrawnAt(DateTimeOffset?)
The areas the map draws at time (see IsDrawnAt(DateTimeOffset?)).
public IEnumerable<CapWarningArea> DrawnAt(DateTimeOffset? time)
Parameters
timeDateTimeOffset?The view time, or null.
Returns
ValidityOf(CapAlert, CapInfo)
When an info is in force: from onset, else effective, else
the alert's sent; to the later of expires and
Ends.
public static NavigationalWarningValidity ValidityOf(CapAlert alert, CapInfo info)
Parameters
Returns
Remarks
The NWS sets expires to when the message should be replaced, which
can be before the hazard starts (a gale warning for tomorrow that expires
this evening); it gives the hazard's end as ends (GeoJSON) or the
eventEndingTime parameter (CAP XML). Using the later of the two
keeps such a warning drawn while its hazard lasts.