EncDotNet.S100.Datasets.S411
0.16.0
dotnet add package EncDotNet.S100.Datasets.S411 --version 0.16.0
NuGet\Install-Package EncDotNet.S100.Datasets.S411 -Version 0.16.0
<PackageReference Include="EncDotNet.S100.Datasets.S411" Version="0.16.0" />
<PackageVersion Include="EncDotNet.S100.Datasets.S411" Version="0.16.0" />
<PackageReference Include="EncDotNet.S100.Datasets.S411" />
paket add EncDotNet.S100.Datasets.S411 --version 0.16.0
#r "nuget: EncDotNet.S100.Datasets.S411, 0.16.0"
#:package EncDotNet.S100.Datasets.S411@0.16.0
#addin nuget:?package=EncDotNet.S100.Datasets.S411&version=0.16.0
#tool nuget:?package=EncDotNet.S100.Datasets.S411&version=0.16.0
EncDotNet.S100.Datasets.S411
Library for reading and portraying IHO/JCOMM S-411 (Ice Information for Surface Navigation) datasets.
S-411 provides a standard data model for distributing sea-ice and lake-ice information as GML-encoded datasets conforming to the S-100 framework.
Features
- Parse S-411 GML datasets (S-100 Part 10b encoding, both
s100gml/1.0ands100gml/5.0profile namespaces) - Extract sea-ice features (
SeaIce,LakeIce,Iceberg,IceEdge,IceLead, etc. — see the S-411 1.2.1 Feature Catalogue for the full set) - Convert to S-100 Part 9 FeatureXML for portrayal pipeline consumption
- XSLT-based portrayal via the S-411 Portrayal Catalogue
Overview
Key types:
S411Dataset— root model containing parsed features and dataset identification.S411Feature— a geographic feature with type code, geometry, simple attributes, and complex attributes.S411ComplexAttribute— a complex attribute instance containing sub-attribute values.GmlGeometryType— shared enum (fromEncDotNet.S100.Core) describing the geometry primitive type of a feature.S411FeatureXmlSource—IFeatureXmlSourceadapter that projects anS411Datasetinto S-100 Part 9 FeatureXML for XSLT portrayal rules.S411FeatureGeometryProvider—IFeatureGeometryProvideradapter for the unified Mapsui display-list renderer.S411PortrayalCatalogue—IVectorPortrayalCatalogueimplementation that loads XSLT rules, symbols, line styles, area fills, and color palettes.
Typed data model
In addition to the raw S411Dataset / S411Feature shapes used by the
portrayal pipeline, the library exposes a strongly-typed projection under
EncDotNet.S100.Datasets.S411.DataModel built on the shared
EncDotNet.S100.DataModel abstractions in EncDotNet.S100.Core. This mirrors
the typed projections added for S-124, S-125, S-128, and S-201 (see PRs
#69,
#70,
#71, and
#72).
Key types:
S411SeaIceInventory— top-level projection with a staticFrom(S411Dataset, out IReadOnlyList<ProjectionDiagnostic>)factory that walks the source feature bag and produces typed subclasses.S411IceFeature— abstract base. Concrete subclasses:S411SeaIce,S411LakeIce,S411Iceberg,S411IceEdge,S411IceLead,S411IceThickness,S411SnowCover,S411StageOfMelt,S411DataCoverage, andS411OtherFeature(catch-all).S411EggCode— typed bundle for the WMO egg-code attributes carried bySeaIce/LakeIcefeatures. Both vocabularies (JCOMMiceact/iceapc/icesod/iceflzand the IHO 1.2.1 sampletotalConcentration/snowDepth) feed the same shape. List-valued JCOMM attributes are preserved as raw text because real-world producers serialise them as Python-list-style strings rather than the standard WMO tokenisation.S411GeometryKind—None/Point/Curve/Surface.
Feature-type normalisation maps the JCOMM lowercase short codes
(seaice, lacice, icebrg, icelne, icethk, snwcvr, stgmlt, …)
to the canonical PascalCase Feature Catalogue class names. Both GML
shapes therefore land on the same typed subclass, and consumers can
dispatch on NormalizedFeatureType without caring which shape the
dataset was emitted in. The raw element name remains available on
SourceFeatureType.
S-411 carries no information types and no xlink cross-references, so
the projection does not need an XlinkResolver graph; it still threads
a ProjectionContext so attribute-parse failures surface as
ProjectionDiagnostic entries rather than exceptions. The projection
only throws when the source dataset has no features at all.
Example:
using var s = File.OpenRead("ice.gml");
var dataset = S411Dataset.Open(s);
var inventory = S411SeaIceInventory.From(dataset, out var diagnostics);
foreach (var seaIce in inventory.IceFeatures.OfType<S411SeaIce>())
{
var conc = seaIce.EggCode?.TotalConcentration;
// ... dispatch on seaIce.NormalizedFeatureType / seaIce.GeometryKind
}
Notes
Two GML shapes in the wild
S-411 1.2.1 datasets are encountered in two distinctly different XML shapes, both of which this reader handles:
JCOMM / Canadian-Ice-Service operational shape (the common case in real-world data). Root element is
<ice:IceDataSet xmlns:ice="http://www.jcomm.info/ice">, members are wrapped one-per-<ice:IceFeatureMember>, and feature elements use the short lowercase codes (ice:seaice,ice:icebrg,ice:lacice,ice:icelne, …). Geometry is inline as a direct<gml:Polygon>/<gml:LineString>/<gml:Point>child. The bundled portrayal catalogue was authored against this shape.IHO 1.2.1 sample shape (transitional; only seen in the official IHO
S-411-Product-Specificationrepository'ssamples/folder). Root is a bare<Dataset>with a plural<members>wrapper holding many feature siblings, and feature class names are PascalCase (SeaIce,Iceberg, …). The dataset-identification block declares the spec via<S100:productIdentifier>S-411</S100:productIdentifier>.
The reader dispatches on the root element and produces an S411Dataset from
either. The original parsed XDocument is preserved on S411Dataset.SourceDocument
and passed through unchanged to the XSLT portrayal pipeline so that the
official catalogue's element names and namespaces are honoured exactly.
Portrayal catalogue
The bundled pc/ tree under EncDotNet.S100.Specifications is byte-identical
to the upstream catalogue at
iho-ohi/S-411-Product-Specification
(version 1.2.1). No edits, additions, or <ruleFile> insertions are made.
The upstream mainRule (pc/Rules/main.xsl) emits a display-list dialect
that is incompatible with this codebase's Part9DisplayListReader (it uses
<symbol><symbolReference>X</symbolReference></symbol> instead of
<symbol reference="X"/>, etc.). To preserve the catalogue intact while
still rendering, this library ships an embedded adapter at
Adapter/main.xsl. S411PortrayalCatalogue.GetCompiledRule("mainRule")
substitutes the adapter for the catalogue's mainRule only; all other rule
references (sub-templates, simple-symbol templates, etc.) are loaded from
the unmodified PC. The adapter handles both GML shapes described above.
Other
- S-411 has no information types (
<imember>elements); only feature wrappers. - Coordinate ordering in
<gml:pos>/<gml:posList>follows the S-100 Part 10b convention of lat lon forEPSG:4326. - The S-411 Portrayal Catalogue ships several top-level XSLT entry points (
mainRule, plus per-ice-class rules such asSeaiceClass1ARule). OnlymainRuleis exposed as an active portrayal rule by default; class-specific rules are still loadable by name viaGetCompiledRule.
Validation rules
EncDotNet.S100.Datasets.S411.Validation.S411SeaIceRules exposes a pilot
rule pack (8 rules) for an S411SeaIceInventory, mirroring the S-421 rule
pack (PR #100).
Rule identifiers follow S411-R-{clause}:
| Rule | Severity | Summary |
|---|---|---|
S411-R-3.1 |
Error | Feature coordinates must lie within WGS-84 lat/lon ranges (S-100 Part 10b §6.2). |
S411-R-3.2 |
Error | Surface features must have a closed ring with ≥ 4 coordinates. |
S411-R-3.3 |
Error | Curve features must have ≥ 2 vertices. |
S411-R-4.1 |
Warning | Egg-code totalConcentration must be one of the S-411 Annex A enumerated WMO codes. |
S411-R-4.2 |
Error | iceAverageThickness must be ≥ 0 when present. |
S411-R-4.3 |
Error | Egg-code snowDepth must be ≥ 0 when present. |
S411-R-4.4 |
Warning | icebergSize must be one of the S-411 Annex A enumerated codes (1–9, 99). |
S411-R-5.1 |
Error | Feature identifiers must be unique across the dataset. |
Rules bind to the typed projection (S411SeaIceInventory, S411IceFeature
subclasses) and are therefore agnostic to the two real-world GML shapes
(JCOMM/Canadian Ice Service operational shape and IHO 1.2.1 sample shape).
Use S411SeaIceRules.Validate(inventory) for a one-shot run against the
default rule set, or compose a custom set via
ValidationRuleSet<S411SeaIceInventory>.
License
The bundled S-411 specification assets in EncDotNet.S100.Specifications are © JCOMM/IHO and used in accordance with their open-publication terms; see https://github.com/iho-ohi/S-411-Product-Specification.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- EncDotNet.S100.Core (>= 0.16.0)
- EncDotNet.S100.Portrayals (>= 0.16.0)
-
net8.0
- EncDotNet.S100.Core (>= 0.16.0)
- EncDotNet.S100.Portrayals (>= 0.16.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on EncDotNet.S100.Datasets.S411:
| Package | Downloads |
|---|---|
|
EncDotNet.S100.Datasets.Pipelines
Per-spec IDatasetProcessor implementations, the DatasetPipelineFactory (file -> processor detection), the headless image-render capability, the S-98 interoperability authority, and the validation runner for IHO S-100 product datasets. Consumed by the EncDotNet.S100 convenience package, the viewer, and the s100 CLI. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.16.0 | 101 | 6/8/2026 |