Class S124DatasetProcessor
IDatasetProcessor for IHO S-124 Navigational Warnings GML datasets. Drives the standard S-100 Part 9 XSLT vector portrayal pipeline inherited from GmlDatasetProcessorBase<TFeature>.
public sealed class S124DatasetProcessor : GmlDatasetProcessorBase<S124Feature>, IDatasetProcessor, IVectorPortrayalSource, IHeadlessImageRenderer, IDisplayModeAwareDatasetProcessor, ILoadedDatasetProjection
- Inheritance
-
S124DatasetProcessor
- Implements
- Inherited Members
Remarks
Normally created through the S124 registration (used by DatasetPipelineFactory) rather than constructed directly.
Constructors
S124DatasetProcessor(IAssetSource, string, PortrayalCatalogueManager, IDisplayPlaneAuthorityProvider, FeatureCatalogueManager?)
Initializes a new S124DatasetProcessor by reading the
dataset file relativePath from
source. Used by exchange-set bulk loading.
public S124DatasetProcessor(IAssetSource source, string relativePath, PortrayalCatalogueManager catalogueManager, IDisplayPlaneAuthorityProvider authorityProvider, FeatureCatalogueManager? featureCatalogueManager = null)
Parameters
sourceIAssetSourcerelativePathstringcatalogueManagerPortrayalCatalogueManagerauthorityProviderIDisplayPlaneAuthorityProviderfeatureCatalogueManagerFeatureCatalogueManager
S124DatasetProcessor(string, PortrayalCatalogueManager, IDisplayPlaneAuthorityProvider, FeatureCatalogueManager?)
Initializes a new S124DatasetProcessor by reading and parsing the
dataset file at path. The file is read in full and
closed before the constructor returns.
public S124DatasetProcessor(string path, PortrayalCatalogueManager catalogueManager, IDisplayPlaneAuthorityProvider authorityProvider, FeatureCatalogueManager? featureCatalogueManager = null)
Parameters
pathstringPath to the S-124 GML dataset file.
catalogueManagerPortrayalCatalogueManagerSupplies the S-124 portrayal catalogue.
authorityProviderIDisplayPlaneAuthorityProviderResolves the default S-98 display plane for the dataset's content.
featureCatalogueManagerFeatureCatalogueManagerOptional source of the S-124 feature catalogue, used to decode attribute values in feature info; null leaves them undecoded.
Properties
Features
The parsed features from the dataset.
protected override IReadOnlyList<S124Feature> Features { get; }
Property Value
ProductDescription
Human-readable product description for info strings (e.g. "Navigational Warnings", "Marine Aids to Navigation").
protected override string ProductDescription { get; }
Property Value
Methods
BuildNavigationalWarning(S124Feature)
Builds the navigational warning message for a feature, when the
product carries warnings. Returns null by default; S-124
overrides this for NavwarnPart features.
protected override NavigationalWarningInfo? BuildNavigationalWarning(S124Feature feature)
Parameters
featureS124Feature
Returns
CreateFeatureXmlSource()
Creates the spec-appropriate feature XML source.
protected override IFeatureXmlSource CreateFeatureXmlSource()
Returns
CreateFeatureXmlSource(RenderContext?)
Leaves out the parts in HiddenFeatures,
with the NavwarnAreaAffected and TextPlacement features
that only hidden parts reference (S-98 Edition 2.0.0 §12.12). Areas
and texts no part references, and those a drawn part also references,
stay. Filtering the input rather than the drawing instructions keeps
the rules that look across parts right, such as the count label the
point rule puts on parts that share a point.
protected override IFeatureXmlSource CreateFeatureXmlSource(RenderContext? context)
Parameters
contextRenderContextThe render context, if any.
Returns
CreateLoadedData()
Allocates the LoadedDatasetData variant wrapping this processor's already-parsed model. Never re-reads the source bytes.
public override LoadedDatasetData CreateLoadedData()
Returns
- LoadedDatasetData
The catalog payload wrapping the resident model (e.g. an
S125DatasetDataorS102CoverageData).
Remarks
Each GML subclass wraps its resident, already-parsed model in the
matching LoadedDatasetData variant (e.g.
new S125DatasetData(_dataset)) — no second parse.
GetNavigationalWarningMessage()
Returns the dataset's navigational warning as a whole (S-124: its
NavwarnPreamble and References), with no part's validity,
text or geometry. A cancellation or an in-force bulletin may have no
parts, so GetNavigationalWarnings() doesn't list it, yet it
ends other warnings; build a NavigationalWarningSet from it.
public override NavigationalWarningInfo? GetNavigationalWarningMessage()
Returns
- NavigationalWarningInfo
The warning, or
nullwhen the product carries none.
GetSuppressionInfo(RenderContext?)
Hides the whole warning when every part is in HiddenFeatures, so its unattached areas and texts aren't drawn alone.
protected override string? GetSuppressionInfo(RenderContext? context)
Parameters
contextRenderContextThe render context, if any.
Returns
- string
The status line, or
nullto render.
IsPickable(S124Feature)
Whether HitTestFeatures(double, double, double) may report feature.
The default is true; S-124 returns false for features its
last portrayal left out, so what isn't drawn isn't picked.
protected override bool IsPickable(S124Feature feature)
Parameters
featureS124FeatureThe feature hit.
Returns
ValidateDataset()
Runs the product's rule pack, or returns null when the product
has none. Called once by Validate(), which caches the
result.
protected override ValidationReport? ValidateDataset()
Returns
Remarks
Overrides should typically delegate to
ValidationRunner.Run(...) so that an
InvalidOperationException from the typed
projection (e.g. an empty dataset) surfaces as an empty report rather
than propagating out of Validate().