Link devicesDevices that bring your whole boat to any screen.
ENC SDKLoad S-57 charts into your application, apply S-64 updates and query what is at any point.
DocumentationSetup guides for every Link device and the reference for the ENC SDK.

Import an exchange set

importExchangeSet is the main entry point. It reads the set, plans the updates against what the store already holds, builds the changed cells and writes them.

Example

1
#include <GeoDataChart/ChartStore.h>
2
#include <GeoDataEnc/Importer.h>
3
4
using namespace GeoData;
5
6
DbOptions db;
7
db.type = DbOptions::Type::SpatiaLite;
8
db.filePath = "chart.sqlite";
9
10
chart::ChartStore store(db);
11
if (!store.open() || !store.createSchema())
12
return 1;
13
14
enc::ImportOptions opts;
15
opts.layerId = "enc";
16
opts.catalogRoot = "/path/to/catalog";
17
18
const enc::UpdateReport report = enc::importExchangeSet(store, "/path/to/ENC_ROOT", opts);

Options

Field

Default

Meaning

layerId

empty

Layer the cells belong to

requireCatalogue

true

Refuse a set without CATALOG.031

strictUpdates

true

Reject update records with no target or a wrong version

threads

0

Concurrent builds, 0 means one per hardware thread

catalogRoot

empty

Directory with PortrayalCatalog/ and feature_catalogue.xml. Required when there is something to build

Do not mix strict and non-strict imports in one store.

Report

UpdateReport has three fields:

  • files: one outcome per file of this load, the same rows as the update log.
  • cells: a summary of each cell of the set now in the library.
  • error: empty when the set was read and everything was written.

Chart library

1
std::vector<enc::CellLibraryRow> rows = enc::cellLibrary(store);
2
std::vector<enc::FileOutcome> log = enc::updateLog(store, "US5MD11M");
3
bool removed = enc::removeCell(store, "US5MD11M");
Next

Update outcomes