[PATCH 4 of 4] issue1630: Fix column calculation for bed quality values

Wald Commits scm-commit at wald.intevation.org
Mon Dec 2 12:16:56 CET 2013


# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1385983053 -3600
# Node ID b24ce5b2141c1475075d4593ec2c613186fe69ae
# Parent  467d01a3a4834f9c0af35adfc14eae0ed37a1314
issue1630: Fix column calculation for bed quality values.
Respect the fact that two values exist per bed.

diff -r 467d01a3a483 -r b24ce5b2141c artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedQualityExporter.java
--- a/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedQualityExporter.java	Mon Dec 02 12:16:50 2013 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedQualityExporter.java	Mon Dec 02 12:17:33 2013 +0100
@@ -124,10 +124,10 @@
                     continue;
                 }
                 for (int k = 0; k < beds.length; k++) {
-                    // k + 1: shift km column.
-                    // j * beds.length: shift periods.
+                    // k * 2 + 1: shift km column.
+                    // j * beds.length * 2: shift periods.
                     // loads.length * results.length: shift bed load columns.
-                    int ndx = (k + 1) + (j * beds.length) + (loads.length * results.length);
+                    int ndx = (k * 2 + 1) + (j * beds.length * 2) + (loads.length * results.length);
                     row[ndx] = beds[k].getDiameterCap(km);
                     row[ndx + 1] = beds[k].getDiameterSub(km);
                 }


More information about the Dive4elements-commits mailing list