Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/exports/minfo/SedimentLoadLSGenerator.java @ 5645:696d710470f5
flys/issue1077: Show loads as step line, therefore transform data in
SedimentLoadFacet to stretch as in the measurement stations bounds.
Deal with this new kind of data in the Generator.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Wed, 10 Apr 2013 09:35:07 +0200 |
parents | ca4b6263996c |
children | 04687db03218 |
comparison
equal
deleted
inserted
replaced
5644:bae2b1568f3d | 5645:696d710470f5 |
---|---|
126 context.putContextValue("startkm", bounds.getLower()); | 126 context.putContextValue("startkm", bounds.getLower()); |
127 context.putContextValue("endkm", bounds.getUpper()); | 127 context.putContextValue("endkm", bounds.getUpper()); |
128 } | 128 } |
129 if (name.equals(SEDIMENT_LOAD_COARSE)) { | 129 if (name.equals(SEDIMENT_LOAD_COARSE)) { |
130 doSedimentLoadCoarseOut( | 130 doSedimentLoadCoarseOut( |
131 (SedimentLoadResult) bundle.getData(context), | 131 (double[][]) bundle.getData(context), |
132 bundle, | 132 bundle, |
133 attr, | 133 attr, |
134 visible); | 134 visible); |
135 } | 135 } |
136 else if (name.equals(SEDIMENT_LOAD_SAND)) { | 136 else if (name.equals(SEDIMENT_LOAD_SAND)) { |
137 doSedimentLoadSandOut( | 137 doSedimentLoadSandOut( |
138 (SedimentLoadResult) bundle.getData(context), | 138 (double[][]) bundle.getData(context), |
139 bundle, | 139 bundle, |
140 attr, | 140 attr, |
141 visible); | 141 visible); |
142 } | 142 } |
143 else if (name.equals(SEDIMENT_LOAD_FINEMIDDLE)) { | 143 else if (name.equals(SEDIMENT_LOAD_FINEMIDDLE)) { |
144 doSedimentLoadFineMiddleOut( | 144 doSedimentLoadFineMiddleOut( |
145 (SedimentLoadResult) bundle.getData(context), | 145 (double[][]) bundle.getData(context), |
146 bundle, | 146 bundle, |
147 attr, | 147 attr, |
148 visible); | 148 visible); |
149 } | 149 } |
150 else if (name.equals(SEDIMENT_LOAD_SUSP_SAND)) { | 150 else if (name.equals(SEDIMENT_LOAD_SUSP_SAND)) { |
151 doSedimentLoadSuspSandOut( | 151 doSedimentLoadSuspSandOut( |
152 (SedimentLoadResult) bundle.getData(context), | 152 (double[][]) bundle.getData(context), |
153 bundle, | 153 bundle, |
154 attr, | 154 attr, |
155 visible); | 155 visible); |
156 } | 156 } |
157 else if (name.equals(SEDIMENT_LOAD_SUSP_SAND_BED)) { | 157 else if (name.equals(SEDIMENT_LOAD_SUSP_SAND_BED)) { |
158 doSedimentLoadSuspSandBedOut( | 158 doSedimentLoadSuspSandBedOut( |
159 (SedimentLoadResult) bundle.getData(context), | 159 (double[][]) bundle.getData(context), |
160 bundle, | 160 bundle, |
161 attr, | 161 attr, |
162 visible); | 162 visible); |
163 } | 163 } |
164 else if (name.equals(SEDIMENT_LOAD_SUSP_SEDIMENT)) { | 164 else if (name.equals(SEDIMENT_LOAD_SUSP_SEDIMENT)) { |
165 doSedimentLoadSuspSedimentOut( | 165 doSedimentLoadSuspSedimentOut( |
166 (SedimentLoadResult) bundle.getData(context), | 166 (double[][]) bundle.getData(context), |
167 bundle, | 167 bundle, |
168 attr, | 168 attr, |
169 visible); | 169 visible); |
170 } | 170 } |
171 else if (name.equals(SEDIMENT_LOAD_TOTAL_LOAD)) { | 171 else if (name.equals(SEDIMENT_LOAD_TOTAL_LOAD)) { |
172 doSedimentLoadTotalLoadOut( | 172 doSedimentLoadTotalLoadOut( |
173 (SedimentLoadResult) bundle.getData(context), | 173 (double[][]) bundle.getData(context), |
174 bundle, | 174 bundle, |
175 attr, | 175 attr, |
176 visible); | 176 visible); |
177 } | 177 } |
178 else if (name.equals(SEDIMENT_LOAD_TOTAL)) { | 178 else if (name.equals(SEDIMENT_LOAD_TOTAL)) { |
179 doSedimentLoadTotalOut( | 179 doSedimentLoadTotalOut( |
180 (SedimentLoadResult) bundle.getData(context), | 180 (double[][]) bundle.getData(context), |
181 bundle, | 181 bundle, |
182 attr, | 182 attr, |
183 visible); | 183 visible); |
184 } | 184 } |
185 else if (name.equals(FLOW_VELOCITY_TOTALCHANNEL)) { | 185 else if (name.equals(FLOW_VELOCITY_TOTALCHANNEL)) { |
288 } | 288 } |
289 | 289 |
290 return label; | 290 return label; |
291 } | 291 } |
292 | 292 |
293 protected void doSedimentLoadCoarseOut(SedimentLoadResult data, | 293 // TODO all double[][] eating *Out() can be subsumed. |
294 ArtifactAndFacet aandf, Document theme, boolean visible) { | 294 protected void doSedimentLoadCoarseOut(double[][] data, |
295 | 295 ArtifactAndFacet aandf, Document theme, boolean visible) { |
296 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme); | 296 |
297 StyledSeriesBuilder.addPoints(series, data.getCoarseData(), true); | 297 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme); |
298 | 298 StyledSeriesBuilder.addPoints(series, data, true); |
299 addAxisSeries(series, YAXIS.L.idx, visible); | 299 |
300 } | 300 addAxisSeries(series, YAXIS.L.idx, visible); |
301 | 301 } |
302 protected void doSedimentLoadSandOut(SedimentLoadResult data, | 302 |
303 ArtifactAndFacet aandf, Document theme, boolean visible) { | 303 protected void doSedimentLoadSandOut(double[][] data, |
304 | 304 ArtifactAndFacet aandf, Document theme, boolean visible) { |
305 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme); | 305 |
306 StyledSeriesBuilder.addPoints(series, data.getSandData(), true); | 306 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme); |
307 | 307 StyledSeriesBuilder.addPoints(series, data, true); |
308 addAxisSeries(series, YAXIS.L.idx, visible); | 308 |
309 } | 309 addAxisSeries(series, YAXIS.L.idx, visible); |
310 | 310 } |
311 protected void doSedimentLoadFineMiddleOut(SedimentLoadResult data, | 311 |
312 ArtifactAndFacet aandf, Document theme, boolean visible) { | 312 protected void doSedimentLoadFineMiddleOut(double[][] data, |
313 | 313 ArtifactAndFacet aandf, Document theme, boolean visible) { |
314 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme); | 314 |
315 StyledSeriesBuilder.addPoints(series, data.getFineMiddleData(), true); | 315 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme); |
316 | 316 StyledSeriesBuilder.addPoints(series, data, true); |
317 addAxisSeries(series, YAXIS.L.idx, visible); | 317 |
318 } | 318 addAxisSeries(series, YAXIS.L.idx, visible); |
319 | 319 } |
320 protected void doSedimentLoadSuspSandOut(SedimentLoadResult data, | 320 |
321 ArtifactAndFacet aandf, Document theme, boolean visible) { | 321 protected void doSedimentLoadSuspSandOut(double[][] data, |
322 | 322 ArtifactAndFacet aandf, Document theme, boolean visible) { |
323 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme); | 323 |
324 StyledSeriesBuilder.addPoints(series, data.getSuspSandData(), true); | 324 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme); |
325 | 325 StyledSeriesBuilder.addPoints(series, data, true); |
326 addAxisSeries(series, YAXIS.L.idx, visible); | 326 |
327 } | 327 addAxisSeries(series, YAXIS.L.idx, visible); |
328 | 328 } |
329 protected void doSedimentLoadSuspSandBedOut(SedimentLoadResult data, | 329 |
330 ArtifactAndFacet aandf, Document theme, boolean visible) { | 330 protected void doSedimentLoadSuspSandBedOut(double[][] data, |
331 | 331 ArtifactAndFacet aandf, Document theme, boolean visible) { |
332 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme); | 332 |
333 StyledSeriesBuilder.addPoints(series, data.getSuspSandBedData(), true); | 333 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme); |
334 | 334 StyledSeriesBuilder.addPoints(series, data, true); |
335 addAxisSeries(series, YAXIS.L.idx, visible); | 335 |
336 } | 336 addAxisSeries(series, YAXIS.L.idx, visible); |
337 | 337 } |
338 protected void doSedimentLoadSuspSedimentOut(SedimentLoadResult data, | 338 |
339 ArtifactAndFacet aandf, Document theme, boolean visible) { | 339 protected void doSedimentLoadSuspSedimentOut(double[][] data, |
340 | 340 ArtifactAndFacet aandf, Document theme, boolean visible) { |
341 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme); | 341 |
342 StyledSeriesBuilder.addPoints(series, data.getSuspSedimentData(), true); | 342 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme); |
343 | 343 StyledSeriesBuilder.addPoints(series, data, true); |
344 addAxisSeries(series, YAXIS.L.idx, visible); | 344 |
345 } | 345 addAxisSeries(series, YAXIS.L.idx, visible); |
346 | 346 } |
347 protected void doSedimentLoadTotalLoadOut(SedimentLoadResult data, | 347 |
348 ArtifactAndFacet aandf, Document theme, boolean visible) { | 348 protected void doSedimentLoadTotalLoadOut(double[][] data, |
349 | 349 ArtifactAndFacet aandf, Document theme, boolean visible) { |
350 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme); | 350 |
351 StyledSeriesBuilder.addPoints(series, data.getTotalLoadData(), true); | 351 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme); |
352 | 352 StyledSeriesBuilder.addPoints(series, data, true); |
353 addAxisSeries(series, YAXIS.L.idx, visible); | 353 |
354 } | 354 addAxisSeries(series, YAXIS.L.idx, visible); |
355 | 355 } |
356 protected void doSedimentLoadTotalOut(SedimentLoadResult data, | 356 |
357 ArtifactAndFacet aandf, Document theme, boolean visible) { | 357 protected void doSedimentLoadTotalOut(double[][] data, |
358 | 358 ArtifactAndFacet aandf, Document theme, boolean visible) { |
359 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme); | 359 |
360 StyledSeriesBuilder.addPoints(series, data.getTotalData(), true); | 360 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme); |
361 | 361 StyledSeriesBuilder.addPoints(series, data, true); |
362 addAxisSeries(series, YAXIS.L.idx, visible); | 362 |
363 } | 363 addAxisSeries(series, YAXIS.L.idx, visible); |
364 | 364 |
365 protected void doFlowVelocityMainOut( | 365 protected void doFlowVelocityMainOut( |
366 FlowVelocityData data, | 366 FlowVelocityData data, |
367 ArtifactAndFacet aandf, | 367 ArtifactAndFacet aandf, |
368 Document theme, | 368 Document theme, |