comparison artifacts/src/main/java/org/dive4elements/river/exports/WstWriter.java @ 7604:05549a84ee83

(issue1620) Add export of official lines in WST as specified
author Andre Heinecke <aheinecke@intevation.de>
date Wed, 27 Nov 2013 16:21:00 +0100
parents af13ceeba52a
children edb323a4c286
comparison
equal deleted inserted replaced
7603:25bce6e8beea 7604:05549a84ee83
228 * 228 *
229 * @return true, if a Q value have changed, otherwise false. 229 * @return true, if a Q value have changed, otherwise false.
230 */ 230 */
231 protected boolean dischargesChanged(double[] newQs) { 231 protected boolean dischargesChanged(double[] newQs) {
232 // XXX maybe there is a way to do this faster 232 // XXX maybe there is a way to do this faster
233 for (int i = 0; i < cols; i++) { 233 for (int i = 0; i < cols && i < qs.length && i < newQs.length; i++) {
234 if (Math.abs(newQs[i] - qs[i]) >= 0.001) { 234 if (Math.abs(newQs[i] - qs[i]) >= 0.001) {
235 return true; 235 return true;
236 } 236 }
237 } 237 }
238 238
239 return false; 239 return false;
240 } 240 }
241
242 /**
243 * Get the lines that have alreay been added to this writer
244 * lines are a map with km as the key and a wstline as value */
245 public Map<Double, WstLine> getLines() {
246 return lines;
247 }
241 } 248 }
242 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : 249 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org