Table of Contents

Class Wind

Namespace
SimpleWeather
Assembly
SimpleWeather.dll

Represents the wind section of the current weather response, including derived directions.

public class Wind
Inheritance
Wind
Inherited Members

Properties

Degree

Wind direction, degrees (meteorological)

public double? Degree { get; }

Property Value

double?

Wind direction, degrees (meteorological)

Gust

Wind gust. Default Unit: meter/sec

public double? Gust { get; }

Property Value

double?

Wind gust. Default Unit: meter/sec

Speed

Wind speed. Default Unit: meter/sec

public double? Speed { get; }

Property Value

double?

Wind speed. Default Unit: meter/sec

WindDirectionLong

Long wind direction represented by a string (North, East, South, West, etc.)

public string? WindDirectionLong { get; }

Property Value

string

Long wind direction represented by a string (North, East, South, West, etc.)

WindDirectionShort

Short wind direction represented by a string (N, E, S, W, etc.)

public string? WindDirectionShort { get; }

Property Value

string

Short wind direction represented by a string (N, E, S, W, etc.)

Methods

FromJson(string?)

Creates this model from its OpenWeather JSON fragment.

public static Wind FromJson(string? json)

Parameters

json string

The JSON fragment, or null for an empty model.

Returns

Wind

The parsed weather model.

GetWindDirectionLong(double?)

Converts a numeric wind bearing into the corresponding long compass representation.

public static string GetWindDirectionLong(double? windDegree)

Parameters

windDegree double?

The meteorological wind degree.

Returns

string

The long direction token (e.g., North, Northwest).

GetWindDirectionShort(double?)

Converts a numeric wind bearing into the corresponding short compass representation.

public static string GetWindDirectionShort(double? windDegree)

Parameters

windDegree double?

The meteorological wind degree.

Returns

string

The short direction token (e.g., N, NW).