Struct S57ProductIdentity
Identifies the product an S-57 data set conforms to: its kind, its product specification edition, and whether it's a base data set or an update.
public readonly record struct S57ProductIdentity : IEquatable<S57ProductIdentity>
- Implements
- Inherited Members
Remarks
The identity is derived from the data set identification field (DSID); get it from Product. The product specification code (PRSP) gives Kind and AmlProduct, the product specification edition (PRED) gives Edition and Version, and the application profile (PROF) gives IsUpdate.
PRSP codes: 1 = ENC, 2 = ODD, 10 = Inland ENC, 51-57 = AML (see AmlProduct).
Properties
AmlProduct
public AmlProduct? AmlProduct { get; init; }
Property Value
Edition
Gets the product specification edition (PRED) exactly as recorded, for example
"2.0" for an ENC or "3.0" for an AML 3.0 data set.
public string Edition { get; init; }
Property Value
IsUpdate
Gets a value indicating whether the data set is an update rather than a base data set (a new edition or re-issue).
public bool IsUpdate { get; init; }
Property Value
Remarks
The application profile (PROF) decides it when it can: 1 = EN (ENC new) and 2 = ER (ENC revision) from S-57 Edition 3.1, Part 3 ยง7.3.1.1, and the AML profiles CLB 4/5, ESB 6/7, LBO 10/11, MFF 12/13, RAL 16/17 and SBO 18/19, where the first code is the base and the second the update.
AML 3.0 uses PROF 20 for both, and other products may not set PROF, so otherwise the
data set name (DSNM) is used: a numeric file extension other than 000 marks an
update, following the S-57 Appendix B.1 file naming convention. If the name has no
numeric extension, an exchange purpose (EXPP) of 2 (R, revision) marks an update.
Kind
Gets the kind of product.
public S57ProductKind Kind { get; init; }
Property Value
Version
Gets Edition parsed as a version, or null when it isn't a
version number. An edition with only a major number, such as "3", parses as 3.0.
public Version? Version { get; init; }
Property Value
Methods
FromDataSetIdentification(S57DataSetIdentification)
Derives the product identity from a data set identification field.
public static S57ProductIdentity FromDataSetIdentification(S57DataSetIdentification identification)
Parameters
identificationS57DataSetIdentificationThe data set identification field.
Returns
- S57ProductIdentity
The product identity.
Exceptions
- ArgumentNullException
identificationis null.