changeset 2703:aa4391648a05

Finalized the CSV export of MINFO flow velocity calculation. flys-artifacts/trunk@4419 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 16 May 2012 09:11:02 +0000
parents 4c00cf83fff1
children d930245c9956
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/exports/FlowVelocityExporter.java flys-artifacts/src/main/resources/messages.properties flys-artifacts/src/main/resources/messages_de.properties flys-artifacts/src/main/resources/messages_de_DE.properties flys-artifacts/src/main/resources/messages_en.properties
diffstat 6 files changed, 41 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Wed May 16 08:37:27 2012 +0000
+++ b/flys-artifacts/ChangeLog	Wed May 16 09:11:02 2012 +0000
@@ -1,3 +1,15 @@
+2012-05-16  Ingo Weinzierl <ingo@intevation.de>
+
+	* src/main/java/de/intevation/flys/exports/FlowVelocityExporter.java:
+	  Append the name of a location for the km row which is provided by
+	  FLYSUtils.getLocationDescription(km);
+
+	* src/main/resources/messages.properties,
+	  src/main/resources/messages_de_DE.properties,
+	  src/main/resources/messages_en.properties,
+	  src/main/resources/messages_de.properties: Added i18n strings for flow
+	  velocity CSV export headers.
+
 2012-05-16  Ingo Weinzierl <ingo@intevation.de>
 
 	* doc/conf/artifacts/minfo.xml: Added new state and csv export for MINFO flow
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/FlowVelocityExporter.java	Wed May 16 08:37:27 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/FlowVelocityExporter.java	Wed May 16 09:11:02 2012 +0000
@@ -13,8 +13,10 @@
 
 import de.intevation.artifacts.CallContext;
 
+import de.intevation.flys.artifacts.FLYSArtifact;
 import de.intevation.flys.artifacts.model.CalculationResult;
 import de.intevation.flys.artifacts.model.FlowVelocityData;
+import de.intevation.flys.utils.FLYSUtils;
 import de.intevation.flys.utils.Formatter;
 
 
@@ -96,6 +98,8 @@
     protected void data2CSV(CSVWriter writer, FlowVelocityData[] fData) {
         logger.debug("Add next FlowVelocityData to CSV");
 
+        FLYSArtifact flys = (FLYSArtifact) master;
+
         for (FlowVelocityData data: fData) {
             for (int i = 0, n = data.size(); i < n; i++) {
                 NumberFormat kmF  = Formatter.getFlowVelocityKM(context);
@@ -108,7 +112,7 @@
                     valF.format(data.getVTotal(i)),
                     valF.format(data.getTauMain(i)),
                     qF.format(data.getQ(i)) + "=" + data.getZone(),
-                    "TODO: add Location for km"// TODO Add Locations
+                    FLYSUtils.getLocationDescription(flys, data.getKM(i)),
                 });
             }
         }
--- a/flys-artifacts/src/main/resources/messages.properties	Wed May 16 08:37:27 2012 +0000
+++ b/flys-artifacts/src/main/resources/messages.properties	Wed May 16 09:11:02 2012 +0000
@@ -173,6 +173,12 @@
 export.reference_curve.pdf.file.gauge = /jasper/reference_en_gauge.jasper
 export.reference_curve.pdf.file.gauge.end = /jasper/reference_en_gauge_end.jasper
 export.reference_curve.pdf.file.gauge.start.end = /jasper/reference_en_gauge_start_end.jasper
+export.flow_velocity.csv.header.km = River Km
+export.flow_velocity.csv.header.v_total = v Total Channel
+export.flow_velocity.csv.header.v_main = v Main Channel
+export.flow_velocity.csv.header.tau_main = TAU Main Channel
+export.flow_velocity.csv.header.q = Q [m\u00b3/s]
+export.flow_velocity.csv.header.locations = Location
 
 floodmap.wmsbackground = Background Map
 floodmap.riveraxis = River Axis
--- a/flys-artifacts/src/main/resources/messages_de.properties	Wed May 16 08:37:27 2012 +0000
+++ b/flys-artifacts/src/main/resources/messages_de.properties	Wed May 16 09:11:02 2012 +0000
@@ -173,6 +173,12 @@
 export.reference_curve.pdf.file.gauge = /jasper/reference_gauge.jasper
 export.reference_curve.pdf.file.gauge.end = /jasper/reference_gauge_end.jasper
 export.reference_curve.pdf.file.gauge.start.end = /jasper/reference_gauge_start_end.jasper
+export.flow_velocity.csv.header.km = Fluss-Km
+export.flow_velocity.csv.header.v_total = v Gesamtgerinne
+export.flow_velocity.csv.header.v_main = v Hauptgerinne
+export.flow_velocity.csv.header.tau_main = TAU Hauptgerinne
+export.flow_velocity.csv.header.q = Q [m\u00b3/s]
+export.flow_velocity.csv.header.locations = Streckendaten
 
 floodmap.wmsbackground = Hintergrundkarte
 floodmap.riveraxis = Flussachse
--- a/flys-artifacts/src/main/resources/messages_de_DE.properties	Wed May 16 08:37:27 2012 +0000
+++ b/flys-artifacts/src/main/resources/messages_de_DE.properties	Wed May 16 09:11:02 2012 +0000
@@ -170,6 +170,12 @@
 export.reference_curve.pdf.file.gauge = /jasper/reference_gauge.jasper
 export.reference_curve.pdf.file.gauge.end = /jasper/reference_gauge_end.jasper
 export.reference_curve.pdf.file.gauge.start.end = /jasper/reference_gauge_start_end.jasper
+export.flow_velocity.csv.header.km = Fluss-Km
+export.flow_velocity.csv.header.v_total = v Gesamtgerinne
+export.flow_velocity.csv.header.v_main = v Hauptgerinne
+export.flow_velocity.csv.header.tau_main = TAU Hauptgerinne
+export.flow_velocity.csv.header.q = Q [m\u00b3/s]
+export.flow_velocity.csv.header.locations = Streckendaten
 
 floodmap.wmsbackground = Hintergrundkarte
 floodmap.riveraxis = Flussachse
--- a/flys-artifacts/src/main/resources/messages_en.properties	Wed May 16 08:37:27 2012 +0000
+++ b/flys-artifacts/src/main/resources/messages_en.properties	Wed May 16 09:11:02 2012 +0000
@@ -172,6 +172,12 @@
 export.reference_curve.pdf.file.gauge = /jasper/reference_en_gauge.jasper
 export.reference_curve.pdf.file.gauge.end = /jasper/reference_en_gauge_end.jasper
 export.reference_curve.pdf.file.gauge.start.end = /jasper/reference_en_gauge_start_end.jasper
+export.flow_velocity.csv.header.km = River Km
+export.flow_velocity.csv.header.v_total = v Total Channel
+export.flow_velocity.csv.header.v_main = v Main Channel
+export.flow_velocity.csv.header.tau_main = TAU Main Channel
+export.flow_velocity.csv.header.q = Q [m\u00b3/s]
+export.flow_velocity.csv.header.locations = Location
 
 floodmap.wmsbackground = Background Map
 floodmap.riveraxis = River Axis

http://dive4elements.wald.intevation.org