changeset 2685:5652a851f1b4

Fix water-through-mountain in cross sections. flys-artifacts/trunk@4386 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Fri, 11 May 2012 07:08:56 +0000
parents 14188f8daefb
children 6fda6ec9e426
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/exports/ComputedDischargeCurveGenerator.java flys-artifacts/src/main/java/de/intevation/flys/exports/CrossSectionGenerator.java flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java
diffstat 4 files changed, 20 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Thu May 10 11:56:40 2012 +0000
+++ b/flys-artifacts/ChangeLog	Fri May 11 07:08:56 2012 +0000
@@ -1,3 +1,16 @@
+2012-05-11  Felix Wolfsteller <felix.wolfsteller@intevation.de>
+
+	Tackle water-through-mountain issue that exists since r4099.
+
+	* src/main/java/de/intevation/flys/exports/StyledSeriesBuilder.java 
+	  (addPoints): Add parameter that decides whether or not to skip NaNs.
+
+	* src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java,
+	  src/main/java/de/intevation/flys/exports/CrossSectionGenerator.java,
+	  src/main/java/de/intevation/flys/exports/ComputedDischargeCurveGenerator.java:
+	  Set new parameter to StyledSeriesBuilder.addPoints calls.
+	  For waterlines it is important that NaNs stay included!
+
 2012-05-10  Ingo Weinzierl <ingo@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/WMSGaugeLocationArtifact.java:
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/ComputedDischargeCurveGenerator.java	Thu May 10 11:56:40 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/ComputedDischargeCurveGenerator.java	Fri May 11 07:08:56 2012 +0000
@@ -161,7 +161,7 @@
         double [][] data = (double [][]) wqkms;
 
         XYSeries series = new StyledXYSeries(aaf.getFacetDescription(), theme);
-        StyledSeriesBuilder.addPoints(series, data);
+        StyledSeriesBuilder.addPoints(series, data, true);
 
         addAxisSeries(series, YAXIS.W.idx, visible);
     }
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/CrossSectionGenerator.java	Thu May 10 11:56:40 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/CrossSectionGenerator.java	Fri May 11 07:08:56 2012 +0000
@@ -243,7 +243,7 @@
         // TODO Missing: "mittlere hoehe" (and area but this geos to
         //                                 the area theme).
         
-        StyledSeriesBuilder.addPoints(series, lines.points);
+        StyledSeriesBuilder.addPoints(series, lines.points, false);
 
         addAxisSeries(series, 0, visible);
     }
@@ -285,7 +285,7 @@
 
         XYSeries series = new StyledXYSeries(seriesName, theme);
 
-        StyledSeriesBuilder.addPoints(series, (double [][]) o);
+        StyledSeriesBuilder.addPoints(series, (double [][]) o, false);
 
         addAxisSeries(series, 0, visible);
     }
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java	Thu May 10 11:56:40 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java	Fri May 11 07:08:56 2012 +0000
@@ -594,13 +594,13 @@
                 }
             }
             else if (data.getUpperData() instanceof double[][]) {
-                StyledSeriesBuilder.addPoints(up, (double [][]) data.getUpperData());
+                StyledSeriesBuilder.addPoints(up, (double [][]) data.getUpperData(), false);
             }
             else if (data.getUpperData() instanceof WKms) {
                 StyledSeriesBuilder.addPoints(up, (WKms) data.getUpperData());
             }
             else if (data.getUpperData() instanceof Lines.LineData) {
-                StyledSeriesBuilder.addPoints(up, ((Lines.LineData) data.getUpperData()).points);
+                StyledSeriesBuilder.addPoints(up, ((Lines.LineData) data.getUpperData()).points, false);
             }
             else {
                 logger.error("Do not know how to deal with (up) area info from: "
@@ -623,13 +623,13 @@
                 }
             }
             else if (data.getLowerData() instanceof double[][]) {
-                StyledSeriesBuilder.addPoints(down, (double[][]) data.getLowerData());
+                StyledSeriesBuilder.addPoints(down, (double[][]) data.getLowerData(), false);
             }
             else if (data.getLowerData() instanceof WKms) {
                 StyledSeriesBuilder.addPoints(down, (WKms) data.getLowerData());
             }
             else if (data.getLowerData() instanceof Lines.LineData) {
-                StyledSeriesBuilder.addPoints(down, ((Lines.LineData) data.getLowerData()).points);
+                StyledSeriesBuilder.addPoints(down, ((Lines.LineData) data.getLowerData()).points, false);
             }
             else {
                 logger.error("Do not know how to deal with (down) area info from: "

http://dive4elements.wald.intevation.org