Table of Contents

Class S129UkcRules

Namespace
EncDotNet.S100.Datasets.S129.Validation
Assembly
EncDotNet.S100.Datasets.S129.dll

The default ValidationRuleSet<TModel> of normative rules for an S-129 S129UnderKeelClearancePlan. Rule identifiers follow the convention S129-R-{clause}, where {clause} traces to the relevant section of the S-129 Edition 2.0.0 specification.

public static class S129UkcRules
Inheritance
S129UkcRules
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 S129UnderKeelClearancePlan in isolation. Tier-3 cross-dataset rules — for example comparing a control-point UKC margin against the charted depth at the same position in a loaded S-102 bathymetric coverage — will be added in a follow-up once the MCP validate_all surface is wired up. They need access to sibling datasets via Services.

Properties

ControlPointHasPosition

S129-R-5.2 — Every control point should carry a point position; a control point without geometry cannot be plotted on the chart.

public static IValidationRule<S129UnderKeelClearancePlan> ControlPointHasPosition { get; }

Property Value

IValidationRule<S129UnderKeelClearancePlan>

Remarks

Spec reference: S-129 Edition 2.0.0 UnderKeelClearanceControlPoint — the feature class is geometry-bearing (point primitive) by definition. The typed projection tolerates absent geometry to avoid throwing on malformed input; this rule surfaces it as a finding instead.

ControlPointMeasurementsFinite

S129-R-5.1 — Numeric control-point measurements (distanceAboveUKCLimit and expectedPassingSpeed), when present, must be finite (no NaN, no ±Infinity).

public static IValidationRule<S129UnderKeelClearancePlan> ControlPointMeasurementsFinite { get; }

Property Value

IValidationRule<S129UnderKeelClearancePlan>

Remarks

Spec reference: S-129 Edition 2.0.0 §distanceAboveUKCLimit and §expectedPassingSpeed — these are real-valued measurements (metres and knots respectively). A non-finite value indicates the producer's calculation failed or the value was corrupted in transit; either way it cannot be used to drive a navigational decision.

ControlPointTimeMonotonic

S129-R-2.1 — Control points carrying an expectedPassingTime must be strictly monotonically increasing in time (no duplicates, no backwards steps).

public static IValidationRule<S129UnderKeelClearancePlan> ControlPointTimeMonotonic { get; }

Property Value

IValidationRule<S129UnderKeelClearancePlan>

Remarks

Spec reference: S-129 Edition 2.0.0 §expectedPassingTime — control points form an ordered time series along the route. Two control points expected to be passed at the same instant, or expected to be passed in an order that contradicts the route sequence, are not navigationally meaningful. The typed projection already sorts by time; this rule reports duplicates that survive that sort.

CoordinatesInWgs84Range

S129-R-3.1 — Every coordinate on every S-129 feature (control-point positions, plan-area rings, non-navigable and almost-non-navigable area rings) must fall within the valid WGS-84 ranges: latitude in [-90, +90], longitude in [-180, +180].

public static IValidationRule<S129UnderKeelClearancePlan> CoordinatesInWgs84Range { get; }

Property Value

IValidationRule<S129UnderKeelClearancePlan>

Remarks

Spec reference: S-100 Part 10b §6.2 — geographic coordinates for EPSG:4326 are bounded.

Default

The canonical default rule set for S-129 UKC plans.

public static ValidationRuleSet<S129UnderKeelClearancePlan> Default { get; }

Property Value

ValidationRuleSet<S129UnderKeelClearancePlan>

MaximumDraughtPositive

S129-R-4.1 — When present, the plan's maximumDraught must be strictly positive.

public static IValidationRule<S129UnderKeelClearancePlan> MaximumDraughtPositive { get; }

Property Value

IValidationRule<S129UnderKeelClearancePlan>

Remarks

Spec reference: S-129 Edition 2.0.0 §maximumDraught — the vessel draught used as input to the UKC calculation, expressed in metres. Zero or negative draught is not physically meaningful and would invalidate every UKC margin in the plan.

PlanAreaGeometryPopulated

S129-R-3.2 — When the dataset carries a plan-area feature, its surface geometry must be populated with at least three distinct coordinates (the minimum to enclose a non-degenerate area).

public static IValidationRule<S129UnderKeelClearancePlan> PlanAreaGeometryPopulated { get; }

Property Value

IValidationRule<S129UnderKeelClearancePlan>

Remarks

Spec reference: S-129 Edition 2.0.0 UnderKeelClearancePlanArea — the plan area describes the spatial extent over which the UKC plan is valid. A degenerate ring (fewer than three vertices) cannot bound any area and provides no useful spatial extent.

PlanValidityPeriod

S129-R-1.1 — When both bounds of the plan's fixedTimeRange are present, the start must not be after the end.

public static IValidationRule<S129UnderKeelClearancePlan> PlanValidityPeriod { get; }

Property Value

IValidationRule<S129UnderKeelClearancePlan>

Remarks

Spec reference: S-129 Edition 2.0.0 §fixedTimeRange — the plan applies during the interval [timeStart, timeEnd]; an interval whose start is after its end is empty and cannot describe a valid plan window.

Methods

Validate(S129UnderKeelClearancePlan, ValidationContext?)

Convenience wrapper around Run(TModel, ValidationContext?) using the Default rule set.

public static ValidationReport Validate(S129UnderKeelClearancePlan plan, ValidationContext? context = null)

Parameters

plan S129UnderKeelClearancePlan
context ValidationContext

Returns

ValidationReport