Table of Contents

Class CoverageSampleSite

Namespace
EncDotNet.S100.Datasets.Pipelines.Query
Assembly
EncDotNet.S100.Core.dll

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

kind CoverageSiteKind

Whether the site is a grid node or a station.

rank double

Orders 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.

run DateTime?

The dataset's issue time (model run), newest preferred; null when not declared.

window CoverageStepWindow?

The site's time steps' span, or null for a product with no time dimension.

Properties

Kind

Whether the site is a grid node or a station.

public CoverageSiteKind Kind { get; }

Property Value

CoverageSiteKind

Rank

Orders sites that cover the requested time, lowest first.

public double Rank { get; }

Property Value

double

Run

The dataset's issue time (model run), or null.

public DateTime? Run { get; }

Property Value

DateTime?

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

IReadOnlyList<DateTime>

Window

The span of the site's time steps, or null for a product with no time dimension.

public CoverageStepWindow? Window { get; }

Property Value

CoverageStepWindow?

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

requestedTime DateTimeOffset?

The requested time, echoed in the sample; null when unspecified.

Returns

CoverageReading

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

steps IReadOnlyList<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.