changeset 7704:a877d2680a4a

SQ relation: only take sieve which have values at all.
author Sascha L. Teichmann <teichmann@intevation.de>
date Tue, 17 Dec 2013 17:59:37 +0100
parents 5484818087de
children f1257717fa4b
files artifacts/src/main/java/org/dive4elements/river/artifacts/model/sq/Measurement.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/sq/MeasurementFactory.java
diffstat 2 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/sq/Measurement.java	Tue Dec 17 17:21:37 2013 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/sq/Measurement.java	Tue Dec 17 17:59:37 2013 +0100
@@ -190,8 +190,11 @@
         sieveArray.adjust(
             eightValue/sieveArray.totalLoad(),
             newFourValue/sieveArray.totalLoad());
-        log.debug("Adjusted loads: " + Arrays.toString(sieveArray.getLoads()));
-        log.debug("Adjusted norm loads:" + Arrays.toString(sieveArray.getNormLoads()));
+
+        if (log.isDebugEnabled()) {
+            log.debug("Adjusted loads: " + Arrays.toString(sieveArray.getLoads()));
+            log.debug("Adjusted norm loads:" + Arrays.toString(sieveArray.getNormLoads()));
+        }
     }
 
     protected SieveArray calculateSieveArray() {
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/sq/MeasurementFactory.java	Tue Dec 17 17:21:37 2013 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/sq/MeasurementFactory.java	Tue Dec 17 17:59:37 2013 +0100
@@ -116,7 +116,7 @@
                 "COALESCE(gs.RSIEB15, 0) + COALESCE(gs.RSIEB16, 0) +" +
                 "COALESCE(gs.RSIEB17, 0) + COALESCE(gs.RSIEB18, 0) +" +
                 "COALESCE(gs.RSIEB19, 0) + COALESCE(gs.RSIEB20, 0) +" +
-                "COALESCE(gs.RSIEB21, 0) + COALESCE(gs.REST, 0)) >= 0 " +
+                "COALESCE(gs.RSIEB21, 0) + COALESCE(gs.REST, 0)) > 0 " +
         "ORDER BY " +
             "m.DATUM, g.UFERABST, g.GLOTRECHTEID, gp.LFDNR";
 
@@ -154,7 +154,7 @@
             }
             rawWriter.writeNext(nextLine);
         }
-    }
+    } // class CSVTransformer
 
     public static class FractionsTransformer extends CSVTransformer {
 

http://dive4elements.wald.intevation.org