[PATCH 2 of 4] issue1596: include river wst unit in csv header for middle bed height

Wald Commits scm-commit at wald.intevation.org
Wed Nov 27 14:54:54 CET 2013


# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1385546785 -3600
# Node ID 410fbd6a6d01d792baea2bbaef23250d1f4ca042
# Parent  520c6384c72ed358ab288ee5903e8955f3dd347e
issue1596: include river wst unit in csv header for middle bed height.

diff -r 520c6384c72e -r 410fbd6a6d01 artifacts/src/main/java/org/dive4elements/river/exports/MiddleBedHeightExporter.java
--- a/artifacts/src/main/java/org/dive4elements/river/exports/MiddleBedHeightExporter.java	Wed Nov 27 11:05:38 2013 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/MiddleBedHeightExporter.java	Wed Nov 27 11:06:25 2013 +0100
@@ -20,8 +20,11 @@
 import org.dive4elements.river.artifacts.D4EArtifact;
 import org.dive4elements.river.artifacts.model.CalculationResult;
 import org.dive4elements.river.artifacts.model.MiddleBedHeightData;
+
+import org.dive4elements.river.model.River;
+
+import org.dive4elements.river.utils.Formatter;
 import org.dive4elements.river.utils.RiverUtils;
-import org.dive4elements.river.utils.Formatter;
 
 
 /**
@@ -91,10 +94,12 @@
 
 
     protected void writeCSVHeader(CSVWriter writer) {
+        River river = RiverUtils.getRiver((D4EArtifact) master);
+        String riverUnit = river.getWstUnit().getName();
         writer.writeNext(new String[] {
             msg(CSV_KM, CSV_KM),
             msg(CSV_SOUNDING, CSV_SOUNDING),
-            msg(CSV_HEIGHT, CSV_HEIGHT),
+            msg(CSV_HEIGHT, CSV_HEIGHT, new Object[] {riverUnit}),
             msg(CSV_UNCERTAINTY, CSV_UNCERTAINTY),
             msg(CSV_DATA_GAP, CSV_DATA_GAP),
             msg(CSV_SOUNDING_WIDTH, CSV_SOUNDING_WIDTH),


More information about the Dive4elements-commits mailing list