Crate nws_forecast_zones

Crate nws_forecast_zones 

Source
Expand description

NWS Public Forecast Zones

NWS’s description of forecast zones:

The NWS issues forecasts and some watches and warnings for public zones which usually are the same as counties but in many cases are subsets of counties. Counties are subset into zones to allow for more accurate forecasts because of the differences in weather within a county due to such things as elevation or proximity to large bodies of water.

This crate contains information about all 3882 public forecast zones, based on the April 5, 2022 data dump from NWS’s website.

And also 632 coastal and offshore marine zones (last updated March 22, 2022, downloaded from here)

You can get a ForecastZone by calling from_str, or by referencing one of the enum variants. Note that the variants are not docmented (because there are so many of them), but you can still access them.

§Example

let parsed = parse_zoneset("MAZ012-013-017-RIZALL").unwrap();
assert!(parsed.contains(ForecastZone::RI001));
assert!(parsed.contains(ForecastZone::MA013));
assert!(! parsed.contains(ForecastZone::MA014));

This crate uses data published from NWS, but is otherwise unaffiliated with the National Weather Service, and is not an official NWS library.

Structs§

ZoneDetails
Details about an NWS forecast zone
ZoneSet
A set of one or more forecast zones

Enums§

CoastalMarineZone
FireZone
ForecastZone
OffshoreMarineZone
Zone
An onshore, offshore, or coastal marine zone
ZoneSetError
Error type for parse_zoneset

Functions§

parse_zoneset
Parse a range of forecast zones