[PATCH 2 of 2] Merge

Wald Commits scm-commit at wald.intevation.org
Mon Jul 30 14:25:27 CEST 2018


# HG changeset patch
# User gernotbelger
# Date 1532953518 -7200
# Node ID 012ca0cf87561f348768b9c95111a7bb38fecf16
# Parent  c9a4eb3afa4a1ba21f1904775432f8c21cfd4661
# Parent  0c621beceb2f57ff22fa19881e6f4fcabb17b792
Merge

diff -r c9a4eb3afa4a -r 012ca0cf8756 artifacts/src/main/java/org/dive4elements/river/artifacts/model/Segment.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/Segment.java	Mon Jul 30 13:40:33 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/Segment.java	Mon Jul 30 14:25:18 2018 +0200
@@ -194,11 +194,11 @@
                 segment.backup();
 
                 for (int i = 0; i < values.length; ++i) {
-                    double w = values[i] * 100.0;
+                    double w = values[i]; // FIXED: * 100.0;
                     double [] qs = DischargeTables.getQsForW(table, w);
                     if (qs.length == 0) {
-                        log.warn("No Qs found for W = " + values[i]);
-                        report.addProblem("cannot.find.q.for.w", values[i]);
+                        log.warn("No Qs found for W = " + w);
+                        report.addProblem("cannot.find.q.for.w", w);
                         values[i] = Double.NaN;
                         success = false;
                     }
@@ -206,7 +206,7 @@
                         values[i] = qs[0];
                         if (qs.length > 1) {
                             log.warn(
-                                "More than one Q found for W = " + values[i]);
+                                "More than one Q found for W = " + w);
                         }
                     }
                 }
diff -r c9a4eb3afa4a -r 012ca0cf8756 artifacts/src/main/java/org/dive4elements/river/artifacts/states/fixation/FixRealizingCompute.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/fixation/FixRealizingCompute.java	Mon Jul 30 13:40:33 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/fixation/FixRealizingCompute.java	Mon Jul 30 14:25:18 2018 +0200
@@ -142,12 +142,13 @@
 
         facets.add(new DataFacet(AT, "AT data", ComputeType.ADVANCE, hash, id));
 
-        facets.add(new FixWQCurveFacet(0, Resources.getMsg(meta, I18N_WQ_CURVE, I18N_WQ_CURVE) + " (" + access.getFunction() + ")"));
+        if (fixRes != null)
+            facets.add(new FixWQCurveFacet(0, Resources.getMsg(meta, I18N_WQ_CURVE, I18N_WQ_CURVE) + " (" + access.getFunction() + ")"));
 
-        if (access.getPreprocessing()) {
+        if (access.getPreprocessing() && fixRes != null) {
             facets.add(new FixOutlierFacet(0, FIX_OUTLIER, Resources.getMsg(meta, I18N_WQ_OUTLIER, I18N_WQ_OUTLIER)));
         }
 
         return res;
     }
-}
+}
\ No newline at end of file
diff -r c9a4eb3afa4a -r 012ca0cf8756 artifacts/src/main/resources/messages.properties
--- a/artifacts/src/main/resources/messages.properties	Mon Jul 30 13:40:33 2018 +0200
+++ b/artifacts/src/main/resources/messages.properties	Mon Jul 30 14:25:18 2018 +0200
@@ -568,6 +568,7 @@
 km.not.found = Cannot find km.
 cannot.create.wq.relation = Cannot create W/Q relation.
 cannot.create.index.q.relation = Cannot create index/Q relation.
+cannot.find.q.for.w = Cannot find Q for W = {0,number,#.##}.
 
 w.w.qkm1.failed = Calculating Q for WST index {0,number,#.##} failed.
 w.w.wkm1.failed = Calculating W for Q = {0,number,#.##} /  WST index {1,number,#.##} failed.
diff -r c9a4eb3afa4a -r 012ca0cf8756 artifacts/src/main/resources/messages_de.properties
--- a/artifacts/src/main/resources/messages_de.properties	Mon Jul 30 13:40:33 2018 +0200
+++ b/artifacts/src/main/resources/messages_de.properties	Mon Jul 30 14:25:18 2018 +0200
@@ -568,6 +568,7 @@
 km.not.found = Passender Kilometer konnte nicht gefunden werden.
 cannot.create.wq.relation = W/Q-Beziehung konnte nicht ermittelt werden.
 cannot.create.index.q.relation = Spaltenindex/Q-Beziehung konnte nicht erstellt werden.
+cannot.find.q.for.w = Q zu W = {0,number,#.##} kann nicht ermittelt werden.
 
 w.w.qkm1.failed = Berechnung von Q f\u00fcr WST-Index {0,number,#.##} fehlgeschlagen.
 w.w.wkm1.failed = Berechnung von W f\u00fcr Q = {0,number,#.##} / WST-Index {1,number,#.##} fehlgeschlagen.


More information about the Dive4Elements-commits mailing list