Class S124NavigationalWarningRules
- Namespace
- EncDotNet.S100.Datasets.S124.Validation
- Assembly
- EncDotNet.S100.Datasets.S124.dll
The default ValidationRuleSet<TModel> of normative rules
for an S-124 S124NavigationalWarning. Rule identifiers
follow the convention S124-R-{clause}, where {clause}
traces to the relevant section of the S-124 Edition 1.0.0 or 2.0.0
Feature Catalogue or to S-100 Part 10b for shared encoding constraints.
public static class S124NavigationalWarningRules
- Inheritance
-
S124NavigationalWarningRules
- Inherited Members
Remarks
This pack covers Tier-1 (schema-shape) and Tier-2 (spec-semantic)
rules that can be evaluated against a single
S124NavigationalWarning in isolation. Tier-3
cross-dataset rules (e.g. resolving the referenced warning of a
cancellation against a sibling catalogue) are out of scope; they need
the MCP validate_all surface and access to sibling datasets
via Services.
Rules read from the strongly-typed projection produced by From(S124Dataset, out IReadOnlyList<ProjectionDiagnostic>); projection diagnostics (duplicate preamble, unresolved xlinks, unparseable values) are surfaced separately and are not duplicated here.
Properties
CoordinatesInRange
S124-R-4.1 — Every coordinate on every part, affected
area, and text placement position must lie within the WGS-84
bounds: latitude in [-90, +90] and longitude in [-180, +180].
public static IValidationRule<S124NavigationalWarning> CoordinatesInRange { get; }
Property Value
Remarks
Spec reference: S-100 Part 10b §6.2 — geographic coordinates for
EPSG:4326 are bounded.
Default
The canonical default rule set for S-124 navigational warnings.
public static ValidationRuleSet<S124NavigationalWarning> Default { get; }
Property Value
MessageSeriesIdentifierWellFormed
S124-R-2.2 — When a messageSeriesIdentifier is
present on the preamble, the warning number must be ≥ 1 and the
year must be a plausible calendar year: four digits
(1900 ≤ year ≤ 2100), or two digits (0–99) as warnings are numbered
("NAVAREA X 106/26").
public static IValidationRule<S124NavigationalWarning> MessageSeriesIdentifierWellFormed { get; }
Property Value
Remarks
Spec reference: S-124 Edition 2.0.0 Feature Catalogue —
messageSeriesIdentifier sub-attributes warningNumber
(sequential, monotonically increasing within the series) and
year, an integer with no stated range. Producers write both
forms: CCG gives 2026, AMSA 26 (#921). Zero or negative
warning numbers, and years that are neither, indicate authoring errors.
MinimumPartCount
S124-R-1.1 — A navigational warning must contain at least
one NavwarnPart feature.
public static IValidationRule<S124NavigationalWarning> MinimumPartCount { get; }
Property Value
Remarks
Spec reference: S-124 Editions 1.0.0 and 2.0.0 Feature Catalogues —
a NavwarnPreamble aggregates one or more NavwarnPart
features, which reach it through the header role (the
navwarnPreambleContent association in Edition 2.0.0). A dataset that
projects with zero parts has no substantive warning content.
NavareaCodeValid
S124-R-3.1 — When NAVAREA is present on the
preamble, its value must be one of the IMO-recognised NAVAREA
Roman-numeral codes (I…XXI).
public static IValidationRule<S124NavigationalWarning> NavareaCodeValid { get; }
Property Value
Remarks
Spec reference: S-124 Edition 1.0.0 Feature Catalogue, attribute
NAVAREA on NavwarnPreamble; codelist matches the
IMO World Wide Navigational Warning Service NAVAREA scheme. The
Edition 2.0.0 Feature Catalogue has no NAVAREA attribute (the
series name goes in messageSeriesIdentifier/nameOfSeries), so
this rule only applies to datasets that carry the attribute.
PartHasWarningText
S124-R-5.1 — Each NavwarnPart must convey
substantive content via a non-empty warningInformation
text or at least one non-empty associated TextPlacement.
public static IValidationRule<S124NavigationalWarning> PartHasWarningText { get; }
Property Value
Remarks
Spec reference: S-124 Editions 1.0.0 and 2.0.0 Feature Catalogues —
NavwarnPart exists to convey a navigational message; a
part with no text payload (neither warningInformation
nor an associated TextPlacement) is operationally
meaningless and almost certainly an authoring error.
PreambleRequired
S124-R-2.1 — Every navigational warning must include a
NavwarnPreamble information type.
public static IValidationRule<S124NavigationalWarning> PreambleRequired { get; }
Property Value
Remarks
Spec reference: S-124 Editions 1.0.0 and 2.0.0 Feature Catalogues —
NavwarnPreamble is mandatory; it carries the
identification, classification, locality, and promulgating
authority of the warning.
ReferenceTargetSpecified
S124-R-6.1 — Every References information type
that sets referenceCategory must identify the warnings it
refers to: a non-empty messageReference (Edition 1.0.0) or at
least one messageSeriesIdentifier (Edition 2.0.0).
public static IValidationRule<S124NavigationalWarning> ReferenceTargetSpecified { get; }
Property Value
Remarks
Spec reference: S-124 Edition 1.0.0 Feature Catalogue,
information type References; S-124 Edition 2.0.0 Table 8-1,
which asks a cancellation for one messageSeriesIdentifier per
cancelled warning. A reference category (cancellation, supersession,
…) without a target cannot be acted on by ECDIS or any downstream
consumer. An in-force bulletin with noMessageOnHand set has
no targets by design and isn't reported.
SurfaceRingClosed
S124-R-4.2 — Surface geometries must be closed: the first
and last coordinate of the exterior ring must coincide, and the
ring must contain at least four positions.
public static IValidationRule<S124NavigationalWarning> SurfaceRingClosed { get; }
Property Value
Remarks
Spec reference: ISO 19136 / GML 3.2 §10.5.1 (gml:LinearRing)
and S-100 Part 10b §6.4 — a polygon's exterior ring is a closed
curve. A closed ring requires the start and end position to be
equal and a minimum of four positions (three distinct vertices
plus the closing copy).
Methods
Validate(S124NavigationalWarning, ValidationContext?)
Convenience wrapper around Run(TModel, ValidationContext?) using the Default rule set.
public static ValidationReport Validate(S124NavigationalWarning warning, ValidationContext? context = null)
Parameters
warningS124NavigationalWarningcontextValidationContext