Table of Contents

Class S57AttributeDefinition

Namespace
EncDotNet.S57
Assembly
EncDotNet.S57.dll

Describes an S-57 attribute in an S57ObjectCatalogue.

public sealed class S57AttributeDefinition
Inheritance
S57AttributeDefinition
Inherited Members

Properties

Acronym

Gets the attribute acronym, for example COLOUR.

public string Acronym { get; }

Property Value

string

Remarks

Acronyms are case-sensitive.

Class

Gets the class of the attribute: feature, national, spatial or cartographic.

public S57AttributeClass Class { get; }

Property Value

S57AttributeClass

Remarks

The class comes from S-57 Edition 3.1, Appendix A, Chapter 2. The AML catalogues don't classify their attributes (codes 20000 and up), so those attributes are Feature; the IHO attributes the AML catalogues include keep their IHO class.

Code

Gets the attribute code, as it's encoded in ATTL.

public int Code { get; }

Property Value

int

IsNational

Gets a value indicating whether the attribute is a national attribute, which a feature record stores in its NATF field rather than its ATTF field (S-57 Part 3, clause 4.5).

public bool IsNational { get; }

Property Value

bool

Remarks

National attributes hold text in a national language, such as NOBJNM, and may use any lexical level; see National.

Name

Gets the attribute name, for example Colour.

public string Name { get; }

Property Value

string

Type

Gets the type of the attribute's value.

public S57AttributeType Type { get; }

Property Value

S57AttributeType

Values

Gets the predefined values of an Enumerated or List attribute, in code order.

public IReadOnlyList<S57EnumeratedValue> Values { get; }

Property Value

IReadOnlyList<S57EnumeratedValue>

Remarks

The list is empty for other attribute types, and for enumerated or list attributes whose values the catalogue doesn't include.

Methods

GetValue(int)

Gets the predefined value with the specified code.

public S57EnumeratedValue? GetValue(int code)

Parameters

code int

The value's code, as it's encoded in ATVL.

Returns

S57EnumeratedValue

The value, or null when the attribute has no value with that code.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

TryGetValue(int, out S57EnumeratedValue?)

Tries to get the predefined value with the specified code.

public bool TryGetValue(int code, out S57EnumeratedValue? value)

Parameters

code int

The value's code, as it's encoded in ATVL.

value S57EnumeratedValue

The value, or null when the attribute has no value with that code.

Returns

bool

true when the value was found; otherwise, false.