diff flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/Calculation1.java @ 738:5abdb2fa8eb1

Fix for flys/issue147 flys-artifacts/trunk@2234 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Sun, 26 Jun 2011 14:46:48 +0000
parents 3b7e9ddf6bb1
children c09c9e05ecfa
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/Calculation1.java	Sun Jun 26 13:07:44 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/Calculation1.java	Sun Jun 26 14:46:48 2011 +0000
@@ -12,7 +12,6 @@
     protected double [] kms;
     protected double [] qs;
     protected double [] ws;
-    protected boolean   up;
     protected double    refKm;
 
     public Calculation1() {
@@ -22,24 +21,18 @@
         double [] kms, 
         double [] qs, 
         double [] ws,
-        double    refKm,
-        boolean   up
+        double    refKm
     ) {
         this.kms   = kms;
         this.qs    = qs;
         this.ws    = ws;
         this.refKm = refKm;
-        this.up    = up;
     }
 
     public CalculationResult calculate(WstValueTable wst) {
 
         ArrayList<WQKms> results = new ArrayList<WQKms>();
 
-        double ref = Double.isNaN(refKm)
-            ? kms[up ? 0 : kms.length-1]
-            : refKm;
-
         String    prefix;
         double [] origData;
 
@@ -54,7 +47,7 @@
             double [] ows = new double[kms.length];
 
             boolean success =
-                wst.interpolate(qs[i], ref, kms, ows, oqs, this) != null;
+                wst.interpolate(qs[i], refKm, kms, ows, oqs, this) != null;
 
             int newNumProblems = numProblems();
 

http://dive4elements.wald.intevation.org