comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java @ 635:acf3b49ec31f

Take the flow direction into account. flys-artifacts/trunk@2010 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 26 May 2011 14:27:06 +0000
parents d8c47520c726
children f0c1250d1e7b
comparison
equal deleted inserted replaced
634:d8c47520c726 635:acf3b49ec31f
928 double tmp = diff / step; 928 double tmp = diff / step;
929 int num = (int)Math.abs(Math.ceil(tmp)) + 1; 929 int num = (int)Math.abs(Math.ceil(tmp)) + 1;
930 930
931 double [] values = new double[num]; 931 double [] values = new double[num];
932 932
933 if (from > to) {
934 step = -step;
935 }
936
933 for (int idx = 0; idx < num; idx++) { 937 for (int idx = 0; idx < num; idx++) {
934 values[idx] = Math.round(lower * precision)/precision; 938 values[idx] = Math.round(lower * precision)/precision;
935 lower += step; 939 lower += step;
936 } 940 }
937 941

http://dive4elements.wald.intevation.org