diff gnv-artifacts/src/main/java/de/intevation/gnv/math/XYColumn.java @ 448:3cb2bea50456

Generate iso line classes according gnv-issues/issue108 gnv-artifacts/trunk@496 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Sun, 03 Jan 2010 12:16:55 +0000
parents f42ed4f10b79
children bc5901bb4525
line wrap: on
line diff
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/math/XYColumn.java	Fri Jan 01 21:52:41 2010 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/math/XYColumn.java	Sun Jan 03 12:16:55 2010 +0000
@@ -82,17 +82,16 @@
                 // if there is no value at 0 repeat first value
                 HeightValue first = values.get(0);
                 if (first.z < 0d) {
-                    values.add(0, new HeightValue(0d, first.z, first.k-1));
+                    values.add(0, new HeightValue(0d, first.v, first.k-1));
                     ++N;
                 }
 
                 // if there is no value at depth repeat last value
                 HeightValue last = values.get(N-1);
                 if (last.z > depth) {
-                    values.add(new HeightValue(depth, last.z, last.k+1));
+                    values.add(new HeightValue(depth, last.v, last.k+1));
                     ++N;
                 }
-                N = values.size();
                 if (N < 3) { // interpolate linear
                     first = values.get(0);
                     last  = values.get(N-1);

http://dive4elements.wald.intevation.org