# HG changeset patch # User Andre Heinecke # Date 1371049186 -7200 # Node ID aa4c13220fa09e7a67dbef7231a205eca419ea4f # Parent b3777be2a76820429979df7fd079d960e04618df Use the river unit in csv export if not converted diff -r b3777be2a768 -r aa4c13220fa0 artifacts/src/main/java/org/dive4elements/river/exports/ComputedDischargeCurveExporter.java --- 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,