Skip to content

Marine warnings and ice charts ​

Besides Appendix M, the catalog draws two IHO S-100 products of the WMO's S-41X family:

  • S-412 Marine Weather Warnings: wind, significant wave height, ice accretion, restricted visibility and thunderstorm warning areas, each in its rule's colour and transparency.
  • S-411 Ice Information: sea- and lake-ice areas in the WMO ice chart colour code (by total concentration or by stage of development), iceberg areas, the ice edge and limit lines, ridges, leads, cracks and fractures, and the point features of an ice chart.

They are ordinary METOC graphics: the same saved object, the same renderers and the same editor. Each catalog entry has a source ('S-411' or 'S-412'), a name prefixed S411 or S412, and an s100 binding naming the S-100 feature and attribute values it portrays. They have no 2525E entity code, so metocSidc returns undefined for them, as for the wind barb.

Reading a dataset ​

readS100Dataset reads an S-100 GML dataset (Part 10b) into features. It parses the XML itself, so it runs in a browser, a worker or Node.

ts
import {readS100Dataset} from '@zaes/metoc';

const {product, features, skipped, warnings} = readS100Dataset(gml);
collection.load({type: 'FeatureCollection', features});
  • Coordinates are read latitude first by default (EPSG:4326); pass {axisOrder: 'lonlat'} for data written longitude first.
  • An S-411 sea-ice area is drawn by its total concentration, or with {iceColorCode: 'stageOfDevelopment'} by the first stage it lists.
  • S-411 point features become the Appendix M symbol for them where there is one (icebergs by size and count, ice drift turned to its bearing, ridges, rafting, thickness with its value), and S-411's own drawings otherwise.
  • Every attribute is kept in properties.metoc.s100, flat: complex attributes dotted, repeated values joined with commas.
  • Nothing is dropped silently: a feature no entry draws is in skipped with the reason, and a graphic drawn on an assumption the data did not state is in warnings.

The egg code ​

An S-411 sea-ice area read from data carries its WMO egg code: total concentration on top, then the partial concentrations, stages of development and forms of ice, each row under a line across the oval. It is built from the area's s100 attributes and drawn where it fits inside the area, shrinking to three quarters of its size and left out below that. An area drawn by hand has no S-411 attributes, so no egg. showLabels: false hides it with the other labels.

Exact geometry ​

S-100 boundaries are published data, so a source graphic is drawn straight between its points whatever smoothLines says. Millimetre sizes in the portrayal are converted at 96 dpi, so outlines and line patterns are screen-sized like every other decoration.

S-411 and S-412 areas are picked by their outline only, even when filled: an ice chart's areas tile the sea, and picking inside them would turn every pan into a drag.

Exchange sets and signatures ​

An S-100 exchange set is a folder (usually a ZIP) with a CATALOG.XML, an optional CATALOG.SIGN and the datasets. Reading the ZIP is the host's; give the package a function that returns a file's bytes by its path in the set.

ts
import {verifyS100ExchangeSet} from '@zaes/metoc';

const result = await verifyS100ExchangeSet({
    readFile: async (path) => zip.file(path)?.async('uint8array'),
    trustedRoots: [schemeAdministratorPem],
});
if (!result.allValid) console.warn(result.catalogue, result.datasets);
  • Signatures are verified with Web Crypto: Part 15's ECDSA-384-SHA2, and the earlier ECDSA signatures.
  • Trust is one level, as Part 15 issues it: the signer is a trusted Scheme Administrator certificate or was signed by one, both within their dates.
  • Each result is valid, invalid, untrusted, expired, certificate-not-found, unsupported or error; a missing CATALOG.SIGN is untrusted. The functions never throw over a bad signature: what went wrong is in the result.

readS100ExchangeCatalogue, readS100StandaloneSignature and verifyS100Signature are the pieces, for a host that wants to list the datasets or check one file.

Status ​

Both products are drafts. The S-412 colours follow its draft portrayal catalogue, and the S-411 colours and line styles its edition 1.1 portrayal, keyed by edition 1.2.1's codes. Expect changes when the products are published.

Released under the MIT License.