Class S57AttributeDefinition
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
Remarks
Acronyms are case-sensitive.
Class
Gets the class of the attribute: feature, national, spatial or cartographic.
public S57AttributeClass Class { get; }
Property Value
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
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
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
Type
Gets the type of the attribute's value.
public S57AttributeType Type { get; }
Property Value
Values
Gets the predefined values of an Enumerated or List attribute, in code order.
public IReadOnlyList<S57EnumeratedValue> Values { get; }
Property Value
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
codeintThe value's code, as it's encoded in
ATVL.
Returns
- S57EnumeratedValue
The value, or
nullwhen 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
codeintThe value's code, as it's encoded in
ATVL.valueS57EnumeratedValueThe value, or
nullwhen the attribute has no value with that code.
Returns
- bool
truewhen the value was found; otherwise,false.