Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/exports/ATWriter.java @ 8202:e4606eae8ea5
sed src/**/*.java 's/logger/log/g'
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Fri, 05 Sep 2014 12:58:17 +0200 |
parents | f51c943c707a |
children | 839032ac1523 |
comparison
equal
deleted
inserted
replaced
8201:4b8c5a08de04 | 8202:e4606eae8ea5 |
---|---|
34 import org.apache.log4j.Logger; | 34 import org.apache.log4j.Logger; |
35 | 35 |
36 /** Write AT files. */ | 36 /** Write AT files. */ |
37 public class ATWriter | 37 public class ATWriter |
38 { | 38 { |
39 private static Logger logger = Logger.getLogger(ATWriter.class); | 39 private static Logger log = Logger.getLogger(ATWriter.class); |
40 | 40 |
41 public static final int COLUMNS = 10; | 41 public static final int COLUMNS = 10; |
42 | 42 |
43 public static final String I18N_AT_HEADER = | 43 public static final String I18N_AT_HEADER = |
44 "export.discharge.curve.at.header"; | 44 "export.discharge.curve.at.header"; |
56 double val = qFunc.value(w); | 56 double val = qFunc.value(w); |
57 return val; | 57 return val; |
58 } | 58 } |
59 catch (FunctionEvaluationException aode) { | 59 catch (FunctionEvaluationException aode) { |
60 // should not happen | 60 // should not happen |
61 logger.error("spline interpolation failed", aode); | 61 log.error("spline interpolation failed", aode); |
62 return Double.NaN; | 62 return Double.NaN; |
63 } | 63 } |
64 } | 64 } |
65 | 65 |
66 public static void printQ(PrintWriter out, double q) { | 66 public static void printQ(PrintWriter out, double q) { |
153 // are in Meter and only the discharge tables data is in meter. | 153 // are in Meter and only the discharge tables data is in meter. |
154 boolean isCalculation = wq.getReferenceSystem() != values.getReferenceSystem(); | 154 boolean isCalculation = wq.getReferenceSystem() != values.getReferenceSystem(); |
155 | 155 |
156 int [] bounds = wq.longestIncreasingWRangeIndices(); | 156 int [] bounds = wq.longestIncreasingWRangeIndices(); |
157 | 157 |
158 if (logger.isDebugEnabled()) { | 158 if (log.isDebugEnabled()) { |
159 logger.debug("exporting " + (isCalculation ? "calculated " : "") + | 159 log.debug("exporting " + (isCalculation ? "calculated " : "") + |
160 "w between indices " + bounds[0] + " and " + bounds[1] + " (" + | 160 "w between indices " + bounds[0] + " and " + bounds[1] + " (" + |
161 (int)Math.ceil(wq.getW(bounds[0])) + ", " + | 161 (int)Math.ceil(wq.getW(bounds[0])) + ", " + |
162 (int)Math.floor(wq.getW(bounds[1]))+ ")"); | 162 (int)Math.floor(wq.getW(bounds[1]))+ ")"); |
163 } | 163 } |
164 | 164 |
207 | 207 |
208 int rest = minW % 10; | 208 int rest = minW % 10; |
209 | 209 |
210 int startW = minW - rest; | 210 int startW = minW - rest; |
211 | 211 |
212 if (logger.isDebugEnabled()) { | 212 if (log.isDebugEnabled()) { |
213 logger.debug("startW: " + startW); | 213 log.debug("startW: " + startW); |
214 logger.debug("rest: " + rest); | 214 log.debug("rest: " + rest); |
215 logger.debug("maxW: " + maxW); | 215 log.debug("maxW: " + maxW); |
216 } | 216 } |
217 | 217 |
218 int col = 0; | 218 int col = 0; |
219 for (int w = startW; w <= maxW; w++) { | 219 for (int w = startW; w <= maxW; w++) { |
220 if (col == 0) { | 220 if (col == 0) { |