Class S101ToS57Translator
Translates an S101Document into an in-memory S-57 S57Document, following S-65 Annex C (S-101 to S-57 ENC Conversion Guidance, Ed 1.0.0, May 2025). This is a preview: it covers Annex C §2–§30 (see S101ToS57Coverage), but not yet the attributes of spatial records.
public sealed class S101ToS57Translator
- Inheritance
-
S101ToS57Translator
- Inherited Members
Remarks
The output uses the EncDotNet.S57 record types and is a base cell
S57DocumentWriter can encode: every record is an insert at
version 1, the DSID/DSPM describe a new ENC cell, and ATTF/NATF text sits
at lexical levels that encode it. Points become isolated nodes and S-101
curves shared edges between connected nodes, which keeps S-57 chain-node
topology. The skin of the earth is cut around floating docks, hulks and
pontoons (§2.5.1.1), and the M_COVR objects tile the dataset's
bounding box, with an M_CSCL where a coverage's scale differs
(§3.5); both split shared edges for every object that uses them.
S57TopologyCheck checks the result.
The structural inverses of the forward translation are built in a second
pass over the S-101 feature associations: a bridge's spans become
BRIDGE objects tied by a C_AGGR (§6.6), aggregations become
C_AGGR or C_ASSO (§25), and Structure/Equipment becomes master
and slave feature pointers (§18.2).
Constructors
S101ToS57Translator()
Creates a translator with the default rules and options.
public S101ToS57Translator()
S101ToS57Translator(S101ToS57Rules, S101ToS57TranslationOptions)
Creates a translator with the given rules and options.
public S101ToS57Translator(S101ToS57Rules rules, S101ToS57TranslationOptions options)
Parameters
rulesS101ToS57RulesThe conversion rules.
optionsS101ToS57TranslationOptionsThe converter choices Annex C leaves open.
S101ToS57Translator(S101ToS57TranslationOptions)
Creates a translator with the default rules and the given options.
public S101ToS57Translator(S101ToS57TranslationOptions options)
Parameters
optionsS101ToS57TranslationOptions
Methods
Translate(S101Document)
Translates an S-101 document into an S-57 document.
public S57Document Translate(S101Document s101)
Parameters
s101S101Document
Returns
Translate(S101Document, S101ToS57TranslationDiagnostics?)
Translates an S-101 document into an S-57 document, collecting
diagnostics into diagnostics when it isn't null.
public S57Document Translate(S101Document s101, S101ToS57TranslationDiagnostics? diagnostics)
Parameters
s101S101DocumentdiagnosticsS101ToS57TranslationDiagnostics