[PATCH] (issue1755) Add Problem also if a result is not interpolateable
Wald Commits
scm-commit at wald.intevation.org
Thu Apr 9 10:27:07 CEST 2015
# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1428568020 -7200
# Node ID fc5fcec91b738f6fe13232b6690ad0deef87b8bc
# Parent 0c241f03ebcdd8f36d885d2825ac5044acb5a068
(issue1755) Add Problem also if a result is not interpolateable
This also reduces the debug output verbosity when adding Problems.
diff -r 0c241f03ebcd -r fc5fcec91b73 artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedQualityCalculation.java
--- 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);
}
}
More information about the Dive4Elements-commits
mailing list