diff flys-artifacts/src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java @ 2733:ac9a03ed32c1

More debugging of discharge-curve issue. flys-artifacts/trunk@4466 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Tue, 22 May 2012 19:51:05 +0000
parents f53173a8736b
children 832f7bd45f9e
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java	Tue May 22 19:42:54 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java	Tue May 22 19:51:05 2012 +0000
@@ -71,6 +71,7 @@
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 
+
 /**
  * The default WINFO artifact.
  *
@@ -475,58 +476,6 @@
 
 
     /**
-     * Returns the data that is used to create discharge curves.
-     *
-     */
-    public CalculationResult getDischargeCurveData() {
-
-        River river = FLYSUtils.getRiver(this);
-        if (river == null) {
-            return error(new WQKms[0], "no.river.selected");
-        }
-
-        double [] distance = FLYSUtils.getKmRange(this);
-
-        if (distance == null) {
-            return error(new WQKms[0], "no.range.found");
-        }
-
-        List<Gauge> gauges = river.determineGauges(distance[0], distance[1]);
-
-        if (gauges.isEmpty()) {
-            return error(new WQKms[0], "no.gauge.selected");
-        }
-
-        String [] names = new String[gauges.size()];
-
-        for (int i = 0; i < names.length; ++i) {
-            names[i] = gauges.get(i).getName();
-        }
-
-        DischargeTables dt = new DischargeTables(river.getName(), names);
-
-        Map<String, double [][]> map = dt.getValues(100d);
-
-        ArrayList<WQKms> res = new ArrayList<WQKms>();
-
-        for (Gauge gauge: gauges) {
-            String name = gauge.getName();
-            double [][] values = map.get(name);
-            if (values == null) {
-                continue;
-            }
-            double [] kms = new double[values[0].length];
-            Arrays.fill(kms, gauge.getStation().doubleValue());
-            res.add(new WQKms(kms, values[0], values[1], name));
-        }
-
-        return new CalculationResult(
-            res.toArray(new WQKms[res.size()]),
-            new Calculation());
-    }
-
-
-    /**
      * Returns the data that is computed by a discharge curve computation.
      *
      * @return the data computed by a discharge curve computation.

http://dive4elements.wald.intevation.org