Fix a bug in the GeoJSON handling when there are no active polygons
All checks were successful
ci/woodpecker/push/build-image Pipeline was successful

This commit is contained in:
2026-06-11 22:21:59 -05:00
parent 5d7f604a2c
commit 2c472449e8
4 changed files with 120 additions and 0 deletions

View File

@@ -87,6 +87,17 @@ func buildConvectiveOutlook(bundle spcprovider.RawConvectiveOutlookBundle, fallb
}
for i, feature := range collection.Features {
if spcprovider.IsEmptyGeometryCollection(feature.Geometry) {
issuedAt, err := parseRequiredSPCTime(feature.Properties.IssueISO, fmt.Sprintf("product %s feature %d.ISSUE_ISO", product.Key, i))
if err != nil {
return model.WeatherOutlookRun{}, time.Time{}, err
}
if latestIssue.IsZero() || issuedAt.After(latestIssue) {
latestIssue = issuedAt
}
continue
}
outlook, err := mapFeature(product, feature, i, point, discussion)
if err != nil {
return model.WeatherOutlookRun{}, time.Time{}, err