Table of Contents

Class S57FeatureRedirect

Namespace
EncDotNet.S100.Datasets.S57
Assembly
EncDotNet.S100.Datasets.S57.dll

Conditional redirect on an S57FeatureRule: when the redirect's conditions are all satisfied, the feature is mapped to TargetS101Code instead of the rule's default S-101 code. A redirect may test an S-57 attribute (via ConditionAttribute), the feature's geometric primitive (via ConditionPrimitives), or both; when both are present they are combined with logical AND. At least one condition must be specified.

public sealed record S57FeatureRedirect : IEquatable<S57FeatureRedirect>
Inheritance
S57FeatureRedirect
Implements
Inherited Members

Properties

AttributeOverrides

Additional attribute overrides applied only when this redirect fires. Layered on top of the rule's AttributeOverrides. Keyed by S-57 attribute acronym.

public IReadOnlyDictionary<string, S57AttributeOverride> AttributeOverrides { get; init; }

Property Value

IReadOnlyDictionary<string, S57AttributeOverride>

ConditionAttribute

S-57 attribute acronym used to test the redirect condition, or null for a purely geometry-based redirect (one that fires solely on ConditionPrimitives).

public string? ConditionAttribute { get; init; }

Property Value

string

ConditionMatchesListItem

When true, ConditionAttribute is read as an S-57 list (comma-separated) and the redirect fires when any list item is in ConditionValues, rather than requiring the whole value to match. Used for list-valued discriminators such as CATLIT, where a light is directional when the list contains 1 (e.g. "1,4"). Ignored when ConditionPresent is true.

public bool ConditionMatchesListItem { get; init; }

Property Value

bool

ConditionPresent

When true, the redirect fires whenever ConditionAttribute is present with any non-empty value, rather than matching a specific value in ConditionValues. Used for continuous-valued discriminators such as a sector light's SECTR1 bearing, where the mere presence of the attribute (not its value) selects the target class.

public bool ConditionPresent { get; init; }

Property Value

bool

ConditionPrimitives

Geometric primitives that satisfy the condition. When non-empty, the redirect only fires for a feature whose primitive is in this set (in addition to any attribute condition). Empty means "any primitive". Used where a single S-57 object class splits across S-101 classes by geometry — e.g. S-57 MORFAC (point) becomes Dolphin while line/area MORFAC becomes ShorelineConstruction.

public IReadOnlyList<S57GeometryPrimitive> ConditionPrimitives { get; init; }

Property Value

IReadOnlyList<S57GeometryPrimitive>

ConditionValues

S-57 attribute values that satisfy the condition. Ignored when ConditionPresent is true; must contain at least one value when ConditionAttribute is set and ConditionPresent is false (a value-matching redirect with no values can never match and is rejected when the mapping is constructed).

public IReadOnlyList<string> ConditionValues { get; init; }

Property Value

IReadOnlyList<string>

TargetS101Code

Target S-101 Feature Catalogue code when the condition matches.

public required string TargetS101Code { get; init; }

Property Value

string