Table of Contents

Class S57CatalogReader

Namespace
EncDotNet.S57.ExchangeSets
Assembly
EncDotNet.S57.dll

Provides methods to read S-57 CATALOG.031 files.

public static class S57CatalogReader
Inheritance
S57CatalogReader
Inherited Members

Remarks

The CATALOG.031 file is an ISO 8211 document containing CATD (Catalogue Directory) records that describe the chart files in an ENC exchange set.

This reader parses the ISO 8211 encoded catalog and constructs an S57Catalog containing the catalog entries.

Methods

Read(byte[], ILogger?)

Reads an S-57 catalog from a byte array.

public static S57Catalog Read(byte[] data, ILogger? logger = null)

Parameters

data byte[]

The catalog data to read.

logger ILogger

An optional logger for reporting parsing warnings.

Returns

S57Catalog

The parsed catalog.

Read(Stream, ILogger?)

Reads an S-57 catalog from a stream.

public static S57Catalog Read(Stream stream, ILogger? logger = null)

Parameters

stream Stream

The stream containing catalog data.

logger ILogger

An optional logger for reporting parsing warnings.

Returns

S57Catalog

The parsed catalog.

Read(ReadOnlySpan<byte>, ILogger?)

Reads an S-57 catalog from a span of bytes.

public static S57Catalog Read(ReadOnlySpan<byte> data, ILogger? logger = null)

Parameters

data ReadOnlySpan<byte>

The catalog data to read.

logger ILogger

An optional logger for reporting parsing warnings.

Returns

S57Catalog

The parsed catalog.

ReadAsync(Stream, ILogger?, CancellationToken)

Asynchronously reads an S-57 catalog from a stream.

public static Task<S57Catalog> ReadAsync(Stream stream, ILogger? logger = null, CancellationToken cancellationToken = default)

Parameters

stream Stream

The stream containing catalog data.

logger ILogger

An optional logger for reporting parsing warnings.

cancellationToken CancellationToken

A token to cancel the operation.

Returns

Task<S57Catalog>

A task that represents the asynchronous read operation.

ReadFromFile(string, ILogger?)

Reads an S-57 catalog from a file.

public static S57Catalog ReadFromFile(string path, ILogger? logger = null)

Parameters

path string

The path to the CATALOG.031 file.

logger ILogger

An optional logger for reporting parsing warnings.

Returns

S57Catalog

The parsed catalog.

ReadFromFileAsync(string, ILogger?, CancellationToken)

Asynchronously reads an S-57 catalog from a file.

public static Task<S57Catalog> ReadFromFileAsync(string path, ILogger? logger = null, CancellationToken cancellationToken = default)

Parameters

path string

The path to the CATALOG.031 file.

logger ILogger

An optional logger for reporting parsing warnings.

cancellationToken CancellationToken

A token to cancel the operation.

Returns

Task<S57Catalog>

A task that represents the asynchronous read operation.