changeset 97:fce237b6fdb8

Bug fixed. Now all Values will be used to calculate the Statistics gnv-artifacts/trunk@143 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Mon, 28 Sep 2009 09:53:17 +0000
parents 4241af6ae374
children 156db25ad4b4
files gnv-artifacts/Changelog gnv-artifacts/src/main/java/de/intevation/gnv/statistics/TimeseriesStatistics.java
diffstat 2 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/gnv-artifacts/Changelog	Mon Sep 28 08:23:40 2009 +0000
+++ b/gnv-artifacts/Changelog	Mon Sep 28 09:53:17 2009 +0000
@@ -1,3 +1,8 @@
+2009-09-28  Tim Englich  <tim.englich@intevation.de>
+
+    * src/main/java/de/intevation/gnv/statistics/TimeseriesStatistics.java (calculateStatistics) Edited:
+      Bug fixed. Now all Values will be used to calculate the Statistics
+      
 2009-09-28  Tim Englich  <tim.englich@intevation.de>
 
     * src/test/ressources/conf.xml Edited :
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/statistics/TimeseriesStatistics.java	Mon Sep 28 08:23:40 2009 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/statistics/TimeseriesStatistics.java	Mon Sep 28 09:53:17 2009 +0000
@@ -61,7 +61,6 @@
         statistics = new ArrayList<Statistic>();
         int break1, break2;
         int lSeries = 1;
-        if (sDebug) log.debug("TimeseriesStatistics() lImageFile != null");
         try{
             
             Iterator<Result> resultIterator = resultSet.iterator();
@@ -75,26 +74,26 @@
                 
                 if (break1 != row.getInteger("GROUP1")
                         || break2 != row.getInteger("GROUP2")) {
-
                     addStatisticsValues(lStatistics, lRegression, lSeries);
                     
                     lStatistics.clear();
                     lRegression.clear();
                     
-                    row = resultIterator.next();
                     lStatistics.addValue(row.getDouble("YORDINATE"));
                     Double x = new Double( (row.getDate("XORDINATE")).getTime()/1000/3600) ;
                     lRegression.addData(x ,row.getDouble("YORDINATE"));
                     
                     break1 = row.getInteger("GROUP1");
                     break2 = row.getInteger("GROUP2");
+                    row = resultIterator.next();
                     lSeries ++;     
                 }
                 else{
-                    row = resultIterator.next();
+                    
                     lStatistics.addValue(row.getDouble("YORDINATE"));
                     Double x = new Double( (row.getDate("XORDINATE")).getTime()/1000/3600) ;
                     lRegression.addData(x,row.getDouble("YORDINATE"));
+                    row = resultIterator.next();
                 }
                 
             }

http://dive4elements.wald.intevation.org