Table of Contents

Struct S57RecordName

Namespace
EncDotNet.S57
Assembly
EncDotNet.S57.dll

Represents an S-57 record name, which uniquely identifies an object within a dataset.

public readonly record struct S57RecordName : IEquatable<S57RecordName>
Implements
Inherited Members

Remarks

A record name consists of a record identification number (RCID), a record name (RCNM), and optionally an agency code and feature ID.

Properties

AgencyCode

Gets the producing agency code (AGEN).

public int AgencyCode { get; init; }

Property Value

int

FeatureId

Gets the feature identification number (FIDN).

public int FeatureId { get; init; }

Property Value

int

Remarks

FIDN is an unsigned 32-bit number (b14), so a value above MaxValue is held as the negative int with the same bits. Use LongName for the unsigned value.

FeatureSubdivision

Gets the feature identification subdivision (FIDS).

public int FeatureSubdivision { get; init; }

Property Value

int

LongName

Gets the feature's long name (AGEN, FIDN, FIDS), or null when the record has none, such as a vector record or a feature record without a FOID field.

public S57LongName? LongName { get; }

Property Value

S57LongName?

RecordId

Gets the record identification number (RCID).

public int RecordId { get; init; }

Property Value

int

RecordNameCode

Gets the record name code (RCNM).

public int RecordNameCode { get; init; }

Property Value

int

Methods

FromLongName(S57LongName)

Creates a record name from a feature's long name.

public static S57RecordName FromLongName(S57LongName longName)

Parameters

longName S57LongName

The long name (AGEN, FIDN, FIDS).

Returns

S57RecordName

A record name with the long name's values and no RCNM or RCID.

Remarks

A FIDN above MaxValue is stored in FeatureId as the negative int with the same bits, so LongName gives back longName for every long name other than all zeros.

FromLongName(int, int, int)

Creates a record name from the long name values (AGEN, FIDN, FIDS).

public static S57RecordName FromLongName(int agencyCode, int featureId, int featureSubdivision)

Parameters

agencyCode int

The producing agency (AGEN).

featureId int

The feature identification number (FIDN).

featureSubdivision int

The feature identification subdivision (FIDS).

Returns

S57RecordName

A record name with the long name values and no RCNM or RCID.

FromRcnmRcid(int, int)

Creates a record name from the RCNM and RCID values.

public static S57RecordName FromRcnmRcid(int rcnm, int rcid)

Parameters

rcnm int
rcid int

Returns

S57RecordName

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.