comparison flys-artifacts/src/main/java/de/intevation/flys/exports/minfo/SedimentLoadLSGenerator.java @ 5777:e95427ed80e5

Merged
author Sascha L. Teichmann <teichmann@intevation.de>
date Sun, 21 Apr 2013 10:46:59 +0200
parents 1126b9e00378 5231e6b849ce
children
comparison
equal deleted inserted replaced
5776:1126b9e00378 5777:e95427ed80e5
122 Bounds bounds = 122 Bounds bounds =
123 calculateZoom(b, getDomainAxisRange()); 123 calculateZoom(b, getDomainAxisRange());
124 context.putContextValue("startkm", bounds.getLower()); 124 context.putContextValue("startkm", bounds.getLower());
125 context.putContextValue("endkm", bounds.getUpper()); 125 context.putContextValue("endkm", bounds.getUpper());
126 } 126 }
127 if (name.equals(SEDIMENT_LOAD_COARSE)) { 127 if (FacetTypes.IS.SEDIMENT_LOAD(SEDIMENT_LOAD_COARSE)) {
128 doSedimentLoadCoarseOut( 128 doSedimentLoadOut(
129 (double[][]) bundle.getData(context),
130 bundle,
131 attr,
132 visible);
133 }
134 else if (name.equals(SEDIMENT_LOAD_SAND)) {
135 doSedimentLoadSandOut(
136 (double[][]) bundle.getData(context),
137 bundle,
138 attr,
139 visible);
140 }
141 else if (name.equals(SEDIMENT_LOAD_FINEMIDDLE)) {
142 doSedimentLoadFineMiddleOut(
143 (double[][]) bundle.getData(context),
144 bundle,
145 attr,
146 visible);
147 }
148 else if (name.equals(SEDIMENT_LOAD_SUSP_SAND)) {
149 doSedimentLoadSuspSandOut(
150 (double[][]) bundle.getData(context),
151 bundle,
152 attr,
153 visible);
154 }
155 else if (name.equals(SEDIMENT_LOAD_SUSP_SAND_BED)) {
156 doSedimentLoadSuspSandBedOut(
157 (double[][]) bundle.getData(context),
158 bundle,
159 attr,
160 visible);
161 }
162 else if (name.equals(SEDIMENT_LOAD_SUSP_SEDIMENT)) {
163 doSedimentLoadSuspSedimentOut(
164 (double[][]) bundle.getData(context),
165 bundle,
166 attr,
167 visible);
168 }
169 else if (name.equals(SEDIMENT_LOAD_TOTAL_LOAD)) {
170 doSedimentLoadTotalLoadOut(
171 (double[][]) bundle.getData(context),
172 bundle,
173 attr,
174 visible);
175 }
176 else if (name.equals(SEDIMENT_LOAD_TOTAL)) {
177 doSedimentLoadTotalOut(
178 (double[][]) bundle.getData(context), 129 (double[][]) bundle.getData(context),
179 bundle, 130 bundle,
180 attr, 131 attr,
181 visible); 132 visible);
182 } 133 }
286 } 237 }
287 238
288 return label; 239 return label;
289 } 240 }
290 241
291 // TODO all double[][] eating *Out() can be subsumed. 242 protected void doSedimentLoadOut(double[][] data,
292 protected void doSedimentLoadCoarseOut(double[][] data,
293 ArtifactAndFacet aandf, Document theme, boolean visible) { 243 ArtifactAndFacet aandf, Document theme, boolean visible) {
294 244
295 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme); 245 // Allow for gaps (NaNs).
296 StyledSeriesBuilder.addPoints(series, data, true); 246 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), false, theme);
297 247 StyledSeriesBuilder.addPoints(series, data, false);
298 addAxisSeries(series, YAXIS.L.idx, visible);
299 }
300
301 protected void doSedimentLoadSandOut(double[][] data,
302 ArtifactAndFacet aandf, Document theme, boolean visible) {
303
304 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme);
305 StyledSeriesBuilder.addPoints(series, data, true);
306
307 addAxisSeries(series, YAXIS.L.idx, visible);
308 }
309
310 protected void doSedimentLoadFineMiddleOut(double[][] data,
311 ArtifactAndFacet aandf, Document theme, boolean visible) {
312
313 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme);
314 StyledSeriesBuilder.addPoints(series, data, true);
315
316 addAxisSeries(series, YAXIS.L.idx, visible);
317 }
318
319 protected void doSedimentLoadSuspSandOut(double[][] data,
320 ArtifactAndFacet aandf, Document theme, boolean visible) {
321
322 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme);
323 StyledSeriesBuilder.addPoints(series, data, true);
324
325 addAxisSeries(series, YAXIS.L.idx, visible);
326 }
327
328 protected void doSedimentLoadSuspSandBedOut(double[][] data,
329 ArtifactAndFacet aandf, Document theme, boolean visible) {
330
331 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme);
332 StyledSeriesBuilder.addPoints(series, data, true);
333
334 addAxisSeries(series, YAXIS.L.idx, visible);
335 }
336
337 protected void doSedimentLoadSuspSedimentOut(double[][] data,
338 ArtifactAndFacet aandf, Document theme, boolean visible) {
339
340 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme);
341 StyledSeriesBuilder.addPoints(series, data, true);
342
343 addAxisSeries(series, YAXIS.L.idx, visible);
344 }
345
346 protected void doSedimentLoadTotalLoadOut(double[][] data,
347 ArtifactAndFacet aandf, Document theme, boolean visible) {
348
349 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme);
350 StyledSeriesBuilder.addPoints(series, data, true);
351
352 addAxisSeries(series, YAXIS.L.idx, visible);
353 }
354
355 protected void doSedimentLoadTotalOut(double[][] data,
356 ArtifactAndFacet aandf, Document theme, boolean visible) {
357
358 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme);
359 StyledSeriesBuilder.addPoints(series, data, true);
360 248
361 addAxisSeries(series, YAXIS.L.idx, visible); 249 addAxisSeries(series, YAXIS.L.idx, visible);
362 } 250 }
363 251
364 protected void doFlowVelocityMainOut( 252 protected void doFlowVelocityMainOut(
432 addAxisSeries(series, YAXIS.D.idx, visible); 320 addAxisSeries(series, YAXIS.D.idx, visible);
433 if (DataUtil.guessWaterIncreasing(wkms.allWs())) { 321 if (DataUtil.guessWaterIncreasing(wkms.allWs())) {
434 setInverted(true); 322 setInverted(true);
435 } 323 }
436 } 324 }
437
438 } 325 }

http://dive4elements.wald.intevation.org