changeset 1901:da52932f3bc1

Handle interpolated WQ data in Computed Discharge Curve Diagram. flys-artifacts/trunk@3261 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 16 Nov 2011 09:21:34 +0000
parents 64ffc371afe7
children 6c5229d0b8e5
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/exports/ComputedDischargeCurveGenerator.java
diffstat 2 files changed, 23 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Wed Nov 16 09:15:25 2011 +0000
+++ b/flys-artifacts/ChangeLog	Wed Nov 16 09:21:34 2011 +0000
@@ -1,3 +1,8 @@
+2011-11-16  Felix Wolfsteller <felix.wolfsteller@intevation.de>
+
+	* src/main/java/de/intevation/flys/exports/ComputedDischargeCurveGenerator.java:
+	  Handle interpolated WQ data.
+
 2011-11-16  Felix Wolfsteller <felix.wolfsteller@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/StaticWQKmsArtifact.java:
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/ComputedDischargeCurveGenerator.java	Wed Nov 16 09:15:25 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/ComputedDischargeCurveGenerator.java	Wed Nov 16 09:21:34 2011 +0000
@@ -101,6 +101,9 @@
         if (name.equals(COMPUTED_DISCHARGE_Q)) {
             doQOut((WQKms) f.getData(artifact, context), facet, attr, visible);
         }
+        else if (name.equals(STATIC_WQ)) {
+            doWQOut(f.getData(artifact, context), facet, attr, visible);
+        }
         else if (name.equals(COMPUTED_DISCHARGE_MAINVALUES_Q)
                 || name.equals(MAINVALUES_Q)
                 || name.equals(COMPUTED_DISCHARGE_MAINVALUES_W)
@@ -115,6 +118,21 @@
         }
     }
 
+    /**
+     * Add WQ Data to plot.
+     */
+    protected void doWQOut(
+        Object    wqkms,
+        Facet    facet,
+        Document theme,
+        boolean  visible
+    ) {
+        double [][] data = (double [][]) wqkms;
+
+        XYSeries series = new StyledXYSeries(facet.getDescription(), theme);
+        StyledSeriesBuilder.addPoints(series, data);
+        addFirstAxisSeries(series, visible);
+    }
 
     /**
      * Add Q-Series to plot.

http://dive4elements.wald.intevation.org