Mercurial > dive4elements > river
annotate flys-artifacts/src/main/java/de/intevation/flys/exports/ATWriter.java @ 1065:193c49b7f6a3
Minor changes to stub MainValuesArtifact.
flys-artifacts/trunk@2545 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Wed, 24 Aug 2011 08:42:31 +0000 |
parents | 821aaceb2776 |
children | 7d11ad5a52d5 |
rev | line source |
---|---|
729
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.exports; |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
2 |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
3 import java.io.IOException; |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
4 import java.io.Writer; |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
5 import java.io.PrintWriter; |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
6 |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
7 import java.util.Locale; |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
8 |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
9 import de.intevation.flys.artifacts.model.WQ; |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
10 |
732
39d191f011dc
ATWriter: Results are now in cm. Made it more robust against corner cases.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
729
diff
changeset
|
11 import org.apache.commons.math.analysis.UnivariateRealFunction; |
729
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
12 |
732
39d191f011dc
ATWriter: Results are now in cm. Made it more robust against corner cases.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
729
diff
changeset
|
13 import org.apache.commons.math.analysis.interpolation.SplineInterpolator; |
39d191f011dc
ATWriter: Results are now in cm. Made it more robust against corner cases.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
729
diff
changeset
|
14 import org.apache.commons.math.analysis.interpolation.LinearInterpolator; |
729
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
15 |
732
39d191f011dc
ATWriter: Results are now in cm. Made it more robust against corner cases.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
729
diff
changeset
|
16 import org.apache.commons.math.analysis.polynomials.PolynomialFunction; |
39d191f011dc
ATWriter: Results are now in cm. Made it more robust against corner cases.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
729
diff
changeset
|
17 |
39d191f011dc
ATWriter: Results are now in cm. Made it more robust against corner cases.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
729
diff
changeset
|
18 import org.apache.commons.math.FunctionEvaluationException; |
729
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
19 |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
20 import org.apache.log4j.Logger; |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
21 |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
22 public class ATWriter |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
23 { |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
24 private static Logger logger = Logger.getLogger(ATWriter.class); |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
25 |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
26 public static final int COLUMNS = 10; |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
27 |
732
39d191f011dc
ATWriter: Results are now in cm. Made it more robust against corner cases.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
729
diff
changeset
|
28 public static final String EMPTY = " "; |
729
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
29 |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
30 protected double minW; |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
31 protected double maxW; |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
32 protected double minQ; |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
33 protected double maxQ; |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
34 |
732
39d191f011dc
ATWriter: Results are now in cm. Made it more robust against corner cases.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
729
diff
changeset
|
35 protected UnivariateRealFunction qFunc; |
729
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
36 |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
37 public ATWriter() { |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
38 } |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
39 |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
40 public ATWriter(WQ wq) throws IllegalArgumentException { |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
41 |
1033
821aaceb2776
Fix for flys/issue191
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
747
diff
changeset
|
42 int [] bounds = wq.longestIncreasingWRangeIndices(); |
729
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
43 |
1033
821aaceb2776
Fix for flys/issue191
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
747
diff
changeset
|
44 if (logger.isDebugEnabled()) { |
821aaceb2776
Fix for flys/issue191
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
747
diff
changeset
|
45 logger.debug("exporting w between indices " + |
821aaceb2776
Fix for flys/issue191
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
747
diff
changeset
|
46 bounds[0] + " and " + bounds[1] + " (" + |
821aaceb2776
Fix for flys/issue191
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
747
diff
changeset
|
47 wq.getW(bounds[0]) + ", " + wq.getW(bounds[1])); |
821aaceb2776
Fix for flys/issue191
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
747
diff
changeset
|
48 } |
821aaceb2776
Fix for flys/issue191
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
747
diff
changeset
|
49 |
821aaceb2776
Fix for flys/issue191
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
747
diff
changeset
|
50 if (bounds[1]-bounds[0] < 1) { // Only first w can be written out. |
821aaceb2776
Fix for flys/issue191
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
747
diff
changeset
|
51 minW = maxW = wq.getW(bounds[0]); |
821aaceb2776
Fix for flys/issue191
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
747
diff
changeset
|
52 minQ = maxQ = wq.getQ(bounds[0]); |
732
39d191f011dc
ATWriter: Results are now in cm. Made it more robust against corner cases.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
729
diff
changeset
|
53 // constant function |
39d191f011dc
ATWriter: Results are now in cm. Made it more robust against corner cases.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
729
diff
changeset
|
54 qFunc = new PolynomialFunction(new double [] { minQ }); |
729
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
55 return; |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
56 } |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
57 |
1033
821aaceb2776
Fix for flys/issue191
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
747
diff
changeset
|
58 double [] ws = new double[bounds[1]-bounds[0]]; |
729
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
59 double [] qs = new double[ws.length]; |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
60 |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
61 for (int i = 0; i < ws.length; ++i) { |
1033
821aaceb2776
Fix for flys/issue191
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
747
diff
changeset
|
62 int idx = bounds[0]+i; |
821aaceb2776
Fix for flys/issue191
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
747
diff
changeset
|
63 ws[i] = wq.getW(idx); |
821aaceb2776
Fix for flys/issue191
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
747
diff
changeset
|
64 qs[i] = wq.getQ(idx); |
729
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
65 } |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
66 |
732
39d191f011dc
ATWriter: Results are now in cm. Made it more robust against corner cases.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
729
diff
changeset
|
67 qFunc = ws.length < 3 |
39d191f011dc
ATWriter: Results are now in cm. Made it more robust against corner cases.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
729
diff
changeset
|
68 ? new LinearInterpolator().interpolate(ws, qs) |
39d191f011dc
ATWriter: Results are now in cm. Made it more robust against corner cases.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
729
diff
changeset
|
69 : new SplineInterpolator().interpolate(ws, qs); |
729
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
70 |
1033
821aaceb2776
Fix for flys/issue191
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
747
diff
changeset
|
71 minW = wq.getW(bounds[0]); |
821aaceb2776
Fix for flys/issue191
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
747
diff
changeset
|
72 maxW = wq.getW(bounds[1]); |
821aaceb2776
Fix for flys/issue191
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
747
diff
changeset
|
73 minQ = wq.getQ(bounds[0]); |
821aaceb2776
Fix for flys/issue191
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
747
diff
changeset
|
74 maxQ = wq.getQ(bounds[1]); |
729
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
75 } |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
76 |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
77 public double getQ(double w) { |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
78 |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
79 try { |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
80 return qFunc.value(w); |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
81 } |
732
39d191f011dc
ATWriter: Results are now in cm. Made it more robust against corner cases.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
729
diff
changeset
|
82 catch (FunctionEvaluationException aode) { |
729
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
83 // should not happen |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
84 logger.warn("spline interpolation failed", aode); |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
85 return w <= minW ? minQ : maxQ; |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
86 } |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
87 } |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
88 |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
89 protected static void printQ(PrintWriter out, double q) { |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
90 String format; |
732
39d191f011dc
ATWriter: Results are now in cm. Made it more robust against corner cases.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
729
diff
changeset
|
91 if (q < 1d) format = " % 8.3f"; |
39d191f011dc
ATWriter: Results are now in cm. Made it more robust against corner cases.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
729
diff
changeset
|
92 else if (q < 10d) format = " % 8.2f"; |
39d191f011dc
ATWriter: Results are now in cm. Made it more robust against corner cases.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
729
diff
changeset
|
93 else if (q < 100d) format = " % 8.1f"; |
729
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
94 else { |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
95 format = " % 8.0f"; |
732
39d191f011dc
ATWriter: Results are now in cm. Made it more robust against corner cases.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
729
diff
changeset
|
96 if (q > 1000d) q = Math.rint(q/10d)*10d; |
729
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
97 } |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
98 out.printf(Locale.US, format, q); |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
99 } |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
100 |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
101 public void write(Writer writer) throws IOException { |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
102 |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
103 PrintWriter out = new PrintWriter(writer); |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
104 |
732
39d191f011dc
ATWriter: Results are now in cm. Made it more robust against corner cases.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
729
diff
changeset
|
105 double rest = Math.abs(minW % COLUMNS); |
729
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
106 |
732
39d191f011dc
ATWriter: Results are now in cm. Made it more robust against corner cases.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
729
diff
changeset
|
107 double startW = Math.round(minW*10.0)/10.0; |
729
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
108 if (rest >= 1d) { |
732
39d191f011dc
ATWriter: Results are now in cm. Made it more robust against corner cases.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
729
diff
changeset
|
109 startW -= 0.1; |
39d191f011dc
ATWriter: Results are now in cm. Made it more robust against corner cases.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
729
diff
changeset
|
110 out.printf(Locale.US, "%8d", (int)Math.round(startW*100.0)); |
729
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
111 int columns = (int)Math.floor(rest); |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
112 for (int i = columns; i < COLUMNS; ++i) { |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
113 out.print(EMPTY); |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
114 } |
732
39d191f011dc
ATWriter: Results are now in cm. Made it more robust against corner cases.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
729
diff
changeset
|
115 for (int i = COLUMNS-columns; i < COLUMNS; ++i) { |
39d191f011dc
ATWriter: Results are now in cm. Made it more robust against corner cases.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
729
diff
changeset
|
116 printQ(out, getQ(startW + i*0.01)); |
729
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
117 } |
732
39d191f011dc
ATWriter: Results are now in cm. Made it more robust against corner cases.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
729
diff
changeset
|
118 out.println(); |
39d191f011dc
ATWriter: Results are now in cm. Made it more robust against corner cases.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
729
diff
changeset
|
119 startW += 0.1; |
729
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
120 } |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
121 |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
122 int col = 0; |
732
39d191f011dc
ATWriter: Results are now in cm. Made it more robust against corner cases.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
729
diff
changeset
|
123 for (double w = startW; w <= maxW; w += 0.01) { |
39d191f011dc
ATWriter: Results are now in cm. Made it more robust against corner cases.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
729
diff
changeset
|
124 if (col == 0) { |
39d191f011dc
ATWriter: Results are now in cm. Made it more robust against corner cases.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
729
diff
changeset
|
125 out.printf(Locale.US, "%8d", (int)Math.round(w*100.0)); |
39d191f011dc
ATWriter: Results are now in cm. Made it more robust against corner cases.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
729
diff
changeset
|
126 } |
729
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
127 |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
128 printQ(out, getQ(w)); |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
129 |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
130 if (++col >= COLUMNS) { |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
131 out.println(); |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
132 col = 0; |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
133 } |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
134 } |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
135 |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
136 if (col > 0) { |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
137 out.println(); |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
138 } |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
139 |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
140 out.flush(); |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
141 } |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
142 } |
078934923acb
New AT writer for results.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
143 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |