Class S57PreTranslationRules
- Namespace
- EncDotNet.S100.Datasets.S57.Validation
- Assembly
- EncDotNet.S100.Datasets.S57.dll
The default ValidationRuleSet<TModel> of pre-translation
normative rules for a legacy S-57 ENC dataset (parsed
S57Document). Captures the small set of checks that
do not survive translation to S-101 and therefore must run
before S57ToS101Translator hands off to the S-101 rule pack.
public static class S57PreTranslationRules
- Inheritance
-
S57PreTranslationRules
- Inherited Members
Remarks
This is the V-5 rule pack as defined in
docs/design/non-gml-validation.md §6.5. Most S-57 quality is
best assessed after translation: S57DatasetProcessor.Validate()
composes findings from this pack with findings from
EncDotNet.S100.Datasets.S101.Validation.S101DatasetRules.Default
run against the translated S101Document, rebadging the latter
with the prefix "S101-as-S57/" (design §9.3, Q-s57-rebadge).
Rule identifiers follow S57-R-{clause} for normative rules
and S57-PROJ-{kind} for projection-diagnostic surrogates
(design §5.3).
Properties
CoverageMetaFeaturePresent
S57-R-1.2 — The dataset should contain at least one
M_COVR (Coverage) meta-feature delineating the data
coverage extent.
public static IValidationRule<S57Document> CoverageMetaFeaturePresent { get; }
Property Value
Remarks
Spec reference: IHO Publication S-57 Edition 3.1 Supplement,
§4.6.1 (Meta object coverage). Without an M_COVR feature
the translator cannot derive a reliable dataset bounding extent
from the chart; downstream ECDIS rendering then falls back to
the union of spatial primitives, which is typically larger
than the producer-asserted coverage.
DatasetIdentificationPresent
S57-R-1.1 — The dataset must carry a Data Set
Identification (DSID) record AND a Data Set Parameters (DSPM)
record whose compilation scale denominator (CSCL) is greater
than zero.
public static IValidationRule<S57Document> DatasetIdentificationPresent { get; }
Property Value
Remarks
Spec reference: IHO Publication S-57 Edition 3.1 Supplement,
§3.5.1 (DSID — Data Set Identification field) and §3.5.2
(DSPM — Data Set Parameter field, attribute CSCL).
Without a DSID the dataset has no producer identity / edition
metadata; without a positive CSCL the translator cannot
populate the S-101 compilationScale equivalent.
Both conditions are folded into a single rule because they fail together (a malformed leader typically loses both fields) and because both are produced by the same ISO 8211 leader pass — emitting one finding per missing field would duplicate noise without adding actionable detail.
Default
The canonical default pre-translation rule set for S-57 datasets.
public static ValidationRuleSet<S57Document> Default { get; }
Property Value
ParserDiagnosticPlaceholder
S57-PROJ-PARSE — Placeholder for parser warnings emitted
by EncDotNet.S57.S57DocumentReader. The rule body is
intentionally empty in v1; this entry commits the rule-id
namespace so a future change that surfaces non-fatal reader
diagnostics can populate findings without breaking downstream
consumers.
public static IValidationRule<S57Document> ParserDiagnosticPlaceholder { get; }
Property Value
Remarks
Spec reference: design note §5.2 (Stance A) and §5.3 — the
reader does not yet surface non-fatal warnings; promoting
Stance B is a separate PR. Mirrors the analogous
S101-PROJ-PARSE placeholder shipped in V-4.
Methods
Validate(S57Document, ValidationContext?)
Convenience wrapper around Run(TModel, ValidationContext?) using the Default rule set.
public static ValidationReport Validate(S57Document document, ValidationContext? context = null)
Parameters
documentS57DocumentcontextValidationContext