Mercurial > dive4elements > river
changeset 8205:04d1d56d896b
Do not return pure NaN data.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Fri, 05 Sep 2014 15:26:40 +0200 |
parents | c657ddcf1fa6 |
children | 436512d9bd94 |
files | artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadDataCalculation.java |
diffstat | 1 files changed, 10 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadDataCalculation.java Fri Sep 05 14:53:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadDataCalculation.java Fri Sep 05 15:26:40 2014 +0200 @@ -317,12 +317,18 @@ results.add(result); } + if (results.size() == 0) { + continue; + } + double [][] result = average(results); - SedimentLoadDataResult.Fraction sldrf = - new SedimentLoadDataResult.Fraction(ls.getDescription(), - result, period); - sldr.addFraction(sldrf); + if (!DoubleUtil.isNaN(result[1])) { + SedimentLoadDataResult.Fraction sldrf = + new SedimentLoadDataResult.Fraction( + ls.getDescription(), result, period); + sldr.addFraction(sldrf); + } } }