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
All checks were successful
ci/woodpecker/push/build-image Pipeline was successful
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user