changeset 6308:aa4c13220fa0

Use the river unit in csv export if not converted
author Andre Heinecke <aheinecke@intevation.de>
date Wed, 12 Jun 2013 16:59:46 +0200
parents b3777be2a768
children ebba1a795d76
files artifacts/src/main/java/org/dive4elements/river/exports/ComputedDischargeCurveExporter.java
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ComputedDischargeCurveExporter.java	Wed Jun 12 16:57:55 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/ComputedDischargeCurveExporter.java	Wed Jun 12 16:59:46 2013 +0200
@@ -176,8 +176,10 @@
 
         RangeAccess access = new RangeAccess((D4EArtifact)master);
         double[] km = access.getLocations();
+        // If we are not at gauge (cm) use the river unit
+        String realUnit = wUnit.equals("cm") ? "cm" : riverUnit;
         String header =
-            msg(CSV_W_HEADER, DEFAULT_CSV_W_HEADER, new Object[] { wUnit });
+            msg(CSV_W_HEADER, DEFAULT_CSV_W_HEADER, new Object[] {realUnit});
 
         writer.writeNext(new String[] {
             header,

http://dive4elements.wald.intevation.org