[PATCH] Change column order in bed differences export

Wald Commits scm-commit at wald.intevation.org
Wed Jun 4 13:06:56 CEST 2014


# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1401880012 -7200
# Node ID db1a2b14c32d81deebfecdb50a6a26291cdf78d1
# Parent  76b5add4f268d912b86c430e76b2395ae69f8123
Change column order in bed differences export.

diff -r 76b5add4f268 -r db1a2b14c32d artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedDifferenceExporter.java
--- a/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedDifferenceExporter.java	Wed Jun 04 12:53:28 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedDifferenceExporter.java	Wed Jun 04 13:06:52 2014 +0200
@@ -96,10 +96,11 @@
                 for (int j = 0; j < kms[0].length; j++) {
                     writer.writeNext(new String[] {
                         kmf.format(kms[0][j]),
+                        desc,
                         mf.format(kms[1][j]),
                         mf.format(morph1[1][j]),
                         mf.format(morph2[1][j]),
-                        desc });
+                        });
                 }
             }
             else {
@@ -108,8 +109,9 @@
                 for (int j = 0; j < kms[0].length; j++) {
                     writer.writeNext(new String[] {
                         kmf.format(kms[0][j]),
+                        desc,
                         mf.format(kms[1][j]),
-                        desc });
+                        });
                 }
             }
         }
@@ -167,13 +169,13 @@
         List<String> header = new ArrayList<String>();
         if (results != null)  {
             header.add(msg(CSV_HEADER_KM, "km"));
+            header.add(msg(CSV_HEADER_DIFF_PAIR, "difference pair"));
             header.add(msg(CSV_HEADER_DIFF, "cm"));
             if (results.length > 0 &&
                 results[0] instanceof BedDiffYearResult) {
                 header.add(msg(CSV_HEADER_MORPH1, "morph width minuend [m]"));
                 header.add(msg(CSV_HEADER_MORPH2, "morph width subtrahend [m]"));
             }
-            header.add(msg(CSV_HEADER_DIFF_PAIR, "difference pair"));
         }
         writer.writeNext(header.toArray(new String[header.size()]));
     }


More information about the Dive4Elements-commits mailing list