EncDotNet.S57 reads and writes IHO S-57 Edition 3.1 Electronic
Navigational Chart (ENC) cells. It gives you the dataset metadata, feature
and vector records, and attributes as encoded, and a typed chart model of
point, line and area features with indexed nodes, edges and faces. It also
applies update cells (.001, .002, ...), reads and verifies exchange sets,
and writes base cells and CATALOG.031 files. It identifies NATO
Additional Military Layers (AML) cells and looks up their object classes and
attributes in the AML object catalogues. Reference it to work with S-57
data in .NET 10 or later. It depends on
EncDotNet.Iso8211,
which it installs for you.
Install
dotnet add package EncDotNet.S57
Example: read a cell and list its depth areas
using EncDotNet.S57;
S57Document document = S57DocumentReader.ReadFromFile("path/to/cell.000");
Console.WriteLine($"{document.DataSetIdentification?.DataSetName} at 1:{document.DataSetParameters?.CompilationScale}");
foreach (S57FeatureRecord feature in document.GetFeaturesByObjectCode(S57ObjectCode.DEPARE))
{
Console.WriteLine($"{feature.RecordName}: {feature.Attributes.Count} attributes, {feature.SpatialPointers.Count} spatial pointers");
}
Main entry points
Records as encoded
Type
Use it to
S57DocumentReader
Read a cell from a file, stream or bytes into an S57Document
S57DocumentWriter
Write an S57Document as a base cell (.000) to a file, stream or bytes
S57Document
Get metadata (DSID, DSPM), feature records and vector records; apply an update cell with ApplyChanges
S57FeatureRecord
Get a feature's object class, primitive, attributes and pointers
S57VectorRecord
Get a node's or edge's coordinates, soundings and topology pointers
S57ObjectCode
Identify object classes (DEPARE, SOUNDG, LIGHTS, ...) by their S-57 code
Typed chart model (EncDotNet.S57.Charts)
Type
Use it to
S57Chart
Get features grouped by primitive and object class, and nodes, edges and faces indexed by record name
S57ExchangeSet.VerifyAsync reports a checksum outcome and a signature
outcome for each file, as S57VerificationOutcome values. It doesn't throw
for files that fail. S-63 signature verification isn't implemented yet;
IS63SignatureVerifier and S63TrustAnchorOptions are the extension point,
and files report NotSigned until it is.