[PATCH 8 of 9] issue1579: ComputedDischargeCurveGenerator: Handle WQKms data

Wald Commits scm-commit at wald.intevation.org
Mon Dec 2 10:14:57 CET 2013


# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1385974595 -3600
# Node ID b64c263df4d1a5f0f0a741b6d482cecaf730a1f7
# Parent  c9b82ffbb7dcb62baaf8aafc1540596d4be80748
issue1579: ComputedDischargeCurveGenerator: Handle WQKms data.

diff -r c9b82ffbb7dc -r b64c263df4d1 artifacts/src/main/java/org/dive4elements/river/exports/ComputedDischargeCurveGenerator.java
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ComputedDischargeCurveGenerator.java	Mon Dec 02 09:55:14 2013 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/ComputedDischargeCurveGenerator.java	Mon Dec 02 09:56:35 2013 +0100
@@ -216,10 +216,14 @@
         boolean          visible
     ) {
         logger.debug("ComputedDischargeCurveGenerator: doWQOut");
-        double [][] data = (double [][]) wq;
-
         XYSeries series = new StyledXYSeries(aaf.getFacetDescription(), theme);
-        StyledSeriesBuilder.addPoints(series, data, true);
+        if (wq instanceof double[][]) {
+            double [][] data = (double [][]) wq;
+            StyledSeriesBuilder.addPoints(series, data, true);
+        } else if (wq instanceof WQKms) {
+            WQKms wqkms = (WQKms) wq;
+            StyledSeriesBuilder.addPointsQW(series, (WQKms) wq);
+        }
 
         addAxisSeries(series, YAXIS.W.idx, visible);
     }


More information about the Dive4elements-commits mailing list