diff flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/FlowVelocityData.java @ 2706:d8444fcb4e44

Create chart facets for flow velocity calculation and a chart generator for this. flys-artifacts/trunk@4424 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 16 May 2012 12:39:13 +0000
parents 4c00cf83fff1
children 4bd3d8bbb60c
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/FlowVelocityData.java	Wed May 16 10:52:12 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/FlowVelocityData.java	Wed May 16 12:39:13 2012 +0000
@@ -75,4 +75,40 @@
     public int size() {
         return km.size();
     }
+
+
+    public double[][] getMainChannelPoints() {
+        double[][] points = new double[2][size()];
+
+        for (int i = 0, n = size(); i < n; i++) {
+            points[0][i] = getKM(i);
+            points[1][i] = getVMain(i);
+        }
+
+        return points;
+    }
+
+
+    public double[][] getTotalChannelPoints() {
+        double[][] points = new double[2][size()];
+
+        for (int i = 0, n = size(); i < n; i++) {
+            points[0][i] = getKM(i);
+            points[1][i] = getVTotal(i);
+        }
+
+        return points;
+    }
+
+
+    public double[][] getTauPoints() {
+        double[][] points = new double[2][size()];
+
+        for (int i = 0, n = size(); i < n; i++) {
+            points[0][i] = getKM(i);
+            points[1][i] = getTauMain(i);
+        }
+
+        return points;
+    }
 }

http://dive4elements.wald.intevation.org