changeset 8863:1009cab0f86b

Some work on flow depth exporter
author gernotbelger
date Fri, 19 Jan 2018 18:47:53 +0100
parents 5b5bdce5a216
children fa168fb02a65
files artifacts/doc/conf/jasper/templates/sinfo.flowdepth.jrxml artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepth/FlowDepthCalculation.java artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepth/FlowDepthCalculationResults.java artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepth/FlowDepthExporter.java artifacts/src/main/resources/messages.properties artifacts/src/main/resources/messages_de.properties artifacts/src/main/resources/messages_de_DE.properties artifacts/src/main/resources/messages_en.properties
diffstat 8 files changed, 356 insertions(+), 266 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/doc/conf/jasper/templates/sinfo.flowdepth.jrxml	Fri Jan 19 18:47:18 2018 +0100
+++ b/artifacts/doc/conf/jasper/templates/sinfo.flowdepth.jrxml	Fri Jan 19 18:47:53 2018 +0100
@@ -1,21 +1,49 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="flysreport" language="groovy" pageWidth="595" pageHeight="842" columnWidth="515" leftMargin="60" rightMargin="20" topMargin="20" bottomMargin="20">
+<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="flysreport" language="groovy" pageWidth="842" pageHeight="595" columnWidth="515" leftMargin="60" rightMargin="20" topMargin="20" bottomMargin="20">
 	<property name="ireport.zoom" value="1.0"/>
 	<property name="ireport.x" value="0"/>
 	<property name="ireport.y" value="0"/>
 
+    <style name="htmlStyle" markup="html" />
+
+	<field name="meta:header" class="java.lang.String"/>
+	<field name="meta:calcMode" class="java.lang.String"/>
+	<field name="meta:version_label" class="java.lang.String"/>
 	<field name="meta:version" class="java.lang.String"/>
+	<field name="meta:user_label" class="java.lang.String"/>
 	<field name="meta:user" class="java.lang.String"/>
+	<field name="meta:date_label" class="java.lang.String"/>
 	<field name="meta:date" class="java.lang.String"/>
+	<field name="meta:river_label" class="java.lang.String"/>
 	<field name="meta:river" class="java.lang.String"/>
+	<field name="meta:range_label" class="java.lang.String"/>
 	<field name="meta:range" class="java.lang.String"/>
 
+	<field name="meta:station_header" class="java.lang.String"/>
+	<field name="meta:flowdepth_header" class="java.lang.String"/>
+	<field name="meta:flowdepth_tkh_header" class="java.lang.String"/>
+	<field name="meta:tkh_header" class="java.lang.String"/>
+	<field name="meta:waterlevel_header" class="java.lang.String"/>
+	<field name="meta:discharge_header" class="java.lang.String"/>
+	<field name="meta:waterlevel_name_header" class="java.lang.String"/>
+	<field name="meta:gauge_header" class="java.lang.String"/>
+	<field name="meta:bedheight_header" class="java.lang.String"/>
+	<field name="meta:sounding_name_header" class="java.lang.String"/>
+	<field name="meta:location_header" class="java.lang.String"/>
+	<field name="meta:river_unit" class="java.lang.String"/>
+
 	<field name="data:0" class="java.lang.String"/>
 	<field name="data:1" class="java.lang.String"/>
 	<field name="data:2" class="java.lang.String"/>
 	<field name="data:3" class="java.lang.String"/>
 	<field name="data:4" class="java.lang.String"/>
 	<field name="data:5" class="java.lang.String"/>
+	<field name="data:6" class="java.lang.String"/>
+	<field name="data:7" class="java.lang.String"/>
+	<field name="data:8" class="java.lang.String"/>
+	<field name="data:9" class="java.lang.String"/>
+	<field name="data:10" class="java.lang.String"/>
+
 <!--	
 	<field name="data:6" class="java.lang.String"/>
 	<field name="data:7" class="java.lang.String"/>
@@ -30,93 +58,72 @@
 	</background>
 	<title>
 		<band height="182" splitType="Stretch">
-			<staticText>
-				<reportElement x="0" y="1" width="165" height="30"/>
-				<textElement>
-					<font size="18"/>
-				</textElement>
-				<text><![CDATA[Ergebnisausgabe]]></text>
-			</staticText>
-			<!--
+     
 			<textField>
-				<reportElement x="165" y="0" width="350" height="31"/>
-				<textElement>
-					<font size="18"/>
-				</textElement>
-				<textFieldExpression><![CDATA[$F{meta:version}]]></textFieldExpression>
-			</textField>
-			<textField>
-				<reportElement x="165" y="0" width="350" height="31"/>
+				<reportElement x="0" y="1" width="515" height="30"/>
 				<textElement>
 					<font size="18"/>
 				</textElement>
-				<textFieldExpression><![CDATA[$F{meta:user}]]></textFieldExpression>
-			</textField>
-			<textField>
-				<reportElement x="165" y="0" width="350" height="31"/>
-				<textElement>
-					<font size="18"/>
-				</textElement>
-				<textFieldExpression><![CDATA[$F{river}]]></textFieldExpression>
+				<textFieldExpression><![CDATA[$F{meta:header} + " " + $F{meta:river}]]></textFieldExpression>
 			</textField>
+
 			<textField>
-				<reportElement x="0" y="31" width="515" height="26"/>
-				<textElement>
-					<font size="14"/>
-				</textElement>
-				<textFieldExpression><![CDATA[$F{calculation}]]></textFieldExpression>
+				<reportElement x="0" y="40" width="165" height="20"/>
+				<textElement/>
+				<textFieldExpression><![CDATA[$F{meta:calcMode}]]></textFieldExpression>
 			</textField>
-			-->
 			
-			<staticText>
+			<textField>
 				<reportElement x="0" y="70" width="123" height="20"/>
 				<textElement/>
-				<text><![CDATA[FLYS-Version:]]></text>
-			</staticText>
+				<textFieldExpression><![CDATA[$F{meta:version_label} + ":"]]></textFieldExpression>
+			</textField>
 			<textField>
 				<reportElement x="123" y="70" width="392" height="20"/>
 				<textElement/>
 				<textFieldExpression><![CDATA[$F{meta:version}]]></textFieldExpression>
 			</textField>
 			
-			<staticText>
+			<textField>
 				<reportElement x="0" y="90" width="123" height="20"/>
 				<textElement/>
-				<text><![CDATA[Bearbeiter:]]></text>
-			</staticText>
+				<textFieldExpression><![CDATA[$F{meta:user_label} + ":"]]></textFieldExpression>
+			</textField>
 			<textField>
 				<reportElement x="123" y="90" width="392" height="20"/>
 				<textElement/>
 				<textFieldExpression><![CDATA[$F{meta:user}]]></textFieldExpression>
 			</textField>
 			
-			<staticText>
+			<textField>
 				<reportElement x="0" y="110" width="123" height="20"/>
 				<textElement/>
-				<text><![CDATA[Datum der Erstellung:]]></text>
-			</staticText>
+				<textFieldExpression><![CDATA[$F{meta:date_label} + ":"]]></textFieldExpression>
+			</textField>
 			<textField>
 				<reportElement x="123" y="110" width="392" height="20"/>
 				<textElement/>
 				<textFieldExpression><![CDATA[$F{meta:date}]]></textFieldExpression>
 			</textField>
 			
-			<staticText>
+			<textField>
 				<reportElement x="0" y="130" width="123" height="20"/>
 				<textElement/>
-				<text><![CDATA[Gewässer:]]></text>
-			</staticText>
+				<textFieldExpression><![CDATA[$F{meta:river_label} + ":"]]></textFieldExpression>
+			</textField>
 			<textField>
 				<reportElement x="123" y="130" width="392" height="20"/>
 				<textElement/>
 				<textFieldExpression><![CDATA[$F{meta:river}]]></textFieldExpression>
 			</textField>
 			
-			<staticText>
+			<textField>
 				<reportElement x="0" y="150" width="123" height="20"/>
 				<textElement/>
-				<text><![CDATA[Bereich:]]></text>
-			</staticText>
+				<textFieldExpression><![CDATA[$F{meta:range_label} + ":"]]></textFieldExpression>
+			</textField>
+
+
 			<textField>
 				<reportElement x="123" y="150" width="392" height="20"/>
 				<textElement/>
@@ -125,85 +132,135 @@
 		</band>
 	</title>
 	<columnHeader>
-		<band height="25" splitType="Stretch">
+		<band height="30" splitType="Stretch">
 			<line>
-				<reportElement x="0" y="19" width="515" height="1"/>
+				<reportElement x="0" y="29" width="762" height="1"/>
 			</line>
-			<staticText>
-				<reportElement x="0" y="0" width="60" height="20"/>
-				<textElement/>
-				<text><![CDATA[Fluss-Km]]></text>
-			</staticText>
-			<staticText>
-				<reportElement x="60" y="0" width="65" height="20"/>
-				<textElement/>
-				<text><![CDATA[W [NN + m]]]></text>
-			</staticText>
-			<staticText>
-				<reportElement x="125" y="0" width="65" height="20"/>
+			<textField>
+				<reportElement x="0" y="0" width="50" height="30" style="htmlStyle"/>
 				<textElement/>
-				<text><![CDATA[Q [m³/s]]]></text>
-			</staticText>
-			<staticText>
-				<reportElement x="190" y="0" width="85" height="20"/>
+				<textFieldExpression><![CDATA[$F{meta:station_header}]]></textFieldExpression>
+			</textField>
+			<textField>
+				<reportElement x="50" y="0" width="50" height="30" style="htmlStyle"/>
+				<textElement />
+				<textFieldExpression><![CDATA[$F{meta:flowdepth_header} + "<br/>[m]"]]></textFieldExpression>
+			</textField>
+			<textField>
+				<reportElement x="100" y="0" width="85" height="30" style="htmlStyle"/>
 				<textElement/>
-				<text><![CDATA[Bezeichnung]]></text>
-			</staticText>
-			<staticText>
-				<reportElement x="275" y="0" width="110" height="20"/>
+				<textFieldExpression><![CDATA[$F{meta:flowdepth_tkh_header} + "<br/>[m]"]]></textFieldExpression>
+			</textField>
+			<textField>
+				<reportElement x="185" y="0" width="25" height="30" style="htmlStyle"/>
 				<textElement/>
-				<text><![CDATA[Lage]]></text>
-			</staticText>
-			<staticText>
-				<reportElement x="385" y="0" width="130" height="20"/>
+				<textFieldExpression><![CDATA[$F{meta:tkh_header} + "<br/>[cm]"]]></textFieldExpression>
+			</textField>
+			<textField>
+				<reportElement x="210" y="0" width="65" height="30" style="htmlStyle"/>
 				<textElement/>
-				<text><![CDATA[Bezugspegel]]></text>
-			</staticText>
+				<textFieldExpression><![CDATA[$F{meta:waterlevel_header} + "["  + $F{meta:river_unit} + "]"]]></textFieldExpression>
+			</textField>
+			<textField>
+				<reportElement x="275" y="0" width="40" height="30" style="htmlStyle"/>
+				<textElement/>
+				<textFieldExpression><![CDATA[$F{meta:discharge_header} + "<br/>[m³/s]"]]></textFieldExpression>
+			</textField>
+			<textField>
+				<reportElement x="315" y="0" width="85" height="30" style="htmlStyle"/>
+				<textElement/>
+				<textFieldExpression><![CDATA[$F{meta:waterlevel_name_header}]]></textFieldExpression>
+			</textField>
+			<textField>
+				<reportElement x="400" y="0" width="100" height="30" style="htmlStyle"/>
+				<textElement/>
+				<textFieldExpression><![CDATA[$F{meta:gauge_header}]]></textFieldExpression>
+			</textField>
+			<textField>
+				<reportElement x="500" y="0" width="65" height="30" style="htmlStyle"/>
+				<textElement/>
+				<textFieldExpression><![CDATA[$F{meta:bedheight_header} + "[" + $F{meta:river_unit} + "]"]]></textFieldExpression>
+			</textField>
+            <textField>
+                <reportElement x="565" y="0" width="85" height="30" style="htmlStyle"/>
+                <textElement/>
+                <textFieldExpression><![CDATA[$F{meta:sounding_name_header}]]></textFieldExpression>
+            </textField>
+			<textField>
+				<reportElement x="650" y="0" width="110" height="30" style="htmlStyle"/>
+				<textElement/>
+				<textFieldExpression><![CDATA[$F{meta:location_header}]]></textFieldExpression>
+			</textField>
 		</band>
 	</columnHeader>
 	<detail>
 		<band height="14" splitType="Stretch">
 			<textField isBlankWhenNull="true">
-				<reportElement x="0" y="0" width="60" height="14"/>
-				<textElement/>
+				<reportElement x="0" y="0" width="40" height="14"/>
+				<textElement textAlignment="Right"/>
 				<textFieldExpression><![CDATA[$F{data:0}]]></textFieldExpression>
 			</textField>
 			<textField isBlankWhenNull="true">
-				<reportElement x="60" y="0" width="65" height="14"/>
-				<textElement/>
+				<reportElement x="50" y="0" width="40" height="14" />
+				<textElement textAlignment="Right"/>
 				<textFieldExpression><![CDATA[$F{data:1}]]></textFieldExpression>
 			</textField>
 			<textField isBlankWhenNull="true">
-				<reportElement x="125" y="0" width="65" height="14"/>
-				<textElement/>
+				<reportElement x="100" y="0" width="75" height="14"/>
+				<textElement textAlignment="Right"/>
 				<textFieldExpression><![CDATA[$F{data:2}]]></textFieldExpression>
 			</textField>
-			<textField isStretchWithOverflow="true" isBlankWhenNull="false">
-				<reportElement stretchType="RelativeToBandHeight" x="190" y="0" width="85" height="14"/>
-				<textElement/>
+			<textField isBlankWhenNull="true">
+				<reportElement x="185" y="0" width="15" height="14"/>
+				<textElement textAlignment="Right"/>
 				<textFieldExpression><![CDATA[$F{data:3}]]></textFieldExpression>
 			</textField>
-			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
-				<reportElement stretchType="RelativeToBandHeight" x="275" y="0" width="110" height="14" isPrintWhenDetailOverflows="true"/>
-				<textElement/>
+			<textField isBlankWhenNull="true">
+				<reportElement x="210" y="0" width="55" height="14"/>
+				<textElement textAlignment="Right"/>
 				<textFieldExpression><![CDATA[$F{data:4}]]></textFieldExpression>
 			</textField>
-			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
-				<reportElement stretchType="RelativeToBandHeight" x="385" y="0" width="130" height="14"/>
+			<textField isBlankWhenNull="true">
+				<reportElement x="275" y="0" width="30" height="14"/>
+				<textElement textAlignment="Right"/>
+				<textFieldExpression><![CDATA[$F{data:5}]]></textFieldExpression>
+			</textField>
+			<textField isBlankWhenNull="true">
+				<reportElement x="315" y="0" width="85" height="14"/>
 				<textElement/>
-				<textFieldExpression><![CDATA[$F{data:5}]]></textFieldExpression>
+				<textFieldExpression><![CDATA[$F{data:6}]]></textFieldExpression>
+			</textField>
+			<textField isBlankWhenNull="true">
+				<reportElement x="400" y="0" width="100" height="14"/>
+				<textElement/>
+				<textFieldExpression><![CDATA[$F{data:7}]]></textFieldExpression>
+			</textField>
+			<textField isBlankWhenNull="true">
+				<reportElement x="500" y="0" width="55" height="14"/>
+				<textElement textAlignment="Right"/>
+				<textFieldExpression><![CDATA[$F{data:8}]]></textFieldExpression>
+			</textField>
+			<textField isBlankWhenNull="true">
+				<reportElement x="565" y="0" width="85" height="14"/>
+				<textElement/>
+				<textFieldExpression><![CDATA[$F{data:9}]]></textFieldExpression>
+			</textField>
+			<textField isBlankWhenNull="true">
+				<reportElement x="650" y="0" width="110" height="14" stretchType="RelativeToBandHeight"/>
+				<textElement/>
+				<textFieldExpression><![CDATA[$F{data:10}]]></textFieldExpression>
 			</textField>
 		</band>
 	</detail>
 	<pageFooter>
 		<band height="29" splitType="Stretch">
 			<textField evaluationTime="Report">
-				<reportElement x="458" y="9" width="57" height="20"/>
+				<reportElement x="705" y="9" width="57" height="20"/>
 				<textElement/>
 				<textFieldExpression><![CDATA[" / " + $V{PAGE_NUMBER}]]></textFieldExpression>
 			</textField>
 			<textField>
-				<reportElement x="403" y="9" width="55" height="20"/>
+				<reportElement x="650" y="9" width="55" height="20"/>
 				<textElement textAlignment="Right"/>
 				<textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
 			</textField>
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepth/FlowDepthCalculation.java	Fri Jan 19 18:47:18 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepth/FlowDepthCalculation.java	Fri Jan 19 18:47:53 2018 +0100
@@ -40,6 +40,9 @@
 	
     public CalculationResult calculate(final SINFOArtifact sinfo) {
     	
+        // FIXME: find user of this artifact; probably only possible by selecting the collection that contains this artifact...
+        final String user = "unbekannt";
+        
     	/* access input data */
     	final FlowDepthAccess access = new FlowDepthAccess(sinfo);
     	final River river = access.getRiver();
@@ -57,7 +60,10 @@
     	final List<Gauge> gauges = river.determineGauges(from, to);
     	final GaugeIndex gaugeIndex = new GaugeIndex(gauges);
 
-    	final FlowDepthCalculationResults results = new FlowDepthCalculationResults(river, from, to, useTkh);
+    	final String calcModeLabel = Resources.getMsg(context.getMeta(),sinfo.getCalculationMode().name() );
+    	
+    	
+        final FlowDepthCalculationResults results = new FlowDepthCalculationResults(calcModeLabel, user, river, from, to, useTkh);
 
     	for (final DifferencesPair diffPair : diffPairs) {
     		final FlowDepthCalculationResult result = calculateResult( river, from, to, diffPair, problems, gaugeIndex );
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepth/FlowDepthCalculationResults.java	Fri Jan 19 18:47:18 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepth/FlowDepthCalculationResults.java	Fri Jan 19 18:47:53 2018 +0100
@@ -19,7 +19,7 @@
  * @author Gernot Belger
  *
  */
-public class FlowDepthCalculationResults{
+public final class FlowDepthCalculationResults{
 	private final List<FlowDepthCalculationResult> results = new ArrayList<>();
 
 	private final River river;
@@ -30,13 +30,27 @@
 	
 	private final boolean useTkh;
 
-	public FlowDepthCalculationResults(final River river, final double from, final double to, final boolean useTkh) {
-		this.river = river;
+    private final String calcModeLabel;
+
+    private final String user;
+
+	public FlowDepthCalculationResults(final String calcModeLabel, final String user, final River river, final double from, final double to, final boolean useTkh) {
+		this.calcModeLabel = calcModeLabel;
+        this.user = user;
+        this.river = river;
 		this.from = from;
 		this.to = to;
 		this.useTkh = useTkh;
 	}
 	
+	public String getCalcModeLabel() {
+        return this.calcModeLabel;
+    }
+	
+	public String getUser() {
+        return this.user;
+    }
+	
 	public River getRiver() {
 		return this.river;
 	}
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepth/FlowDepthExporter.java	Fri Jan 19 18:47:18 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepth/FlowDepthExporter.java	Fri Jan 19 18:47:53 2018 +0100
@@ -10,7 +10,6 @@
 
 import java.io.OutputStream;
 import java.text.DateFormat;
-import java.text.NumberFormat;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Date;
@@ -21,12 +20,13 @@
 import org.apache.log4j.Logger;
 import org.dive4elements.artifacts.CallMeta;
 import org.dive4elements.artifacts.common.utils.Config;
+import org.dive4elements.river.FLYS;
 import org.dive4elements.river.artifacts.model.CalculationResult;
 import org.dive4elements.river.artifacts.resources.Resources;
 import org.dive4elements.river.artifacts.sinfo.util.MetaAndTableJRDataSource;
 import org.dive4elements.river.exports.AbstractExporter;
 import org.dive4elements.river.model.River;
-import org.dive4elements.river.utils.Formatter;
+import org.dive4elements.river.model.Unit;
 
 import au.com.bytecode.opencsv.CSVWriter;
 import net.sf.jasperreports.engine.JRDataSource;
@@ -56,61 +56,73 @@
     private static final String CSV_LABEL_HEADER = "sinfo.export.flow_depth.csv.header.label";
     private static final String CSV_GAUGE_HEADER = "sinfo.export.flow_depth.csv.header.gauge";
     private static final String CSV_MEAN_BED_HEIGHT_HEADER = "sinfo.export.flow_depth.csv.header.mean_bed_height";
+    private static final String CSV_MEAN_BED_HEIGHT_HEADER_SHORT = "sinfo.export.flow_depth.csv.header.mean_bed_height.short";
     private static final String CSV_SOUNDING_HEADER = "sinfo.export.flow_depth.csv.header.sounding";
     private static final String CSV_LOCATION_HEADER = "sinfo.export.flow_depth.csv.header.location";
     
     private static final String CSV_META_HEADER_RESULT =
         "sinfo.export.flow_depth.csv.meta.header.result";
 
+    private static final String CSV_META_HEADER_RESULT_LABEL =
+            "sinfo.export.flow_depth.csv.meta.header.result.label";
+    
     private static final String CSV_META_VERSION =
     		"sinfo.export.flow_depth.csv.meta.version";
+
+    private static final String CSV_META_VERSION_LABEL =
+            "sinfo.export.flow_depth.csv.meta.version.label";
     
     private static final String CSV_META_USER =
     		"sinfo.export.flow_depth.csv.meta.user";
     
+    private static final String CSV_META_USER_LABEL =
+            "sinfo.export.flow_depth.csv.meta.user.label";
+    
     private static final String CSV_META_CREATION =
         "sinfo.export.flow_depth.csv.meta.creation";
 
+    private static final String CSV_META_CREATION_LABEL =
+            "sinfo.export.flow_depth.csv.meta.creation.label";
+    
     private static final String CSV_META_RIVER =
         "sinfo.export.flow_depth.csv.meta.river";
 
+    private static final String CSV_META_RIVER_LABEL =
+            "sinfo.export.flow_depth.csv.meta.river.label";
+    
     private static final String CSV_META_HEADER_SOUNDING =
     		"sinfo.export.flow_depth.csv.meta.header.sounding";
 
     private static final String CSV_META_HEADER_WATERLEVEL =
     		"sinfo.export.flow_depth.csv.meta.header.waterlevel";
+
+    private static final String CSV_META_RANGE =
+            "sinfo.export.flow_depth.csv.meta.range";
+
+    private static final String CSV_META_RANGE_LABEL =
+            "sinfo.export.flow_depth.csv.meta.range.label";
     
-    private static final String JASPER_FILE     = "/jasper/sinfo.flowdepth.jasper"; //$NON-NLS-1$
+    private static final String CSV_META_HEIGHT_UNIT_RIVER = "sinfo.export.flow_depth.csv.meta.height_unit.river";
+    
+    private static final String JASPER_FILE     = "/jasper/sinfo.flowdepth.jasper";
+
+    private static final String UNIT_M = "m";
+
+    private static final String UNIT_CM = "cm";
+
+    private static final String UNIT_CUBIC_M = "m³/s";
 
     /** The storage that contains the current calculation result.*/
     private FlowDepthCalculationResults data = null;
 
-	private NumberFormat meanBedHeightFormatter;
-
-	private NumberFormat tkhFormatter;
-
-	private NumberFormat flowDepthFormatter;
-
-    private NumberFormat getMeanBedHeightFormatter() {
-    	if( meanBedHeightFormatter == null )
-    		// FIXME: check if this is right
-    		meanBedHeightFormatter = Formatter.getMiddleBedHeightHeight(context);
-		return meanBedHeightFormatter;
-	}
-
-	private NumberFormat getTkhFormatter() {
-    	if( tkhFormatter == null )
-    		// FIXME: check if this is right, probably not, we need one digit
-    		tkhFormatter = Formatter.getWaterlevelW(context);
-		return tkhFormatter;
-	}
-
-	private NumberFormat getFlowDepthFormatter() {
-    	if( flowDepthFormatter == null )
-    		// FIXME: check if this is right
-    		flowDepthFormatter = Formatter.getMeterFormat(context);
-		return flowDepthFormatter;
-	}    
+	/**
+	 * Formats header with unit
+	 */
+	private String msgUnit(final String key, String unit ) {
+	    
+	    final String msg = msg(key);
+	    return String.format("%s [%s]", msg, unit);
+    }
     
     @Override
     protected void addData(Object d) {
@@ -124,7 +136,7 @@
         		data = (FlowDepthCalculationResults)dat;
         }
     }
-
+    
     @Override
     protected void writeCSVData(CSVWriter writer) {
         log.info("FlowDepthExporter.writeCSVData");
@@ -132,17 +144,12 @@
         /* fetch calculation results */
         final FlowDepthCalculationResults results = data;
 
-        /* write as csv */
+        final boolean useTkh = results.isUseTkh();
+        final River river = results.getRiver();
 
-//        boolean atGauge = mode == WQ_MODE.QGAUGE || mode == WQ_MODE.WGAUGE;
-//        boolean isQ     = mode == WQ_MODE.QGAUGE || mode == WQ_MODE.QFREE;
-//        RiverUtils.WQ_INPUT input
-//            = RiverUtils.getWQInputMode((D4EArtifact)master);
-
-        final boolean useTkh = results.isUseTkh();
-
+        /* write as csv */
         writeCSVMeta(writer, results);
-        writeCSVHeader(writer, useTkh);
+        writeCSVHeader(writer, river, useTkh);
 
         for (final FlowDepthCalculationResult result : results.getResults()) {
         	writeCSVFlowDepthResult(writer, result, useTkh);
@@ -159,49 +166,35 @@
 	private void writeCSVMeta(final CSVWriter writer, final FlowDepthCalculationResults results) {
         log.info("FlowDepthExporter.writeCSVMeta");
 
-        // Workflow zur Berechnung der Fließtiefe.pdf
-        // "##ERGEBNISAUSGABE - Name des Gewässers - Fließtiefe"
+        final String calcModeLabel = results.getCalcModeLabel();
         final River river = results.getRiver();
-		writeCSVMeataEntry(writer, CSV_META_HEADER_RESULT, river.getName() );
+        writeCSVMetaEntry(writer, CSV_META_HEADER_RESULT, msg( CSV_META_HEADER_RESULT_LABEL ), river.getName(), calcModeLabel );
 
 		// "# FLYS-Version: "
-        // FIXME
-        final String flysVersion = "unbekannt";
-        writeCSVMeataEntry(writer, CSV_META_VERSION, flysVersion );
+        writeCSVMetaEntry(writer, CSV_META_VERSION, msg( CSV_META_VERSION_LABEL ), FLYS.VERSION );
 
 		// "# Bearbeiter: "
-        // FIXME
-        final String user = "unbekannt";
-        writeCSVMeataEntry(writer, CSV_META_USER, user );
+        writeCSVMetaEntry(writer, CSV_META_USER, msg( CSV_META_USER_LABEL ), results.getUser() );
 
         // "# Datum der Erstellung: "
         final Locale locale = Resources.getLocale(context.getMeta());
         final DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT, locale);
-        writeCSVMeataEntry(writer, CSV_META_CREATION, df.format(new Date()) );
+        writeCSVMetaEntry(writer, CSV_META_CREATION, msg( CSV_META_CREATION_LABEL ), df.format(new Date()) );
 
         // "# Gewässer: "
-        writeCSVMeataEntry(writer, CSV_META_RIVER, river.getName() );
+        writeCSVMetaEntry(writer, CSV_META_RIVER, msg( CSV_META_RIVER_LABEL ), river.getName() );
 
         // "# Höhensystem des Flusses: "
-        
-        // FIXME
+        final Unit wstUnit = river.getWstUnit();
+        writeCSVMetaEntry(writer, CSV_META_HEIGHT_UNIT_RIVER, wstUnit.getName());
 
         // "# Ort/Bereich (km): "
-        // FIXME
-        // TODO: unklar, es wird nur ein Bereich eingegeben
-//        RangeAccess rangeAccess = new RangeAccess(flys);
-//        double[] kms = rangeAccess.getKmRange();
-//        writer.writeNext(new String[] {
-//        		Resources.getMsg(
-//        				meta,
-//        				CSV_META_RANGE,
-//        				CSV_META_RANGE,
-//        				new Object[] { kms[0], kms[kms.length-1] })
-//        });
+        writeCSVMetaEntry(writer, CSV_META_RANGE, msg( CSV_META_RANGE_LABEL ), getKmFormatter().format(results.getFrom() ), getKmFormatter().format( results.getTo()));
 
         // "##METADATEN PEILUNG"
-        writeCSVMeataEntry(writer, CSV_META_HEADER_SOUNDING );
+        writeCSVMetaEntry(writer, CSV_META_HEADER_SOUNDING );
 
+        // FIXME: check: macht nicht viel sinn da es mehrere geben kann.. oder immer wieder wiederholen?
 //        "# Jahr der Peilung: "
         // FIXME
 //        "# Aufnahmeart: "
@@ -213,7 +206,7 @@
 //        "# ursprüngliches Höhensystem: "
         // FIXME
 //        "##METADATEN WASSERSPIEGELLAGE"
-        writeCSVMeataEntry(writer, CSV_META_HEADER_WATERLEVEL );
+        writeCSVMetaEntry(writer, CSV_META_HEADER_WATERLEVEL );
 //        "# Bezeichnung der Wasserspiegellage: "
         // FIXME
 //        "# Höhensystem der Wasserspiegellage: "
@@ -231,19 +224,11 @@
         // "# Q (m³/s): " (nur bei Eingabe des Durchflusses)        
         // TODO: unklar, es wird kein Q eingegeben
 
-//        writer.writeNext(new String[] {
-//            Resources.getMsg(
-//                meta,
-//                CSV_META_GAUGE,
-//                CSV_META_GAUGE,
-//                new Object[] { RiverUtils.getGaugename(flys) })
-//        });
-
         writer.writeNext(new String[] { "" });
     }
 
 
-    private void writeCSVMeataEntry(CSVWriter writer, String message, Object... messageArgs) {
+    private void writeCSVMetaEntry(CSVWriter writer, String message, Object... messageArgs) {
 
         CallMeta meta = context.getMeta();
 
@@ -259,28 +244,32 @@
 	/**
      * Write the header, with different headings depending on whether at a
      * gauge or at a location.
+	 * @param river 
 	 * @param useTkh 
      */
     private void writeCSVHeader(
         final CSVWriter writer,
+        final River river, 
         final boolean useTkh
     ) {
         log.info("FlowDepthExporter.writeCSVHeader");
 
         final Collection<String> header = new ArrayList<>(11);
         
-        header.add(msg(CSV_KM_HEADER,CSV_KM_HEADER));
-        header.add(msg(CSV_FLOWDEPTH_HEADER));
+        header.add(msg(CSV_KM_HEADER));
+        header.add(msgUnit(CSV_FLOWDEPTH_HEADER, UNIT_M));
         if( useTkh )
         {
-        	header.add(msg(CSV_FLOWDEPTHTKH_HEADER));
-        	header.add(msg(CSV_TKH_HEADER));
+        	header.add(msgUnit(CSV_FLOWDEPTHTKH_HEADER, UNIT_M));
+        	header.add(msgUnit(CSV_TKH_HEADER, UNIT_CM));
         }
-        header.add(msg(CSV_WATERLEVEL_HEADER));
-        header.add(msg(CSV_DISCHARGE_HEADER));
+
+        final String wstUnitName = river.getWstUnit().getName();
+        header.add(msgUnit(CSV_WATERLEVEL_HEADER, wstUnitName));
+        header.add(msgUnit(CSV_DISCHARGE_HEADER, UNIT_CUBIC_M));
         header.add(msg(CSV_LABEL_HEADER));
         header.add(msg(CSV_GAUGE_HEADER));
-        header.add(msg(CSV_MEAN_BED_HEIGHT_HEADER));
+        header.add(msgUnit(CSV_MEAN_BED_HEIGHT_HEADER, wstUnitName));
         header.add(msg(CSV_SOUNDING_HEADER));
         header.add(msg(CSV_LOCATION_HEADER));
 
@@ -313,7 +302,7 @@
     	}
     	
     	// Wasserstand [NN + m]
-    	lines.add( getWFormatter().format( row.getWaterlevel() ) );
+    	lines.add( getW2Formatter().format( row.getWaterlevel() ) );
     	
     	// Q [m³/s]
     	lines.add( getQFormatter().format( row.getDischarge() ) );
@@ -325,7 +314,7 @@
     	lines.add( row.getGauge() );
     	
     	// Mittlere Sohlhöhe [NN + m]
-    	lines.add( getMeanBedHeightFormatter().format( row.getMeanBedHeight( ) ) );
+    	lines.add( getMeanBedHeighFormatter().format( row.getMeanBedHeight( ) ) );
     	
     	// Peilung/Epoche
     	lines.add( row.getSoundageLabel() );
@@ -394,52 +383,50 @@
 
 	private void addJRMetaData(final MetaAndTableJRDataSource source, FlowDepthCalculationResults results) {
 
-		// Workflow zur Berechnung der Fließtiefe.pdf
-        // "##ERGEBNISAUSGABE - Name des Gewässers - Fließtiefe"
-        // writeCSVMeataEntry(writer, CSV_META_HEADER_RESULT, inputData.getRiver() );
-        
-        // FIXME
-        final String flysVersion = "unbekannt";
-        // CSV_META_VERSION
-        source.addMetaData("version", flysVersion);
+	    final River river = results.getRiver();
+	    final String wstUnitName = river.getWstUnit().getName();
 
-        // FIXME
-        String user = "unbekannt";
-        // CSV_META_USER
-        source.addMetaData("user", user);
+	    /* general metadata */
+	    source.addMetaData("header", msg(CSV_META_HEADER_RESULT_LABEL));
+	    source.addMetaData("calcMode", results.getCalcModeLabel());
+
+	    source.addMetaData("version_label", msg(CSV_META_VERSION_LABEL));
+        source.addMetaData("version", FLYS.VERSION);
+
+        source.addMetaData("user_label", msg(CSV_META_USER_LABEL));
+        source.addMetaData("user", results.getUser());
         
         final Locale locale = Resources.getLocale(context.getMeta());
         final DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT, locale);
+        source.addMetaData("date_label", msg(CSV_META_CREATION_LABEL));
         source.addMetaData("date", df.format(new Date()));
 
-        // CSV_META_RIVER
-        source.addMetaData("river", results.getRiver().getName());
+        source.addMetaData("river_label", msg(CSV_META_RIVER_LABEL) );
+        source.addMetaData("river", river.getName());
 
-        // FIXME
-        source.addMetaData("range", "FIXME");
-        // "# Ort/Bereich (km): "
-        // FIXME
-        // TODO: unklar, es wird nur ein Bereich eingegeben
-//        RangeAccess rangeAccess = new RangeAccess(flys);
-//        double[] kms = rangeAccess.getKmRange();
-//        writer.writeNext(new String[] {
-//        		Resources.getMsg(
-//        				meta,
-//        				CSV_META_RANGE,
-//        				CSV_META_RANGE,
-//        				new Object[] { kms[0], kms[kms.length-1] })
-//        });
+        final String rangeValue = String.format( "%s - %s", getKmFormatter().format(results.getFrom() ), getKmFormatter().format( results.getTo()));
+        source.addMetaData("range_label", msg(CSV_META_RANGE_LABEL));
+        source.addMetaData("range", rangeValue);
 
-//        RangeAccess rangeAccess = new RangeAccess(flys);
-//        double[] kms = rangeAccess.getKmRange();
-//        source.addMetaData("range",
-//                kmf.format(kms[0]) + " - " + kmf.format(kms[kms.length-1]));
+        /* column headings */
+        source.addMetaData("station_header", msg(CSV_KM_HEADER));
+        source.addMetaData("flowdepth_header", msg(CSV_FLOWDEPTH_HEADER));
+        source.addMetaData("flowdepth_tkh_header", msg(CSV_FLOWDEPTHTKH_HEADER));
+        source.addMetaData("tkh_header", msg(CSV_TKH_HEADER));
+        source.addMetaData("waterlevel_header", msg(CSV_WATERLEVEL_HEADER));
+        source.addMetaData("river_unit", wstUnitName);
+        source.addMetaData("discharge_header", msg(CSV_DISCHARGE_HEADER));
+        source.addMetaData("waterlevel_name_header", msg(CSV_LABEL_HEADER));
+        source.addMetaData("gauge_header", msg(CSV_GAUGE_HEADER));
+        source.addMetaData("bedheight_header", msg(CSV_MEAN_BED_HEIGHT_HEADER_SHORT));
+        source.addMetaData("sounding_name_header", msg(CSV_SOUNDING_HEADER));
+        source.addMetaData("location_header", msg(CSV_LOCATION_HEADER));
     }
 
     private void addJRTableData(final MetaAndTableJRDataSource source, final FlowDepthCalculationResult result, final boolean useTkh) {
     	
     	final Collection<FlowDepthRow> rows = result.getRows();
-    	
+
     	for (final FlowDepthRow row : rows) {
     		
     		final String[] formattedRow = formatFlowDepthRow(row, useTkh);
--- a/artifacts/src/main/resources/messages.properties	Fri Jan 19 18:47:18 2018 +0100
+++ b/artifacts/src/main/resources/messages.properties	Fri Jan 19 18:47:53 2018 +0100
@@ -789,30 +789,36 @@
 useTransportBodies.active = Activ
 useTransportBodies.inactive = Inactiv
 
-sinfo.export.flow_depth.csv.meta.header.result = ## Calculation Output - {0} - Flie\u00dftiefe - FLYS 3
-sinfo.export.flow_depth.csv.meta.version = # FLYS-Version: {0}
-sinfo.export.flow_depth.csv.meta.user = # Bearbeiter: {0}
-sinfo.export.flow_depth.csv.meta.creation = # Time of creation: {0}
-sinfo.export.flow_depth.csv.meta.river = # River: {0}
+sinfo.export.flow_depth.csv.meta.header.result = ## {0} - {1} - {2}
+sinfo.export.flow_depth.csv.meta.header.result.label = Calculation Output
+sinfo.export.flow_depth.csv.meta.version = # {0}: {1}
+sinfo.export.flow_depth.csv.meta.version.label = FLYS-Version
+sinfo.export.flow_depth.csv.meta.user = # {0}: {1}
+sinfo.export.flow_depth.csv.meta.user.label = Bearbeiter
+sinfo.export.flow_depth.csv.meta.creation = # {0}: {1}
+sinfo.export.flow_depth.csv.meta.creation.label = Time of creation
+sinfo.export.flow_depth.csv.meta.river = # {0}: {1}
+sinfo.export.flow_depth.csv.meta.river.label = Gew\u00e4sser
 sinfo.export.flow_depth.csv.meta.header.sounding = ##METADATEN PEILUNG
 sinfo.export.flow_depth.csv.meta.header.waterlevel = ##METADATEN WASSERSPIEGELLAGE
+sinfo.export.flow_depth.csv.meta.range = # {0}: {1} - {2}
+sinfo.export.flow_depth.csv.meta.range.label = Range (km)
+sinfo.export.flow_depth.csv.meta.height_unit.river = # H\u00f6henbezugssystem des Flusses: {0} 
 
-#export.export.flow_depth.csv.meta.range = # Location/Range (km): {0} - {1}
 #export.export.flow_depth.csv.meta.gauge = # Gauge: {0}
 #export.export.flow_depth.csv.meta.q = # Q (m\u00b3/s): {0}
 #export.export.flow_depth.csv.meta.w = # W (NN + m): {0} - {1}
 
 sinfo.export.flow_depth.csv.header.km = Fluss-km
-sinfo.export.flow_depth.csv.header.flowdepth = Flie\u00dftiefe [m]
-sinfo.export.flow_depth.csv.header.flowdepthTkh = Flie\u00dftiefe mit TKH [m]
-sinfo.export.flow_depth.csv.header.tkh = Flie\u00dftiefe mit TKH [cm]
-# FIXME: H\u00f6henbezugssystem?
-sinfo.export.flow_depth.csv.header.waterlevel = Wasserstand [NN+m]
-sinfo.export.flow_depth.csv.header.discharge = Q [m\u00b3/s]
+sinfo.export.flow_depth.csv.header.flowdepth = Flie\u00dftiefe
+sinfo.export.flow_depth.csv.header.flowdepthTkh = Flie\u00dftiefe mit TKH
+sinfo.export.flow_depth.csv.header.tkh = TKH
+sinfo.export.flow_depth.csv.header.waterlevel = Wasserstand
+sinfo.export.flow_depth.csv.header.discharge = Q
 sinfo.export.flow_depth.csv.header.label = Bezeichnung
 sinfo.export.flow_depth.csv.header.gauge = Bezugspegel
-# FIXME: H\u00f6henbezugssystem?
-sinfo.export.flow_depth.csv.header.mean_bed_height = Mittlere Sohlh\u00f6he [NN+m]
+sinfo.export.flow_depth.csv.header.mean_bed_height = Mittlere Sohlh\u00f6he
+sinfo.export.flow_depth.csv.header.mean_bed_height.short = Mittlere Sohl-
 sinfo.export.flow_depth.csv.header.sounding = Peilung/Epoche
 sinfo.export.flow_depth.csv.header.location = Lage
 
--- a/artifacts/src/main/resources/messages_de.properties	Fri Jan 19 18:47:18 2018 +0100
+++ b/artifacts/src/main/resources/messages_de.properties	Fri Jan 19 18:47:53 2018 +0100
@@ -795,30 +795,38 @@
 useTransportBodies.active = Aktiv
 useTransportBodies.inactive = Inaktiv
 
-sinfo.export.flow_depth.csv.meta.header.result = ## Ergebnisausgabe - {0} - Flie\u00dftiefe - FLYS 3
-sinfo.export.flow_depth.csv.meta.version = # FLYS-Version: {0}
-sinfo.export.flow_depth.csv.meta.user = # Bearbeiter: {0}
-sinfo.export.flow_depth.csv.meta.creation = # Datum der Erstellung: {0}
-sinfo.export.flow_depth.csv.meta.river = # Gew\u00e4sser: {0}
+sinfo.export.flow_depth.csv.meta.header.result = ## {0} - {1} - {2}
+sinfo.export.flow_depth.csv.meta.header.result.label = Ergebnisausgabe
+sinfo.export.flow_depth.csv.meta.version = # {0}: {1}
+sinfo.export.flow_depth.csv.meta.version.label = FLYS-Version
+sinfo.export.flow_depth.csv.meta.user = # {0}: {1}
+sinfo.export.flow_depth.csv.meta.user.label = Bearbeiter
+sinfo.export.flow_depth.csv.meta.creation = # {0}: {1}
+sinfo.export.flow_depth.csv.meta.creation.label = Datum der Erstellung
+sinfo.export.flow_depth.csv.meta.river = # {0}: {1}
+sinfo.export.flow_depth.csv.meta.river.label = Gew\u00e4sser
 sinfo.export.flow_depth.csv.meta.header.sounding = ##METADATEN PEILUNG
 sinfo.export.flow_depth.csv.meta.header.waterlevel = ##METADATEN WASSERSPIEGELLAGE
+sinfo.export.flow_depth.csv.meta.range = # {0}: {1} - {2}
+sinfo.export.flow_depth.csv.meta.range.label = Bereich (km)
+sinfo.export.flow_depth.csv.meta.height_unit.river = # H\u00f6henbezugssystem des Flusses: {0} 
 
 #export.export.flow_depth.csv.meta.range = # Location/Range (km): {0} - {1}
+export.waterlevel.csv.meta.range = # Ort/Bereich (km): {0} - {1}
 #export.export.flow_depth.csv.meta.gauge = # Gauge: {0}
 #export.export.flow_depth.csv.meta.q = # Q (m\u00b3/s): {0}
 #export.export.flow_depth.csv.meta.w = # W (NN + m): {0} - {1}
 
 sinfo.export.flow_depth.csv.header.km = Fluss-km
-sinfo.export.flow_depth.csv.header.flowdepth = Flie\u00dftiefe [m]
-sinfo.export.flow_depth.csv.header.flowdepthTkh = Flie\u00dftiefe mit TKH [m]
-sinfo.export.flow_depth.csv.header.tkh = Flie\u00dftiefe mit TKH [cm]
-# FIXME: H\u00f6henbezugssystem?
-sinfo.export.flow_depth.csv.header.waterlevel = Wasserstand [NN+m]
-sinfo.export.flow_depth.csv.header.discharge = Q [m\u00b3/s]
+sinfo.export.flow_depth.csv.header.flowdepth = Flie\u00dftiefe
+sinfo.export.flow_depth.csv.header.flowdepthTkh = Flie\u00dftiefe mit TKH
+sinfo.export.flow_depth.csv.header.tkh = TKH
+sinfo.export.flow_depth.csv.header.waterlevel = Wasserstand
+sinfo.export.flow_depth.csv.header.discharge = Q
 sinfo.export.flow_depth.csv.header.label = Bezeichnung
 sinfo.export.flow_depth.csv.header.gauge = Bezugspegel
-# FIXME: H\u00f6henbezugssystem?
-sinfo.export.flow_depth.csv.header.mean_bed_height = Mittlere Sohlh\u00f6he [NN+m]
+sinfo.export.flow_depth.csv.header.mean_bed_height = Mittlere Sohlh\u00f6he
+sinfo.export.flow_depth.csv.header.mean_bed_height.short = Mittlere Sohl-
 sinfo.export.flow_depth.csv.header.sounding = Peilung/Epoche
 sinfo.export.flow_depth.csv.header.location = Lage
 
--- a/artifacts/src/main/resources/messages_de_DE.properties	Fri Jan 19 18:47:18 2018 +0100
+++ b/artifacts/src/main/resources/messages_de_DE.properties	Fri Jan 19 18:47:53 2018 +0100
@@ -791,30 +791,36 @@
 useTransportBodies.active = Aktiv
 useTransportBodies.inactive = Inaktiv
 
-sinfo.export.flow_depth.csv.meta.header.result = ## Ergebnisausgabe - {0} - Flie\u00dftiefe - FLYS 3
-sinfo.export.flow_depth.csv.meta.version = # FLYS-Version: {0}
-sinfo.export.flow_depth.csv.meta.user = # Bearbeiter: {0}
-sinfo.export.flow_depth.csv.meta.creation = # Datum der Erstellung: {0}
-sinfo.export.flow_depth.csv.meta.river = # Gew\u00e4sser: {0}
+sinfo.export.flow_depth.csv.meta.header.result = ## {0} - {1} - {2}
+sinfo.export.flow_depth.csv.meta.header.result.label = Ergebnisausgabe
+sinfo.export.flow_depth.csv.meta.version = # {0}: {1}
+sinfo.export.flow_depth.csv.meta.version.label = FLYS-Version
+sinfo.export.flow_depth.csv.meta.user = # {0}: {1}
+sinfo.export.flow_depth.csv.meta.user.label = Bearbeiter
+sinfo.export.flow_depth.csv.meta.creation = # {0}: {1}
+sinfo.export.flow_depth.csv.meta.creation.label = Datum der Erstellung
+sinfo.export.flow_depth.csv.meta.river = # {0}: {1}
+sinfo.export.flow_depth.csv.meta.river.label = Gew\u00e4sser
 sinfo.export.flow_depth.csv.meta.header.sounding = ##METADATEN PEILUNG
 sinfo.export.flow_depth.csv.meta.header.waterlevel = ##METADATEN WASSERSPIEGELLAGE
+sinfo.export.flow_depth.csv.meta.range = # {0}: {1} - {2}
+sinfo.export.flow_depth.csv.meta.range.label = Bereich (km)
+sinfo.export.flow_depth.csv.meta.height_unit.river = # H\u00f6henbezugssystem des Flusses: {0} 
 
-#export.export.flow_depth.csv.meta.range = # Location/Range (km): {0} - {1}
 #export.export.flow_depth.csv.meta.gauge = # Gauge: {0}
 #export.export.flow_depth.csv.meta.q = # Q (m\u00b3/s): {0}
 #export.export.flow_depth.csv.meta.w = # W (NN + m): {0} - {1}
 
 sinfo.export.flow_depth.csv.header.km = Fluss-km
-sinfo.export.flow_depth.csv.header.flowdepth = Flie\u00dftiefe [m]
-sinfo.export.flow_depth.csv.header.flowdepthTkh = Flie\u00dftiefe mit TKH [m]
-sinfo.export.flow_depth.csv.header.tkh = Flie\u00dftiefe mit TKH [cm]
-# FIXME: H\u00f6henbezugssystem?
-sinfo.export.flow_depth.csv.header.waterlevel = Wasserstand [NN+m]
-sinfo.export.flow_depth.csv.header.discharge = Q [m\u00b3/s]
+sinfo.export.flow_depth.csv.header.flowdepth = Flie\u00dftiefe
+sinfo.export.flow_depth.csv.header.flowdepthTkh = Flie\u00dftiefe mit TKH
+sinfo.export.flow_depth.csv.header.tkh = TKH
+sinfo.export.flow_depth.csv.header.waterlevel = Wasserstand
+sinfo.export.flow_depth.csv.header.discharge = Q
 sinfo.export.flow_depth.csv.header.label = Bezeichnung
 sinfo.export.flow_depth.csv.header.gauge = Bezugspegel
-# FIXME: H\u00f6henbezugssystem?
-sinfo.export.flow_depth.csv.header.mean_bed_height = Mittlere Sohlh\u00f6he [NN+m]
+sinfo.export.flow_depth.csv.header.mean_bed_height = Mittlere Sohlh\u00f6he
+sinfo.export.flow_depth.csv.header.mean_bed_height.short = Mittlere Sohl-
 sinfo.export.flow_depth.csv.header.sounding = Peilung/Epoche
 sinfo.export.flow_depth.csv.header.location = Lage
 
--- a/artifacts/src/main/resources/messages_en.properties	Fri Jan 19 18:47:18 2018 +0100
+++ b/artifacts/src/main/resources/messages_en.properties	Fri Jan 19 18:47:53 2018 +0100
@@ -790,30 +790,36 @@
 useTransportBodies.active = Activ
 useTransportBodies.inactive = Inactiv
 
-sinfo.export.flow_depth.csv.meta.header.result = ## Calculation Output - {0} - Flie\u00dftiefe - FLYS 3
-sinfo.export.flow_depth.csv.meta.version = # FLYS-Version: {0}
-sinfo.export.flow_depth.csv.meta.user = # Bearbeiter: {0}
-sinfo.export.flow_depth.csv.meta.creation = # Time of creation: {0}
-sinfo.export.flow_depth.csv.meta.river = # River: {0}
+sinfo.export.flow_depth.csv.meta.header.result = ## {0} - {1} - {2}
+sinfo.export.flow_depth.csv.meta.header.result.label = Calculation Output
+sinfo.export.flow_depth.csv.meta.version = # {0}: {1}
+sinfo.export.flow_depth.csv.meta.version.label = FLYS-Version
+sinfo.export.flow_depth.csv.meta.user = # {0}: {1}
+sinfo.export.flow_depth.csv.meta.user.label = Bearbeiter
+sinfo.export.flow_depth.csv.meta.creation = # {0}: {1}
+sinfo.export.flow_depth.csv.meta.creation.label = Time of creation
+sinfo.export.flow_depth.csv.meta.river = # {0}: {1}
+sinfo.export.flow_depth.csv.meta.river.label = Gew\u00e4sser
 sinfo.export.flow_depth.csv.meta.header.sounding = ##METADATEN PEILUNG
 sinfo.export.flow_depth.csv.meta.header.waterlevel = ##METADATEN WASSERSPIEGELLAGE
+sinfo.export.flow_depth.csv.meta.range = # {0}: {1} - {2}
+sinfo.export.flow_depth.csv.meta.range.label = Range (km)
+sinfo.export.flow_depth.csv.meta.height_unit.river = # H\u00f6henbezugssystem des Flusses: {0} 
 
-#export.export.flow_depth.csv.meta.range = # Location/Range (km): {0} - {1}
 #export.export.flow_depth.csv.meta.gauge = # Gauge: {0}
 #export.export.flow_depth.csv.meta.q = # Q (m\u00b3/s): {0}
 #export.export.flow_depth.csv.meta.w = # W (NN + m): {0} - {1}
 
 sinfo.export.flow_depth.csv.header.km = Fluss-km
-sinfo.export.flow_depth.csv.header.flowdepth = Flie\u00dftiefe [m]
-sinfo.export.flow_depth.csv.header.flowdepthTkh = Flie\u00dftiefe mit TKH [m]
-sinfo.export.flow_depth.csv.header.tkh = Flie\u00dftiefe mit TKH [cm]
-# FIXME: H\u00f6henbezugssystem?
-sinfo.export.flow_depth.csv.header.waterlevel = Wasserstand [NN+m]
-sinfo.export.flow_depth.csv.header.discharge = Q [m\u00b3/s]
+sinfo.export.flow_depth.csv.header.flowdepth = Flie\u00dftiefe
+sinfo.export.flow_depth.csv.header.flowdepthTkh = Flie\u00dftiefe mit TKH
+sinfo.export.flow_depth.csv.header.tkh = TKH
+sinfo.export.flow_depth.csv.header.waterlevel = Wasserstand
+sinfo.export.flow_depth.csv.header.discharge = Q
 sinfo.export.flow_depth.csv.header.label = Bezeichnung
 sinfo.export.flow_depth.csv.header.gauge = Bezugspegel
-# FIXME: H\u00f6henbezugssystem?
-sinfo.export.flow_depth.csv.header.mean_bed_height = Mittlere Sohlh\u00f6he [NN+m]
+sinfo.export.flow_depth.csv.header.mean_bed_height = Mittlere Sohlh\u00f6he
+sinfo.export.flow_depth.csv.header.mean_bed_height.short = Mittlere Sohl-
 sinfo.export.flow_depth.csv.header.sounding = Peilung/Epoche
 sinfo.export.flow_depth.csv.header.location = Lage
 

http://dive4elements.wald.intevation.org