comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffCalculation.java @ 7829:1aba75321441 minfo-opt

Added morph. active width to bed height difference calculation.
author Raimund Renkert <rrenkert@intevation.de>
date Fri, 28 Mar 2014 11:20:49 +0100
parents 8faa8cfd2385
children 868f55932fe6
comparison
equal deleted inserted replaced
7828:8faa8cfd2385 7829:1aba75321441
138 TDoubleArrayList soundings = new TDoubleArrayList(size); 138 TDoubleArrayList soundings = new TDoubleArrayList(size);
139 TDoubleArrayList absolute = new TDoubleArrayList(size); 139 TDoubleArrayList absolute = new TDoubleArrayList(size);
140 TDoubleArrayList gap = new TDoubleArrayList(size); 140 TDoubleArrayList gap = new TDoubleArrayList(size);
141 TDoubleArrayList heights1 = new TDoubleArrayList(size); 141 TDoubleArrayList heights1 = new TDoubleArrayList(size);
142 TDoubleArrayList heights2 = new TDoubleArrayList(size); 142 TDoubleArrayList heights2 = new TDoubleArrayList(size);
143 TDoubleArrayList morphs1 = new TDoubleArrayList(size);
144 TDoubleArrayList morphs2 = new TDoubleArrayList(size);
143 145
144 int range = Math.abs(s1.getYear() - s2.getYear()); 146 int range = Math.abs(s1.getYear() - s2.getYear());
145 147
146 for (int i = 0; i < size; i++) { 148 for (int i = 0; i < size; i++) {
147 double station = stations.getQuick(i); 149 double station = stations.getQuick(i);
148 double h1 = s1.getHeight(station); 150 double h1 = s1.getHeight(station);
149 double h2 = s2.getHeight(station); 151 double h2 = s2.getHeight(station);
152 double m1 = s1.getWidth(station);
153 double m2 = s2.getWidth(station);
150 double hDiff = h1 - h2; 154 double hDiff = h1 - h2;
151 155
152 if (!Double.isNaN(hDiff)) { 156 if (!Double.isNaN(hDiff)) {
153 diffRes.add(hDiff); 157 diffRes.add(hDiff);
154 kms.add(station); 158 kms.add(station);
162 s2.getDataGap(station))); 166 s2.getDataGap(station)));
163 167
164 absolute.add((hDiff / range) * 100d); 168 absolute.add((hDiff / range) * 100d);
165 heights1.add(h1); 169 heights1.add(h1);
166 heights2.add(h2); 170 heights2.add(h2);
171 morphs1.add(m1);
172 morphs2.add(m2);
167 } 173 }
168 } 174 }
169 return new BedDiffYearResult( 175 return new BedDiffYearResult(
170 kms, 176 kms,
171 diffRes, 177 diffRes,
172 heights1, 178 heights1,
173 heights2, 179 heights2,
180 morphs1,
181 morphs2,
174 soundings, 182 soundings,
175 absolute, 183 absolute,
176 gap, 184 gap,
177 s1.getYear(), 185 s1.getYear(),
178 s2.getYear(), 186 s2.getYear(),

http://dive4elements.wald.intevation.org