Skip to content
philliphoffPublic

About

Libraries for reading Electronic Nautical Charts (ENCs)

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

EncDotNet

CI Discord

EncDotNet is a set of .NET libraries for IHO S-57 Electronic Navigational Charts (ENCs) and the ISO/IEC 8211 files they're encoded in. The libraries read and write ISO 8211, read S-57 cells, apply update cells, verify exchange sets, and find cells in the NOAA product catalog. They target .NET 8 and .NET 10.

EncDotNet.S100 builds on these libraries to read S-101 and to translate S-57 cells to S-101.

Packages

Package Description
EncDotNet.Iso8211 Reads, writes and builds ISO/IEC 8211 files: the DDR, records, fields and subfields
EncDotNet.S57 Reads S-57 cells into records and a typed chart model; applies updates; reads and verifies exchange sets
EncDotNet.Noaa Finds and downloads U.S. cells from the NOAA ENC product catalog

EncDotNet.S57 depends on EncDotNet.Iso8211; EncDotNet.Noaa is independent.

Use the libraries

dotnet add package EncDotNet.S57
using EncDotNet.S57;

S57Document document = S57DocumentReader.ReadFromFile("path/to/cell.000");

foreach (S57FeatureRecord feature in document.GetFeaturesByObjectCode(S57ObjectCode.DEPARE))
{
    Console.WriteLine($"{feature.RecordName}: {feature.Attributes.Count} attributes");
}

The documentation has a getting started quickstart and guides to reading S-57 charts, reading and writing ISO 8211 and downloading NOAA cells.

Chart viewer

The repository also has a legacy desktop viewer, EncDotNet.ChartViewer, which draws S-57 cells on a map. It's kept building but isn't being developed; chart display work happens in EncDotNet.S100. To run it from a clone:

dotnet run --project src/EncDotNet.ChartViewer

Build from source

You need the .NET 10 SDK.

dotnet build
dotnet test

Scripts

The scripts/ folder has file-based C# programs for working with NOAA data. Run them with dotnet run:

Script Description
DownloadCatalog.cs Download every NOAA ENC cell's ZIP file to .catalog/
ExpandCatalog.cs Extract the downloaded ZIP files to .expanded/
ReadCatalog.cs Time ISO 8211 parsing of every .000 file
ReadCatalogS57.cs Read every .000 file as S-57 and report diagnostics
DumpCatalog.cs Print a hex dump and parsed view of a CATALOG.031 file
DumpChart.cs Print a hex dump and parsed view of a .000 file
BuildChartIndex.cs Write a JSON index of the cells in every catalog
dotnet run scripts/DownloadCatalog.cs
dotnet run scripts/ExpandCatalog.cs
dotnet run scripts/DumpChart.cs .expanded/US5CA11M/ENC_ROOT/US5CA11M/US5CA11M.000

Standards

  • IHO S-57 Edition 3.1: transfer standard for digital hydrographic data.
  • ISO/IEC 8211: specification for a data descriptive file for information interchange.
  • IHO S-52: chart content and display aspects of ECDIS.

Contributing

See CONTRIBUTING.md. For questions, see SUPPORT.md; to report a vulnerability, see SECURITY.md.

License

MIT. See LICENSE.

About

Libraries for reading Electronic Nautical Charts (ENCs)

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages