@atmosx/event-product-parser 3.0.4 → 3.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (212) hide show
  1. package/{CONTRIBUTING.md → .github/CONTRIBUTING.md} +1 -1
  2. package/.github/SUPPORTED_EVENTS.md +370 -0
  3. package/.github/docs/docs-functions.md +30 -0
  4. package/.github/docs/docs-general-configurations.md +199 -0
  5. package/.github/docs/docs-integrations.md +38 -0
  6. package/.github/docs/docs-listeners.md +28 -0
  7. package/.github/docs/docs-source-configuration.md +218 -0
  8. package/.github/docs/docs-technical.md +50 -0
  9. package/.github/logo.png +0 -0
  10. package/.github/samples/SAMPLE_EAS_GENERATION.wav +0 -0
  11. package/.github/samples/SAMPLE_GEOJSON.json +204 -0
  12. package/.github/samples/SAMPLE_TEXT_PRODUCT.txt +119 -0
  13. package/README.md +157 -337
  14. package/dist/cjs/index.cjs +24125 -15815
  15. package/dist/esm/index.mjs +24144 -15839
  16. package/package.json +56 -53
  17. package/pnpm-workspace.yaml +4 -0
  18. package/src/bootstrap.ts +83 -43
  19. package/src/building/CreateEvent.ts +54 -0
  20. package/src/{@building/building.clean.ts → building/GetCleanedEvent.ts} +4 -4
  21. package/src/building/GetEventAttachments.ts +88 -0
  22. package/src/building/GetEventDirection.ts +28 -0
  23. package/src/{@building/building.enhance.ts → building/GetEventEnhancedName.ts} +13 -17
  24. package/src/{@building/building.geometry.ts → building/GetEventGeometry.ts} +19 -13
  25. package/src/{@building/building.headers.ts → building/GetEventHeader.ts} +13 -13
  26. package/src/{@building/building.polygon.ts → building/GetEventNodes.ts} +26 -22
  27. package/src/{@building/building.office.ts → building/GetEventOffice.ts} +14 -14
  28. package/src/building/GetEventProperties.ts +105 -0
  29. package/src/{@building/building.signature.ts → building/GetEventSignature.ts} +16 -17
  30. package/src/{@core/core.createListener.ts → building/GetEventTags.ts} +11 -6
  31. package/src/building/GetEventTheme.ts +26 -0
  32. package/src/building/GetEventTracking.ts +64 -0
  33. package/src/components/audio/GenerateAudioMessage.ts +149 -0
  34. package/src/components/audio/components/GetCleanDescription.ts +91 -0
  35. package/src/{@modules/@eas/eas.getFloatPCM16.ts → components/audio/components/GetFloatPCM16.ts} +3 -3
  36. package/src/{@modules/@eas/eas.getMergedPCM16.ts → components/audio/components/GetMergedPCM16.ts} +3 -3
  37. package/src/{@modules/@eas/eas.getPCM16.ts → components/audio/components/GetPCM16.ts} +13 -8
  38. package/src/{@modules/@eas/eas.getPCMToFloat.ts → components/audio/components/GetPCMToFloat.ts} +3 -3
  39. package/src/{@modules/@eas/eas.getSampledPCM16.ts → components/audio/components/GetSampledPCM16.ts} +14 -8
  40. package/src/components/audio/components/GetTTS.ts +61 -0
  41. package/src/{@modules/@eas/eas.getWavPCM16.ts → components/audio/components/GetWavPCM16.ts} +8 -8
  42. package/src/{@modules/@eas/eas.setAFSK.ts → components/audio/components/SetAFSK.ts} +12 -8
  43. package/src/{@modules/@eas/eas.setAsciiToBits.ts → components/audio/components/SetAsciiToBits.ts} +3 -4
  44. package/src/{@modules/@eas/eas.setAttentionTone.ts → components/audio/components/SetAttentionTone.ts} +11 -6
  45. package/src/{@modules/@eas/eas.setNoise.ts → components/audio/components/SetNoise.ts} +14 -8
  46. package/src/{@modules/@eas/eas.setRadioEffect.ts → components/audio/components/SetRadioEffect.ts} +14 -8
  47. package/src/{@modules/@eas/eas.setSameHeader.ts → components/audio/components/SetSameHeader.ts} +22 -15
  48. package/src/{@modules/@utilities/utilities.setWarning.ts → components/database/CreateQuery.ts} +18 -13
  49. package/src/{@modules/@database/database.cache.ts → components/database/GetCachedEvents.ts} +19 -14
  50. package/src/components/database/ImportBoundaries.ts +168 -0
  51. package/src/components/database/ImportBroadcastify.ts +60 -0
  52. package/src/components/database/ImportCities.ts +87 -0
  53. package/src/{@modules/@database/database.shapefiles.ts → components/database/ImportShapefiles.ts} +31 -37
  54. package/src/components/database/ImportStanza.ts +43 -0
  55. package/src/components/database/InitializeDatabase.ts +71 -0
  56. package/src/components/images/GenerateGraphic.ts +234 -0
  57. package/src/components/images/components/CreateRectangle.ts +22 -0
  58. package/src/components/images/components/CreateText.ts +22 -0
  59. package/src/components/images/modules/CreateSVG.ts +37 -0
  60. package/src/components/images/modules/GetGeographicalBoundaries.ts +72 -0
  61. package/src/components/images/modules/GetGeographicalCities.ts +58 -0
  62. package/src/components/images/modules/GetGeographicalEvents.ts +48 -0
  63. package/src/components/images/modules/GetGeometryBounds.ts +82 -0
  64. package/src/components/images/modules/GetParsedBoundary.ts +58 -0
  65. package/src/components/images/modules/GetSVGPath.ts +53 -0
  66. package/src/components/images/modules/NormalizePolygon.ts +57 -0
  67. package/src/{@modules/@stanza/stanza.getAwipsType.ts → components/stanza/GetAwipsType.ts} +19 -18
  68. package/src/components/stanza/ValidateStanza.ts +62 -0
  69. package/src/components/utilities/CreateHttp.ts +83 -0
  70. package/src/{@modules/@utilities/utilities.getFormattedTime.ts → components/utilities/GetFormattedTime.ts} +3 -3
  71. package/src/components/utilities/GetLatestIssuance.ts +32 -0
  72. package/src/components/utilities/GetMatched.ts +38 -0
  73. package/src/{@modules/@utilities/utilities.getShapeNearestPoint.ts → components/utilities/GetShapeNearestPoint.ts} +24 -19
  74. package/src/components/utilities/GetUnionPolygon.ts +36 -0
  75. package/src/components/utilities/QueueManager.ts +70 -0
  76. package/src/components/utilities/SetCronSchedule.ts +98 -0
  77. package/src/{@core/core.clearEvents.ts → components/utilities/SetDebug.ts} +17 -12
  78. package/src/components/utilities/SetEventEmit.ts +42 -0
  79. package/src/{@modules/@utilities/utilities.setSettings.ts → components/utilities/SetSettings.ts} +7 -7
  80. package/src/{@modules/@utilities/utilities.setSleep.ts → components/utilities/SetSleep.ts} +5 -5
  81. package/src/components/utilities/SetTimeoutAction.ts +64 -0
  82. package/src/components/utilities/SetWarning.ts +47 -0
  83. package/src/{@modules/@xmpp/xmpp.xDeploy.ts → components/xmpp/DeployXMPP.ts} +26 -27
  84. package/src/components/xmpp/ErrorXMPP.ts +27 -0
  85. package/src/{@modules/@xmpp/xmpp.xError.ts → components/xmpp/OfflineXMPP.ts} +17 -9
  86. package/src/{@modules/@xmpp/xmpp.xOnline.ts → components/xmpp/OnlineXMPP.ts} +21 -20
  87. package/src/components/xmpp/ReconnectXMPP.ts +64 -0
  88. package/src/components/xmpp/StanzaXMPP.ts +63 -0
  89. package/src/{@building/building.tags.ts → core/ClearEvents.ts} +12 -5
  90. package/src/{@core/core.getVersion.ts → core/GetEvents.ts} +5 -6
  91. package/src/core/GetNodes.ts +24 -0
  92. package/src/{@core/core.getNodes.ts → core/GetRandomEvent.ts} +5 -6
  93. package/src/core/GetVersion.ts +24 -0
  94. package/src/core/ManualEvent.ts +55 -0
  95. package/src/core/QueryStanza.ts +40 -0
  96. package/src/core/SetNode.ts +87 -0
  97. package/src/core/StartService.ts +62 -0
  98. package/src/core/StopService.ts +32 -0
  99. package/src/enums/AWIPS.ts +366 -0
  100. package/src/{@dictionaries/dictionaries.eventActions.ts → enums/Actions.ts} +3 -3
  101. package/src/{@dictionaries/dictionaries.eventCancelMessages.ts → enums/Cancellation.ts} +4 -3
  102. package/src/{@dictionaries/dictionaries.eventCauses.ts → enums/Causes.ts} +3 -3
  103. package/src/{@dictionaries/dictionaries.statusCorrelationText.ts → enums/Correlations.ts} +3 -3
  104. package/src/enums/Enhanced.ts +70 -0
  105. package/src/{@dictionaries/dictionaries.eventTypes.ts → enums/Events.ts} +3 -3
  106. package/src/{@dictionaries/dictionaries.regExp.ts → enums/Expressions.ts} +5 -4
  107. package/src/{@core/core.getEvents.ts → enums/GlobalFilter.ts} +7 -8
  108. package/src/{@dictionaries/dictionaries.hailStrings.ts → enums/Hail.ts} +9 -4
  109. package/src/{@dictionaries/dictionaries.officeICAOs.ts → enums/ICAO.ts} +5 -3
  110. package/src/enums/Matches.ts +60 -0
  111. package/src/{@dictionaries/dictionaries.eventProducts.ts → enums/Products.ts} +3 -3
  112. package/src/{@dictionaries/dictionaries.eventRecords.ts → enums/Records.ts} +3 -3
  113. package/src/{@dictionaries/dictionaries.eventSeverity.ts → enums/Severity.ts} +3 -3
  114. package/src/{@dictionaries/dictionaries.shapefileLinks.ts → enums/Shapefiles.ts} +3 -3
  115. package/src/enums/States.ts +136 -0
  116. package/src/{@dictionaries/dictionaries.eventStatus.ts → enums/Status.ts} +3 -3
  117. package/src/enums/Strings.ts +22 -0
  118. package/src/enums/Tags.ts +172 -0
  119. package/src/{@dictionaries/dictionaries.testSignatures.ts → enums/Testing.ts} +5 -4
  120. package/src/enums/Themes.ts +70 -0
  121. package/src/events/ParseAPI.ts +129 -0
  122. package/src/{@events/events.text.ts → events/ParseText.ts} +32 -23
  123. package/src/{@events/events.ugc.ts → events/ParseUGC.ts} +36 -26
  124. package/src/events/ParseVTEC.ts +88 -0
  125. package/src/index.ts +60 -38
  126. package/src/manager/MakeEvents.ts +110 -0
  127. package/src/manager/RemoveEvent.ts +74 -0
  128. package/src/{@manager/manager.setHash.ts → manager/SetHash.ts} +19 -15
  129. package/src/manager/UpdateEvents.ts +35 -0
  130. package/src/manager/UpdateNode.ts +62 -0
  131. package/src/manager/ValidateEvents.ts +144 -0
  132. package/src/{@parsers/@hvtec/hvtec.extract.ts → parsers/hvtec/HVExtract.ts} +13 -13
  133. package/src/parsers/text/GetDescriptionFromProduct.ts +59 -0
  134. package/src/parsers/text/GetEmbededText.ts +57 -0
  135. package/src/parsers/text/GetPolygonFromProduct.ts +71 -0
  136. package/src/parsers/text/GetStringText.ts +58 -0
  137. package/src/{@parsers/@text/text.getTextFromProduct.ts → parsers/text/GetTextFromProduct.ts} +12 -12
  138. package/src/parsers/ugc/GetCache.ts +24 -0
  139. package/src/{@parsers/@ugc/ugc.expiry.ts → parsers/ugc/GetExpiry.ts} +3 -3
  140. package/src/{@parsers/@ugc/ugc.header.ts → parsers/ugc/GetHeader.ts} +6 -6
  141. package/src/parsers/ugc/GetLocations.ts +57 -0
  142. package/src/parsers/ugc/GetZonePolygon.ts +73 -0
  143. package/src/{@parsers/@ugc/ugc.zones.ts → parsers/ugc/GetZones.ts} +3 -3
  144. package/src/{@modules/@utilities/utilities.setListener.ts → parsers/ugc/SetCache.ts} +13 -10
  145. package/src/{@parsers/@ugc/ugc.extract.ts → parsers/ugc/UGCExtract.ts} +15 -15
  146. package/src/{@parsers/@pvtec/pvtec.expires.ts → parsers/vtec/GetExpiry.ts} +3 -3
  147. package/src/parsers/vtec/VTECExtract.ts +49 -0
  148. package/src/{@types/types.attributes.ts → static/Attributes.ts} +2 -3
  149. package/src/{@types/type.event.ts → static/Event.ts} +11 -8
  150. package/src/{@types/type.properties.ts → static/Properties.ts} +17 -10
  151. package/src/{@types/types.stanza.ts → static/Stanza.ts} +2 -2
  152. package/src/tasks/CreateTasks.ts +123 -0
  153. package/src/{@core/core.stop.ts → tasks/TaskGenerateJSON.ts} +14 -12
  154. package/src/tasks/TaskGenerateText.ts +34 -0
  155. package/src/tasks/TaskSendNTFY.ts +97 -0
  156. package/src/tasks/TaskSendWebhook.ts +107 -0
  157. package/src/types/Actions.ts +37 -0
  158. package/src/{@types/types.hvtec.ts → types/HVTEC.ts} +6 -6
  159. package/src/{@types/types.hash.ts → types/Hash.ts} +5 -5
  160. package/src/types/Nodes.ts +29 -0
  161. package/src/{@types/types.settings.ts → types/Settings.ts} +42 -10
  162. package/src/{@types/types.compiled.ts → types/StanzaCompiled.ts} +15 -14
  163. package/src/{@types/types.ugc.ts → types/UGC.ts} +5 -5
  164. package/src/{@modules/@utilities/utilities.getSettings.ts → types/VTEC.ts} +12 -7
  165. package/tools/build.js +47 -0
  166. package/tsconfig.json +28 -1
  167. package/dist/index.d.mts +0 -239
  168. package/dist/index.d.ts +0 -239
  169. package/src/@building/building.create.ts +0 -42
  170. package/src/@building/building.properties.ts +0 -89
  171. package/src/@building/building.tracking.ts +0 -68
  172. package/src/@building/building.validate.ts +0 -147
  173. package/src/@core/core.getRandomEvent.ts +0 -25
  174. package/src/@core/core.setNode.ts +0 -81
  175. package/src/@core/core.start.ts +0 -61
  176. package/src/@dictionaries/dictionaries.betterEventNames.ts +0 -99
  177. package/src/@dictionaries/dictionaries.eventAwipAbreviations.ts +0 -364
  178. package/src/@dictionaries/dictionaries.eventTags.ts +0 -93
  179. package/src/@dictionaries/dictionaries.eventsMatchText.ts +0 -36
  180. package/src/@dictionaries/dictionaries.transcribedMessageReplacements.ts +0 -68
  181. package/src/@events/events.api.ts +0 -113
  182. package/src/@events/events.vtec.ts +0 -87
  183. package/src/@manager/manager.mkEvent.ts +0 -96
  184. package/src/@manager/manager.rmEvent.ts +0 -49
  185. package/src/@manager/manager.updateEvents.ts +0 -35
  186. package/src/@manager/manager.updateNodes.ts +0 -55
  187. package/src/@manager/manager.updateWebhooks.ts +0 -50
  188. package/src/@modules/@database/database.init.ts +0 -45
  189. package/src/@modules/@database/database.stanza.ts +0 -48
  190. package/src/@modules/@eas/eas.setEasTone.ts +0 -137
  191. package/src/@modules/@stanza/stanza.validate.ts +0 -50
  192. package/src/@modules/@utilities/utilities.createHttp.ts +0 -85
  193. package/src/@modules/@utilities/utilities.createWebhook.ts +0 -115
  194. package/src/@modules/@utilities/utilities.setCronSchedule.ts +0 -65
  195. package/src/@modules/@utilities/utilities.setEventEmit.ts +0 -41
  196. package/src/@modules/@utilities/utilities.setTimeoutAction.ts +0 -59
  197. package/src/@modules/@xmpp/xmpp.xOffline.ts +0 -38
  198. package/src/@modules/@xmpp/xmpp.xReconnect.ts +0 -64
  199. package/src/@modules/@xmpp/xmpp.xStanza.ts +0 -63
  200. package/src/@parsers/@pvtec/pvtec.extract.ts +0 -49
  201. package/src/@parsers/@text/text.getDescriptionFromProduct.ts +0 -53
  202. package/src/@parsers/@text/text.getPolygonFromProduct.ts +0 -32
  203. package/src/@parsers/@text/text.getXML.ts +0 -61
  204. package/src/@parsers/@ugc/ugc.coordinates.ts +0 -110
  205. package/src/@parsers/@ugc/ugc.locations.ts +0 -29
  206. package/src/@types/types.pvtec.ts +0 -30
  207. package/src/@types/types.webhook.ts +0 -27
  208. package/test.js +0 -91
  209. package/tsup.config.ts +0 -16
  210. /package/{CODE_OF_CONDUCT.md → .github/CODE_OF_CONDUCT.md} +0 -0
  211. /package/{LICENSE → .github/LICENSE} +0 -0
  212. /package/{SECURITY.md → .github/SECURITY.md} +0 -0
@@ -0,0 +1,218 @@
1
+ <div align="center">
2
+ <a href="https://atmosphericx.scriptkitty.cafe">
3
+ <img src="https://scriptkitty.cafe/ftp/@atmosphericx/assets/logo-event-product-parser.png" alt="@atmosx/event-product-parser" width="800"/>
4
+ </a>
5
+ <br>
6
+ <p>A TypeScript/JavaScript library for parsing and ingesting NOAA and NWS Weather Text Products</p>
7
+ <small>A project built and maintained with ❤️ by the AtmosphericX team</small>
8
+ <p align="center">
9
+ <a href="https://atmosphericx.scriptkitty.cafe"><b>Documentation</b></a> |
10
+ <a href="https://github.com/AtmosphericX"><b>Repositories</b></a> |
11
+ <a href="https://www.npmjs.com/search?q=%40atmosx"><b>NPM Packages</b></a> |
12
+ <a href="https://atmosphericx-discord.scriptkitty.cafe"><b>Community Discord</b></a>
13
+ </p>
14
+ </div>
15
+ <br><br>
16
+
17
+
18
+ # 3.0 - Source Configurations
19
+
20
+
21
+ `@atmosx/event-product-parser` supports multiple source configurations that allow you to customize how weather data is ingested and processed. These configurations define the external services, connection methods, and parsing used by the parser to receive weather products. The available source configurations provide flexibility for different data ingestion requirements, allowing you to choose the appropriate source based on your application's needs while maintaining a consistent parsing experience.
22
+
23
+ # 3.1 - NOAA Weather Wire Service
24
+ [NOAA Weather Wire Service](https://www.weather.gov/nwws) is a real-time dissemination service that delivers official weather information, alerts, forecasts, products, and warnings in text format from NWS Weather Forecast Offices and National Centers.
25
+
26
+ This service is designed for television and radio broadcasters, emergency managers, commercial alerting providers, private weather services, and other organizations that require rapid access to weather products.
27
+
28
+
29
+ Each alert, forecast, and observation is delivered over [XMPP](https://xmpp.org/) using the standardized [WMO Header Format](#34---geojson--wmo-formatting). This provides a consistent structure for automated processing.
30
+
31
+ Accessing the NOAA Weather Wire Service requires credentials, which can be obtained by sending an email to [NWWS.Issue@noaa.gov](mailto:NWWS.Issue@noaa.gov).
32
+
33
+ When requesting access, provide the following information:
34
+
35
+ * Name (First and Last)
36
+ * Company
37
+ * Address
38
+ * State, City, and ZIP Code
39
+ * Telephone Number
40
+ * Account Information: Single or Multiple Accounts
41
+
42
+ NWS processing of your request may take as long as 10 days or more depending on critical weather days and NWS priority requirements.
43
+
44
+
45
+ # 3.2 - National Weather Service API
46
+ The [National Weather Service](https://www.weather.gov/) provides a [RESTful API](https://www.weather.gov/documentation/services-web-api) for programmatically accessing weather data and products.
47
+
48
+ Compared to the [NOAA Weather Wire Service](#31---noaa-weather-wire-service), the API introduces additional latency, with data typically delayed by 1 to 2 minutes on average. This delay is one of the primary tradeoffs when using the API instead of NOAA Weather Wire Service for real-time weather product ingestion.
49
+
50
+ The NWS API is best suited for applications that require on demand access to weather data rather than the lowest possible latency delivery of operational weather products. All responses are provided in [GeoJSON](https://geojson.org/) format, making the data straightforward to parse and integrate into applications.
51
+
52
+
53
+ # 3.3 - NOAA Weather Wire Service vs NWS RESTful API
54
+ There are significant differences between these two sources. [NOAA Weather Wire Service](#31---noaa-weather-wire-service) requires authenticated access and is optimized for real-time product delivery, while the [NWS RESTful API](#32---national-weather-service-api) is publicly accessible and designed for on demand data retrieval.
55
+
56
+ | Feature | NOAA Weather Wire Service | NWS RESTful API |
57
+ | --- | --- | --- |
58
+ | Authentication | ✅ | ❌ |
59
+ | Real-time Delivery | ✅ | ❌ |
60
+ | WMO Formatting | ✅ | ❌ |
61
+ | Persistent Connection | ✅ | ❌ |
62
+ | Low Latency Products | ✅ | ❌ |
63
+ | Easy to Use | ❌ | ✅ |
64
+ | Publicly Accessible | ❌ | ✅ |
65
+
66
+
67
+ # 3.4 - GeoJSON & WMO Formatting
68
+
69
+ `@atmosx/event-product-parser` supports two primary data formats when ingesting weather products. The [NOAA Weather Wire Service](#31---noaa-weather-wire-service) uses [WMO Format](#342---wmo-format), while the [National Weather Service API](#32---national-weather-service-api) uses [GeoJSON](#341---geojson).
70
+
71
+ ## 3.4.1 - GeoJSON
72
+ [GeoJSON](https://geojson.org/) is a format for encoding a variety of geographic data structures. It is based on the JavaScript Object Notation (JSON) standard and is widely used for representing geographic features in web applications.
73
+
74
+ You can view a real-world sample [here](/.github/samples/SAMPLE_GEOJSON.json).
75
+
76
+ ```json
77
+ {
78
+ "type": "Feature",
79
+ "geometry": {
80
+ "type": "Polygon",
81
+ "coordinates": [[]]
82
+ },
83
+ "properties": {}
84
+ }
85
+ ```
86
+
87
+ ## 3.4.2 - WMO Format
88
+ **WMO Format** (World Meteorological Organization Format) is a standardized structure used for exchanging meteorological data, including observations, forecasts, and warnings. It provides a consistent format for weather products, allowing meteorological organizations and systems around the world to reliably share and process weather information.
89
+
90
+ A real-world example of a WMO-formatted product can be found [here](/.github/samples/SAMPLE_TEXT_PRODUCT.txt).
91
+ ```text
92
+ 000
93
+ WUUS51 KLOT 000000
94
+ SVRGYX
95
+ ILC001-ILC002-
96
+ /O.NEW.XXXX.XX.X.0000.000000T0000Z-000000T0000Z/
97
+
98
+ BULLETIN - IMMEDIATE BROADCAST REQUESTED
99
+
100
+ Severe Thunderstorm Warning
101
+
102
+ National Weather Service
103
+
104
+ XXXX PM Timezone Weekday Month DD 2026
105
+
106
+ TEST EXAMPLE - TEXT EXAMPLE - TEST EXAMPLE
107
+
108
+ &&
109
+
110
+
111
+
112
+ LAT...LON 4587 6965 4585 6968 4588 6971 4587 6972
113
+
114
+ 4584 6970 4576 6972 4576 6976 4577 6978
115
+
116
+ 4574 6981 4566 6974 4565 6970 4558 6971
117
+
118
+ 4553 6978 4530 6970 4567 7054 4573 7038
119
+
120
+ 4580 7042 4589 7026 4596 7026 4598 6968
121
+
122
+ TIME...MOT...LOC 1650Z 313DEG 52KT 4600 7042
123
+ ```
124
+
125
+
126
+ # 3.5 - Configuring NOAA Weather Wire Service
127
+
128
+ Configuring `@atmosx/event-product-parser` to use the [NOAA Weather Wire Service](#31---noaa-weather-wire-service) requires setting up the necessary credentials and connection parameters to establish a persistent connection to the service. This can be configured through the **Manager** class within your application.
129
+
130
+ * Keep in mind that settings configured within `NOAAWeatherWireServiceSettings` only apply to the [NOAA Weather Wire Service](#31---noaa-weather-wire-service) source and do not affect the [National Weather Service API](#32---national-weather-service-api) source.
131
+
132
+ ```ts
133
+ import { Manager } from '@atmosx/event-product-parser';
134
+
135
+ const client = new Manager({
136
+ EnableWireService: true, // Enable NOAA Weather Wire Service (NWWS)
137
+ NOAAWeatherWireServiceSettings: {
138
+ CredentialSettings: {
139
+ Username: `USERNAME`, // Case sensitive
140
+ Password: `PASSWORD`, // Case sensitive
141
+ Nickname: `NICKNAME`, // Visible to other connected users
142
+ },
143
+ },
144
+ });
145
+ ```
146
+
147
+ * Only **one** source can be enabled at a time. (*This project does not use fallback sources*)
148
+
149
+ ## 3.5.1 - Auto Reconnecting
150
+
151
+ With [XMPP](https://xmpp.org/) connections, `@atmosx/event-product-parser` can automatically reconnect to the [NOAA Weather Wire Service](#31---noaa-weather-wire-service) if the connection is interrupted.
152
+
153
+ This ensures your application can maintain a persistent connection and continue receiving weather products without requiring manual intervention after temporary network failures or service disruptions.
154
+
155
+ * This configuration only applies to the [NOAA Weather Wire Service](#31---noaa-weather-wire-service) using [XMPP](https://xmpp.org/). The [National Weather Service API](#32---national-weather-service-api) source does not require auto reconnect configuration.
156
+
157
+ ```ts
158
+ NOAAWeatherWireServiceSettings: {
159
+ ReconnectionSettings: {
160
+ Enabled: true, // Enable auto reconnect
161
+ ReconnectionInterval: 60, // Time since last stanza before reconnecting (seconds)
162
+ },
163
+ },
164
+ ```
165
+
166
+ ## 3.5.2 - Stanza Caching
167
+
168
+ Optionally, you can enable stanza caching to retain previously processed [XMPP](https://xmpp.org/) stanzas. This can help prevent data loss in the event that your application requires a fresh restart.
169
+
170
+ * Keep in mind that increasing **MaxRetentionHistory** will increase the amount of time required for `@atmosx/event-product-parser` to initialize, as more cached stanzas must be loaded and processed during startup.
171
+
172
+ ```ts
173
+ NOAAWeatherWireServiceSettings: {
174
+ CacheSettings: {
175
+ Enabled: true, // Enable stanza caching
176
+ MaxDatabaseHistory: 50000, // Maximum stanzas to store in the database
177
+ MaxRetentionHistory: 1200, // Maximum stanzas to load during startup
178
+ },
179
+ },
180
+ ```
181
+
182
+ ## 3.5.3 - Stanza Processing Settings
183
+
184
+ While processing stanzas, each one is categorized based on its contents and characteristics. This includes formats such as [CAP (Common Alerting Protocol) v1.2](https://docs.oasis-open.org/emergency/cap/v1.2/CAP-v1.2-os.html), [VTEC](https://www.weather.gov/vtec/), [UGC](https://www.weather.gov/gis/AWIPSShapefiles), and **Raw Text** products. By default, all product categories are enabled by default which includes:
185
+
186
+ * UGC Only Products
187
+ * VTEC/HVTEC Only Products
188
+ * Raw Text (No UGC/VTEC Present)
189
+
190
+ Please keep in mind that the **Common Alerting Protocol** text products will always be skipped as they tend to be slower for ingestion and require extra steps which include parsing [XML](https://www.w3.org/TR/REC-xml/). There is **NO** longer support for this category.
191
+
192
+
193
+ ```ts
194
+ NOAAWeatherWireServiceSettings: {
195
+ StanzaSettings: {
196
+ DisableUGC: false, // Disables all UGC Categories
197
+ DisableVTEC: false, // Disables all VTEC/HVTEC Categories
198
+ DisableText: false, // Disables all RawText Categories
199
+ }
200
+ },
201
+ ```
202
+
203
+
204
+ # 3.6 - Configuring National Weather Service API
205
+
206
+ The [National Weather Service API](#32---national-weather-service-api) requires minimal configuration compared to the [NOAA Weather Wire Service](#31---noaa-weather-wire-service). While there are fewer available settings, the API source is designed to provide simple access to weather data through RESTful requests without requiring authentication or persistent connections.
207
+
208
+ ```ts
209
+ import { Manager } from '@atmosx/event-product-parser';
210
+
211
+ const client = new Manager({
212
+ EnableWireService: false, // Disable NOAA Weather Wire Service (NWWS)
213
+ NationalWeatherServiceSettings: {
214
+ CallbackInterval: 30, // How often it retrieves new products (Minimum: 15 seconds)
215
+ EventsEndpoint: `https://api.weather.gov/alerts/active`, // RESTful API
216
+ },
217
+ });
218
+ ```
@@ -0,0 +1,50 @@
1
+ <div align="center">
2
+ <a href="https://atmosphericx.scriptkitty.cafe">
3
+ <img src="https://scriptkitty.cafe/ftp/@atmosphericx/assets/logo-event-product-parser.png" alt="@atmosx/event-product-parser" width="800"/>
4
+ </a>
5
+ <br>
6
+ <p>A TypeScript/JavaScript library for parsing and ingesting NOAA and NWS Weather Text Products</p>
7
+ <small>A project built and maintained with ❤️ by the AtmosphericX team</small>
8
+ <p align="center">
9
+ <a href="https://atmosphericx.scriptkitty.cafe"><b>Documentation</b></a> |
10
+ <a href="https://github.com/AtmosphericX"><b>Repositories</b></a> |
11
+ <a href="https://www.npmjs.com/search?q=%40atmosx"><b>NPM Packages</b></a> |
12
+ <a href="https://atmosphericx-discord.scriptkitty.cafe"><b>Community Discord</b></a>
13
+ </p>
14
+ </div>
15
+ <br><br>
16
+
17
+ # 8.0 - Technical Parser Documentation
18
+ # 8.1 - Workflow & Pipeline
19
+ # 8.2 - Core Parsing Logic
20
+ ## 8.2.1 - VTEC
21
+ ### 8.2.1.1 - Product Dictionary
22
+ ### 8.2.1.2 - Tracking
23
+ ### 8.2.1.3 - Event Dictionary
24
+ ### 8.2.1.4 - Status Dictionary
25
+ ### 8.2.1.5 - Organization Sender
26
+ ### 8.2.1.6 - Expiry Parsing
27
+ ### 8.2.1.7 - Watch Parsing
28
+ ### 8.2.1.8 - KWNS / SPC
29
+ ## 8.2.2 - UGC
30
+ ### 8.2.2.1 - Extracting Headers
31
+ ### 8.2.2.2 - Getting Zones
32
+ ### 8.2.2.3 - Extracting Expiry
33
+ ### 8.2.2.4 - UGC to Zones
34
+ ## 8.2.3 - HVTEC
35
+ ### 8.2.3.1 - Flood Severity
36
+ ### 8.2.3.2 - Flood Causes
37
+ ### 8.2.3.3 - Flood Records
38
+ ## 8.2.4 - Raw Text
39
+ ### 8.2.4.1 - Extracting Descriptions
40
+ ### 8.2.4.2 - Extracting Coordinates
41
+ ### 8.2.4.3 - Extracting String Specifics
42
+ ### 8.2.4.4 - Extracting XML
43
+ ## 8.2.5 - Building Properties
44
+ ## 8.2.6 - Building Geometry
45
+ # 8.3 - Event Validation & Filtering
46
+ ## 8.3.1 - Enhanced Event Naming
47
+ ## 8.3.2 - Appending Attachments
48
+ ## 8.3.3 - Generation Hashes
49
+ # 8.4 - Event & History Management
50
+ # 8.5 - Action Workflow
Binary file
@@ -0,0 +1,204 @@
1
+ {
2
+ "type": "Feature",
3
+ "geometry": {
4
+ "type": "Polygon",
5
+ "coordinates": [
6
+ [
7
+ [
8
+ -69.65,
9
+ 45.87
10
+ ],
11
+ [
12
+ -69.68,
13
+ 45.85
14
+ ],
15
+ [
16
+ -69.71,
17
+ 45.88
18
+ ],
19
+ [
20
+ -69.72,
21
+ 45.87
22
+ ],
23
+ [
24
+ -69.7,
25
+ 45.84
26
+ ],
27
+ [
28
+ -69.72,
29
+ 45.76
30
+ ],
31
+ [
32
+ -69.76,
33
+ 45.76
34
+ ],
35
+ [
36
+ -69.78,
37
+ 45.77
38
+ ],
39
+ [
40
+ -69.81,
41
+ 45.74
42
+ ],
43
+ [
44
+ -69.74,
45
+ 45.66
46
+ ],
47
+ [
48
+ -69.7,
49
+ 45.65
50
+ ],
51
+ [
52
+ -69.71,
53
+ 45.58
54
+ ],
55
+ [
56
+ -69.78,
57
+ 45.53
58
+ ],
59
+ [
60
+ -69.7,
61
+ 45.3
62
+ ],
63
+ [
64
+ -70.54,
65
+ 45.67
66
+ ],
67
+ [
68
+ -70.38,
69
+ 45.73
70
+ ],
71
+ [
72
+ -70.42,
73
+ 45.8
74
+ ],
75
+ [
76
+ -70.26,
77
+ 45.89
78
+ ],
79
+ [
80
+ -70.26,
81
+ 45.96
82
+ ],
83
+ [
84
+ -69.68,
85
+ 45.98
86
+ ],
87
+ [
88
+ -69.65,
89
+ 45.87
90
+ ]
91
+ ]
92
+ ]
93
+ },
94
+ "properties": {
95
+ "event": "Considerable Severe Thunderstorm Warning",
96
+ "parent": "Severe Thunderstorm Warning",
97
+ "status": "Expired",
98
+ "issued": "2026-07-14T16:51:00.000Z",
99
+ "expires": "2026-07-14T17:45:00.012Z",
100
+ "locations": "Somerset, ME",
101
+ "locations_array": [
102
+ "Somerset, ME"
103
+ ],
104
+ "description": "Considerable Severe Thunderstorm Warning has been allowed to expire. This product is no longer in effect.",
105
+ "attributes": {
106
+ "xmlns": "nwws-oi",
107
+ "id": "nwws_processor.6830",
108
+ "issue": "2026-07-14T16:51:00Z",
109
+ "ttaaii": "WUUS51",
110
+ "cccc": "KGYX",
111
+ "awipsid": "SVRGYX"
112
+ },
113
+ "geocode": {
114
+ "office": {
115
+ "office": "KGYX",
116
+ "name": "Portland, ME"
117
+ },
118
+ "organization": "WUUS51 KGYX 141651",
119
+ "ugc": [
120
+ "MEC025"
121
+ ],
122
+ "polygon": "W1tbLTY5LjY1LDQ1Ljg3XSxbLTY5LjY4LDQ1Ljg1XSxbLTY5LjcxLDQ1Ljg4XSxbLTY5LjcyLDQ1Ljg3XSxbLTY5LjcsNDUuODRdLFstNjkuNzIsNDUuNzZdLFstNjkuNzYsNDUuNzZdLFstNjkuNzgsNDUuNzddLFstNjkuODEsNDUuNzRdLFstNjkuNzQsNDUuNjZdLFstNjkuNyw0NS42NV0sWy02OS43MSw0NS41OF0sWy02OS43OCw0NS41M10sWy02OS43LDQ1LjNdLFstNzAuNTQsNDUuNjddLFstNzAuMzgsNDUuNzNdLFstNzAuNDIsNDUuOF0sWy03MC4yNiw0NS44OV0sWy03MC4yNiw0NS45Nl0sWy02OS42OCw0NS45OF0sWy02OS42NSw0NS44N11dXQ==",
123
+ "polygon_generated": true
124
+ },
125
+ "parameters": {
126
+ "tags": [
127
+ "Radar Indicated",
128
+ "Nickel Size Hail"
129
+ ],
130
+ "instructions": "MOVE TO AN INTERIOR ROOM ON THE LOWEST FLOOR OF A...",
131
+ "source": "RADAR INDICATED",
132
+ "hazards": "70 MPH WIND GUSTS AND NICKEL SIZE HAIL",
133
+ "impacts": "EXPECT CONSIDERABLE TREE DAMAGE DAMAGE IS LIKELY TO",
134
+ "estimated_hail_size": "0.88 (Nickel)",
135
+ "estimated_wind_gusts": "70 MPH",
136
+ "damage_threat": "CONSIDERABLE",
137
+ "wind_threat": "RADAR INDICATED",
138
+ "hail_threat": "RADAR INDICATED"
139
+ },
140
+ "discussion_parameters": {},
141
+ "watch_parameters": {
142
+ "watch_number": false
143
+ },
144
+ "metadata": {
145
+ "ms": 13.219468999654055,
146
+ "source": "events.vtec",
147
+ "tracking": "KGYX.SV.W.0034",
148
+ "header": "ZCZC-ATMOSX-SVR-MEC025-Issued-20260714T165133-KGYX",
149
+ "vtec": {
150
+ "vtec": "O.NEW.KGYX.SV.W.0034.260714T1651Z-260714T1745Z",
151
+ "product": "Operational Product",
152
+ "tracking": "KGYX.SV.W.0034",
153
+ "event": "Severe Thunderstorm Warning",
154
+ "status": "Issued",
155
+ "organization": "WUUS51 KGYX 141651",
156
+ "expires": "2026-07-14T13:45:00.000-04:00",
157
+ "is_watch": false,
158
+ "prediction_center": false
159
+ },
160
+ "raw": "Considerable Severe Thunderstorm Warning has been allowed to expire. This product is no longer in effect.",
161
+ "history": [
162
+ {
163
+ "description": "The National Weather Service in Gray Maine has issued a\n\n\n\n* Severe Thunderstorm Warning for...\n\n Northwestern Somerset County in west central Maine...\n\n\n\n* Until 145 PM EDT.\n\n\n\n* At 1250 PM EDT, a severe thunderstorm was located 29 miles north of\n\n Jackman, moving southeast at 60 mph.\n\n\n\n HAZARD...70 mph wind gusts and nickel size hail.\n\n\n\n SOURCE...Radar indicated.\n\n\n\n IMPACT...Expect considerable tree damage. Damage is likely to \n\n mobile homes, roofs, and outbuildings.\n\n\n\n* Locations impacted include...\n\n Jackman, Seboomook, Misery Gore, Sandwich Academy Grant, Moose\n\n River, Long Pond, Parlin Pond, Forsyth, Tomhegan, Dennistown\n\n Plantation, Chase Stream, Rockwood Strip, Soldiertown, Sandy Bay,\n\n Johnson Mountain, Plymouth, Taunton And Raynham Academy Grant,\n\n Pittston Academy Grant, Brassua, and Sapling.\n\n\n\nPRECAUTIONARY/PREPAREDNESS ACTIONS...\n\n\n\nFor your protection move to an interior room on the lowest floor of a\n\nbuilding.\n\n\n\nIf on or near Moosehead Lake, get away from the water and move \n\nindoors or inside a vehicle. Remember, lightning can strike out to \n\n15 miles from the parent thunderstorm. If you can hear thunder, you \n\nare close enough to be struck by lightning. Move to safe shelter \n\nnow! Do not be caught on the water in a thunderstorm.",
164
+ "issued": "2026-07-14T16:51:00.000Z",
165
+ "status": "Issued"
166
+ },
167
+ {
168
+ "description": "Considerable Severe Thunderstorm Warning has been allowed to expire. This product is no longer in effect.",
169
+ "issued": "2026-07-14T17:45:00.012Z",
170
+ "status": "Expired"
171
+ }
172
+ ],
173
+ "attachments": [
174
+ {
175
+ "name": "Public Safety: Anson and Madison Fire",
176
+ "link": "https://www.broadcastify.com/listen/feed/47168"
177
+ },
178
+ {
179
+ "name": "Public Safety: Anson/Madison/Starks Ambulance",
180
+ "link": "https://www.broadcastify.com/listen/feed/47335"
181
+ },
182
+ {
183
+ "name": "Public Safety: Kennebec, Somerset, and Waldo County Fire Departments",
184
+ "link": "https://www.broadcastify.com/listen/feed/41643"
185
+ },
186
+ {
187
+ "name": "Public Safety: Somerset County Fire",
188
+ "link": "https://www.broadcastify.com/listen/feed/25011"
189
+ }
190
+ ],
191
+ "hash": "0d3f2b404c2ea964712416139e1867534fc63f1343ea84a0be91760918d9bf33",
192
+ "nodes": [],
193
+ "filtered_proximity": false,
194
+ "updated": 1784051098011
195
+ },
196
+ "status_metadata": {
197
+ "is_issued": true,
198
+ "is_test": false,
199
+ "is_updated": false,
200
+ "is_expired": true,
201
+ "is_statement": false
202
+ }
203
+ }
204
+ }
@@ -0,0 +1,119 @@
1
+ 449
2
+
3
+ WUUS51 KGYX 141651
4
+
5
+ SVRGYX
6
+
7
+ MEC025-141745-
8
+
9
+ /O.NEW.KGYX.SV.W.0034.260714T1651Z-260714T1745Z/
10
+
11
+
12
+
13
+ BULLETIN - IMMEDIATE BROADCAST REQUESTED
14
+
15
+ Severe Thunderstorm Warning
16
+
17
+ National Weather Service Gray ME
18
+
19
+ 1251 PM EDT Tue Jul 14 2026
20
+
21
+
22
+
23
+ The National Weather Service in Gray Maine has issued a
24
+
25
+
26
+
27
+ * Severe Thunderstorm Warning for...
28
+
29
+ Northwestern Somerset County in west central Maine...
30
+
31
+
32
+
33
+ * Until 145 PM EDT.
34
+
35
+
36
+
37
+ * At 1250 PM EDT, a severe thunderstorm was located 29 miles north of
38
+
39
+ Jackman, moving southeast at 60 mph.
40
+
41
+
42
+
43
+ HAZARD...70 mph wind gusts and nickel size hail.
44
+
45
+
46
+
47
+ SOURCE...Radar indicated.
48
+
49
+
50
+
51
+ IMPACT...Expect considerable tree damage. Damage is likely to
52
+
53
+ mobile homes, roofs, and outbuildings.
54
+
55
+
56
+
57
+ * Locations impacted include...
58
+
59
+ Jackman, Seboomook, Misery Gore, Sandwich Academy Grant, Moose
60
+
61
+ River, Long Pond, Parlin Pond, Forsyth, Tomhegan, Dennistown
62
+
63
+ Plantation, Chase Stream, Rockwood Strip, Soldiertown, Sandy Bay,
64
+
65
+ Johnson Mountain, Plymouth, Taunton And Raynham Academy Grant,
66
+
67
+ Pittston Academy Grant, Brassua, and Sapling.
68
+
69
+
70
+
71
+ PRECAUTIONARY/PREPAREDNESS ACTIONS...
72
+
73
+
74
+
75
+ For your protection move to an interior room on the lowest floor of a
76
+
77
+ building.
78
+
79
+
80
+
81
+ If on or near Moosehead Lake, get away from the water and move
82
+
83
+ indoors or inside a vehicle. Remember, lightning can strike out to
84
+
85
+ 15 miles from the parent thunderstorm. If you can hear thunder, you
86
+
87
+ are close enough to be struck by lightning. Move to safe shelter
88
+
89
+ now! Do not be caught on the water in a thunderstorm.
90
+
91
+
92
+
93
+ &&
94
+
95
+
96
+
97
+ LAT...LON 4587 6965 4585 6968 4588 6971 4587 6972
98
+
99
+ 4584 6970 4576 6972 4576 6976 4577 6978
100
+
101
+ 4574 6981 4566 6974 4565 6970 4558 6971
102
+
103
+ 4553 6978 4530 6970 4567 7054 4573 7038
104
+
105
+ 4580 7042 4589 7026 4596 7026 4598 6968
106
+
107
+ TIME...MOT...LOC 1650Z 313DEG 52KT 4600 7042
108
+
109
+
110
+
111
+ THUNDERSTORM DAMAGE THREAT...CONSIDERABLE
112
+
113
+ HAIL THREAT...RADAR INDICATED
114
+
115
+ MAX HAIL SIZE...0.88 IN
116
+
117
+ WIND THREAT...RADAR INDICATED
118
+
119
+ MAX WIND GUST...70 MPH