Table of Contents

Class S57TypedFeature

Namespace
EncDotNet.S57.Charts
Assembly
EncDotNet.S57.dll

Base class for all strongly-typed feature records in an S-57 chart.

public abstract record S57TypedFeature : IEquatable<S57TypedFeature>
Inheritance
S57TypedFeature
Implements
Derived
Inherited Members

Constructors

S57TypedFeature(S57FeatureRecord)

Initializes a new instance of the S57TypedFeature class from a generic feature record.

protected S57TypedFeature(S57FeatureRecord source)

Parameters

source S57FeatureRecord

Properties

Attributes

Gets the feature attributes from the ATTF field.

public IReadOnlyList<S57AttributeValue> Attributes { get; }

Property Value

IReadOnlyList<S57AttributeValue>

Group

Gets the group code (GRUP) for display ordering.

public int Group { get; }

Property Value

int

HasAttributes

Gets a value indicating whether this feature has any attributes.

public bool HasAttributes { get; }

Property Value

bool

HasNationalAttributes

Gets a value indicating whether this feature has national attributes.

public bool HasNationalAttributes { get; }

Property Value

bool

HasRelatedFeatures

Gets a value indicating whether this feature has related features.

public bool HasRelatedFeatures { get; }

Property Value

bool

LongName

Gets the feature's long name (LNAM), which other features' RelatedFeatures pointers use to refer to it, or null when the feature has none.

public S57LongName? LongName { get; }

Property Value

S57LongName?

NationalAttributes

Gets the national language attributes from the NATF field.

public IReadOnlyList<S57AttributeValue> NationalAttributes { get; }

Property Value

IReadOnlyList<S57AttributeValue>

ObjectCode

Gets the object code (OBJL) identifying the feature type.

public S57ObjectCode ObjectCode { get; }

Property Value

S57ObjectCode

RecordName

Gets the record name that uniquely identifies this feature.

public S57RecordName RecordName { get; }

Property Value

S57RecordName

RecordVersion

Gets the record version.

public int RecordVersion { get; }

Property Value

int

RelatedFeatures

Gets the feature-to-feature relationships from the FFPT field.

public IReadOnlyList<S57FeaturePointer> RelatedFeatures { get; }

Property Value

IReadOnlyList<S57FeaturePointer>

UpdateInstruction

Gets the update instruction for this record.

public S57UpdateInstruction UpdateInstruction { get; }

Property Value

S57UpdateInstruction

Methods

Create(S57FeatureRecord)

Creates the appropriate strongly-typed feature from a generic feature record.

public static S57TypedFeature Create(S57FeatureRecord source)

Parameters

source S57FeatureRecord

The source feature record.

Returns

S57TypedFeature

A strongly-typed feature record.

GetAttributeValue(int)

Gets the value of an attribute by its code.

public string? GetAttributeValue(int attributeCode)

Parameters

attributeCode int

The attribute code to find.

Returns

string

The attribute value, or null if not found.

GetAttributeValues(int)

Gets all values for a specific attribute code (for repeating attributes).

public IEnumerable<string> GetAttributeValues(int attributeCode)

Parameters

attributeCode int

The attribute code to find.

Returns

IEnumerable<string>

All values for the specified attribute.