Class S57FeatureRule
Rule describing how an S-57 feature class (object class, OBJL) maps to one or more S-101 feature classes.
public sealed record S57FeatureRule : IEquatable<S57FeatureRule>
- Inheritance
-
S57FeatureRule
- Implements
- Inherited Members
Remarks
In the simplest case a rule has only a DefaultS101Code, which
is the S-101 Feature Catalogue code that every instance of the OBJL maps
to. Set DefaultS101Code to null to drop the feature
entirely (e.g. S-57 M_HOPA has no S-101 equivalent).
Cross-class redirects are expressed via Redirects. Redirects
are evaluated in declaration order and the first matching redirect wins;
if none match, DefaultS101Code applies. This models the
pattern used by the IHO S-57 to S-101 Conversion Guidance, e.g.
CTRPNT with CATCTR ∈ {1, 5} redirects to Landmark,
while other CTRPNT instances are dropped.
AttributeOverrides are applied to every instance regardless of which redirect (if any) fires. A redirect can supply additional overrides via AttributeOverrides; redirect overrides take precedence over the rule-level overrides.
Properties
AttributeOverrides
Attribute overrides applied whenever this rule is selected (default or redirect path). Keyed by S-57 attribute acronym.
public IReadOnlyDictionary<string, S57AttributeOverride> AttributeOverrides { get; init; }
Property Value
DefaultS101Code
Default S-101 Feature Catalogue code. When null, the feature is
dropped (unless a redirect matches).
public string? DefaultS101Code { get; init; }
Property Value
DroppedPrimitives
Geometric primitives for which the feature is not converted, when no
redirect matches. Used where S-57 allows a primitive that the S-101
target does not, and the conversion guidance converts it to nothing —
e.g. an area RECTRC (S-101 RecommendedTrack is curve
only).
public IReadOnlyList<S57GeometryPrimitive> DroppedPrimitives { get; init; }
Property Value
Objl
S-57 numeric object class code (OBJL).
public required ushort Objl { get; init; }
Property Value
Redirects
Conditional cross-class redirects evaluated in order; the first match wins.
public IReadOnlyList<S57FeatureRedirect> Redirects { get; init; }
Property Value
S57Acronym
S-57 object class acronym (e.g. COALNE).
public required string S57Acronym { get; init; }