Class S101DatasetRules
- Namespace
- EncDotNet.S100.Datasets.S101.Validation
- Assembly
- EncDotNet.S100.Datasets.S101.dll
The default ValidationRuleSet<TModel> of normative rules
for an S-101 dataset, evaluated through the spec-vocabulary
S101DatasetView façade. Rule identifiers follow
S101-R-{clause} for normative rules and
S101-PROJ-{kind} for projection-diagnostic surrogates.
public static class S101DatasetRules
- Inheritance
-
S101DatasetRules
- Inherited Members
Remarks
This is the V-4 rule pack as defined in
docs/design/non-gml-validation.md §6.4. The pack reads from
the thin façade introduced in the same PR (input model option (b),
design §3.1); rules cite the relevant spec clause and the
s101-enc skill review checklist item they implement.
Per-finding payload conventions follow design §4.3:
- S-101 feature findings —
RelatedFeatureId = "{agency}:{FIDN}.{FIDS}" - Spatial record findings —
RelatedFeatureId = "surf:{RCID}"/"curve:{RCID}"/"point:{RCID}"
Properties
AttributeBindingsValid
S101-R-1.2 — Every attribute on every feature must
resolve through AttributeTypeCatalogue
AND be bound where it sits: a top-level attribute (PAIX 0)
must be a permitted attribute of the host feature class per the
Feature Catalogue (including inherited bindings from any super-type
chain); a sub-attribute (PAIX > 0) must be a sub-attribute
binding of the complex attribute its PAIX points at.
public static IValidationRule<S101DatasetView> AttributeBindingsValid { get; }
Property Value
Remarks
Spec reference: S-101 Edition 1.2.0 §6, S-100 Part 5 (ISO
19110) — feature-type attribute bindings define the set of
attributes a feature instance may carry. Implements the
s101-enc skill review checklist items "attribute codes
resolve" and "attribute bindings match FC for feature class".
Degrades to a no-op when no FeatureCatalogueDecoder
is available (the decoder lookup returned null).
CompositeCurveContinuity
S101-R-3.3 — Composite curve continuity: when iterating
a composite curve's component curves in their declared order
(and honouring per-component orientation), the end point of
each curve segment must equal the start point of the next.
public static IValidationRule<S101DatasetView> CompositeCurveContinuity { get; }
Property Value
Remarks
Spec reference: S-100 Part 10a §4.3.3 (Composite curve records) and ISO 19107 — a composite curve is a connected sequence of curve segments.
CoordinatesInWgs84Range
S101-R-5.1 — Every resolved coordinate (latitude /
longitude after applying the dataset's coordinate
multiplication factors) on every point, multi-point,
curve-segment intermediate coordinate, and composite-curve
vertex must lie within the WGS-84 bounds: latitude in
[-90, 90], longitude in [-180, 180].
public static IValidationRule<S101DatasetView> CoordinatesInWgs84Range { get; }
Property Value
Remarks
Spec reference: S-100 Part 10b §6.2 (geographic coordinates
for EPSG:4326) — the same bounds the GML packs apply.
Issued as a warning because some chart compilers permit
dateline-crossing geometry whose normalised form falls
slightly outside the canonical range.
Default
The canonical default rule set for S-101 datasets.
public static ValidationRuleSet<S101DatasetView> Default { get; }
Property Value
EnumeratedAttributeDomain
S101-R-4.1 — Enumerated simple-attribute values must be
one of the listed values declared for that attribute by the
Feature Catalogue. Issued as a warning because authoring tools
sometimes carry out-of-domain codes that are nonetheless
renderable.
public static IValidationRule<S101DatasetView> EnumeratedAttributeDomain { get; }
Property Value
Remarks
Spec reference: S-100 Part 5 (ISO 19110) — listed-value
attributes constrain values to a closed code list.
Implements the s101-enc skill review checklist item
"enumerated attribute domain conformance". Degrades to a
no-op when no decoder is available.
FeatureTypeResolves
S101-R-1.1 — Every feature record's
FeatureTypeCode must resolve to
a Feature Catalogue acronym through the dataset's embedded
FeatureTypeCatalogue.
public static IValidationRule<S101DatasetView> FeatureTypeResolves { get; }
Property Value
Remarks
Spec reference: S-101 Edition 1.2.0 §6 (Encoding) and S-100
Part 10a §4.3 — the FRID record's feature type code is a
numeric reference into the embedded feature-type catalogue.
Implements the s101-enc skill review checklist item
"feature type code resolves to FC acronym".
FoidUniqueness
S101-R-2.1 — Feature Object Identifier (FOID) triples
(producingAgency, FIDN, FIDS) must be
unique across Features. Each
duplicate occurrence emits one finding; the first occurrence
is the anchor and is not flagged.
public static IValidationRule<S101DatasetView> FoidUniqueness { get; }
Property Value
Remarks
Spec reference: S-101 Edition 1.2.0 §6 / S-100 Part 10a §4.3.2
— the FOID composite key uniquely identifies a feature
instance within an exchange set. Implements the design
note §8.4 ("FOID uniqueness — one finding per duplicate;
first occurrence is the anchor") and the s101-enc
skill review checklist item "FOID uniqueness".
InformationAssociationsResolve
S101-R-5.2 — Every information association on every
feature must reference an information-type record present in
InformationTypes. Issued as a
warning because unresolved information associations degrade
gracefully (the feature still renders) but lose the linked
information content.
public static IValidationRule<S101DatasetView> InformationAssociationsResolve { get; }
Property Value
Remarks
Spec reference: S-100 Part 10a §4.3.3 (INAS field on feature
records) — the association references an information record
by RCID. Implements the s101-enc skill review checklist
item "information association referential integrity".
ParserDiagnosticPlaceholder
S101-PROJ-PARSE — Placeholder for parser warnings
emitted by EncDotNet.S100.Datasets.S101.S101DocumentReader. 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<S101DatasetView> ParserDiagnosticPlaceholder { get; }
Property Value
Remarks
Spec reference: design note §5.2 (Stance A) — the reader does not yet surface non-fatal warnings; promoting Stance B is a separate PR. Until then the rule reads Diagnostics (always empty) and emits one warning per diagnostic.
SpatialAssociationsResolve
S101-R-3.1 — Every spatial association on every feature
must reference a record present in the matching
(RecordName, RecordId) dictionary of the document.
public static IValidationRule<S101DatasetView> SpatialAssociationsResolve { get; }
Property Value
Remarks
Spec reference: S-100 Part 10a §4.3.3 — the SPAS field carries
(RCNM, RCID, orientation) tuples that must resolve to a point
(110), multipoint (115), curve (120), composite curve (125),
or surface (130) record present in the same dataset.
Implements the s101-enc skill review checklist item
"spatial association referential integrity".
SurfaceRingsClosed
S101-R-3.2 — Every surface record's rings (exterior and
interior) must be closed and contain at least three distinct
vertices. A ring is closed when its constituent curves form a
cycle (end of the last curve equals start of the first), walking
each curve, composite curve component, and ring association in its
encoded orientation; a degenerate ring (fewer than three distinct
points) is reported regardless of closure per the design note §8.2.
public static IValidationRule<S101DatasetView> SurfaceRingsClosed { get; }
Property Value
Remarks
Spec reference: S-100 Part 10a §4.3.3 (Surface records) and
ISO 19107 — a polygon boundary is a closed simple ring.
Implements the s101-enc skill review checklist item
"surface ring closure".
Methods
Validate(S101DatasetView, ValidationContext?)
Convenience wrapper around Run(TModel, ValidationContext?) using the Default rule set.
public static ValidationReport Validate(S101DatasetView view, ValidationContext? context = null)
Parameters
viewS101DatasetViewcontextValidationContext