OpenWeather 2.0.0
See the version list below for details.
dotnet add package OpenWeather --version 2.0.0
NuGet\Install-Package OpenWeather -Version 2.0.0
<PackageReference Include="OpenWeather" Version="2.0.0" />
paket add OpenWeather --version 2.0.0
#r "nuget: OpenWeather, 2.0.0"
// Install OpenWeather as a Cake Addin #addin nuget:?package=OpenWeather&version=2.0.0 // Install OpenWeather as a Cake Tool #tool nuget:?package=OpenWeather&version=2.0.0
This project has been quiet for a while, but I am working on udpates now.
Welcome to OpenWeather.
Open Weather is a simple library designed to take a coordinate (latitude and longitude) and find the closest weather station to that coordinate while also getting the current METAR or TAF weather data and parsing it. It has other features like being cross-platform (Windows/Linux/Android), searching by ICAO codes, automatic update intervals, and unit conversions. We hope to be adding more and more features as development continues!
Pre-Compiled Packages
You can get a pre-compiled nuget package by searching OpenWeather in NuGet or going directly to our NuGet page: https://www.nuget.org/packages/OpenWeather/
The Data
All the METAR data is obtained through NOAA and the Aviation Weather Center. Our weather station lookup list is adapted from Greg Thompson's station list which can be found here.
Getting Started
It's easy to search for a station and start getting weather data!
private static void Main(string[] args)
{
//Optional, build the StationDataTable without any actions, otherwise it will be built upon first loopkup like below.
//On average, increases the first lookup time by 5 times. Obviously it's of no use in this application, but for an
//application that runs lookups at a later time, you could build the table at the start and have it ready for later
(assuming you even want persistant lookup).
//StationLookup.ZeroActionInitialize();
var station = MetarStationLookup.Instance.Lookup(-90, -180);
Console.WriteLine($"Station: {station.GetStationInfo.Name}\n" +
$"ICAO: {station.GetStationInfo.ICAO}\n" +
$"Temperature: {station.Weather.Temperature} {station.Units.TemperatureUnit}\n" +
$"Pressure: {station.Weather.Pressure} {station.Units.PressureUnit}\n" +
$"Wind Speed: {station.Weather.WindSpeed} {station.Units.WindSpeedUnit}");
Console.ReadLine();
}
License
OpenWeather is under the BSD 3-Clause License.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- UnitsNet (>= 4.113.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.