Table of Contents

Class S57DatasetHeader

Namespace
EncDotNet.S100.Datasets.S57
Assembly
EncDotNet.S100.Datasets.S57.dll

The identification facts of an S-57 dataset file (a base cell ….000 or a sequential update ….001, …), read from its leading DSID / DSPM records without parsing the rest of the file.

public sealed record S57DatasetHeader : IEquatable<S57DatasetHeader>
Inheritance
S57DatasetHeader
Implements
Inherited Members

Remarks

S-57 Part 3 §7.3 requires the Data Set General Information record (DSID) to be the first data record and the Data Set Geographic Reference record (DSPM) to follow it. Read(Stream) therefore reads only the Data Descriptive Record plus the first two data records (typically a few kilobytes) and hands them to the upstream EncDotNet.S57 parser. This is what lets a collection index report a cell's edition, update and issue date without the cost of a full parse — facts the exchange-set catalogue (CATALOG.031) does not carry.

Properties

CompilationScale

The compilation scale (DSPM CSCL), or null when absent.

public int? CompilationScale { get; init; }

Property Value

int?

DataSetName

The data set name (DSNM), e.g. US5MA1BO.000.

public required string DataSetName { get; init; }

Property Value

string

EditionNumber

The edition number (EDTN), or null when absent or non-numeric.

public int? EditionNumber { get; init; }

Property Value

int?

IntendedUsage

The intended usage (INTU, navigational purpose 1–6), or null when zero.

public int? IntendedUsage { get; init; }

Property Value

int?

IssueDate

The issue date (ISDT), or null when absent or malformed.

public DateOnly? IssueDate { get; init; }

Property Value

DateOnly?

ProducingAgency

The producing agency code (AGEN), or null when zero.

public int? ProducingAgency { get; init; }

Property Value

int?

UpdateApplicationDate

The update application date (UADT), or null when absent or malformed.

public DateOnly? UpdateApplicationDate { get; init; }

Property Value

DateOnly?

UpdateNumber

The update number (UPDN), or null when absent or non-numeric.

public int? UpdateNumber { get; init; }

Property Value

int?

Methods

Read(Stream)

Reads the header of an S-57 dataset from stream, consuming only its leading records.

public static S57DatasetHeader? Read(Stream stream)

Parameters

stream Stream

A stream positioned at the start of the dataset.

Returns

S57DatasetHeader

The header, or null when the stream carries no readable DSID.

Read(string)

Reads the header of the S-57 dataset file at path.

public static S57DatasetHeader? Read(string path)

Parameters

path string

The dataset file path.

Returns

S57DatasetHeader

The header, or null when the file carries no readable DSID.