Class CapWarningArea
One CAP area ready to draw and pick: the alert and info it belongs to, its outline, where that came from, the zone codes that couldn't be resolved, and when it's in force.
public sealed record CapWarningArea : IEquatable<CapWarningArea>
- Inheritance
-
CapWarningArea
- Implements
- Inherited Members
Properties
Alert
The alert.
public required CapAlert Alert { get; init; }
Property Value
Area
The area as the file gives it.
public required CapArea Area { get; init; }
Property Value
Id
The area's feature id within the file, stable for a given file:
alert{n}.info{n}.area{n}, counting from 1 in document order.
public required string Id { get; init; }
Property Value
Info
The info block the area belongs to.
public required CapInfo Info { get; init; }
Property Value
IsDrawable
Whether the message is one the map draws at all: an Alert or
Update (not a Cancel, Ack or Error) whose
status isn't Draft.
public bool IsDrawable { get; }
Property Value
ShapeSource
Where Surfaces came from.
public required CapShapeSource ShapeSource { get; init; }
Property Value
SupersededAt
When a later message in the same file that updates or cancels this alert was sent, which ends this one; null when none does.
public DateTimeOffset? SupersededAt { get; init; }
Property Value
SupersededBy
The identifier of the message that superseded it, or null.
public string? SupersededBy { get; init; }
Property Value
Surfaces
The outline to draw, WGS-84: one surface per polygon, circle or zone part. Empty for None.
public required IReadOnlyList<SurfacePart> Surfaces { get; init; }
Property Value
UnmatchedZoneCodes
The area's zone codes that the marine zone layer doesn't have, when the
outline had to come from zones. They are listed, not dropped: in the
pick report and in s100 info.
public IReadOnlyList<string> UnmatchedZoneCodes { get; init; }
Property Value
Validity
When the warning is in force: from onset (else effective,
else sent) to the later of expires and the NWS hazard end
(Ends). Either end may be open.
public required NavigationalWarningValidity Validity { get; init; }
Property Value
Zones
The zones the outline was built from, for Zones; otherwise empty.
public IReadOnlyList<MarineZone> Zones { get; init; }
Property Value
Methods
IsDrawnAt(DateTimeOffset?)
Whether the map draws the area at time: it is
IsDrawable, has an outline, and is in force then. With no
time (a host with no clock, or a headless render with no time step),
every drawable area not superseded by another message in the file.
public bool IsDrawnAt(DateTimeOffset? time)
Parameters
timeDateTimeOffset?The view time, or null.
Returns
StatusAt(DateTimeOffset)
The warning's status at time, by the in-force rule
S-124 navigational warnings use (StatusAt(IReadOnlyList<NavigationalWarningValidity>, DateTimeOffset?, DateTimeOffset)):
Validity, ended from SupersededAt.
public NavigationalWarningStatus StatusAt(DateTimeOffset time)
Parameters
timeDateTimeOffsetThe time, usually the view time.