diff flys-artifacts/src/main/java/de/intevation/flys/artifacts/math/LinearRemap.java @ 452:343f248e4c8c

use correct kms and step width now now flys-artifacts/trunk@1948 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 19 May 2011 09:24:08 +0000
parents 909196be11a0
children f0c1250d1e7b
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/math/LinearRemap.java	Wed May 18 17:37:06 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/math/LinearRemap.java	Thu May 19 09:24:08 2011 +0000
@@ -1,7 +1,11 @@
 package de.intevation.flys.artifacts.math;
 
+import org.apache.log4j.Logger;
+
 public class LinearRemap
 {
+    private static Logger logger = Logger.getLogger(LinearRemap.class);
+
     public static class Segment {
 
         protected Segment next;
@@ -58,6 +62,14 @@
         }
 
         head = new Segment(from, to, m, b, head);
+
+        if (logger.isDebugEnabled()) {
+            logger.debug("LinearRemap.add --------- enter");
+            logger.debug("  range: [" + from + ", " + to + "]");
+            logger.debug("  " + x1 + " -> " + y1 + " (" + head.eval(x1) + ")");
+            logger.debug("  " + x2 + " -> " + y2 + " (" + head.eval(x2) + ")");
+            logger.debug("LinearRemap.add --------- leave");
+        }
     }
 
     public double eval(double pos, double x) {

http://dive4elements.wald.intevation.org