Class CoverageSampleSite
One place in a dataset that can answer a sample — a grid node or a station — found by FindSites(CoverageSampleQuery).
public abstract class CoverageSampleSite
- Inheritance
-
CoverageSampleSite
- Inherited Members
Remarks
CoverageSampling chooses between sites by Window (sites covering the requested time first), then Rank (lowest first), then Run (newest first), then the latest last step; and reads the chosen one.
Constructors
CoverageSampleSite(CoverageSiteKind, double, DateTime?, CoverageStepWindow?)
Creates a site.
protected CoverageSampleSite(CoverageSiteKind kind, double rank, DateTime? run, CoverageStepWindow? window)
Parameters
kindCoverageSiteKindWhether the site is a grid node or a station.
rankdoubleOrders sites that all cover the requested time, lowest first: the grid cell area for a grid (finest wins), the distance in metres for a station. Equal ranks keep dataset order.
runDateTime?The dataset's issue time (model run), newest preferred;
nullwhen not declared.windowCoverageStepWindow?The site's time steps' span, or
nullfor a product with no time dimension.
Properties
Kind
Whether the site is a grid node or a station.
public CoverageSiteKind Kind { get; }
Property Value
Rank
Orders sites that cover the requested time, lowest first.
public double Rank { get; }
Property Value
Run
The dataset's issue time (model run), or null.
public DateTime? Run { get; }
Property Value
Steps
The site's time steps in storage order, which ReadSteps(IReadOnlyList<CoverageStepRequest>)
indexes, or null (the default) when the site cannot answer a
range or series time query.
public virtual IReadOnlyList<DateTime>? Steps { get; }
Property Value
Window
The span of the site's time steps, or null for a product with no time dimension.
public CoverageStepWindow? Window { get; }
Property Value
Methods
Read(DateTimeOffset?)
Reads the site at the time step nearest requestedTime
(the first step when it is null; a time outside the range clamps
to the nearest end). SelectTimeStep(IReadOnlyList<DateTime>, DateTimeOffset?)
picks the step.
public abstract CoverageReading Read(DateTimeOffset? requestedTime)
Parameters
requestedTimeDateTimeOffset?The requested time, echoed in the sample;
nullwhen unspecified.
Returns
ReadSteps(IReadOnlyList<CoverageStepRequest>)
Reads the site at each of steps for a range or series
query. Only called when Steps is not null; the
default reports the query as not supported.
public virtual CoverageReading ReadSteps(IReadOnlyList<CoverageStepRequest> steps)
Parameters
stepsIReadOnlyList<CoverageStepRequest>The steps to read, each with the time the caller asked for; at least one.
Returns
- CoverageReading
A CoverageReading.Series, or the reason the site cannot be read.