Add SPC provider parsing helpers
This commit is contained in:
29
internal/providers/spc/testdata/day1_cat.geojson
vendored
Normal file
29
internal/providers/spc/testdata/day1_cat.geojson
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"type": "FeatureCollection",
|
||||
"features": [
|
||||
{
|
||||
"type": "Feature",
|
||||
"properties": {
|
||||
"VALID_ISO": "2026-06-11T13:00:00Z",
|
||||
"EXPIRE_ISO": "2026-06-12T12:00:00Z",
|
||||
"ISSUE_ISO": "2026-06-11T12:34:56Z",
|
||||
"FORECASTER": "SMITH",
|
||||
"LABEL": "SLGT",
|
||||
"LABEL2": "Slight Risk",
|
||||
"DN": 3
|
||||
},
|
||||
"geometry": {
|
||||
"type": "Polygon",
|
||||
"coordinates": [
|
||||
[
|
||||
[-91.0, 38.0],
|
||||
[-90.0, 38.0],
|
||||
[-90.0, 39.0],
|
||||
[-91.0, 39.0],
|
||||
[-91.0, 38.0]
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
19
internal/providers/spc/testdata/day1_prt.html
vendored
Normal file
19
internal/providers/spc/testdata/day1_prt.html
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head><title>Day 1 Convective Outlook</title></head>
|
||||
<body>
|
||||
<pre>
|
||||
<script>window.bad = "<b>ignore me</b>";</script>
|
||||
Day 1 Convective Outlook
|
||||
NWS Storm Prediction Center Norman OK
|
||||
Updated: 2026-06-11T12:45:00Z
|
||||
|
||||
...SUMMARY...
|
||||
Severe thunderstorms are possible across parts of the central Plains
|
||||
and mid Mississippi Valley this afternoon and evening.
|
||||
|
||||
...DISCUSSION...
|
||||
The primary threats will be damaging wind and large hail.
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
15
internal/providers/spc/testdata/day2_prt_corr.html
vendored
Normal file
15
internal/providers/spc/testdata/day2_prt_corr.html
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<body>
|
||||
<pre>
|
||||
Day 2 Convective Outlook CORR 1
|
||||
NWS Storm Prediction Center Norman OK
|
||||
|
||||
...SUMMARY...
|
||||
Scattered severe thunderstorms remain possible across the southern Plains.
|
||||
|
||||
...DISCUSSION...
|
||||
Corrected outlook text remains otherwise unchanged.
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
29
internal/providers/spc/testdata/day2_torn.geojson
vendored
Normal file
29
internal/providers/spc/testdata/day2_torn.geojson
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"type": "FeatureCollection",
|
||||
"features": [
|
||||
{
|
||||
"type": "Feature",
|
||||
"properties": {
|
||||
"VALID_ISO": "2026-06-12T12:00:00Z",
|
||||
"EXPIRE_ISO": "2026-06-13T12:00:00Z",
|
||||
"ISSUE_ISO": "2026-06-11T17:30:00Z",
|
||||
"FORECASTER": "DOE",
|
||||
"LABEL": "5",
|
||||
"LABEL2": "5% Tornado",
|
||||
"DN": "5"
|
||||
},
|
||||
"geometry": {
|
||||
"type": "Polygon",
|
||||
"coordinates": [
|
||||
[
|
||||
[-100.0, 35.0],
|
||||
[-98.0, 35.0],
|
||||
[-98.0, 37.0],
|
||||
[-100.0, 37.0],
|
||||
[-100.0, 35.0]
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
16
internal/providers/spc/testdata/day3_prt.html
vendored
Normal file
16
internal/providers/spc/testdata/day3_prt.html
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<body>
|
||||
<pre>
|
||||
Day 3 Convective Outlook
|
||||
NWS Storm Prediction Center Norman OK
|
||||
Updated: 2026-06-11T20:00:00Z
|
||||
|
||||
...SUMMARY...
|
||||
A corridor of strong to severe storms may develop near a frontal zone.
|
||||
|
||||
...DISCUSSION...
|
||||
Confidence remains moderate for organized storms.
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
31
internal/providers/spc/testdata/day3_wind.geojson
vendored
Normal file
31
internal/providers/spc/testdata/day3_wind.geojson
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"type": "FeatureCollection",
|
||||
"features": [
|
||||
{
|
||||
"type": "Feature",
|
||||
"properties": {
|
||||
"VALID_ISO": "2026-06-13T12:00:00Z",
|
||||
"EXPIRE_ISO": "2026-06-14T12:00:00Z",
|
||||
"ISSUE_ISO": "2026-06-11T19:45:00Z",
|
||||
"FORECASTER": "LEE",
|
||||
"LABEL": "15",
|
||||
"LABEL2": "15% Wind",
|
||||
"DN": 15
|
||||
},
|
||||
"geometry": {
|
||||
"type": "MultiPolygon",
|
||||
"coordinates": [
|
||||
[
|
||||
[
|
||||
[-103.0, 34.0],
|
||||
[-101.0, 34.0],
|
||||
[-101.0, 36.0],
|
||||
[-103.0, 36.0],
|
||||
[-103.0, 34.0]
|
||||
]
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user