[Dive4elements-commits] [PATCH 12 of 12] Assume that the result is calculated if the wUnit is meter

Wald Commits scm-commit at wald.intevation.org
Wed Jun 12 17:47:25 CEST 2013


# HG changeset patch
# User Andre Heinecke <aheinecke at intevation.de>
# Date 1371052016 -7200
# Node ID ac99cade71dd0e233ca6b49bb086e7542d5dd8d1
# Parent  c4c7ed0e5ffc50703f4e8b7981e2945c20a6d5fd
Assume that the result is calculated if the wUnit is meter

diff -r c4c7ed0e5ffc -r ac99cade71dd artifacts/src/main/java/org/dive4elements/river/exports/ComputedDischargeCurveExporter.java
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ComputedDischargeCurveExporter.java	Wed Jun 12 17:46:22 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/ComputedDischargeCurveExporter.java	Wed Jun 12 17:46:56 2013 +0200
@@ -273,7 +273,9 @@
         source.addMetaData("range",
                 Formatter.getCalculationKm(context.getMeta()).format(kms[0]));
 
-        if (isCalculated) {
+        // When w is in meter we are not at a gauge so our values
+        // must be calculated
+        if (isCalculated || wUnit.equals("m")) {
             source.addMetaData("calculation", Resources.getMsg(
                                                 locale,
                                                 PDF_HEADER_CALC_MODE,


More information about the Dive4elements-commits mailing list