diff artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepthminmax/FlowDepthMinMaxCalculation.java @ 8978:b5600453bb8f

SINFO Calculations: do not produce result rows if some input data has missing values. Also check for years of waterlevels in flow depth development calculation.
author gernotbelger
date Thu, 05 Apr 2018 11:57:54 +0200
parents 45f1ad66560e
children b194fa64506a
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepthminmax/FlowDepthMinMaxCalculation.java	Tue Apr 03 17:23:51 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepthminmax/FlowDepthMinMaxCalculation.java	Thu Apr 05 11:57:54 2018 +0200
@@ -149,6 +149,10 @@
                 // REMARK: access the gauge once only during calculation
                 final String gaugeLabel = riverInfoProvider.findGauge(station);
 
+                /* ignore invalid lines */
+                if (Double.isNaN(wst) || Double.isNaN(minBedHeightValue) || Double.isNaN(maxBedHeightValue))
+                    continue;
+
                 final SInfoResultRow row = SInfoResultRow.create().//
                         putValue(SInfoResultType.station, station). //
                         putValue(SInfoResultType.flowdepthmin, minFlowDepth). //

http://dive4elements.wald.intevation.org