Class SurfaceCurrentSample
S-111 surface current sample at the nearest grid cell and time step.
public sealed record SurfaceCurrentSample : SampledValue, IEquatable<SampledValue>, IEquatable<SurfaceCurrentSample>
- Inheritance
-
SurfaceCurrentSample
- Implements
- Inherited Members
Constructors
SurfaceCurrentSample(double, double, double, DateTime, DateTimeOffset?, int, int, double, double)
S-111 surface current sample at the nearest grid cell and time step.
public SurfaceCurrentSample(double SpeedMetresPerSecond, double SpeedKnots, double DirectionDegreesTrue, DateTime SampleTime, DateTimeOffset? RequestedTime, int Row, int Column, double CellCentreLatitude, double CellCentreLongitude)
Parameters
SpeedMetresPerSeconddoubleSpeed in metres per second, converted from the encoded knots as
kn × 0.514444.SpeedKnotsdoubleSpeed in knots — the unit S-111 encodes
surfaceCurrentSpeedin.DirectionDegreesTruedoubleDirection in degrees from true north, clockwise (0..360).
SampleTimeDateTimeThe actual time step (UTC) selected for this sample.
RequestedTimeDateTimeOffset?The time the caller asked for, or
nullif unspecified.RowintRow index of the resolved cell in the source grid (0-based).
ColumnintColumn index of the resolved cell in the source grid (0-based).
CellCentreLatitudedoubleLatitude of the resolved cell centre.
CellCentreLongitudedoubleLongitude of the resolved cell centre.
Properties
CellCentreLatitude
Latitude of the resolved cell centre.
public double CellCentreLatitude { get; init; }
Property Value
CellCentreLongitude
Longitude of the resolved cell centre.
public double CellCentreLongitude { get; init; }
Property Value
Column
Column index of the resolved cell in the source grid (0-based).
public int Column { get; init; }
Property Value
DirectionDegreesTrue
Direction in degrees from true north, clockwise (0..360).
public double DirectionDegreesTrue { get; init; }
Property Value
RequestedTime
The time the caller asked for, or null if unspecified.
public DateTimeOffset? RequestedTime { get; init; }
Property Value
Row
Row index of the resolved cell in the source grid (0-based).
public int Row { get; init; }
Property Value
SampleTime
The actual time step (UTC) selected for this sample.
public DateTime SampleTime { get; init; }
Property Value
SpeedKnots
Speed in knots — the unit S-111 encodes surfaceCurrentSpeed in.
public double SpeedKnots { get; init; }
Property Value
SpeedMetresPerSecond
Speed in metres per second, converted from the encoded knots as
kn × 0.514444.
public double SpeedMetresPerSecond { get; init; }
Property Value
Methods
GetFields()
The sampled values with their quantities and units, in a fixed order per product. A method rather than a property so the typed variants' JSON is unchanged.
public override IReadOnlyList<SampledField> GetFields()