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
databyte[]The catalog data to read.
loggerILoggerAn 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
streamStreamThe stream containing catalog data.
loggerILoggerAn 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
dataReadOnlySpan<byte>The catalog data to read.
loggerILoggerAn 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
streamStreamThe stream containing catalog data.
loggerILoggerAn optional logger for reporting parsing warnings.
cancellationTokenCancellationTokenA 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
pathstringThe path to the CATALOG.031 file.
loggerILoggerAn 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
pathstringThe path to the CATALOG.031 file.
loggerILoggerAn optional logger for reporting parsing warnings.
cancellationTokenCancellationTokenA token to cancel the operation.
Returns
- Task<S57Catalog>
A task that represents the asynchronous read operation.