@atmosx/event-product-parser 3.0.55 → 3.0.62
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.
- package/.github/CODE_OF_CONDUCT.md +9 -9
- package/.github/CONTRIBUTING.md +29 -29
- package/.github/LICENSE +17 -17
- package/.github/SECURITY.md +20 -20
- package/.github/SUPPORTED_EVENTS.md +369 -369
- package/.github/docs/docs-functions.md +30 -0
- package/.github/docs/docs-general-configurations.md +209 -0
- package/.github/docs/docs-integrations.md +37 -0
- package/.github/docs/docs-listeners.md +28 -0
- package/.github/docs/docs-source-configuration.md +218 -0
- package/.github/docs/docs-technical.md +50 -0
- package/.github/logo.png +0 -0
- package/.github/samples/SAMPLE_EAS_GENERATION.wav +0 -0
- package/.github/samples/SAMPLE_GEOJSON.json +204 -0
- package/.github/samples/SAMPLE_TEXT_PRODUCT.txt +119 -0
- package/.vscode/settings.json +3 -3
- package/README.md +167 -0
- package/dist/cjs/index.cjs +1439 -1277
- package/dist/esm/index.mjs +1420 -1258
- package/package.json +47 -52
- package/src/@building/{building.create.ts → CreateEvent.ts} +55 -55
- package/src/@building/{building.clean.ts → GetCleanedEvent.ts} +29 -29
- package/src/@building/{building.attachments.ts → GetEventAttachments.ts} +85 -82
- package/src/@building/{building.enhance.ts → GetEventEnhancedName.ts} +54 -59
- package/src/@building/{building.geometry.ts → GetEventGeometry.ts} +47 -47
- package/src/@building/{building.headers.ts → GetEventHeader.ts} +36 -36
- package/src/@building/{building.polygon.ts → GetEventNodes.ts} +72 -69
- package/src/@building/{building.office.ts → GetEventOffice.ts} +42 -42
- package/src/@building/{building.properties.ts → GetEventProperties.ts} +95 -95
- package/src/@building/{building.signature.ts → GetEventSignature.ts} +60 -60
- package/src/@building/{building.tags.ts → GetEventTags.ts} +29 -24
- package/src/@building/{building.tracking.ts → GetEventTracking.ts} +67 -67
- package/src/@core/{core.clearEvents.ts → ClearEvents.ts} +30 -30
- package/src/@core/{core.createListener.ts → CreateListener.ts} +23 -23
- package/src/@core/{core.getEvents.ts → GetEvents.ts} +23 -23
- package/src/@core/{core.getNodes.ts → GetNodes.ts} +23 -23
- package/src/@core/{core.getRandomEvent.ts → GetRandomEvent.ts} +23 -23
- package/src/@core/{core.getVersion.ts → GetVersion.ts} +23 -23
- package/src/@core/{core.manualEvent.ts → ManualEvent.ts} +56 -38
- package/src/@core/{core.query.ts → QueryStanza.ts} +38 -38
- package/src/@core/{core.setNode.ts → SetNode.ts} +80 -80
- package/src/@core/{core.start.ts → StartService.ts} +60 -60
- package/src/@core/{core.stop.ts → StopService.ts} +31 -31
- package/src/@enums/AWIPS.ts +366 -0
- package/src/{@dictionaries/dictionaries.actions.ts → @enums/Actions.ts} +27 -27
- package/src/{@dictionaries/dictionaries.cancellation.ts → @enums/Cancellation.ts} +30 -30
- package/src/{@dictionaries/dictionaries.causes.ts → @enums/Causes.ts} +35 -35
- package/src/{@dictionaries/dictionaries.correlations.ts → @enums/Correlations.ts} +42 -42
- package/src/{@dictionaries/dictionaries.enhanced.ts → @enums/Enhanced.ts} +69 -69
- package/src/{@dictionaries/dictionaries.events.ts → @enums/Events.ts} +82 -82
- package/src/{@dictionaries/dictionaries.expressions.ts → @enums/Expressions.ts} +28 -28
- package/src/@enums/GlobalFilter.ts +24 -0
- package/src/{@dictionaries/dictionaries.hail.ts → @enums/Hail.ts} +37 -35
- package/src/{@dictionaries/dictionaries.icao.ts → @enums/ICAO.ts} +258 -258
- package/src/{@dictionaries/dictionaries.matches.ts → @enums/Matches.ts} +54 -54
- package/src/{@dictionaries/dictionaries.products.ts → @enums/Products.ts} +24 -24
- package/src/{@dictionaries/dictionaries.records.ts → @enums/Records.ts} +25 -25
- package/src/{@dictionaries/dictionaries.severity.ts → @enums/Severity.ts} +27 -27
- package/src/{@dictionaries/dictionaries.shapefiles.ts → @enums/Shapefiles.ts} +35 -35
- package/src/{@dictionaries/dictionaries.states.ts → @enums/States.ts} +71 -71
- package/src/{@dictionaries/dictionaries.status.ts → @enums/Status.ts} +30 -30
- package/src/{@dictionaries/dictionaries.global.ts → @enums/Strings.ts} +22 -24
- package/src/@enums/Tags.ts +167 -0
- package/src/{@dictionaries/dictionaries.testing.ts → @enums/Testing.ts} +24 -24
- package/src/@events/{events.api.ts → ParseAPI.ts} +116 -116
- package/src/@events/{events.text.ts → ParseText.ts} +87 -84
- package/src/@events/{events.ugc.ts → ParseUGC.ts} +93 -89
- package/src/@events/{events.vtec.ts → ParseVTEC.ts} +86 -86
- package/src/@manager/MakeEvents.ts +106 -0
- package/src/@manager/{manager.rmEvent.ts → RemoveEvent.ts} +69 -71
- package/src/@manager/{manager.setHash.ts → SetHash.ts} +35 -35
- package/src/@manager/Tasks.ts +246 -0
- package/src/@manager/{manager.updateEvents.ts → UpdateEvents.ts} +34 -34
- package/src/@manager/{manager.updateNodes.ts → UpdateNode.ts} +61 -53
- package/src/{@building/building.validate.ts → @manager/ValidateEvents.ts} +141 -154
- package/src/@modules/@database/{database.cache.ts → GetCachedEvents.ts} +49 -49
- package/src/@modules/@database/{database.broadcastify.ts → ImportBroadcastify.ts} +69 -66
- package/src/@modules/@database/{database.shapefiles.ts → ImportShapefiles.ts} +92 -92
- package/src/@modules/@database/{database.stanza.ts → ImportStanza.ts} +46 -46
- package/src/@modules/@database/{database.init.ts → InitializeDatabase.ts} +58 -58
- package/src/@modules/@eas/{eas.setEasTone.ts → GenerateEASMessage.ts} +144 -151
- package/src/@modules/@eas/{eas.getCleanDescription.ts → GetCleanDescription.ts} +91 -91
- package/src/@modules/@eas/{eas.getFloatPCM16.ts → GetFloatPCM16.ts} +29 -29
- package/src/@modules/@eas/{eas.getMergedPCM16.ts → GetMergedPCM16.ts} +32 -32
- package/src/@modules/@eas/{eas.getPCM16.ts → GetPCM16.ts} +52 -52
- package/src/@modules/@eas/{eas.getPCMToFloat.ts → GetPCMToFloat.ts} +26 -26
- package/src/@modules/@eas/{eas.getSampledPCM16.ts → GetSampledPCM16.ts} +36 -36
- package/src/@modules/@eas/{eas.getTTS.ts → GetTTS.ts} +54 -54
- package/src/@modules/@eas/{eas.getWavPCM16.ts → GetWavPCM16.ts} +52 -52
- package/src/@modules/@eas/{eas.setAFSK.ts → SetAFSK.ts} +51 -51
- package/src/@modules/@eas/{eas.setAsciiToBits.ts → SetAsciiToBits.ts} +31 -31
- package/src/@modules/@eas/{eas.setAttentionTone.ts → SetAttentionTone.ts} +40 -40
- package/src/@modules/@eas/{eas.setNoise.ts → SetNoise.ts} +32 -32
- package/src/@modules/@eas/{eas.setRadioEffect.ts → SetRadioEffect.ts} +50 -50
- package/src/@modules/@eas/{eas.setSameHeader.ts → SetSameHeader.ts} +44 -44
- package/src/@modules/@stanza/{stanza.getAwipsType.ts → GetAwipsType.ts} +47 -45
- package/src/@modules/@stanza/{stanza.validate.ts → ValidateStanza.ts} +49 -49
- package/src/@modules/@utilities/{utilities.createHttp.ts → CreateHttp.ts} +83 -83
- package/src/@modules/@utilities/{utilities.getFormattedTime.ts → GetFormattedTime.ts} +43 -43
- package/src/@modules/@utilities/{utilities.getLatestIssuance.ts → GetLatestIssuance.ts} +32 -32
- package/src/@modules/@utilities/{utilities.getMatched.ts → GetMatched.ts} +33 -33
- package/src/@modules/@utilities/{utilities.getSettings.ts → GetSettings.ts} +25 -25
- package/src/@modules/@utilities/{utilities.getShapeNearestPoint.ts → GetShapeNearestPoint.ts} +114 -114
- package/src/@modules/@utilities/{utilities.setCronSchedule.ts → SetCronSchedule.ts} +94 -94
- package/src/@modules/@utilities/{utilities.setDebug.ts → SetDebug.ts} +37 -38
- package/src/@modules/@utilities/{utilities.setEventEmit.ts → SetEventEmit.ts} +41 -41
- package/src/@modules/@utilities/{utilities.setListener.ts → SetListener.ts} +30 -30
- package/src/@modules/@utilities/{utilities.setSettings.ts → SetSettings.ts} +42 -42
- package/src/@modules/@utilities/{utilities.setSleep.ts → SetSleep.ts} +33 -33
- package/src/@modules/@utilities/{utilities.setTimeoutAction.ts → SetTimeoutAction.ts} +63 -63
- package/src/@modules/@utilities/{utilities.setWarning.ts → SetWarning.ts} +34 -34
- package/src/@modules/@xmpp/{xmpp.xDeploy.ts → DeployXMPP.ts} +57 -57
- package/src/@modules/@xmpp/{xmpp.xError.ts → ErrorXMPP.ts} +26 -26
- package/src/@modules/@xmpp/{xmpp.xOffline.ts → OfflineXMPP.ts} +36 -36
- package/src/@modules/@xmpp/{xmpp.xOnline.ts → OnlineXMPP.ts} +45 -45
- package/src/@modules/@xmpp/{xmpp.xReconnect.ts → ReconnectXMPP.ts} +64 -64
- package/src/@modules/@xmpp/{xmpp.xStanza.ts → StanzaXMPP.ts} +62 -62
- package/src/@parsers/@hvtec/{hvtec.extract.ts → HVExtract.ts} +39 -39
- package/src/@parsers/@pvtec/{pvtec.expires.ts → GetExpiry.ts} +25 -25
- package/src/@parsers/@pvtec/{pvtec.extract.ts → VTECExtract.ts} +48 -48
- package/src/@parsers/@text/{text.getDescriptionFromProduct.ts → GetDescriptionFromProduct.ts} +59 -52
- package/src/@parsers/@text/{text.getEmbedText.ts → GetEmbededText.ts} +55 -55
- package/src/@parsers/@text/{text.getPolygonFromProduct.ts → GetPolygonFromProduct.ts} +52 -52
- package/src/@parsers/@text/{text.getStringText.ts → GetStringText.ts} +57 -53
- package/src/@parsers/@text/{text.getTextFromProduct.ts → GetTextFromProduct.ts} +42 -42
- package/src/@parsers/@text/{text.getXML.ts → GetXML.ts} +60 -60
- package/src/@parsers/@ugc/{ugc.getCache.ts → GetCache.ts} +23 -23
- package/src/@parsers/@ugc/{ugc.expiry.ts → GetExpiry.ts} +31 -31
- package/src/@parsers/@ugc/{ugc.locations.ts → GetLocations.ts} +56 -56
- package/src/@parsers/@ugc/{ugc.header.ts → GetUGCHeader.ts} +29 -29
- package/src/@parsers/@ugc/{ugc.coordinates.ts → GetZonePolygon.ts} +110 -110
- package/src/@parsers/@ugc/{ugc.zones.ts → GetZones.ts} +51 -51
- package/src/@parsers/@ugc/{ugc.setCache.ts → SetCache.ts} +27 -27
- package/src/@parsers/@ugc/{ugc.extract.ts → UGCExtract.ts} +36 -36
- package/src/@types/{type.listener.ts → Actions.ts} +37 -38
- package/src/@types/{type.attributes.ts → Attributes.ts} +28 -28
- package/src/@types/{type.event.ts → Event.ts} +69 -69
- package/src/@types/{type.hvtec.ts → HVTEC.ts} +25 -25
- package/src/@types/{type.hash.ts → Hash.ts} +24 -24
- package/src/@types/{type.properties.ts → Properties.ts} +77 -77
- package/src/@types/{type.settings.ts → Settings.ts} +99 -93
- package/src/@types/{type.stanza.ts → Stanza.ts} +37 -37
- package/src/@types/{type.compiled.ts → StanzaCompiled.ts} +35 -34
- package/src/@types/{type.ugc.ts → UGC.ts} +24 -24
- package/src/@types/{type.pvtec.ts → VTEC.ts} +30 -30
- package/src/bootstrap.ts +128 -124
- package/src/index.ts +74 -74
- package/tsconfig.json +13 -13
- package/tsup.config.ts +15 -15
- package/.github/README.md +0 -384
- package/src/@dictionaries/dictionaries.awips.ts +0 -364
- package/src/@dictionaries/dictionaries.strings.ts +0 -22
- package/src/@dictionaries/dictionaries.tags.ts +0 -93
- package/src/@manager/manager.mkEvent.ts +0 -98
- package/src/@manager/manager.updateListener.ts +0 -180
- package/testing/init.js +0 -91
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
/*
|
|
2
|
+
_ _ _ __ __
|
|
3
|
+
/\ | | | | (_) \ \ / /
|
|
4
|
+
/ \ | |_ _ __ ___ ___ ___ _ __ | |__ ___ _ __ _ ___ \ V /
|
|
5
|
+
/ /\ \| __| '_ ` _ \ / _ \/ __| '_ \| '_ \ / _ \ '__| |/ __| > <
|
|
6
|
+
/ ____ \ |_| | | | | | (_) \__ \ |_) | | | | __/ | | | (__ / . \
|
|
7
|
+
/_/ \_\__|_| |_| |_|\___/|___/ .__/|_| |_|\___|_| |_|\___/_/ \_\
|
|
8
|
+
| |
|
|
9
|
+
|_|
|
|
10
|
+
|
|
11
|
+
Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, & CJ Ziegler)
|
|
12
|
+
Discord: https://atmosphericx-discord.scriptkitty.cafe
|
|
13
|
+
Ko-Fi: https://ko-fi.com/k3yomi
|
|
14
|
+
Documentation: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
|
|
15
|
+
|
|
16
|
+
Internal Package: @atmosx/event-product-parser
|
|
17
|
+
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
export const EnumTags = {
|
|
21
|
+
SEVERE_WEATHER: [
|
|
22
|
+
{ match: /A Large And Extremely Dangerous Tornado/i, tag: "Large and Dangerous Tornado" },
|
|
23
|
+
{ match: /This Is A Particularly Dangerous Situation/i, tag: "Particularly Dangerous Situation" },
|
|
24
|
+
{ match: /Weather Spotters Confirmed Tornado/i, tag: "Weather Spotters Confirmed Tornado" },
|
|
25
|
+
{ match: /Law Enforcement Confirmed Tornado/i, tag: "Law Enforcement Confirmed Tornado" },
|
|
26
|
+
{ match: /Radar Confirmed/i, tag: "Radar Confirmed" },
|
|
27
|
+
{ match: /Radar Indicated Rotation/i, tag: "Radar Indicated Rotation" },
|
|
28
|
+
{ match: /Radar Indicated(?! Rotation)/i, tag: "Radar Indicated" },
|
|
29
|
+
{ match: /A Tornado Is On The Ground/i, tag: "Tornado On The Ground" },
|
|
30
|
+
{ match: /Tornado Was Reported Briefly On The Ground/i, tag: "Tornado Briefly On Ground" },
|
|
31
|
+
{ match: /Weather Spotters Reported Funnel Cloud/i, tag: "Confirmed Funnel Cloud" },
|
|
32
|
+
{ match: /Spotters Indicate That A Funnel Cloud Continues With This Storm/i, tag: "Funnel Cloud Continues" },
|
|
33
|
+
{ match: /A Severe Thunderstorm Capable Of Producing A Tornado/i, tag: "Tornado Possible" },
|
|
34
|
+
{ match: /A Tornado May Develop At Any Time/i, tag: "Tornado May Develop" },
|
|
35
|
+
{ match: /A Tornado Watch Remains In Effect/i, tag: "Active Tornado Watch" },
|
|
36
|
+
{ match: /Complete Destruction Is Possible/i, tag: "Extremely Damaging Tornado" },
|
|
37
|
+
{ match: /Potentially Deadly Tornado/i, tag: "Deadly Tornado" },
|
|
38
|
+
{ match: /Life-Threatening Situation/i, tag: "Life Threatening Situation" },
|
|
39
|
+
{ match: /Capable Of Producing A Landspout/i, tag: "Landspout Possible" },
|
|
40
|
+
{ match: /Public Confirmed Tornado/i, tag: "Public Confirmed Tornado" },
|
|
41
|
+
{ match: /Expect Wind Damage/i, tag: "Wind Damage" },
|
|
42
|
+
{ match: /Destructive Winds/i, tag: "Destructive Winds" },
|
|
43
|
+
{ match: /Wind Damage With This Storm Will Occur/i, tag: "Immediate Wind Damage Threat" },
|
|
44
|
+
{ match: /Widespread Wind Damage/i, tag: "Widespread Wind Damage" },
|
|
45
|
+
{ match: /Significant Wind Damage/i, tag: "Significant Wind Damage" },
|
|
46
|
+
{ match: /Tornado Like Wind Speeds/i, tag: "Tornado-Like Wind Speeds" },
|
|
47
|
+
{ match: /Winds Will Strengthen/i, tag: "Strengthening Winds" },
|
|
48
|
+
{ match: /Gusty Winds/i, tag: "Gusty Winds" },
|
|
49
|
+
{ match: /Could Knock Down Tree Limbs/i, tag: "Tree Damage Possible" },
|
|
50
|
+
{ match: /Blow Around Unsecured Objects/i, tag: "Loose Object Damage Possible" },
|
|
51
|
+
{ match: /Unsecured lightweight objects blown about/i, tag: "Loose Objects May Blow Around" },
|
|
52
|
+
{ match: /Many large tree limbs broken off/i, tag: "Tree Limb Damage Possible" },
|
|
53
|
+
{ match: /Some fences and roadway signs blown over/i, tag: "Fence and Sign Damage Possible" },
|
|
54
|
+
{ match: /Hazardous driving conditions on bridges/i, tag: "Hazardous Bridge Travel" },
|
|
55
|
+
{ match: /Scattered power and communications outages/i, tag: "Power Outages Possible" },
|
|
56
|
+
{ match: /Hail Damage To Vehicles Is Expected/i, tag: "Vehicle Damaging Hail" },
|
|
57
|
+
{ match: /Extremely Large Hail/i, tag: "Extremely Large Hail" },
|
|
58
|
+
{ match: /(?<!Extremely )Large Hail/i, tag: "Large Hail" },
|
|
59
|
+
{ match: /Tennis Ball Size Hail/i, tag: "Tennis Ball Size Hail" },
|
|
60
|
+
{ match: /Baseball Size Hail/i, tag: "Baseball Size Hail" },
|
|
61
|
+
{ match: /Golf Ball Size Hail/i, tag: "Golf Ball Size Hail" },
|
|
62
|
+
{ match: /Quarter Size Hail/i, tag: "Quarter Size Hail" },
|
|
63
|
+
{ match: /Ping Pong Ball Size Hail/i, tag: "Ping Pong Ball Size Hail" },
|
|
64
|
+
{ match: /Nickel Size Hail/i, tag: "Nickel Size Hail" },
|
|
65
|
+
{ match: /Hail Driven By Severe Winds/i, tag: "Wind Driven Hail" },
|
|
66
|
+
{ match: /Prepare Immediately For Large Hail/i, tag: "Large Hail" },
|
|
67
|
+
{ match: /Half Inch Hail/i, tag: "Half Inch Hail" },
|
|
68
|
+
{ match: /Frequent Lightning/i, tag: "Frequent Lightning" },
|
|
69
|
+
{ match: /Deadly Cloud To Ground Lightning/i, tag: "Deadly Cloud To Ground Lightning" },
|
|
70
|
+
{ match: /Continuous Cloud To Ground Lightning/i, tag: "Continuous Cloud To Ground Lightning" },
|
|
71
|
+
{ match: /Frequent Cloud To Ground Lightning/i, tag: "Frequent Cloud To Ground Lightning" },
|
|
72
|
+
{ match: /Lightning Can Strike \d+ Miles Away/i, tag: "Lightning Safety Threat" },
|
|
73
|
+
{ match: /Showers and thunderstorms with gusty winds may still occur/i, tag: "Gusty Thunderstorms Possible" },
|
|
74
|
+
|
|
75
|
+
],
|
|
76
|
+
|
|
77
|
+
FLOOD: [
|
|
78
|
+
{ match: /Flash Flooding Caused By Thunderstorms/i, tag: "Thunderstorm Flash Flooding" },
|
|
79
|
+
{ match: /Flash Flooding Caused By Heavy Rain/i, tag: "Heavy Rain Flash Flooding" },
|
|
80
|
+
{ match: /Torrential Rainfall/i, tag: "Torrential Rainfall" },
|
|
81
|
+
{ match: /May Lead To Flash Flooding/i, tag: "Flash Flooding Possible" },
|
|
82
|
+
{ match: /Minor Flooding Is Occurring/i, tag: "Minor Flooding Occurring" },
|
|
83
|
+
{ match: /Localized Flooding/i, tag: "Localized Flooding Possible" },
|
|
84
|
+
{ match: /Do Not Drive Your Vehicle Through Flooded Roadways/i, tag: "Flooded Roadways" },
|
|
85
|
+
{ match: /No storm surge inundation forecast/i, tag: "No Storm Surge Inundation" },
|
|
86
|
+
{ match: /Localized storm surge possible/i, tag: "Localized Storm Surge Possible" },
|
|
87
|
+
{ match: /Peak Storm Surge Inundation/i, tag: "Storm Surge Inundation Risk" },
|
|
88
|
+
{ match: /Potential for storm surge flooding/i, tag: "Storm Surge Flooding Possible" },
|
|
89
|
+
{ match: /Small streams, creeks, and ditches may become swollen/i, tag: "Small Stream Flooding Risk" },
|
|
90
|
+
{ match: /Rivers and tributaries may quickly rise/i, tag: "Rapid River Rise Possible" },
|
|
91
|
+
{ match: /Flood waters can enter a few structures/i, tag: "Flood Damage Possible" },
|
|
92
|
+
{ match: /Rapid ponding of water occurs/i, tag: "Water Ponding Possible" },
|
|
93
|
+
{ match: /Brief road and bridge closures/i, tag: "Road Closures Possible" },
|
|
94
|
+
|
|
95
|
+
],
|
|
96
|
+
|
|
97
|
+
WINTER_WEATHER: [
|
|
98
|
+
{ match: /Frostbite And Hypothermia Are Likely/i, tag: "Frostbite and Hypothermia Likely" },
|
|
99
|
+
{ match: /Very Cold Temperatures Can Lead To Hypothermia/i, tag: "Hypothermia Risk" },
|
|
100
|
+
{ match: /Hypothermia If Precautions Are Not Taken/i, tag: "Hypothermia Risk" },
|
|
101
|
+
{ match: /Frostbite And Hypothermia Will Occur If Unprotected Skin/i, tag: "Frostbite Risk" },
|
|
102
|
+
{ match: /Temperatures Could Cause Ruptured Water Pipes/i, tag: "Ruptured Water Pipes Possible" },
|
|
103
|
+
{ match: /Blowing Snow Which Could Reduce Visibility/i, tag: "Reduced Visibility From Blowing Snow" },
|
|
104
|
+
{ match: /Lake Effect Snow Expected/i, tag: "Lake Effect Snow" },
|
|
105
|
+
{ match: /Slick And Icy Spots On Roads/i, tag: "Icy Roads" },
|
|
106
|
+
{ match: /Hazardous Roadways And Black Ice/i, tag: "Black Ice" },
|
|
107
|
+
{ match: /Icy Patches May Be More Common On Bridges/i, tag: "Bridge Icing" },
|
|
108
|
+
],
|
|
109
|
+
|
|
110
|
+
COASTAL_MARINE: [
|
|
111
|
+
{ match: /Rip Currents Can Sweep Even The Best Swimmer/i, tag: "Dangerous Rip Currents" },
|
|
112
|
+
{ match: /Small Craft Could Be Damaged/i, tag: "Small Craft Damage Possible" },
|
|
113
|
+
{ match: /No Tsunami Threat/i, tag: "No Tsunami Threat" },
|
|
114
|
+
{ match: /Tsunami Threat Exists/i, tag: "Tsunami Threat Exists" },
|
|
115
|
+
{ match: /TROPICAL STORM WARNING IN EFFECT/i, tag: "Tropical Storm Warning" },
|
|
116
|
+
{ match: /TROPICAL STORM WARNING REMAINS IN EFFECT/i, tag: "Tropical Storm Warning Continues" },
|
|
117
|
+
{ match: /Tropical storm[- ]force winds/i, tag: "Tropical Storm Force Winds" },
|
|
118
|
+
{ match: /hazardous wind/i, tag: "Hazardous Winds" },
|
|
119
|
+
{ match: /hazardous seas/i, tag: "Hazardous Seas" },
|
|
120
|
+
{ match: /could capsize or damage vessels/i, tag: "Vessel Damage Risk" },
|
|
121
|
+
{ match: /reduce visibility/i, tag: "Reduced Visibility" },
|
|
122
|
+
{ match: /Mariners should alter plans/i, tag: "Marine Travel Disruption" },
|
|
123
|
+
{ match: /Remain in port/i, tag: "Remain In Port" },
|
|
124
|
+
{ match: /seek safe harbor/i, tag: "Seek Safe Harbor" },
|
|
125
|
+
{ match: /secure the vessel for severe conditions/i, tag: "Secure Vessel" },
|
|
126
|
+
],
|
|
127
|
+
|
|
128
|
+
SAFETY_INFO: [
|
|
129
|
+
{ match: /Seek Shelter Now/i, tag: "Seek Shelter Now" },
|
|
130
|
+
{ match: /Seek Shelter Immediately/i, tag: "Seek Shelter Immediately" },
|
|
131
|
+
{ match: /Move To An Interior Room/i, tag: "Move To Interior Room" },
|
|
132
|
+
{ match: /Move To Safe Shelter Now/i, tag: "Move To Safe Shelter" },
|
|
133
|
+
{ match: /Potentially Deadly Storm/i, tag: "Potentially Deadly Storm" },
|
|
134
|
+
{ match: /Serious Injury And Significant Property Damage/i, tag: "Serious Damage Possible" },
|
|
135
|
+
{ match: /People And Animals Outdoors Will Be Injured/i, tag: "Outdoor Injury Risk" },
|
|
136
|
+
{ match: /IMMINENT DANGEROUS WEATHER CONDITIONS/i, tag: "Imminent Dangerous Weather" },
|
|
137
|
+
{ match: /Follow the instructions of local officials/i, tag: "Follow Local Officials" },
|
|
138
|
+
{ match: /Monitor forecasts/i, tag: "Monitor Forecast Updates" },
|
|
139
|
+
{ match: /Complete preparations.*before conditions become unsafe/i, tag: "Complete Preparations Early" },
|
|
140
|
+
{ match: /Leave immediately if evacuation orders are given/i, tag: "Evacuate If Ordered" },
|
|
141
|
+
{ match: /Heed any flood watches and warnings/i, tag: "Monitor Flood Alerts" },
|
|
142
|
+
{ match: /Listen for changes in the forecast/i, tag: "Stay Weather Aware" },
|
|
143
|
+
{ match: /Travel Could Be Very Difficult/i, tag: "Difficult Travel Conditions" },
|
|
144
|
+
{ match: /Expect Disruptions/i, tag: "Travel Disruptions Expected" },
|
|
145
|
+
{ match: /Trained Weather Spotters/i, tag: "Confirmed By Storm Spotters" },
|
|
146
|
+
{ match: /Doppler Radar/i, tag: "Confirmed By Radar" },
|
|
147
|
+
{ match: /Source\.\.\.Storm Spotters/i, tag: "Confirmed By Storm Spotters" },
|
|
148
|
+
{ match: /Source\.\.\.Doppler Radar/i, tag: "Confirmed By Radar" },
|
|
149
|
+
{ match: /Source\.\.\.Automated Gauges/i, tag: "Confirmed By Automated Gauges" },
|
|
150
|
+
{ match: /Source\.\.\.Radar Confirmed/i, tag: "Confirmed By Radar" },
|
|
151
|
+
{ match: /Source\.\.\.Radar Indicated/i, tag: "Indicated By Radar" },
|
|
152
|
+
{ match: /Source\.\.\.Public/i, tag: "Confirmed By Public" },
|
|
153
|
+
{ match: /Source\.\.\.Amateur Radio/i, tag: "Confirmed By Amateur Radio" },
|
|
154
|
+
{ match: /Source\.\.\.Emergency Management/i, tag: "Confirmed By Emergency Management" },
|
|
155
|
+
{ match: /Source\.\.\.Law Enforcement Reported/i, tag: "Confirmed By Law Enforcement" },
|
|
156
|
+
{ match: /Source\.\.\.Broadcast Media/i, tag: "Confirmed By Broadcast Media" },
|
|
157
|
+
{ match: /Source\.\.\.Media/i, tag: "Confirmed By Media" },
|
|
158
|
+
{ match: /Source\.\.\.Media Reported/i, tag: "Confirmed By Media" },
|
|
159
|
+
{ match: /Doppler Radar And Automated Gauges/i, tag: "Confirmed By Radar and Gauges" },
|
|
160
|
+
{ match: /Potential Impacts:\s*Limited/i, tag: "Limited Impacts Expected" },
|
|
161
|
+
{ match: /Potential Impacts:\s*Little to None/i, tag: "Minimal Impacts Expected" },
|
|
162
|
+
{ match: /Slow Down And Allow Extra Time/i, tag: "Allow Extra Travel Time" },
|
|
163
|
+
{ match: /Should Exercise Caution/i, tag: "Exercise Caution" },
|
|
164
|
+
{ match: /Heat Illnesses/i, tag: "Heat Illness Risk" },
|
|
165
|
+
{ match: /\bIntensifying\b/i, tag: "Intensifying Conditions" },
|
|
166
|
+
],
|
|
167
|
+
};
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
/*
|
|
2
|
-
_ _ _ __ __
|
|
3
|
-
/\ | | | | (_) \ \ / /
|
|
4
|
-
/ \ | |_ _ __ ___ ___ ___ _ __ | |__ ___ _ __ _ ___ \ V /
|
|
5
|
-
/ /\ \| __| '_ ` _ \ / _ \/ __| '_ \| '_ \ / _ \ '__| |/ __| > <
|
|
6
|
-
/ ____ \ |_| | | | | | (_) \__ \ |_) | | | | __/ | | | (__ / . \
|
|
7
|
-
/_/ \_\__|_| |_| |_|\___/|___/ .__/|_| |_|\___|_| |_|\___/_/ \_\
|
|
8
|
-
| |
|
|
9
|
-
|_|
|
|
10
|
-
|
|
11
|
-
Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, & CJ Ziegler)
|
|
12
|
-
Discord: https://atmosphericx-discord.scriptkitty.cafe
|
|
13
|
-
Ko-Fi: https://ko-fi.com/k3yomi
|
|
14
|
-
Documentation: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
|
|
15
|
-
|
|
16
|
-
Internal Package: @atmosx/event-product-parser
|
|
17
|
-
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
export const
|
|
21
|
-
`This is a test message`,
|
|
22
|
-
`Monitoring message only.`,
|
|
23
|
-
`THIS_MESSAGE_IS_FOR_TEST_PURPOSES_ONLY`,
|
|
24
|
-
"TEST MESSAGE"
|
|
1
|
+
/*
|
|
2
|
+
_ _ _ __ __
|
|
3
|
+
/\ | | | | (_) \ \ / /
|
|
4
|
+
/ \ | |_ _ __ ___ ___ ___ _ __ | |__ ___ _ __ _ ___ \ V /
|
|
5
|
+
/ /\ \| __| '_ ` _ \ / _ \/ __| '_ \| '_ \ / _ \ '__| |/ __| > <
|
|
6
|
+
/ ____ \ |_| | | | | | (_) \__ \ |_) | | | | __/ | | | (__ / . \
|
|
7
|
+
/_/ \_\__|_| |_| |_|\___/|___/ .__/|_| |_|\___|_| |_|\___/_/ \_\
|
|
8
|
+
| |
|
|
9
|
+
|_|
|
|
10
|
+
|
|
11
|
+
Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, & CJ Ziegler)
|
|
12
|
+
Discord: https://atmosphericx-discord.scriptkitty.cafe
|
|
13
|
+
Ko-Fi: https://ko-fi.com/k3yomi
|
|
14
|
+
Documentation: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
|
|
15
|
+
|
|
16
|
+
Internal Package: @atmosx/event-product-parser
|
|
17
|
+
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
export const EnumTesting: string[] = [
|
|
21
|
+
`This is a test message`,
|
|
22
|
+
`Monitoring message only.`,
|
|
23
|
+
`THIS_MESSAGE_IS_FOR_TEST_PURPOSES_ONLY`,
|
|
24
|
+
"TEST MESSAGE"
|
|
25
25
|
]
|
|
@@ -1,117 +1,117 @@
|
|
|
1
|
-
/*
|
|
2
|
-
_ _ _ __ __
|
|
3
|
-
/\ | | | | (_) \ \ / /
|
|
4
|
-
/ \ | |_ _ __ ___ ___ ___ _ __ | |__ ___ _ __ _ ___ \ V /
|
|
5
|
-
/ /\ \| __| '_ ` _ \ / _ \/ __| '_ \| '_ \ / _ \ '__| |/ __| > <
|
|
6
|
-
/ ____ \ |_| | | | | | (_) \__ \ |_) | | | | __/ | | | (__ / . \
|
|
7
|
-
/_/ \_\__|_| |_| |_|\___/|___/ .__/|_| |_|\___|_| |_|\___/_/ \_\
|
|
8
|
-
| |
|
|
9
|
-
|_|
|
|
10
|
-
|
|
11
|
-
Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, & CJ Ziegler)
|
|
12
|
-
Discord: https://atmosphericx-discord.scriptkitty.cafe
|
|
13
|
-
Ko-Fi: https://ko-fi.com/k3yomi
|
|
14
|
-
Documentation: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
|
|
15
|
-
|
|
16
|
-
Internal Package: @atmosx/event-product-parser
|
|
17
|
-
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
import { TypeStanzaCompiled } from "../@types/
|
|
21
|
-
import { TypePVTEC } from "../@types/
|
|
22
|
-
import {
|
|
23
|
-
import { bootstrap } from "../bootstrap";
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
|
|
30
|
-
export const
|
|
31
|
-
const messages = Object.values(JSON.parse(stanza.message).features) as any;
|
|
32
|
-
for (const feature of messages) {
|
|
33
|
-
const tick = performance.now();
|
|
34
|
-
const pVtec =
|
|
35
|
-
bootstrap.cache.processed.push({
|
|
36
|
-
type: `Feature`,
|
|
37
|
-
geometry: {
|
|
38
|
-
type: `Point`,
|
|
39
|
-
coordinates: []
|
|
40
|
-
},
|
|
41
|
-
properties: {
|
|
42
|
-
event: feature?.properties?.event ?? null,
|
|
43
|
-
parent: feature?.properties?.event ?? null,
|
|
44
|
-
status: feature?.properties?.messageType ?? null,
|
|
45
|
-
issued: feature?.properties?.sent ? new Date(feature?.properties?.sent).toISOString() : null,
|
|
46
|
-
expires: feature?.properties?.expires ? new Date(feature?.properties?.expires).toISOString() : null,
|
|
47
|
-
locations: feature?.properties?.areaDesc ?? null,
|
|
48
|
-
locations_array: feature?.properties?.areaDesc ? feature?.properties?.areaDesc.split(';') : [],
|
|
49
|
-
description: feature?.properties?.description ?? null,
|
|
50
|
-
attributes: feature?.properties?.attributes ?? {},
|
|
51
|
-
geocode: {
|
|
52
|
-
office: {
|
|
53
|
-
office: pVtec ? pVtec?.[0]?.tracking.split(`.`)[0] : null,
|
|
54
|
-
name:
|
|
55
|
-
},
|
|
56
|
-
organization: feature?.properties?.parameters?.WMOidentifier?.[0],
|
|
57
|
-
ugc: feature?.properties?.geocode?.UGC ?? [],
|
|
58
|
-
polygon: feature?.geometry?.coordinates.length > 0 ? Buffer.from(JSON.stringify([feature?.geometry?.coordinates[0]])).toString('base64') : null,
|
|
59
|
-
polygon_generated: feature?.geometry?.coordinates.length > 0 ? true : false,
|
|
60
|
-
},
|
|
61
|
-
parameters: {
|
|
62
|
-
tags:
|
|
63
|
-
instructions: feature?.properties?.instruction ?? null,
|
|
64
|
-
source:
|
|
65
|
-
hazards:
|
|
66
|
-
impacts:
|
|
67
|
-
estimated_hail_size: feature?.properties?.parameters?.maxHailSize?.[0] ?? null,
|
|
68
|
-
estimated_wind_gusts: feature?.properties?.parameters?.maxWindGust?.[0] ?? null,
|
|
69
|
-
damage_threat: feature?.properties?.parameters?.thunderstormDamageThreat?.[0] ?? null,
|
|
70
|
-
tornado_threat: feature?.properties?.parameters?.tornadoDetection?.[0] ?? null,
|
|
71
|
-
flood_threat: feature?.properties?.parameters?.floodDetection?.[0] ?? null,
|
|
72
|
-
wind_threat: feature?.properties?.parameters?.windThreat?.[0] ?? null,
|
|
73
|
-
hail_threat: feature?.properties?.parameters?.hailThreat?.[0] ?? null,
|
|
74
|
-
},
|
|
75
|
-
discussion_parameters: {
|
|
76
|
-
discussion_number:
|
|
77
|
-
discussion_concerning:
|
|
78
|
-
discussion_max_tornado:
|
|
79
|
-
discussion_max_hail:
|
|
80
|
-
discussion_max_wind:
|
|
81
|
-
discussion_watch_issuance:
|
|
82
|
-
},
|
|
83
|
-
watch_parameters: {
|
|
84
|
-
watch_number: (pVtec?.[0]?.is_watch) && (
|
|
85
|
-
watch_type: feature?.properties?.description.includes(`TORNADO WATCH`) ? `Tornado` : feature?.properties?.description.includes(`SEVERE`) ? `Severe` : null,
|
|
86
|
-
additional_tornadoes_probability:
|
|
87
|
-
strong_tornadoes_probability:
|
|
88
|
-
severe_wind_probability:
|
|
89
|
-
severe_hail_probability:
|
|
90
|
-
hail_2in_probability:
|
|
91
|
-
combined_hail_wind_probability:
|
|
92
|
-
max_hail_in:
|
|
93
|
-
max_wind_surface:
|
|
94
|
-
max_tops_x100feet:
|
|
95
|
-
pds_watch: (
|
|
96
|
-
},
|
|
97
|
-
metadata: {
|
|
98
|
-
ms: performance.now() - tick,
|
|
99
|
-
source: `events.api`,
|
|
100
|
-
tracking:
|
|
101
|
-
header: `ZCZC-ATMOSX-${feature?.properties?.parameters?.WMOidentifier}`,
|
|
102
|
-
vtec: pVtec?.[0],
|
|
103
|
-
hvtec: null,
|
|
104
|
-
raw: feature?.properties?.description,
|
|
105
|
-
history: [
|
|
106
|
-
{
|
|
107
|
-
description: feature?.properties?.description,
|
|
108
|
-
issued: feature?.properties?.sent ? new Date(feature?.properties?.sent).toISOString() : null,
|
|
109
|
-
status: feature?.properties?.messageType ?? null,
|
|
110
|
-
}
|
|
111
|
-
]
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
})
|
|
115
|
-
|
|
116
|
-
}
|
|
1
|
+
/*
|
|
2
|
+
_ _ _ __ __
|
|
3
|
+
/\ | | | | (_) \ \ / /
|
|
4
|
+
/ \ | |_ _ __ ___ ___ ___ _ __ | |__ ___ _ __ _ ___ \ V /
|
|
5
|
+
/ /\ \| __| '_ ` _ \ / _ \/ __| '_ \| '_ \ / _ \ '__| |/ __| > <
|
|
6
|
+
/ ____ \ |_| | | | | | (_) \__ \ |_) | | | | __/ | | | (__ / . \
|
|
7
|
+
/_/ \_\__|_| |_| |_|\___/|___/ .__/|_| |_|\___|_| |_|\___/_/ \_\
|
|
8
|
+
| |
|
|
9
|
+
|_|
|
|
10
|
+
|
|
11
|
+
Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, & CJ Ziegler)
|
|
12
|
+
Discord: https://atmosphericx-discord.scriptkitty.cafe
|
|
13
|
+
Ko-Fi: https://ko-fi.com/k3yomi
|
|
14
|
+
Documentation: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
|
|
15
|
+
|
|
16
|
+
Internal Package: @atmosx/event-product-parser
|
|
17
|
+
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
import { TypeStanzaCompiled } from "../@types/StanzaCompiled"
|
|
21
|
+
import { TypePVTEC } from "../@types/VTEC";
|
|
22
|
+
import { EnumICAO } from "../@enums/ICAO";
|
|
23
|
+
import { bootstrap } from "../bootstrap";
|
|
24
|
+
import { GetEventTracking } from "../@building/GetEventTracking";
|
|
25
|
+
import { VTECExtract } from "../@parsers/@pvtec/VTECExtract"
|
|
26
|
+
import { GetEventTags } from "../@building/GetEventTags";
|
|
27
|
+
import { GetTextFromProduct } from "../@parsers/@text/GetTextFromProduct";
|
|
28
|
+
import { SetDebug } from "../@modules/@utilities/SetDebug";
|
|
29
|
+
|
|
30
|
+
export const ParseAPI = async (stanza: TypeStanzaCompiled): Promise<void> => {
|
|
31
|
+
const messages = Object.values(JSON.parse(stanza.message).features) as any;
|
|
32
|
+
for (const feature of messages) {
|
|
33
|
+
const tick = performance.now();
|
|
34
|
+
const pVtec = VTECExtract(feature?.properties?.parameters?.VTEC?.[0]) ?? null as TypePVTEC[]
|
|
35
|
+
bootstrap.cache.processed.push({
|
|
36
|
+
type: `Feature`,
|
|
37
|
+
geometry: {
|
|
38
|
+
type: `Point`,
|
|
39
|
+
coordinates: []
|
|
40
|
+
},
|
|
41
|
+
properties: {
|
|
42
|
+
event: feature?.properties?.event ?? null,
|
|
43
|
+
parent: feature?.properties?.event ?? null,
|
|
44
|
+
status: feature?.properties?.messageType ?? null,
|
|
45
|
+
issued: feature?.properties?.sent ? new Date(feature?.properties?.sent).toISOString() : null,
|
|
46
|
+
expires: feature?.properties?.expires ? new Date(feature?.properties?.expires).toISOString() : null,
|
|
47
|
+
locations: feature?.properties?.areaDesc ?? null,
|
|
48
|
+
locations_array: feature?.properties?.areaDesc ? feature?.properties?.areaDesc.split(';') : [],
|
|
49
|
+
description: feature?.properties?.description ?? null,
|
|
50
|
+
attributes: feature?.properties?.attributes ?? {},
|
|
51
|
+
geocode: {
|
|
52
|
+
office: {
|
|
53
|
+
office: pVtec ? pVtec?.[0]?.tracking.split(`.`)[0] : null,
|
|
54
|
+
name: EnumICAO[pVtec ? pVtec?.[0]?.tracking.split(`.`)[0] : null] ?? null,
|
|
55
|
+
},
|
|
56
|
+
organization: feature?.properties?.parameters?.WMOidentifier?.[0],
|
|
57
|
+
ugc: feature?.properties?.geocode?.UGC ?? [],
|
|
58
|
+
polygon: feature?.geometry?.coordinates.length > 0 ? Buffer.from(JSON.stringify([feature?.geometry?.coordinates[0]])).toString('base64') : null,
|
|
59
|
+
polygon_generated: feature?.geometry?.coordinates.length > 0 ? true : false,
|
|
60
|
+
},
|
|
61
|
+
parameters: {
|
|
62
|
+
tags: GetEventTags(feature?.properties?.description),
|
|
63
|
+
instructions: feature?.properties?.instruction ?? null,
|
|
64
|
+
source: GetTextFromProduct({ message: feature?.properties?.description, find: [`SOURCE...`], removal: [`.`]}) ?? null,
|
|
65
|
+
hazards: GetTextFromProduct({ message: feature?.properties?.description, find: [`HAZARD...`], removal: [`.`]}) ?? null,
|
|
66
|
+
impacts: GetTextFromProduct({ message: feature?.properties?.description, find: [`IMPACT...`], removal: [`.`]}) ?? null,
|
|
67
|
+
estimated_hail_size: feature?.properties?.parameters?.maxHailSize?.[0] ?? null,
|
|
68
|
+
estimated_wind_gusts: feature?.properties?.parameters?.maxWindGust?.[0] ?? null,
|
|
69
|
+
damage_threat: feature?.properties?.parameters?.thunderstormDamageThreat?.[0] ?? null,
|
|
70
|
+
tornado_threat: feature?.properties?.parameters?.tornadoDetection?.[0] ?? null,
|
|
71
|
+
flood_threat: feature?.properties?.parameters?.floodDetection?.[0] ?? null,
|
|
72
|
+
wind_threat: feature?.properties?.parameters?.windThreat?.[0] ?? null,
|
|
73
|
+
hail_threat: feature?.properties?.parameters?.hailThreat?.[0] ?? null,
|
|
74
|
+
},
|
|
75
|
+
discussion_parameters: {
|
|
76
|
+
discussion_number: GetTextFromProduct({ message: feature?.properties?.description, find: [`Mesoscale Discussion `], removal: [`Mesoscale Discussion`, `Number`, `...`] })?.toString()?.padStart(4, "0") ?? null,
|
|
77
|
+
discussion_concerning: GetTextFromProduct({ message: feature?.properties?.description, find: [`Concerning...`] }) ?? null,
|
|
78
|
+
discussion_max_tornado: GetTextFromProduct({ message: feature?.properties?.description, find: [`MOST PROBABLE PEAK TORNADO INTENSITY...`] }) ?? null,
|
|
79
|
+
discussion_max_hail: GetTextFromProduct({ message: feature?.properties?.description, find: [`MOST PROBABLE PEAK HAIL SIZE...`] }) ?? null,
|
|
80
|
+
discussion_max_wind: GetTextFromProduct({ message: feature?.properties?.description, find: [`MOST PROBABLE PEAK WIND GUST...`] }) ?? null,
|
|
81
|
+
discussion_watch_issuance: GetTextFromProduct({ message: feature?.properties?.description, find: [`Probability of Watch Issuance...`], removal: [`percent`]}) ?? null,
|
|
82
|
+
},
|
|
83
|
+
watch_parameters: {
|
|
84
|
+
watch_number: (pVtec?.[0]?.is_watch) && (GetTextFromProduct({ message: feature?.properties?.description, find: [`ITIES FOR`, `UPDATE FOR`, `Watch Number `], removal: [`%`, `<`, `:`] })?.replace(/(WT|WS|)/g, '')?.trim()?.toString()?.padStart(4, "0") ?? pVtec?.[0]?.tracking?.slice(-4)?.toString()?.padStart(4, "0") ?? null),
|
|
85
|
+
watch_type: feature?.properties?.description.includes(`TORNADO WATCH`) ? `Tornado` : feature?.properties?.description.includes(`SEVERE`) ? `Severe` : null,
|
|
86
|
+
additional_tornadoes_probability: GetTextFromProduct({ message: feature?.properties?.description, find: [`PROB OF 2 OR MORE TORNADOES`], removal: [`%`, `<`, `:`] }) ?? null,
|
|
87
|
+
strong_tornadoes_probability: GetTextFromProduct({ message: feature?.properties?.description, find: [`PROB OF 1 OR MORE STRONG /EF2-EF5/ TORNADOES`], removal: [`%`, `<`, `:`] }) ?? null,
|
|
88
|
+
severe_wind_probability: GetTextFromProduct({ message: feature?.properties?.description, find: [`PROB OF 10 OR MORE SEVERE WIND EVENTS`], removal: [`%`, `<`, `:`] }) ?? null,
|
|
89
|
+
severe_hail_probability: GetTextFromProduct({ message: feature?.properties?.description, find: [`PROB OF 10 OR MORE SEVERE HAIL EVENTS`], removal: [`%`, `<`, `:`] }) ?? null,
|
|
90
|
+
hail_2in_probability: GetTextFromProduct({ message: feature?.properties?.description, find: [`PROB OF 1 OR MORE HAIL EVENTS >= 2 INCHES`], removal: [`%`, `<`, `:`] }) ?? null,
|
|
91
|
+
combined_hail_wind_probability: GetTextFromProduct({ message: feature?.properties?.description, find: [`PROB OF 6 OR MORE COMBINED SEVERE HAIL/WIND EVENTS`], removal: [`%`, `<`, `:`] }) ?? null,
|
|
92
|
+
max_hail_in: GetTextFromProduct({ message: feature?.properties?.description, find: [`MAX HAIL /INCHES/`], removal: [`%`, `<`, `:`] }) ?? null,
|
|
93
|
+
max_wind_surface: GetTextFromProduct({ message: feature?.properties?.description, find: [`MAX WIND GUSTS SURFACE /KNOTS/`], removal: [`%`, `<`, `:`] }) ?? null,
|
|
94
|
+
max_tops_x100feet: GetTextFromProduct({ message: feature?.properties?.description, find: [`MAX TOPS /X 100 FEET/`], removal: [`%`, `<`, `:`] }) ?? null,
|
|
95
|
+
pds_watch: (GetTextFromProduct({ message: feature?.properties?.description, find: [`PARTICULARLY DANGEROUS SITUATION`], removal: [`%`, `<`, `:`] }) === `YES`)
|
|
96
|
+
},
|
|
97
|
+
metadata: {
|
|
98
|
+
ms: performance.now() - tick,
|
|
99
|
+
source: `events.api`,
|
|
100
|
+
tracking: GetEventTracking({ type: `API`, organization: { wmoidentifier: feature?.properties?.parameters?.WMOidentifier?.[0], featureId: feature?.id}, vtec: pVtec?.[0]}),
|
|
101
|
+
header: `ZCZC-ATMOSX-${feature?.properties?.parameters?.WMOidentifier}`,
|
|
102
|
+
vtec: pVtec?.[0],
|
|
103
|
+
hvtec: null,
|
|
104
|
+
raw: feature?.properties?.description,
|
|
105
|
+
history: [
|
|
106
|
+
{
|
|
107
|
+
description: feature?.properties?.description,
|
|
108
|
+
issued: feature?.properties?.sent ? new Date(feature?.properties?.sent).toISOString() : null,
|
|
109
|
+
status: feature?.properties?.messageType ?? null,
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
})
|
|
115
|
+
SetDebug({ title: `ParseAPI`, message: `${Math.round(performance.now() - tick)}ms` })
|
|
116
|
+
}
|
|
117
117
|
}
|