Table of Contents

Class DatasetMetadata

Namespace
EncDotNet.S100.Core
Assembly
EncDotNet.S100.Core.dll

Lightweight, product-agnostic description of a dataset obtained without fully reading or portraying it — the output of a dataset reader's ReadMetadata "peek" path. Carries only the facts a host needs to place a dataset on the map and decide whether it is worth loading in full: its declared specification, geographic extent, and (where the encoding models them) display-scale window and temporal coverage.

public sealed record DatasetMetadata : IEquatable<DatasetMetadata>
Inheritance
DatasetMetadata
Implements
Inherited Members

Remarks

This type exists to make dataset loading phased: a host can probe many datasets cheaply — frame a viewport from the union of their extents, register them in a layer list, draw an out-of-scale indicator — and defer the expensive full parse + portrayal of each dataset until the user actually brings it into view. For a catalogued exchange set the same facts come from CATALOG.XML; for a "loose" folder of datasets they must come from the datasets themselves, which is what a reader's ReadMetadata supplies.

Only Spec is guaranteed. Extent, DisplayScale, and TimeCoverage are optional because they are not universal across S-100 encodings: display scale is an ENC / catalogue concept, temporal coverage exists only for dynamic products (the HDF5 time-series products S-104 and S-111), and some encodings (notably GML without a reliable gml:boundedBy) cannot yield an extent cheaply. A null optional means "not cheaply available" — the host should fall back to a full load rather than treat it as authoritative.

A probed Extent is an estimate: the authoritative extent (which may include portrayal-induced symbol overhang) is the one produced by the full render. Hosts should overwrite the probe estimate once the dataset is fully loaded.

Properties

DisplayScale

The display-scale window (coarsest / finest scale denominators) at which the dataset is intended to draw, or null for encodings that do not carry one. Sourced from the ENC DataCoverage (S-101 FC §3.1.1) or an equivalent catalogue field.

public DisplayScaleRange? DisplayScale { get; init; }

Property Value

DisplayScaleRange?

Extent

The dataset's extent in its native horizontal CRS (HorizontalCrsEpsg), or null when it cannot be determined without a full parse. It is WGS-84 decimal degrees only when HorizontalCrsEpsg is null or 4326. Use GetGeographicExtent(ICrsTransformFactory) for a WGS-84 extent, e.g. to frame a map viewport.

public BoundingBox? Extent { get; init; }

Property Value

BoundingBox

Remarks

BoundingBox nominally documents itself as WGS-84, but for projected HDF5 grids (e.g. UTM S-102, S-100 Part 10c) the latitude members hold the minimum / maximum northing and the longitude members the minimum / maximum easting. This matches NativeExtent.

The extent stays native because the product readers that probe it (e.g. S102DatasetReader.ReadMetadata) have no CRS transform, and because a probed and a fully loaded dataset must report the same value.

HorizontalCrsEpsg

EPSG code of the coordinate reference system in which Extent is expressed, or null to mean EPSG:4326 (WGS-84 geographic). Populated for HDF5 gridded products that may be projected (e.g. UTM S-102); null for GML / ENC vector products whose geometry is always geographic.

public int? HorizontalCrsEpsg { get; init; }

Property Value

int?

Spec

The product specification (name + edition) the dataset declares conformance to, resolved from the dataset itself (HDF5 productSpecification attribute, GML application namespace, S-101 ProductSpecificationEdition, etc.). Always present. The edition is default (0.0.0) when the dataset does not self-describe a parseable edition — callers should not assume a real supported edition is always present.

public required SpecRef Spec { get; init; }

Property Value

SpecRef

TimeCoverage

The temporal span the dataset covers, or null for static products. Populated for the HDF5 time-series products (S-104 and S-111), whose forecast / observation time dimension is read from the group time attributes without touching the payload. Other encodings that carry time (e.g. GML S-411) leave this null because it is not surfaced cheaply today.

public TimeCoverage? TimeCoverage { get; init; }

Property Value

TimeCoverage?

Methods

GetGeographicExtent(ICrsTransformFactory)

Returns Extent as a WGS-84 (EPSG:4326) bounding box in decimal degrees, reprojecting it from HorizontalCrsEpsg when that CRS is projected.

public BoundingBox? GetGeographicExtent(ICrsTransformFactory transformFactory)

Parameters

transformFactory ICrsTransformFactory

Factory used to build the native → EPSG:4326 transform (e.g. ProjNetCrsTransformFactory). It is not called when the extent is already geographic.

Returns

BoundingBox

The WGS-84 envelope of all four reprojected corners, or null when Extent is null.

Exceptions

ArgumentNullException

transformFactory is null.