comparison artifacts/src/main/java/org/dive4elements/river/exports/StyledSeriesBuilder.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 32af7e5cb00f
children 7d0c4e508835
comparison
equal deleted inserted replaced
8201:4b8c5a08de04 8202:e4606eae8ea5
26 * or Double.MAX_VALUE (probably because these are really used in 26 * or Double.MAX_VALUE (probably because these are really used in
27 * calculations). We define and use a more handy value instead. 27 * calculations). We define and use a more handy value instead.
28 */ 28 */
29 final static double BIG_DOUBLE_VALUE = 1234567d; 29 final static double BIG_DOUBLE_VALUE = 1234567d;
30 30
31 private static final Logger logger = Logger.getLogger 31 private static final Logger log = Logger.getLogger
32 (StyledSeriesBuilder.class); 32 (StyledSeriesBuilder.class);
33 33
34 34
35 /** 35 /**
36 * Trivial, hidden constructor. 36 * Trivial, hidden constructor.
65 double [] xPoints = points[0]; 65 double [] xPoints = points[0];
66 double [] yPoints = points[1]; 66 double [] yPoints = points[1];
67 for (int i = 0; i < xPoints.length; i++) { 67 for (int i = 0; i < xPoints.length; i++) {
68 if (skipNANs && 68 if (skipNANs &&
69 (Double.isNaN(xPoints[i]) || Double.isNaN(yPoints[i]))) { 69 (Double.isNaN(xPoints[i]) || Double.isNaN(yPoints[i]))) {
70 logger.warn ("Skipping NaN in StyledSeriesBuilder."); 70 log.warn ("Skipping NaN in StyledSeriesBuilder.");
71 continue; 71 continue;
72 } 72 }
73 // Create gap if distance >= distance. 73 // Create gap if distance >= distance.
74 if (i != 0 && Math.abs(xPoints[i-1] - xPoints[i]) >= distance) { 74 if (i != 0 && Math.abs(xPoints[i-1] - xPoints[i]) >= distance) {
75 // Create at least a small segment for last point. 75 // Create at least a small segment for last point.
105 double [] xPoints = points[0]; 105 double [] xPoints = points[0];
106 double [] yPoints = points[1]; 106 double [] yPoints = points[1];
107 for (int i = 0; i < xPoints.length; i++) { 107 for (int i = 0; i < xPoints.length; i++) {
108 if (skipNANs && 108 if (skipNANs &&
109 (Double.isNaN(xPoints[i]) || Double.isNaN(yPoints[i]))) { 109 (Double.isNaN(xPoints[i]) || Double.isNaN(yPoints[i]))) {
110 logger.warn ("Skipping NaN in StyledSeriesBuilder."); 110 log.warn ("Skipping NaN in StyledSeriesBuilder.");
111 continue; 111 continue;
112 } 112 }
113 // Create gap if distance >= distance. 113 // Create gap if distance >= distance.
114 if (i != 0 && Math.abs(xPoints[i-1] - xPoints[i]) >= distance) { 114 if (i != 0 && Math.abs(xPoints[i-1] - xPoints[i]) >= distance) {
115 // Create at least a small segment for last point. 115 // Create at least a small segment for last point.
147 double [] xPoints = points[0]; 147 double [] xPoints = points[0];
148 double [] yPoints = points[1]; 148 double [] yPoints = points[1];
149 for (int i = 0; i < xPoints.length; i++) { 149 for (int i = 0; i < xPoints.length; i++) {
150 if (skipNANs && 150 if (skipNANs &&
151 (Double.isNaN(xPoints[i]) || Double.isNaN(yPoints[i]))) { 151 (Double.isNaN(xPoints[i]) || Double.isNaN(yPoints[i]))) {
152 logger.warn ("Skipping NaN in StyledSeriesBuilder."); 152 log.warn ("Skipping NaN in StyledSeriesBuilder.");
153 continue; 153 continue;
154 } 154 }
155 series.add(xPoints[i], factorY * (transY+yPoints[i]), false); 155 series.add(xPoints[i], factorY * (transY+yPoints[i]), false);
156 } 156 }
157 } 157 }
171 double [] xPoints = points[0]; 171 double [] xPoints = points[0];
172 double [] yPoints = points[1]; 172 double [] yPoints = points[1];
173 for (int i = 0; i < xPoints.length; i++) { 173 for (int i = 0; i < xPoints.length; i++) {
174 if (skipNANs && 174 if (skipNANs &&
175 (Double.isNaN(xPoints[i]) || Double.isNaN(yPoints[i]))) { 175 (Double.isNaN(xPoints[i]) || Double.isNaN(yPoints[i]))) {
176 logger.warn ("Skipping NaN in StyledSeriesBuilder."); 176 log.warn ("Skipping NaN in StyledSeriesBuilder.");
177 continue; 177 continue;
178 } 178 }
179 series.add(xPoints[i], yPoints[i], false); 179 series.add(xPoints[i], yPoints[i], false);
180 } 180 }
181 } 181 }

http://dive4elements.wald.intevation.org