Interface ICoverageSampler
Capability implemented by coverage dataset processors (and the catalog
payloads that carry their data) whose values can be read at a point: S-102
depths, S-104 water levels and S-111 surface currents today, weather grids
later. Lets the MCP sample_coverage and sample_coverage_along
tools sample a product without knowing its specification.
public interface ICoverageSampler
- Extension Methods
Remarks
A sampler only says where in its dataset a point can be answered (FindSites(CoverageSampleQuery)) and reads a value there (Read(DateTimeOffset?) and ReadSteps(IReadOnlyList<CoverageStepRequest>)). Choosing between datasets and between the sites in them, and the time handling — the nearest time step, the one-step tolerance at either end of a dataset's range, the out-of-range policy and range or series windows — are shared, in CoverageSampling, so every product treats time the same way.
Values come back as SampledValues. A product without a typed shape of its own returns a CoverageFieldsSample, whose SampledFields carry each value's quantity and unit, so its fields reach MCP callers with no tool changes. Every typed shape describes its values the same way through GetFields().
Point sampling at a time, sampling along a polyline and windowed sampling of a single dataset are available as extension methods in CoverageSamplerExtensions.
Methods
FindSites(CoverageSampleQuery)
Finds the places in this dataset that can answer a sample at the query's point: the grid node nearest to it, or every station of a station-series dataset (the nearest across datasets is chosen later).
CoverageSiteSearch FindSites(CoverageSampleQuery query)
Parameters
queryCoverageSampleQueryThe point to sample, with the transforms that reproject it into the dataset's CRS.
Returns
- CoverageSiteSearch
The sites, or an empty search when the dataset does not cover the point. Implementations may throw ObjectDisposedException when the dataset was closed during the call.