changeset 8668:fc5fcec91b73

(issue1755) Add Problem also if a result is not interpolateable This also reduces the debug output verbosity when adding Problems.
author Andre Heinecke <andre.heinecke@intevation.de>
date Thu, 09 Apr 2015 10:27:00 +0200
parents 0c241f03ebcd
children 0bc0d84a4fe0
files artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedQualityCalculation.java
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedQualityCalculation.java	Wed Apr 08 19:09:38 2015 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedQualityCalculation.java	Thu Apr 09 10:27:00 2015 +0200
@@ -92,21 +92,22 @@
     protected void addValuesToResult(BedQualityResult result,
                                      BedQualityResultValue[] values) {
         for (BedQualityResultValue value: values) {
-            if (value.isEmpty() || value.isNaN()) {
+            if (value.isEmpty() || value.isNaN() || !value.isInterpolateable()) {
                 if (value.isDiameterResult()) {
-                    log.debug("Adding diameter problem");
                     addProblem("bedquality.missing.diameter." +
                             value.getType(), value.getName().toUpperCase(),
                             result.getDateRange().getFrom(),
                             result.getDateRange().getTo());
                 } else {
-                    log.debug("Adding diameter problem");
                     addProblem("bedquality.missing." + value.getName() + "." +
                             value.getType(), result.getDateRange().getFrom(),
                             result.getDateRange().getTo());
                 }
+                if (!value.isInterpolateable() && (!value.isEmpty() && !value.isNaN())) {
+                    // we want to keep single point results
+                    result.add(value);
+                }
             } else {
-                log.debug("Adding unproblematic result");
                 result.add(value);
             }
         }

http://dive4elements.wald.intevation.org