diff gnv-artifacts/src/main/java/de/intevation/gnv/statistics/TimeseriesStatistics.java @ 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 13402ac8d8fe
children 156db25ad4b4
line wrap: on
line diff
--- 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