Table of Contents

Class CapWarningSet

Namespace
EncDotNet.S100.Datasets.Cap
Assembly
EncDotNet.S100.Datasets.Cap.dll

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

IReadOnlyList<CapWarningArea>

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

IReadOnlyList<DateTime>

Document

The file read.

public CapDocument Document { get; }

Property Value

CapDocument

UnmatchedZoneCodes

Every zone code no area could resolve, sorted, each once.

public IReadOnlyList<string> UnmatchedZoneCodes { get; }

Property Value

IReadOnlyList<string>

Methods

Build(CapDocument, MarineZoneLayer?)

Resolves every area of document.

public static CapWarningSet Build(CapDocument document, MarineZoneLayer? zones = null)

Parameters

document CapDocument

The CAP file read.

zones MarineZoneLayer

The marine zones to resolve zone codes against; Default when null.

Returns

CapWarningSet

DrawnAt(DateTimeOffset?)

The areas the map draws at time (see IsDrawnAt(DateTimeOffset?)).

public IEnumerable<CapWarningArea> DrawnAt(DateTimeOffset? time)

Parameters

time DateTimeOffset?

The view time, or null.

Returns

IEnumerable<CapWarningArea>

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

alert CapAlert

The alert.

info CapInfo

One of its info blocks.

Returns

NavigationalWarningValidity

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.