Class S57UpdateApplicator
Applies S-57 sequential updates to a base cell, checking each update's DSID against the cell's first (S-57 Part 3, sequential updating; tested by S-64 ยง2.2).
public static class S57UpdateApplicator
- Inheritance
-
S57UpdateApplicator
- Inherited Members
Remarks
An update applies when it's for the cell's edition and its update number follows the last one applied. Updates the cell already holds, such as those before a re-issue, are skipped. The first update that is for another edition, leaves a gap, or fails to apply stops the sequence; the updates before it stay applied.
Each record an update changes must also follow on: a record it modifies or
deletes must be at the version just below the update's (RVER), and
a record it inserts must not exist yet. An update that changes a record
twice gives each change the next version. That catches an update whose DSID
is right but whose content belongs elsewhere in the sequence.
An update with edition 0 cancels the cell. Nothing after it applies, and IsCancelled is set; the cell is still returned so the caller decides how to show it.
Methods
Apply(S57Document, IReadOnlyList<S57Document>, out S57UpdateReport)
Applies orderedUpdates to baseDocument
and reports what was applied.
public static S57Document Apply(S57Document baseDocument, IReadOnlyList<S57Document> orderedUpdates, out S57UpdateReport report)
Parameters
baseDocumentS57DocumentThe base cell (
.000).orderedUpdatesIReadOnlyList<S57Document>The update datasets, in ascending update-number order.
reportS57UpdateReportWhat was applied, and the first problem if there was one.
Returns
- S57Document
The cell with every update up to the first problem applied.