Class S411SeaIceRules
- Namespace
- EncDotNet.S100.Datasets.S411.Validation
- Assembly
- EncDotNet.S100.Datasets.S411.dll
The default ValidationRuleSet<TModel> of normative rules
for an S-411 S411SeaIceInventory. Rule identifiers follow
the convention S411-R-{clause}, where {clause} traces to
the relevant section of the S-411 (Sea Ice Information for Surface
Navigation) product specification, Edition 1.2.1.
public static class S411SeaIceRules
- Inheritance
-
S411SeaIceRules
- Inherited Members
Remarks
The pilot rule set focuses on Tier-1 (schema-shape) and Tier-2
(spec-semantic) rules that can be evaluated against a single
S411SeaIceInventory in isolation. Tier-3 cross-dataset
rules will be added in a follow-up once the MCP validate_all
surface is wired up.
All rules bind to the typed projection (S411SeaIceInventory and S411IceFeature subclasses) rather than to either of the two real-world GML shapes encountered in production (JCOMM / Canadian Ice Service operational shape and IHO 1.2.1 sample shape). Both shapes normalise to the same typed model, so the rules are shape-agnostic.
Properties
CoordinatesInWgs84Range
S411-R-3.1 — Every feature coordinate must lie within the
valid WGS-84 ranges: latitude in [-90, +90] and longitude in
[-180, +180].
public static IValidationRule<S411SeaIceInventory> CoordinatesInWgs84Range { get; }
Property Value
Remarks
Spec reference: S-100 Part 10b §6.2 — geographic coordinates for
EPSG:4326 are bounded. Applied uniformly to every typed
feature regardless of geometry kind.
CurveHasMinimumVertices
S411-R-3.3 — Curve (line) features (e.g. IceEdge,
IcebergLimit, LineOfIceCrack) must have at least two
vertices.
public static IValidationRule<S411SeaIceInventory> CurveHasMinimumVertices { get; }
Property Value
Remarks
Spec reference: S-100 Part 10b §6.3 (GML curve encoding) — a
gml:LineString requires at least two positions to describe
a non-degenerate segment.
Default
The canonical default rule set for S-411 sea-ice inventories.
public static ValidationRuleSet<S411SeaIceInventory> Default { get; }
Property Value
IceAverageThicknessNonNegative
S411-R-4.2 — When an S411IceThickness feature
carries an iceAverageThickness value, it must be
non-negative.
public static IValidationRule<S411SeaIceInventory> IceAverageThicknessNonNegative { get; }
Property Value
Remarks
Spec reference: S-411 Annex A iceAverageThickness (ICETCK)
— a real-valued ice-thickness measurement. Negative thickness has
no physical meaning.
IcebergSizeInEnumeration
S411-R-4.4 — When an S411Iceberg feature
carries an icebergSize value, it must be one of the
enumerated codes defined by the S-411 Feature Catalogue.
public static IValidationRule<S411SeaIceInventory> IcebergSizeInEnumeration { get; }
Property Value
Remarks
Spec reference: S-411 Annex A icebergSize (ICEBSZ) — a
closed enumeration with codes 1–9 (Growler … Dome) plus 99
(Other). Any other value is a producer error.
SnowDepthNonNegative
S411-R-4.3 — When an egg-code snowDepth value is
present, it must be non-negative.
public static IValidationRule<S411SeaIceInventory> SnowDepthNonNegative { get; }
Property Value
Remarks
Spec reference: S-411 Annex A snowDepth (ICESCT) — the
depth of snow cover on the ice, measured in centimetres. Negative
values are nonsensical.
SurfacePolygonClosed
S411-R-3.2 — Surface (area) features must have a closed
exterior ring of at least four coordinates with the first and last
coincident.
public static IValidationRule<S411SeaIceInventory> SurfacePolygonClosed { get; }
Property Value
Remarks
Spec reference: S-100 Part 10b §6.3 (GML surface encoding) —
gml:LinearRing must be closed (first point equals last)
and must contain at least four positions to enclose a non-zero
area. Closure is tested with a tight tolerance (1e-9 degrees) so
floating-point round-trip does not trigger the rule.
TotalConcentrationInEnumeration
S411-R-4.1 — When a SeaIce or LakeIce feature
carries an egg-code total concentration, the value must be one of
the enumerated WMO codes defined by the S-411 Feature Catalogue.
public static IValidationRule<S411SeaIceInventory> TotalConcentrationInEnumeration { get; }
Property Value
Remarks
Spec reference: S-411 Annex A totalConcentration (ICEACT) —
an enumeration of WMO sea-ice concentration codes. The allowed
codes include both single-tenth values (10, 20, … 90) and WMO
range pairs (e.g. 23 = "2/10 to 3/10"), plus reserved sentinels
(1 = Ice Free, 2 = Open Water, 3 = Bergy Water, 91 = ice of land
origin, 92 = undefined, 99 = not surveyed). Values outside this
closed set are reported as warnings because some producers extend
the vocabulary informally.
UniqueFeatureIdentifiers
S411-R-5.1 — Every feature in the dataset must carry a
unique identifier.
public static IValidationRule<S411SeaIceInventory> UniqueFeatureIdentifiers { get; }
Property Value
Remarks
Spec reference: S-100 Part 10b §5 — gml:id uniqueness is a
GML schema requirement; duplicate IDs break xlink resolution and
downstream lookups. Empty IDs are ignored (they're a separate
schema-shape concern handled by the projection).
Methods
Validate(S411SeaIceInventory, ValidationContext?)
Convenience wrapper around Run(TModel, ValidationContext?) using the Default rule set.
public static ValidationReport Validate(S411SeaIceInventory inventory, ValidationContext? context = null)
Parameters
inventoryS411SeaIceInventorycontextValidationContext