changeset 643:24a85678bd39

Added some more debug information while gap detection. gnv-artifacts/trunk@729 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 04 Mar 2010 08:03:56 +0000
parents 83f8f98a4f11
children f3882e94c7e0
files gnv-artifacts/ChangeLog gnv-artifacts/src/main/java/de/intevation/gnv/chart/HorizontalProfileChart.java gnv-artifacts/src/main/java/de/intevation/gnv/chart/VerticalProfileChart.java
diffstat 3 files changed, 24 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/gnv-artifacts/ChangeLog	Wed Mar 03 16:26:19 2010 +0000
+++ b/gnv-artifacts/ChangeLog	Thu Mar 04 08:03:56 2010 +0000
@@ -1,3 +1,11 @@
+2010-03-04  Ingo Weinzierl <ingo.weinzierl@intevation.de>
+
+	* src/main/java/de/intevation/gnv/chart/VerticalProfileChart.java: Added
+	  some more debug information for gap detection on grids.
+
+	* src/main/java/de/intevation/gnv/chart/HorizontalProfileChart.java: Added
+	  some more debug information for gap detection on grids.
+
 2010-03-03  Ingo Weinzierl <ingo.weinzierl@intevation.de>
 
 	* src/main/java/de/intevation/gnv/chart/TimeSeriesChart.java: Log important
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/chart/HorizontalProfileChart.java	Wed Mar 03 16:26:19 2010 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/chart/HorizontalProfileChart.java	Thu Mar 04 08:03:56 2010 +0000
@@ -168,8 +168,15 @@
 
                 boolean detected = gridDetection(last, current);
 
+                if (log.isDebugEnabled()) {
+                    log.debug("Current distance from start: " + range);
+                    log.debug("Last point: " + lastPoint.toString());
+                    log.debug("Current point: " + currentPoint.toString());
+                    log.debug("Distance (current point - last point): " + distance);
+                }
+
                 if (detected) {
-                    log.debug(
+                    log.info(
                         "Gap detected on grid between " + range +
                         " and " + (range+distance)
                     );
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/chart/VerticalProfileChart.java	Wed Mar 03 16:26:19 2010 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/chart/VerticalProfileChart.java	Thu Mar 04 08:03:56 2010 +0000
@@ -330,6 +330,14 @@
 
     
     protected boolean gridDetection(double last, double current) {
+        if (log.isDebugEnabled()) {
+            log.debug("######################################################");
+            log.debug("Parameters for gap detection");
+            log.debug("Defined gap size for grids: " + GAP_MAX_LEVEL);
+            log.debug("1st value to compare: " + last);
+            log.debug("2nd value to compare: " + current);
+            log.debug("Difference: " + Math.abs(current - last));
+        }
         return (Math.abs(current - last) > GAP_MAX_LEVEL);
     }
 

http://dive4elements.wald.intevation.org