annotate artifacts/src/main/java/org/dive4elements/river/exports/LongitudinalSectionGenerator.java @ 6798:7089f338138a longitudinal-symmetry

Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
author Tom Gottfried <tom.gottfried@intevation.de>
date Fri, 09 Aug 2013 13:32:47 +0200
parents 23ab795f2f0e
children a1ff1b7e2dee
rev   line source
5863
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
2 * Software engineering by Intevation GmbH
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
3 *
5994
af13ceeba52a Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5867
diff changeset
4 * This file is Free Software under the GNU AGPL (>=v3)
5863
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the
5994
af13ceeba52a Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5867
diff changeset
6 * documentation coming with Dive4Elements River for details.
5863
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
7 */
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
8
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4448
diff changeset
9 package org.dive4elements.river.exports;
359
e5ea6a01526c Added an OutGenerator for creating longitudinal section curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
10
6794
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
11 import java.util.Arrays;
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
12
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4448
diff changeset
13 import org.dive4elements.artifactdatabase.state.ArtifactAndFacet;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4448
diff changeset
14 import org.dive4elements.artifactdatabase.state.Facet;
5867
59ff03ff48f1 River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5865
diff changeset
15 import org.dive4elements.river.artifacts.D4EArtifact;
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4448
diff changeset
16 import org.dive4elements.river.artifacts.geom.Lines;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4448
diff changeset
17 import org.dive4elements.river.artifacts.model.AreaFacet;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4448
diff changeset
18 import org.dive4elements.river.artifacts.model.FacetTypes;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4448
diff changeset
19 import org.dive4elements.river.artifacts.model.WKms;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4448
diff changeset
20 import org.dive4elements.river.artifacts.model.WQKms;
6689
e568788f519d issue1393: Handle bedheightdiff-facets in LS Generator.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5994
diff changeset
21
e568788f519d issue1393: Handle bedheightdiff-facets in LS Generator.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5994
diff changeset
22 import org.dive4elements.river.exports.process.Processor;
e568788f519d issue1393: Handle bedheightdiff-facets in LS Generator.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5994
diff changeset
23 import org.dive4elements.river.exports.process.BedDiffHeightYearProcessor;
e568788f519d issue1393: Handle bedheightdiff-facets in LS Generator.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5994
diff changeset
24 import org.dive4elements.river.exports.process.BedDiffYearProcessor;
e568788f519d issue1393: Handle bedheightdiff-facets in LS Generator.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5994
diff changeset
25 import org.dive4elements.river.exports.process.BedheightProcessor;
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4448
diff changeset
26 import org.dive4elements.river.exports.process.WOutProcessor;
6689
e568788f519d issue1393: Handle bedheightdiff-facets in LS Generator.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5994
diff changeset
27
6794
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
28 import org.dive4elements.river.artifacts.access.FlowVelocityAccess;
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
29 import org.dive4elements.river.artifacts.model.FlowVelocityData;
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
30 import org.dive4elements.river.model.FlowVelocityMeasurementValue;
6798
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
31 import org.dive4elements.river.artifacts.model.minfo.BedDiameterResult;
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
32 import org.dive4elements.river.artifacts.model.minfo.BedloadDiameterResult;
6794
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
33
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
34 import org.dive4elements.river.jfree.Bounds;
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
35 import org.dive4elements.river.jfree.DoubleBounds;
5864
f2e46a668fe6 River artifacts: Renamed FLYSAnnotation to RiverAnnotation.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5863
diff changeset
36 import org.dive4elements.river.jfree.RiverAnnotation;
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4448
diff changeset
37 import org.dive4elements.river.jfree.StyledAreaSeriesCollection;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4448
diff changeset
38 import org.dive4elements.river.jfree.StyledXYSeries;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4448
diff changeset
39 import org.dive4elements.river.utils.DataUtil;
5865
73da40528cf2 River artifacts: Renamed FLYSUtils to RiverUtils.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5864
diff changeset
40 import org.dive4elements.river.utils.RiverUtils;
3409
97ad960f5579 Add subtitle to Fix W/Q chart and refactor addSubtitle() method(s)
Christian Lins <christian.lins@intevation.de>
parents: 3400
diff changeset
41 import org.apache.log4j.Logger;
97ad960f5579 Add subtitle to Fix W/Q chart and refactor addSubtitle() method(s)
Christian Lins <christian.lins@intevation.de>
parents: 3400
diff changeset
42 import org.jfree.chart.axis.NumberAxis;
97ad960f5579 Add subtitle to Fix W/Q chart and refactor addSubtitle() method(s)
Christian Lins <christian.lins@intevation.de>
parents: 3400
diff changeset
43 import org.jfree.chart.axis.ValueAxis;
97ad960f5579 Add subtitle to Fix W/Q chart and refactor addSubtitle() method(s)
Christian Lins <christian.lins@intevation.de>
parents: 3400
diff changeset
44 import org.jfree.chart.plot.XYPlot;
97ad960f5579 Add subtitle to Fix W/Q chart and refactor addSubtitle() method(s)
Christian Lins <christian.lins@intevation.de>
parents: 3400
diff changeset
45 import org.jfree.data.xy.XYSeries;
97ad960f5579 Add subtitle to Fix W/Q chart and refactor addSubtitle() method(s)
Christian Lins <christian.lins@intevation.de>
parents: 3400
diff changeset
46 import org.w3c.dom.Document;
2664
3c4ec3b50af7 Fix area creation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2601
diff changeset
47
1035
9f69a5f0af98 Started implementation of CustomAnnotation to plot collision-free annotations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1034
diff changeset
48
9f69a5f0af98 Started implementation of CustomAnnotation to plot collision-free annotations.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1034
diff changeset
49 /**
2206
e2124ca11adb Add manual point handling for many different chart types.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2199
diff changeset
50 * An OutGenerator that generates longitudinal section curves.
359
e5ea6a01526c Added an OutGenerator for creating longitudinal section curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
51 *
e5ea6a01526c Added an OutGenerator for creating longitudinal section curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
52 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
e5ea6a01526c Added an OutGenerator for creating longitudinal section curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
53 */
696
708b270dfd30 OutGenerators use now facets to fetch necessary data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 695
diff changeset
54 public class LongitudinalSectionGenerator
708b270dfd30 OutGenerators use now facets to fetch necessary data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 695
diff changeset
55 extends XYChartGenerator
708b270dfd30 OutGenerators use now facets to fetch necessary data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 695
diff changeset
56 implements FacetTypes
708b270dfd30 OutGenerators use now facets to fetch necessary data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 695
diff changeset
57 {
1953
590d9bc88ff5 Refactored LongitudinalSection- and WDiff-Generators, fixed minor issues.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1948
diff changeset
58 public enum YAXIS {
6794
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
59 W(0), // waterlevel
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
60 D(1), // waterlevel-difference
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
61 Q(2), // discharge
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
62 V(3), // flow velocity
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
63 T(4), // tau (shear stress)
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
64 O(3); // diameter
1931
7c52e9cb2a72 Allow more than two datasets and more flexibility with axes in plots. Based on patch by S. Teichmann.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1861
diff changeset
65 protected int idx;
7c52e9cb2a72 Allow more than two datasets and more flexibility with axes in plots. Based on patch by S. Teichmann.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1861
diff changeset
66 private YAXIS(int c) {
3176
cbaa49896eca Fix issue663 (step curves for longitudinal_section Qs).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3076
diff changeset
67 idx = c;
1931
7c52e9cb2a72 Allow more than two datasets and more flexibility with axes in plots. Based on patch by S. Teichmann.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1861
diff changeset
68 }
7c52e9cb2a72 Allow more than two datasets and more flexibility with axes in plots. Based on patch by S. Teichmann.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1861
diff changeset
69 }
7c52e9cb2a72 Allow more than two datasets and more flexibility with axes in plots. Based on patch by S. Teichmann.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1861
diff changeset
70
1037
75cf1b11c97e Improved CustomAnnotation rendering.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1036
diff changeset
71 /** The logger that is used in this generator. */
359
e5ea6a01526c Added an OutGenerator for creating longitudinal section curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
72 private static Logger logger =
e5ea6a01526c Added an OutGenerator for creating longitudinal section curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
73 Logger.getLogger(LongitudinalSectionGenerator.class);
e5ea6a01526c Added an OutGenerator for creating longitudinal section curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
74
1700
13a9ee6cebef Fix most labels in w-diff diagrams; refactoring to allow easier adoption of
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1697
diff changeset
75 /** Key to look up internationalized String for annotations label. */
1041
c3902ff2d3bd Added legend for annotations to LongitudinalSectionDiagram.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1040
diff changeset
76 public static final String I18N_ANNOTATIONS_LABEL =
c3902ff2d3bd Added legend for annotations to LongitudinalSectionDiagram.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1040
diff changeset
77 "chart.longitudinal.annotations.label";
c3902ff2d3bd Added legend for annotations to LongitudinalSectionDiagram.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1040
diff changeset
78
1701
6e59208839ae Expose translateable Strings as constants.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1700
diff changeset
79 /**
6e59208839ae Expose translateable Strings as constants.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1700
diff changeset
80 * Key to look up internationalized String for LongitudinalSection diagrams
6e59208839ae Expose translateable Strings as constants.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1700
diff changeset
81 * titles.
6e59208839ae Expose translateable Strings as constants.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1700
diff changeset
82 */
6794
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
83 /** TODO:
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
84 * create a class which extends this one to avoid following definition here
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
85 */
1701
6e59208839ae Expose translateable Strings as constants.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1700
diff changeset
86 public static final String I18N_CHART_TITLE =
6e59208839ae Expose translateable Strings as constants.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1700
diff changeset
87 "chart.longitudinal.section.title";
6794
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
88 public static final String I18N_CHART_TITLE_DEFAULT =
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
89 "L\u00e4ngsschnitt";
1701
6e59208839ae Expose translateable Strings as constants.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1700
diff changeset
90
6e59208839ae Expose translateable Strings as constants.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1700
diff changeset
91 /**
6e59208839ae Expose translateable Strings as constants.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1700
diff changeset
92 * Key to look up internationalized String for LongitudinalSection diagrams
6e59208839ae Expose translateable Strings as constants.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1700
diff changeset
93 * subtitles.
6e59208839ae Expose translateable Strings as constants.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1700
diff changeset
94 */
6e59208839ae Expose translateable Strings as constants.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1700
diff changeset
95 public static final String I18N_CHART_SUBTITLE =
6e59208839ae Expose translateable Strings as constants.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1700
diff changeset
96 "chart.longitudinal.section.subtitle";
6e59208839ae Expose translateable Strings as constants.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1700
diff changeset
97
2159
ebfca80dae09 Added short subtitle for longitudinal section chart.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2154
diff changeset
98 /**
ebfca80dae09 Added short subtitle for longitudinal section chart.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2154
diff changeset
99 * Key to look up internationalized String for LongitudinalSection diagrams
ebfca80dae09 Added short subtitle for longitudinal section chart.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2154
diff changeset
100 * short subtitles.
ebfca80dae09 Added short subtitle for longitudinal section chart.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2154
diff changeset
101 */
ebfca80dae09 Added short subtitle for longitudinal section chart.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2154
diff changeset
102 public static final String I18N_CHART_SHORT_SUBTITLE =
ebfca80dae09 Added short subtitle for longitudinal section chart.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2154
diff changeset
103 "chart.longitudinal.section.shortsubtitle";
ebfca80dae09 Added short subtitle for longitudinal section chart.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2154
diff changeset
104
6794
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
105 /**
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
106 * Key to look up internationalized String for LongitudinalSection diagrams
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
107 * X-axis title.
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
108 */
1701
6e59208839ae Expose translateable Strings as constants.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1700
diff changeset
109 public static final String I18N_XAXIS_LABEL =
6e59208839ae Expose translateable Strings as constants.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1700
diff changeset
110 "chart.longitudinal.section.xaxis.label";
6794
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
111 public static final String I18N_XAXIS_LABEL_DEFAULT =
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
112 "km";
1701
6e59208839ae Expose translateable Strings as constants.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1700
diff changeset
113
6794
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
114 /**
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
115 * Key to look up internationalized String for LongitudinalSection diagrams
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
116 * Y-axis titles.
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
117 */
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
118 public static final String I18N_YAXIS_LABEL_W =
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
119 "chart.longitudinal.section.yaxis.label.w";
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
120 public static final String I18N_YAXIS_LABEL_Q =
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
121 "chart.longitudinal.section.yaxis.label.q";
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
122 public static final String I18N_YAXIS_LABEL_D =
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
123 "chart.w_differences.yaxis.label";
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
124 public static final String I18N_YAXIS_LABEL_V =
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
125 "chart.flow_velocity.section.yaxis.label";
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
126 public static final String I18N_YAXIS_LABEL_T =
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
127 "chart.flow_velocity.section.yaxis.second.label";
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
128 public static final String I18N_YAXIS_LABEL_DEFAULT =
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
129 "Y-axis";
1701
6e59208839ae Expose translateable Strings as constants.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1700
diff changeset
130
1953
590d9bc88ff5 Refactored LongitudinalSection- and WDiff-Generators, fixed minor issues.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1948
diff changeset
131
359
e5ea6a01526c Added an OutGenerator for creating longitudinal section curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
132 public LongitudinalSectionGenerator() {
e5ea6a01526c Added an OutGenerator for creating longitudinal section curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
133 super();
369
2ce7b473620e Implemented the chart creation of a longitudinal section chart - W and Q facets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 364
diff changeset
134 }
2ce7b473620e Implemented the chart creation of a longitudinal section chart - W and Q facets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 364
diff changeset
135
2ce7b473620e Implemented the chart creation of a longitudinal section chart - W and Q facets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 364
diff changeset
136
2000
e71719483546 Improved the ChartSettings - now, each chart writes proper AxisSections into the ChartSettings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1997
diff changeset
137 @Override
e71719483546 Improved the ChartSettings - now, each chart writes proper AxisSections into the ChartSettings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1997
diff changeset
138 protected YAxisWalker getYAxisWalker() {
e71719483546 Improved the ChartSettings - now, each chart writes proper AxisSections into the ChartSettings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1997
diff changeset
139 return new YAxisWalker() {
e71719483546 Improved the ChartSettings - now, each chart writes proper AxisSections into the ChartSettings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1997
diff changeset
140 @Override
e71719483546 Improved the ChartSettings - now, each chart writes proper AxisSections into the ChartSettings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1997
diff changeset
141 public int length() {
e71719483546 Improved the ChartSettings - now, each chart writes proper AxisSections into the ChartSettings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1997
diff changeset
142 return YAXIS.values().length;
e71719483546 Improved the ChartSettings - now, each chart writes proper AxisSections into the ChartSettings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1997
diff changeset
143 }
e71719483546 Improved the ChartSettings - now, each chart writes proper AxisSections into the ChartSettings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1997
diff changeset
144
e71719483546 Improved the ChartSettings - now, each chart writes proper AxisSections into the ChartSettings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1997
diff changeset
145 @Override
e71719483546 Improved the ChartSettings - now, each chart writes proper AxisSections into the ChartSettings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1997
diff changeset
146 public String getId(int idx) {
e71719483546 Improved the ChartSettings - now, each chart writes proper AxisSections into the ChartSettings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1997
diff changeset
147 YAXIS[] yaxes = YAXIS.values();
e71719483546 Improved the ChartSettings - now, each chart writes proper AxisSections into the ChartSettings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1997
diff changeset
148 return yaxes[idx].toString();
e71719483546 Improved the ChartSettings - now, each chart writes proper AxisSections into the ChartSettings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1997
diff changeset
149 }
e71719483546 Improved the ChartSettings - now, each chart writes proper AxisSections into the ChartSettings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1997
diff changeset
150 };
e71719483546 Improved the ChartSettings - now, each chart writes proper AxisSections into the ChartSettings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1997
diff changeset
151 }
e71719483546 Improved the ChartSettings - now, each chart writes proper AxisSections into the ChartSettings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1997
diff changeset
152
e71719483546 Improved the ChartSettings - now, each chart writes proper AxisSections into the ChartSettings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1997
diff changeset
153
3621
6772e9f9b65f Deal with inverted axes in longitudinal charts and logos.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3409
diff changeset
154 /**
6772e9f9b65f Deal with inverted axes in longitudinal charts and logos.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3409
diff changeset
155 * Return left most data points x value (on first axis).
6772e9f9b65f Deal with inverted axes in longitudinal charts and logos.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3409
diff changeset
156 * Overridden because axis could be inverted.
6772e9f9b65f Deal with inverted axes in longitudinal charts and logos.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3409
diff changeset
157 */
6772e9f9b65f Deal with inverted axes in longitudinal charts and logos.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3409
diff changeset
158 @Override
6772e9f9b65f Deal with inverted axes in longitudinal charts and logos.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3409
diff changeset
159 protected double getLeftX() {
6772e9f9b65f Deal with inverted axes in longitudinal charts and logos.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3409
diff changeset
160 if (isInverted()) {
6772e9f9b65f Deal with inverted axes in longitudinal charts and logos.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3409
diff changeset
161 return (Double)getXBounds(0).getUpper();
6772e9f9b65f Deal with inverted axes in longitudinal charts and logos.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3409
diff changeset
162 }
6772e9f9b65f Deal with inverted axes in longitudinal charts and logos.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3409
diff changeset
163 return (Double)getXBounds(0).getLower();
6772e9f9b65f Deal with inverted axes in longitudinal charts and logos.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3409
diff changeset
164 }
6772e9f9b65f Deal with inverted axes in longitudinal charts and logos.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3409
diff changeset
165
6772e9f9b65f Deal with inverted axes in longitudinal charts and logos.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3409
diff changeset
166
6772e9f9b65f Deal with inverted axes in longitudinal charts and logos.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3409
diff changeset
167 /**
6772e9f9b65f Deal with inverted axes in longitudinal charts and logos.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3409
diff changeset
168 * Return right most data points x value (on first axis).
6772e9f9b65f Deal with inverted axes in longitudinal charts and logos.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3409
diff changeset
169 * Overridden because axis could be inverted.
6772e9f9b65f Deal with inverted axes in longitudinal charts and logos.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3409
diff changeset
170 */
6772e9f9b65f Deal with inverted axes in longitudinal charts and logos.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3409
diff changeset
171 @Override
6772e9f9b65f Deal with inverted axes in longitudinal charts and logos.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3409
diff changeset
172 protected double getRightX() {
6772e9f9b65f Deal with inverted axes in longitudinal charts and logos.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3409
diff changeset
173 if (isInverted()) {
6772e9f9b65f Deal with inverted axes in longitudinal charts and logos.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3409
diff changeset
174 return (Double)getXBounds(0).getLower();
6772e9f9b65f Deal with inverted axes in longitudinal charts and logos.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3409
diff changeset
175 }
6772e9f9b65f Deal with inverted axes in longitudinal charts and logos.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3409
diff changeset
176 return (Double)getXBounds(0).getUpper();
6772e9f9b65f Deal with inverted axes in longitudinal charts and logos.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3409
diff changeset
177 }
6772e9f9b65f Deal with inverted axes in longitudinal charts and logos.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3409
diff changeset
178
1700
13a9ee6cebef Fix most labels in w-diff diagrams; refactoring to allow easier adoption of
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1697
diff changeset
179
13a9ee6cebef Fix most labels in w-diff diagrams; refactoring to allow easier adoption of
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1697
diff changeset
180 /**
2048
3157a78e6494 Improved chart title and subtitle creation in ChartGenerators - all ChartGenerators make now use of title and subtitle provided by ChartSettings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2047
diff changeset
181 * Returns the default title for this chart.
2047
0318fa6f0844 Make use of first attributes specified in the ChartSettings. NOTE: work is still in progress.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2031
diff changeset
182 *
2048
3157a78e6494 Improved chart title and subtitle creation in ChartGenerators - all ChartGenerators make now use of title and subtitle provided by ChartSettings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2047
diff changeset
183 * @return the default title for this chart.
1700
13a9ee6cebef Fix most labels in w-diff diagrams; refactoring to allow easier adoption of
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1697
diff changeset
184 */
2047
0318fa6f0844 Make use of first attributes specified in the ChartSettings. NOTE: work is still in progress.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2031
diff changeset
185 @Override
6517
ef3b02034f6a More consistent labeling for longitudinal section diagrams
Tom Gottfried <tom@intevation.de>
parents: 5994
diff changeset
186 protected String getDefaultChartTitle() {
1701
6e59208839ae Expose translateable Strings as constants.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1700
diff changeset
187 return msg(I18N_CHART_TITLE, I18N_CHART_TITLE_DEFAULT);
1700
13a9ee6cebef Fix most labels in w-diff diagrams; refactoring to allow easier adoption of
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1697
diff changeset
188 }
13a9ee6cebef Fix most labels in w-diff diagrams; refactoring to allow easier adoption of
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1697
diff changeset
189
13a9ee6cebef Fix most labels in w-diff diagrams; refactoring to allow easier adoption of
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1697
diff changeset
190
2047
0318fa6f0844 Make use of first attributes specified in the ChartSettings. NOTE: work is still in progress.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2031
diff changeset
191 /**
2048
3157a78e6494 Improved chart title and subtitle creation in ChartGenerators - all ChartGenerators make now use of title and subtitle provided by ChartSettings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2047
diff changeset
192 * Returns the default subtitle for this chart.
2047
0318fa6f0844 Make use of first attributes specified in the ChartSettings. NOTE: work is still in progress.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2031
diff changeset
193 *
2048
3157a78e6494 Improved chart title and subtitle creation in ChartGenerators - all ChartGenerators make now use of title and subtitle provided by ChartSettings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2047
diff changeset
194 * @return the default subtitle for this chart.
2047
0318fa6f0844 Make use of first attributes specified in the ChartSettings. NOTE: work is still in progress.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2031
diff changeset
195 */
1989
156304542edf Finished the ChartSection part of the chart Settings returned by the XYChartGenerator.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1953
diff changeset
196 @Override
2048
3157a78e6494 Improved chart title and subtitle creation in ChartGenerators - all ChartGenerators make now use of title and subtitle provided by ChartSettings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2047
diff changeset
197 protected String getDefaultChartSubtitle() {
1989
156304542edf Finished the ChartSection part of the chart Settings returned by the XYChartGenerator.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1953
diff changeset
198 double[] dist = getRange();
156304542edf Finished the ChartSection part of the chart Settings returned by the XYChartGenerator.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1953
diff changeset
199
2154
ce9b15673f3f Use waterlevel state and longitudinal section generator for longitudinal
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2104
diff changeset
200 Object[] args = null;
ce9b15673f3f Use waterlevel state and longitudinal section generator for longitudinal
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2104
diff changeset
201 if (dist == null) {
ce9b15673f3f Use waterlevel state and longitudinal section generator for longitudinal
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2104
diff changeset
202 args = new Object[] {getRiverName()};
2159
ebfca80dae09 Added short subtitle for longitudinal section chart.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2154
diff changeset
203 return msg(getChartShortSubtitleKey(), "", args);
2154
ce9b15673f3f Use waterlevel state and longitudinal section generator for longitudinal
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2104
diff changeset
204 }
2159
ebfca80dae09 Added short subtitle for longitudinal section chart.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2154
diff changeset
205 args = new Object[] {
ebfca80dae09 Added short subtitle for longitudinal section chart.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2154
diff changeset
206 getRiverName(),
ebfca80dae09 Added short subtitle for longitudinal section chart.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2154
diff changeset
207 dist[0],
ebfca80dae09 Added short subtitle for longitudinal section chart.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2154
diff changeset
208 dist[1]
ebfca80dae09 Added short subtitle for longitudinal section chart.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2154
diff changeset
209 };
1989
156304542edf Finished the ChartSection part of the chart Settings returned by the XYChartGenerator.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1953
diff changeset
210 return msg(getChartSubtitleKey(), "", args);
156304542edf Finished the ChartSection part of the chart Settings returned by the XYChartGenerator.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1953
diff changeset
211 }
156304542edf Finished the ChartSection part of the chart Settings returned by the XYChartGenerator.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1953
diff changeset
212
156304542edf Finished the ChartSection part of the chart Settings returned by the XYChartGenerator.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1953
diff changeset
213
1700
13a9ee6cebef Fix most labels in w-diff diagrams; refactoring to allow easier adoption of
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1697
diff changeset
214 /**
13a9ee6cebef Fix most labels in w-diff diagrams; refactoring to allow easier adoption of
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1697
diff changeset
215 * Gets key to look up internationalized String for the charts subtitle.
13a9ee6cebef Fix most labels in w-diff diagrams; refactoring to allow easier adoption of
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1697
diff changeset
216 * @return key to look up translated subtitle.
13a9ee6cebef Fix most labels in w-diff diagrams; refactoring to allow easier adoption of
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1697
diff changeset
217 */
13a9ee6cebef Fix most labels in w-diff diagrams; refactoring to allow easier adoption of
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1697
diff changeset
218 protected String getChartSubtitleKey() {
1701
6e59208839ae Expose translateable Strings as constants.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1700
diff changeset
219 return I18N_CHART_SUBTITLE;
1700
13a9ee6cebef Fix most labels in w-diff diagrams; refactoring to allow easier adoption of
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1697
diff changeset
220 }
13a9ee6cebef Fix most labels in w-diff diagrams; refactoring to allow easier adoption of
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1697
diff changeset
221
13a9ee6cebef Fix most labels in w-diff diagrams; refactoring to allow easier adoption of
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1697
diff changeset
222
13a9ee6cebef Fix most labels in w-diff diagrams; refactoring to allow easier adoption of
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1697
diff changeset
223 /**
3076
5642a83420f2 FLYS artifacts: Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 2685
diff changeset
224 * Gets key to look up internationalized String for the charts short
2159
ebfca80dae09 Added short subtitle for longitudinal section chart.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2154
diff changeset
225 * subtitle.
ebfca80dae09 Added short subtitle for longitudinal section chart.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2154
diff changeset
226 * @return key to look up translated subtitle.
ebfca80dae09 Added short subtitle for longitudinal section chart.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2154
diff changeset
227 */
ebfca80dae09 Added short subtitle for longitudinal section chart.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2154
diff changeset
228 protected String getChartShortSubtitleKey() {
ebfca80dae09 Added short subtitle for longitudinal section chart.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2154
diff changeset
229 return I18N_CHART_SHORT_SUBTITLE;
ebfca80dae09 Added short subtitle for longitudinal section chart.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2154
diff changeset
230 }
ebfca80dae09 Added short subtitle for longitudinal section chart.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2154
diff changeset
231
ebfca80dae09 Added short subtitle for longitudinal section chart.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2154
diff changeset
232
ebfca80dae09 Added short subtitle for longitudinal section chart.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 2154
diff changeset
233 /**
1700
13a9ee6cebef Fix most labels in w-diff diagrams; refactoring to allow easier adoption of
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1697
diff changeset
234 * Get internationalized label for the x axis.
13a9ee6cebef Fix most labels in w-diff diagrams; refactoring to allow easier adoption of
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1697
diff changeset
235 */
2051
4ba5036109d2 Make use of user defined axes labels during chart creation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2049
diff changeset
236 @Override
4ba5036109d2 Make use of user defined axes labels during chart creation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2049
diff changeset
237 protected String getDefaultXAxisLabel() {
5867
59ff03ff48f1 River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5865
diff changeset
238 D4EArtifact flys = (D4EArtifact) master;
1667
f1af0c07a6ee Bugfix: #346 Modified x and y axis titles of longitudinal section charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1653
diff changeset
239
f1af0c07a6ee Bugfix: #346 Modified x and y axis titles of longitudinal section charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1653
diff changeset
240 return msg(
1701
6e59208839ae Expose translateable Strings as constants.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1700
diff changeset
241 I18N_XAXIS_LABEL,
6e59208839ae Expose translateable Strings as constants.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1700
diff changeset
242 I18N_XAXIS_LABEL_DEFAULT,
5865
73da40528cf2 River artifacts: Renamed FLYSUtils to RiverUtils.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5864
diff changeset
243 new Object[] { RiverUtils.getRiver(flys).getName() });
369
2ce7b473620e Implemented the chart creation of a longitudinal section chart - W and Q facets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 364
diff changeset
244 }
2ce7b473620e Implemented the chart creation of a longitudinal section chart - W and Q facets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 364
diff changeset
245
2ce7b473620e Implemented the chart creation of a longitudinal section chart - W and Q facets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 364
diff changeset
246
1700
13a9ee6cebef Fix most labels in w-diff diagrams; refactoring to allow easier adoption of
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1697
diff changeset
247 /**
13a9ee6cebef Fix most labels in w-diff diagrams; refactoring to allow easier adoption of
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1697
diff changeset
248 * Get internationalized label for the y axis.
13a9ee6cebef Fix most labels in w-diff diagrams; refactoring to allow easier adoption of
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1697
diff changeset
249 */
6794
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
250 @Override
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
251 protected String getDefaultYAxisLabel(int index) {
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
252
5867
59ff03ff48f1 River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5865
diff changeset
253 D4EArtifact flys = (D4EArtifact) master;
5865
73da40528cf2 River artifacts: Renamed FLYSUtils to RiverUtils.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5864
diff changeset
254 String unit = RiverUtils.getRiver(flys).getWstUnit().getName();
1667
f1af0c07a6ee Bugfix: #346 Modified x and y axis titles of longitudinal section charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1653
diff changeset
255
6794
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
256 if (index == YAXIS.W.idx) {
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
257 return msg(
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
258 I18N_YAXIS_LABEL_W,
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
259 I18N_YAXIS_LABEL_DEFAULT,
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
260 new Object[] { unit });
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
261 }
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
262 if (index == YAXIS.Q.idx) {
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
263 return msg(
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
264 I18N_YAXIS_LABEL_Q,
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
265 I18N_YAXIS_LABEL_DEFAULT);
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
266 }
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
267 if (index == YAXIS.D.idx) {
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
268 return msg(
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
269 I18N_YAXIS_LABEL_D,
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
270 I18N_YAXIS_LABEL_DEFAULT);
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
271 }
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
272 if (index == YAXIS.V.idx) {
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
273 return msg(
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
274 I18N_YAXIS_LABEL_V,
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
275 I18N_YAXIS_LABEL_DEFAULT);
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
276 }
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
277 if (index == YAXIS.T.idx) {
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
278 return msg(
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
279 I18N_YAXIS_LABEL_T,
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
280 I18N_YAXIS_LABEL_DEFAULT);
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
281 }
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
282
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
283 return "default";
369
2ce7b473620e Implemented the chart creation of a longitudinal section chart - W and Q facets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 364
diff changeset
284 }
2ce7b473620e Implemented the chart creation of a longitudinal section chart - W and Q facets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 364
diff changeset
285
2ce7b473620e Implemented the chart creation of a longitudinal section chart - W and Q facets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 364
diff changeset
286
1700
13a9ee6cebef Fix most labels in w-diff diagrams; refactoring to allow easier adoption of
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1697
diff changeset
287 /**
1931
7c52e9cb2a72 Allow more than two datasets and more flexibility with axes in plots. Based on patch by S. Teichmann.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1861
diff changeset
288 * Create Axis for given index.
7c52e9cb2a72 Allow more than two datasets and more flexibility with axes in plots. Based on patch by S. Teichmann.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1861
diff changeset
289 * @return axis with according internationalized label.
7c52e9cb2a72 Allow more than two datasets and more flexibility with axes in plots. Based on patch by S. Teichmann.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1861
diff changeset
290 */
7c52e9cb2a72 Allow more than two datasets and more flexibility with axes in plots. Based on patch by S. Teichmann.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1861
diff changeset
291 @Override
7c52e9cb2a72 Allow more than two datasets and more flexibility with axes in plots. Based on patch by S. Teichmann.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1861
diff changeset
292 protected NumberAxis createYAxis(int index) {
2053
f9a972d375ba Use the user defined font size to set Y axes label fonts sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2051
diff changeset
293 NumberAxis axis = super.createYAxis(index);
1991
0bd7c3cf0af1 Added axis sections into charts Settings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1989
diff changeset
294
1941
0fa53fa65401 Fix LongitudinalSections multi-axes plotting behavior.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1936
diff changeset
295 // "Q" Axis shall include 0.
0fa53fa65401 Fix LongitudinalSections multi-axes plotting behavior.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1936
diff changeset
296 if (index == YAXIS.Q.idx) {
0fa53fa65401 Fix LongitudinalSections multi-axes plotting behavior.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1936
diff changeset
297 axis.setAutoRangeIncludesZero(true);
0fa53fa65401 Fix LongitudinalSections multi-axes plotting behavior.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1936
diff changeset
298 }
0fa53fa65401 Fix LongitudinalSections multi-axes plotting behavior.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1936
diff changeset
299 else {
0fa53fa65401 Fix LongitudinalSections multi-axes plotting behavior.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1936
diff changeset
300 axis.setAutoRangeIncludesZero(false);
0fa53fa65401 Fix LongitudinalSections multi-axes plotting behavior.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1936
diff changeset
301 }
2053
f9a972d375ba Use the user defined font size to set Y axes label fonts sizes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2051
diff changeset
302
1931
7c52e9cb2a72 Allow more than two datasets and more flexibility with axes in plots. Based on patch by S. Teichmann.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1861
diff changeset
303 return axis;
7c52e9cb2a72 Allow more than two datasets and more flexibility with axes in plots. Based on patch by S. Teichmann.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1861
diff changeset
304 }
7c52e9cb2a72 Allow more than two datasets and more flexibility with axes in plots. Based on patch by S. Teichmann.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1861
diff changeset
305
1991
0bd7c3cf0af1 Added axis sections into charts Settings.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1989
diff changeset
306
1931
7c52e9cb2a72 Allow more than two datasets and more flexibility with axes in plots. Based on patch by S. Teichmann.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1861
diff changeset
307 /**
7c52e9cb2a72 Allow more than two datasets and more flexibility with axes in plots. Based on patch by S. Teichmann.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1861
diff changeset
308 * Trigger inversion.
1700
13a9ee6cebef Fix most labels in w-diff diagrams; refactoring to allow easier adoption of
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1697
diff changeset
309 */
13a9ee6cebef Fix most labels in w-diff diagrams; refactoring to allow easier adoption of
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1697
diff changeset
310 @Override
375
60f63539d004 Ws and Qs of a longitudinal section chart are mapped to an own range axis now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 369
diff changeset
311 protected void adjustAxes(XYPlot plot) {
60f63539d004 Ws and Qs of a longitudinal section chart are mapped to an own range axis now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 369
diff changeset
312 super.adjustAxes(plot);
422
3b83341e0cf4 ISSUE-52 The longitudinal section charts will now always have the head of the river at the left side.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 420
diff changeset
313 invertXAxis(plot.getDomainAxis());
3b83341e0cf4 ISSUE-52 The longitudinal section charts will now always have the head of the river at the left side.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 420
diff changeset
314 }
3b83341e0cf4 ISSUE-52 The longitudinal section charts will now always have the head of the river at the left side.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 420
diff changeset
315
3b83341e0cf4 ISSUE-52 The longitudinal section charts will now always have the head of the river at the left side.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 420
diff changeset
316
3b83341e0cf4 ISSUE-52 The longitudinal section charts will now always have the head of the river at the left side.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 420
diff changeset
317 /**
3b83341e0cf4 ISSUE-52 The longitudinal section charts will now always have the head of the river at the left side.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 420
diff changeset
318 * This method inverts the x-axis based on the kilometer information of the
3b83341e0cf4 ISSUE-52 The longitudinal section charts will now always have the head of the river at the left side.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 420
diff changeset
319 * selected river. If the head of the river is at kilometer 0, the axis is
3b83341e0cf4 ISSUE-52 The longitudinal section charts will now always have the head of the river at the left side.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 420
diff changeset
320 * not inverted, otherwise it is.
3b83341e0cf4 ISSUE-52 The longitudinal section charts will now always have the head of the river at the left side.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 420
diff changeset
321 *
3b83341e0cf4 ISSUE-52 The longitudinal section charts will now always have the head of the river at the left side.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 420
diff changeset
322 * @param xaxis The domain axis.
3b83341e0cf4 ISSUE-52 The longitudinal section charts will now always have the head of the river at the left side.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 420
diff changeset
323 */
3b83341e0cf4 ISSUE-52 The longitudinal section charts will now always have the head of the river at the left side.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 420
diff changeset
324 protected void invertXAxis(ValueAxis xaxis) {
4445
0eca080fc162 Move inverted from LongitudinalSectionGenerator to XYChartGenerator
Björn Ricks <bjoern.ricks@intevation.de>
parents: 3621
diff changeset
325 if (isInverted()) {
1692
5201173c3db5 Bugfixes: #150 #345 Corrected the determination to invert the x axis in longitudinal section charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1690
diff changeset
326 logger.debug("X-Axis.setInverted(true)");
422
3b83341e0cf4 ISSUE-52 The longitudinal section charts will now always have the head of the river at the left side.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 420
diff changeset
327 xaxis.setInverted(true);
3b83341e0cf4 ISSUE-52 The longitudinal section charts will now always have the head of the river at the left side.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 420
diff changeset
328 }
359
e5ea6a01526c Added an OutGenerator for creating longitudinal section curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
329 }
e5ea6a01526c Added an OutGenerator for creating longitudinal section curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
330
e5ea6a01526c Added an OutGenerator for creating longitudinal section curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
331
1769
bbe12d77710d Prepare rendering of added other (static) WKms and Differences in LongitudinalSection Diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1719
diff changeset
332 /**
bbe12d77710d Prepare rendering of added other (static) WKms and Differences in LongitudinalSection Diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1719
diff changeset
333 * Produce output.
3269
b2ea89a665bc Fix issues in 'documentation'.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3227
diff changeset
334 * @param artifactAndFacet current facet and artifact.
1769
bbe12d77710d Prepare rendering of added other (static) WKms and Differences in LongitudinalSection Diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1719
diff changeset
335 * @param attr theme for facet
bbe12d77710d Prepare rendering of added other (static) WKms and Differences in LongitudinalSection Diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1719
diff changeset
336 */
3409
97ad960f5579 Add subtitle to Fix W/Q chart and refactor addSubtitle() method(s)
Christian Lins <christian.lins@intevation.de>
parents: 3400
diff changeset
337 @Override
1684
bdb05dc9b763 Bugfix: #353 Enabled chart's to be drawn with proper axes set even if no data is contained.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1679
diff changeset
338 public void doOut(
1944
21a4d2c677a1 Changed doOut signature, side effect from blackboard feature (to come).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1941
diff changeset
339 ArtifactAndFacet artifactAndFacet,
21a4d2c677a1 Changed doOut signature, side effect from blackboard feature (to come).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1941
diff changeset
340 Document attr,
21a4d2c677a1 Changed doOut signature, side effect from blackboard feature (to come).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1941
diff changeset
341 boolean visible
1684
bdb05dc9b763 Bugfix: #353 Enabled chart's to be drawn with proper axes set even if no data is contained.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1679
diff changeset
342 ) {
1944
21a4d2c677a1 Changed doOut signature, side effect from blackboard feature (to come).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1941
diff changeset
343 String name = artifactAndFacet.getFacetName();
359
e5ea6a01526c Added an OutGenerator for creating longitudinal section curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
344
695
45cd58a2a2bb OutGenerators doOut() takes a facet object now instead of just its name.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 666
diff changeset
345 logger.debug("LongitudinalSectionGenerator.doOut: " + name);
45cd58a2a2bb OutGenerators doOut() takes a facet object now instead of just its name.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 666
diff changeset
346
45cd58a2a2bb OutGenerators doOut() takes a facet object now instead of just its name.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 666
diff changeset
347 if (name == null) {
369
2ce7b473620e Implemented the chart creation of a longitudinal section chart - W and Q facets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 364
diff changeset
348 logger.error("No facet name for doOut(). No output generated!");
2ce7b473620e Implemented the chart creation of a longitudinal section chart - W and Q facets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 364
diff changeset
349 return;
2ce7b473620e Implemented the chart creation of a longitudinal section chart - W and Q facets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 364
diff changeset
350 }
2ce7b473620e Implemented the chart creation of a longitudinal section chart - W and Q facets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 364
diff changeset
351
1944
21a4d2c677a1 Changed doOut signature, side effect from blackboard feature (to come).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1941
diff changeset
352 Facet facet = artifactAndFacet.getFacet();
696
708b270dfd30 OutGenerators use now facets to fetch necessary data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 695
diff changeset
353
1944
21a4d2c677a1 Changed doOut signature, side effect from blackboard feature (to come).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1941
diff changeset
354 if (facet == null) {
696
708b270dfd30 OutGenerators use now facets to fetch necessary data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 695
diff changeset
355 return;
369
2ce7b473620e Implemented the chart creation of a longitudinal section chart - W and Q facets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 364
diff changeset
356 }
696
708b270dfd30 OutGenerators use now facets to fetch necessary data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 695
diff changeset
357
6689
e568788f519d issue1393: Handle bedheightdiff-facets in LS Generator.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5994
diff changeset
358 WOutProcessor wProcessor = new WOutProcessor();
e568788f519d issue1393: Handle bedheightdiff-facets in LS Generator.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5994
diff changeset
359 Processor bedp = new BedheightProcessor();
e568788f519d issue1393: Handle bedheightdiff-facets in LS Generator.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5994
diff changeset
360 Processor bdyProcessor = new BedDiffYearProcessor();
e568788f519d issue1393: Handle bedheightdiff-facets in LS Generator.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5994
diff changeset
361 Processor bdhyProcessor = new BedDiffHeightYearProcessor();
e568788f519d issue1393: Handle bedheightdiff-facets in LS Generator.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5994
diff changeset
362
e568788f519d issue1393: Handle bedheightdiff-facets in LS Generator.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5994
diff changeset
363 if (wProcessor.canHandle(name)) {
e568788f519d issue1393: Handle bedheightdiff-facets in LS Generator.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5994
diff changeset
364 wProcessor.doOut(this, artifactAndFacet, attr, visible, YAXIS.W.idx);
e568788f519d issue1393: Handle bedheightdiff-facets in LS Generator.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5994
diff changeset
365 }
e568788f519d issue1393: Handle bedheightdiff-facets in LS Generator.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5994
diff changeset
366 else if (bedp.canHandle(name)) {
e568788f519d issue1393: Handle bedheightdiff-facets in LS Generator.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5994
diff changeset
367 bedp.doOut(this, artifactAndFacet, attr, visible, YAXIS.W.idx);
e568788f519d issue1393: Handle bedheightdiff-facets in LS Generator.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5994
diff changeset
368 }
e568788f519d issue1393: Handle bedheightdiff-facets in LS Generator.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5994
diff changeset
369 else if (bdyProcessor.canHandle(name)) {
e568788f519d issue1393: Handle bedheightdiff-facets in LS Generator.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5994
diff changeset
370 bdyProcessor.doOut(this, artifactAndFacet, attr, visible, YAXIS.W.idx);
e568788f519d issue1393: Handle bedheightdiff-facets in LS Generator.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5994
diff changeset
371 }
e568788f519d issue1393: Handle bedheightdiff-facets in LS Generator.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5994
diff changeset
372 else if (bdhyProcessor.canHandle(name)) {
e568788f519d issue1393: Handle bedheightdiff-facets in LS Generator.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 5994
diff changeset
373 bdhyProcessor.doOut(this, artifactAndFacet, attr, visible, YAXIS.W.idx);
696
708b270dfd30 OutGenerators use now facets to fetch necessary data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 695
diff changeset
374 }
708b270dfd30 OutGenerators use now facets to fetch necessary data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 695
diff changeset
375 else if (name.equals(LONGITUDINAL_Q)) {
2325
1fcaeced48f2 #485 Fixed broken renaming of chart themes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2214
diff changeset
376 doQOut(
1fcaeced48f2 #485 Fixed broken renaming of chart themes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2214
diff changeset
377 (WQKms) artifactAndFacet.getData(context),
1fcaeced48f2 #485 Fixed broken renaming of chart themes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2214
diff changeset
378 artifactAndFacet,
1fcaeced48f2 #485 Fixed broken renaming of chart themes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2214
diff changeset
379 attr,
1fcaeced48f2 #485 Fixed broken renaming of chart themes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2214
diff changeset
380 visible);
369
2ce7b473620e Implemented the chart creation of a longitudinal section chart - W and Q facets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 364
diff changeset
381 }
1028
10bafb4f46cc Made (kind of dummy-) Annotations in LongitudinalSection diagrams visible.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 925
diff changeset
382 else if (name.equals(LONGITUDINAL_ANNOTATION)) {
2325
1fcaeced48f2 #485 Fixed broken renaming of chart themes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2214
diff changeset
383 doAnnotations(
5864
f2e46a668fe6 River artifacts: Renamed FLYSAnnotation to RiverAnnotation.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5863
diff changeset
384 (RiverAnnotation) artifactAndFacet.getData(context),
2325
1fcaeced48f2 #485 Fixed broken renaming of chart themes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2214
diff changeset
385 artifactAndFacet,
1fcaeced48f2 #485 Fixed broken renaming of chart themes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2214
diff changeset
386 attr,
1fcaeced48f2 #485 Fixed broken renaming of chart themes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2214
diff changeset
387 visible);
1028
10bafb4f46cc Made (kind of dummy-) Annotations in LongitudinalSection diagrams visible.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 925
diff changeset
388 }
2104
bb0dede9294f Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2074
diff changeset
389 else if (name.equals(STATIC_WQKMS_Q)) {
2325
1fcaeced48f2 #485 Fixed broken renaming of chart themes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2214
diff changeset
390 doQOut(
1fcaeced48f2 #485 Fixed broken renaming of chart themes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2214
diff changeset
391 (WQKms) artifactAndFacet.getData(context),
1fcaeced48f2 #485 Fixed broken renaming of chart themes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2214
diff changeset
392 artifactAndFacet,
1fcaeced48f2 #485 Fixed broken renaming of chart themes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2214
diff changeset
393 attr,
1fcaeced48f2 #485 Fixed broken renaming of chart themes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2214
diff changeset
394 visible);
2104
bb0dede9294f Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2074
diff changeset
395 }
1769
bbe12d77710d Prepare rendering of added other (static) WKms and Differences in LongitudinalSection Diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1719
diff changeset
396 else if (name.equals(W_DIFFERENCES)) {
bbe12d77710d Prepare rendering of added other (static) WKms and Differences in LongitudinalSection Diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1719
diff changeset
397 doWDifferencesOut(
1944
21a4d2c677a1 Changed doOut signature, side effect from blackboard feature (to come).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1941
diff changeset
398 (WKms) artifactAndFacet.getData(context),
2325
1fcaeced48f2 #485 Fixed broken renaming of chart themes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2214
diff changeset
399 artifactAndFacet,
1769
bbe12d77710d Prepare rendering of added other (static) WKms and Differences in LongitudinalSection Diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1719
diff changeset
400 attr,
bbe12d77710d Prepare rendering of added other (static) WKms and Differences in LongitudinalSection Diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1719
diff changeset
401 visible);
bbe12d77710d Prepare rendering of added other (static) WKms and Differences in LongitudinalSection Diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1719
diff changeset
402 }
2029
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
403 else if (FacetTypes.IS.AREA(name)) {
2325
1fcaeced48f2 #485 Fixed broken renaming of chart themes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2214
diff changeset
404 doArea(
1fcaeced48f2 #485 Fixed broken renaming of chart themes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2214
diff changeset
405 artifactAndFacet.getData(context),
1fcaeced48f2 #485 Fixed broken renaming of chart themes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2214
diff changeset
406 artifactAndFacet,
2029
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
407 attr,
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
408 visible);
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
409 }
2206
e2124ca11adb Add manual point handling for many different chart types.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2199
diff changeset
410 else if (FacetTypes.IS.MANUALPOINTS(name)) {
2325
1fcaeced48f2 #485 Fixed broken renaming of chart themes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2214
diff changeset
411 doPoints(
1fcaeced48f2 #485 Fixed broken renaming of chart themes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2214
diff changeset
412 artifactAndFacet.getData(context),
1fcaeced48f2 #485 Fixed broken renaming of chart themes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2214
diff changeset
413 artifactAndFacet,
1fcaeced48f2 #485 Fixed broken renaming of chart themes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2214
diff changeset
414 attr,
1fcaeced48f2 #485 Fixed broken renaming of chart themes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2214
diff changeset
415 visible,
1fcaeced48f2 #485 Fixed broken renaming of chart themes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2214
diff changeset
416 YAXIS.W.idx);
2175
3f90f4d37c8d Render manual points in longitudinal sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2159
diff changeset
417 }
6794
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
418
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
419 /* output for flow velocity */
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
420 if (getXBounds(0) != null && getDomainAxisRange() != null) {
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
421 logger.debug(Arrays.toString(getDomainAxisRangeFromRequest()));
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
422 Bounds bounds =
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
423 calculateZoom(getXBounds(0), getDomainAxisRange());
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
424 context.putContextValue("startkm", bounds.getLower());
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
425 context.putContextValue("endkm", bounds.getUpper());
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
426 }
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
427 else if (getXBounds(0) != null && getDomainAxisRange() == null) {
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
428 context.putContextValue("startkm", getXBounds(0).getLower());
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
429 context.putContextValue("endkm", getXBounds(0).getUpper());
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
430 }
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
431 else if (getXBounds(0) == null && getDomainAxisRange() == null) {
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
432 D4EArtifact artifact = (D4EArtifact)artifactAndFacet.getArtifact();
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
433 FlowVelocityAccess access = new FlowVelocityAccess(artifact);
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
434 context.putContextValue("startkm", access.getLowerKM());
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
435 context.putContextValue("endkm", access.getUpperKM());
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
436 }
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
437 else if (getXBounds(0) == null && getDomainAxisRange() != null){
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
438 D4EArtifact artifact = (D4EArtifact)artifactAndFacet.getArtifact();
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
439 FlowVelocityAccess access = new FlowVelocityAccess(artifact);
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
440 Bounds b = new DoubleBounds(access.getLowerKM(), access.getUpperKM());
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
441 Bounds bounds =
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
442 calculateZoom(b, getDomainAxisRange());
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
443 context.putContextValue("startkm", bounds.getLower());
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
444 context.putContextValue("endkm", bounds.getUpper());
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
445 }
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
446 if (name.equals(FLOW_VELOCITY_MAINCHANNEL)) {
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
447 doMainChannelOut(
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
448 (FlowVelocityData) artifactAndFacet.getData(context),
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
449 artifactAndFacet,
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
450 attr,
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
451 visible);
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
452 }
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
453 else if (name.equals(FLOW_VELOCITY_TOTALCHANNEL)) {
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
454 doTotalChannelOut(
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
455 (FlowVelocityData) artifactAndFacet.getData(context),
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
456 artifactAndFacet,
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
457 attr,
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
458 visible);
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
459 }
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
460 else if (name.equals(FLOW_VELOCITY_MAINCHANNEL_FILTERED)) {
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
461 doMainChannelOut(
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
462 (FlowVelocityData) artifactAndFacet.getData(context),
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
463 artifactAndFacet,
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
464 attr,
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
465 visible);
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
466 }
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
467 else if (name.equals(FLOW_VELOCITY_TOTALCHANNEL_FILTERED)) {
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
468 doTotalChannelOut(
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
469 (FlowVelocityData) artifactAndFacet.getData(context),
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
470 artifactAndFacet,
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
471 attr,
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
472 visible);
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
473 }
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
474 else if (name.equals(FLOW_VELOCITY_DISCHARGE)) {
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
475 doQOut(
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
476 (FlowVelocityData) artifactAndFacet.getData(context),
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
477 artifactAndFacet,
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
478 attr,
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
479 visible);
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
480 }
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
481 else if (name.equals(FLOW_VELOCITY_TAU)) {
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
482 doTauOut(
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
483 (FlowVelocityData) artifactAndFacet.getData(context),
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
484 artifactAndFacet,
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
485 attr,
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
486 visible);
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
487 }
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
488 else if (name.equals(FLOW_VELOCITY_TAU_FILTERED)) {
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
489 doTauOut(
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
490 (FlowVelocityData) artifactAndFacet.getData(context),
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
491 artifactAndFacet,
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
492 attr,
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
493 visible);
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
494 }
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
495 else if (name.equals(FLOW_VELOCITY_MEASUREMENT)) {
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
496 doVPointOut(
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
497 artifactAndFacet.getData(context),
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
498 artifactAndFacet,
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
499 attr,
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
500 visible);
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
501 }
6798
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
502 else if (name.equals(BED_QUALITY_BED_DIAMETER_SUBLAYER)) {
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
503 doBedQualitySubLayerOut(
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
504 (BedDiameterResult)artifactAndFacet.getData(context),
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
505 artifactAndFacet,
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
506 attr,
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
507 visible);
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
508 }
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
509 else if (name.equals(BED_QUALITY_BED_DIAMETER_TOPLAYER)) {
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
510 doBedQualityTopLayerOut(
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
511 (BedDiameterResult)artifactAndFacet.getData(context),
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
512 artifactAndFacet,
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
513 attr,
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
514 visible);
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
515 }
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
516 else if (name.equals(BED_QUALITY_BEDLOAD_DIAMETER)) {
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
517 doBedQualityLoadDiameter(
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
518 (BedloadDiameterResult)artifactAndFacet.getData(context),
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
519 artifactAndFacet,
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
520 attr,
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
521 visible);
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
522 }
6794
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
523
369
2ce7b473620e Implemented the chart creation of a longitudinal section chart - W and Q facets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 364
diff changeset
524 else {
695
45cd58a2a2bb OutGenerators doOut() takes a facet object now instead of just its name.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 666
diff changeset
525 logger.warn("Unknown facet name: " + name);
369
2ce7b473620e Implemented the chart creation of a longitudinal section chart - W and Q facets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 364
diff changeset
526 return;
2ce7b473620e Implemented the chart creation of a longitudinal section chart - W and Q facets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 364
diff changeset
527 }
2ce7b473620e Implemented the chart creation of a longitudinal section chart - W and Q facets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 364
diff changeset
528 }
2ce7b473620e Implemented the chart creation of a longitudinal section chart - W and Q facets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 364
diff changeset
529
1769
bbe12d77710d Prepare rendering of added other (static) WKms and Differences in LongitudinalSection Diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1719
diff changeset
530 /**
bbe12d77710d Prepare rendering of added other (static) WKms and Differences in LongitudinalSection Diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1719
diff changeset
531 * Add items to dataseries which describes the differences.
bbe12d77710d Prepare rendering of added other (static) WKms and Differences in LongitudinalSection Diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1719
diff changeset
532 */
bbe12d77710d Prepare rendering of added other (static) WKms and Differences in LongitudinalSection Diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1719
diff changeset
533 protected void doWDifferencesOut(
bbe12d77710d Prepare rendering of added other (static) WKms and Differences in LongitudinalSection Diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1719
diff changeset
534 WKms wkms,
2325
1fcaeced48f2 #485 Fixed broken renaming of chart themes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2214
diff changeset
535 ArtifactAndFacet aandf,
1769
bbe12d77710d Prepare rendering of added other (static) WKms and Differences in LongitudinalSection Diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1719
diff changeset
536 Document theme,
bbe12d77710d Prepare rendering of added other (static) WKms and Differences in LongitudinalSection Diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1719
diff changeset
537 boolean visible
bbe12d77710d Prepare rendering of added other (static) WKms and Differences in LongitudinalSection Diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1719
diff changeset
538 ) {
bbe12d77710d Prepare rendering of added other (static) WKms and Differences in LongitudinalSection Diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1719
diff changeset
539 logger.debug("WDifferencesCurveGenerator.doWDifferencesOut");
bbe12d77710d Prepare rendering of added other (static) WKms and Differences in LongitudinalSection Diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1719
diff changeset
540 if (wkms == null) {
bbe12d77710d Prepare rendering of added other (static) WKms and Differences in LongitudinalSection Diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1719
diff changeset
541 logger.warn("No data to add to WDifferencesChart.");
bbe12d77710d Prepare rendering of added other (static) WKms and Differences in LongitudinalSection Diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1719
diff changeset
542 return;
bbe12d77710d Prepare rendering of added other (static) WKms and Differences in LongitudinalSection Diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1719
diff changeset
543 }
bbe12d77710d Prepare rendering of added other (static) WKms and Differences in LongitudinalSection Diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1719
diff changeset
544
2325
1fcaeced48f2 #485 Fixed broken renaming of chart themes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2214
diff changeset
545 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme);
1769
bbe12d77710d Prepare rendering of added other (static) WKms and Differences in LongitudinalSection Diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1719
diff changeset
546
bbe12d77710d Prepare rendering of added other (static) WKms and Differences in LongitudinalSection Diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1719
diff changeset
547 if (logger.isDebugEnabled()) {
bbe12d77710d Prepare rendering of added other (static) WKms and Differences in LongitudinalSection Diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1719
diff changeset
548 if (wkms.size() > 0) {
bbe12d77710d Prepare rendering of added other (static) WKms and Differences in LongitudinalSection Diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1719
diff changeset
549 logger.debug("Generate series: " + series.getKey());
bbe12d77710d Prepare rendering of added other (static) WKms and Differences in LongitudinalSection Diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1719
diff changeset
550 logger.debug("Start km: " + wkms.getKm(0));
1791
e0e5a5b51a40 Added new StyledSeriesBuilder class and use it when adding points to XYSeries (in diagram generation).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1789
diff changeset
551 logger.debug("End km: " + wkms.getKm(wkms.size() - 1));
e0e5a5b51a40 Added new StyledSeriesBuilder class and use it when adding points to XYSeries (in diagram generation).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1789
diff changeset
552 logger.debug("Values : " + wkms.size());
1769
bbe12d77710d Prepare rendering of added other (static) WKms and Differences in LongitudinalSection Diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1719
diff changeset
553 }
bbe12d77710d Prepare rendering of added other (static) WKms and Differences in LongitudinalSection Diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1719
diff changeset
554 }
bbe12d77710d Prepare rendering of added other (static) WKms and Differences in LongitudinalSection Diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1719
diff changeset
555
1791
e0e5a5b51a40 Added new StyledSeriesBuilder class and use it when adding points to XYSeries (in diagram generation).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1789
diff changeset
556 StyledSeriesBuilder.addPoints(series, wkms);
1769
bbe12d77710d Prepare rendering of added other (static) WKms and Differences in LongitudinalSection Diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1719
diff changeset
557
1931
7c52e9cb2a72 Allow more than two datasets and more flexibility with axes in plots. Based on patch by S. Teichmann.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1861
diff changeset
558 addAxisSeries(series, YAXIS.D.idx, visible);
1769
bbe12d77710d Prepare rendering of added other (static) WKms and Differences in LongitudinalSection Diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1719
diff changeset
559 if (DataUtil.guessWaterIncreasing(wkms.allWs())) {
745
f959faaa7c4a Fix for flys/issue150: Invert the x axis if its guessed that water is increasing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 734
diff changeset
560 setInverted(true);
f959faaa7c4a Fix for flys/issue150: Invert the x axis if its guessed that water is increasing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 734
diff changeset
561 }
369
2ce7b473620e Implemented the chart creation of a longitudinal section chart - W and Q facets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 364
diff changeset
562 }
2ce7b473620e Implemented the chart creation of a longitudinal section chart - W and Q facets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 364
diff changeset
563
2ce7b473620e Implemented the chart creation of a longitudinal section chart - W and Q facets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 364
diff changeset
564
2ce7b473620e Implemented the chart creation of a longitudinal section chart - W and Q facets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 364
diff changeset
565 /**
2ce7b473620e Implemented the chart creation of a longitudinal section chart - W and Q facets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 364
diff changeset
566 * Process the output for Q facets in a longitudinal section curve.
2ce7b473620e Implemented the chart creation of a longitudinal section chart - W and Q facets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 364
diff changeset
567 *
2ce7b473620e Implemented the chart creation of a longitudinal section chart - W and Q facets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 364
diff changeset
568 * @param wqkms An array of WQKms values.
3269
b2ea89a665bc Fix issues in 'documentation'.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3227
diff changeset
569 * @param aandf The facet and artifact. This facet does NOT support any data objects. Use
5867
59ff03ff48f1 River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5865
diff changeset
570 * D4EArtifact.getNativeFacet() instead to retrieve a Facet which supports
1712
7e19449d7826 #253 Modified the title creation of chart curves - titles will now equal the Facet's description.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1701
diff changeset
571 * data.
924
f7761914f745 An initial implementation to render chart series based on the XML configuration in themes.xml.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 923
diff changeset
572 * @param theme The theme that contains styling information.
1712
7e19449d7826 #253 Modified the title creation of chart curves - titles will now equal the Facet's description.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1701
diff changeset
573 * @param visible The visibility of the curve.
369
2ce7b473620e Implemented the chart creation of a longitudinal section chart - W and Q facets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 364
diff changeset
574 */
1712
7e19449d7826 #253 Modified the title creation of chart curves - titles will now equal the Facet's description.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1701
diff changeset
575 protected void doQOut(
7e19449d7826 #253 Modified the title creation of chart curves - titles will now equal the Facet's description.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1701
diff changeset
576 WQKms wqkms,
2325
1fcaeced48f2 #485 Fixed broken renaming of chart themes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2214
diff changeset
577 ArtifactAndFacet aandf,
1712
7e19449d7826 #253 Modified the title creation of chart curves - titles will now equal the Facet's description.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1701
diff changeset
578 Document theme,
7e19449d7826 #253 Modified the title creation of chart curves - titles will now equal the Facet's description.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1701
diff changeset
579 boolean visible
7e19449d7826 #253 Modified the title creation of chart curves - titles will now equal the Facet's description.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1701
diff changeset
580 ) {
369
2ce7b473620e Implemented the chart creation of a longitudinal section chart - W and Q facets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 364
diff changeset
581 logger.debug("LongitudinalSectionGenerator.doQOut");
2ce7b473620e Implemented the chart creation of a longitudinal section chart - W and Q facets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 364
diff changeset
582
2325
1fcaeced48f2 #485 Fixed broken renaming of chart themes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2214
diff changeset
583 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme);
369
2ce7b473620e Implemented the chart creation of a longitudinal section chart - W and Q facets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 364
diff changeset
584
3176
cbaa49896eca Fix issue663 (step curves for longitudinal_section Qs).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3076
diff changeset
585 StyledSeriesBuilder.addStepPointsKmQ(series, wqkms);
696
708b270dfd30 OutGenerators use now facets to fetch necessary data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 695
diff changeset
586
1931
7c52e9cb2a72 Allow more than two datasets and more flexibility with axes in plots. Based on patch by S. Teichmann.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1861
diff changeset
587 addAxisSeries(series, YAXIS.Q.idx, visible);
745
f959faaa7c4a Fix for flys/issue150: Invert the x axis if its guessed that water is increasing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 734
diff changeset
588
1692
5201173c3db5 Bugfixes: #150 #345 Corrected the determination to invert the x axis in longitudinal section charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1690
diff changeset
589 if (needInvertAxis(wqkms)) {
5201173c3db5 Bugfixes: #150 #345 Corrected the determination to invert the x axis in longitudinal section charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1690
diff changeset
590 setInverted(true);
5201173c3db5 Bugfixes: #150 #345 Corrected the determination to invert the x axis in longitudinal section charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1690
diff changeset
591 }
5201173c3db5 Bugfixes: #150 #345 Corrected the determination to invert the x axis in longitudinal section charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1690
diff changeset
592 }
5201173c3db5 Bugfixes: #150 #345 Corrected the determination to invert the x axis in longitudinal section charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1690
diff changeset
593
5201173c3db5 Bugfixes: #150 #345 Corrected the determination to invert the x axis in longitudinal section charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1690
diff changeset
594 /**
5201173c3db5 Bugfixes: #150 #345 Corrected the determination to invert the x axis in longitudinal section charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1690
diff changeset
595 * This method determines - taking JFreeCharts auto x value ordering into
5201173c3db5 Bugfixes: #150 #345 Corrected the determination to invert the x axis in longitudinal section charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1690
diff changeset
596 * account - if the x axis need to be inverted. Waterlines in these charts
5201173c3db5 Bugfixes: #150 #345 Corrected the determination to invert the x axis in longitudinal section charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1690
diff changeset
597 * should decrease.
5201173c3db5 Bugfixes: #150 #345 Corrected the determination to invert the x axis in longitudinal section charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1690
diff changeset
598 *
3270
4ac581062c40 Fix various documentation issues.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3269
diff changeset
599 * @param wkms The data object that stores the x and y values used for this
1692
5201173c3db5 Bugfixes: #150 #345 Corrected the determination to invert the x axis in longitudinal section charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1690
diff changeset
600 * chart.
5201173c3db5 Bugfixes: #150 #345 Corrected the determination to invert the x axis in longitudinal section charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1690
diff changeset
601 */
2420
65ff8ff20be4 Fix flys/issue150 ('water increasing').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2325
diff changeset
602 public boolean needInvertAxis(WKms wkms) {
65ff8ff20be4 Fix flys/issue150 ('water increasing').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2325
diff changeset
603 boolean wsUp = wkms.guessWaterIncreasing();
65ff8ff20be4 Fix flys/issue150 ('water increasing').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2325
diff changeset
604 boolean kmUp = DataUtil.guessWaterIncreasing(wkms.allKms());
1692
5201173c3db5 Bugfixes: #150 #345 Corrected the determination to invert the x axis in longitudinal section charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1690
diff changeset
605 boolean inv = (wsUp && kmUp) || (!wsUp && !kmUp);
5201173c3db5 Bugfixes: #150 #345 Corrected the determination to invert the x axis in longitudinal section charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1690
diff changeset
606
2420
65ff8ff20be4 Fix flys/issue150 ('water increasing').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2325
diff changeset
607 int size = wkms.size();
1692
5201173c3db5 Bugfixes: #150 #345 Corrected the determination to invert the x axis in longitudinal section charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1690
diff changeset
608
5201173c3db5 Bugfixes: #150 #345 Corrected the determination to invert the x axis in longitudinal section charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1690
diff changeset
609 if (logger.isDebugEnabled()) {
2420
65ff8ff20be4 Fix flys/issue150 ('water increasing').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2325
diff changeset
610 logger.debug("(Wkms)Values : " + size);
1692
5201173c3db5 Bugfixes: #150 #345 Corrected the determination to invert the x axis in longitudinal section charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1690
diff changeset
611 if (size > 0) {
2420
65ff8ff20be4 Fix flys/issue150 ('water increasing').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2325
diff changeset
612 logger.debug("Start km: " + wkms.getKm(0));
65ff8ff20be4 Fix flys/issue150 ('water increasing').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2325
diff changeset
613 logger.debug("End km: " + wkms.getKm(size-1));
1692
5201173c3db5 Bugfixes: #150 #345 Corrected the determination to invert the x axis in longitudinal section charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1690
diff changeset
614 }
5201173c3db5 Bugfixes: #150 #345 Corrected the determination to invert the x axis in longitudinal section charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1690
diff changeset
615 logger.debug("wsUp: " + wsUp);
5201173c3db5 Bugfixes: #150 #345 Corrected the determination to invert the x axis in longitudinal section charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1690
diff changeset
616 logger.debug("kmUp: " + kmUp);
5201173c3db5 Bugfixes: #150 #345 Corrected the determination to invert the x axis in longitudinal section charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1690
diff changeset
617 logger.debug("inv: " + inv);
5201173c3db5 Bugfixes: #150 #345 Corrected the determination to invert the x axis in longitudinal section charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1690
diff changeset
618 }
5201173c3db5 Bugfixes: #150 #345 Corrected the determination to invert the x axis in longitudinal section charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1690
diff changeset
619
5201173c3db5 Bugfixes: #150 #345 Corrected the determination to invert the x axis in longitudinal section charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1690
diff changeset
620 return inv;
369
2ce7b473620e Implemented the chart creation of a longitudinal section chart - W and Q facets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 364
diff changeset
621 }
2ce7b473620e Implemented the chart creation of a longitudinal section chart - W and Q facets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 364
diff changeset
622
2ce7b473620e Implemented the chart creation of a longitudinal section chart - W and Q facets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 364
diff changeset
623
1041
c3902ff2d3bd Added legend for annotations to LongitudinalSectionDiagram.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1040
diff changeset
624 /**
c3902ff2d3bd Added legend for annotations to LongitudinalSectionDiagram.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1040
diff changeset
625 * Get name of series (displayed in legend).
c3902ff2d3bd Added legend for annotations to LongitudinalSectionDiagram.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1040
diff changeset
626 * @return name of the series.
c3902ff2d3bd Added legend for annotations to LongitudinalSectionDiagram.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1040
diff changeset
627 */
448
88d9e1d75d64 W and Q curves in longitudinal section curves will now have names.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 422
diff changeset
628 protected String getSeriesName(WQKms wqkms, String mode) {
88d9e1d75d64 W and Q curves in longitudinal section curves will now have names.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 422
diff changeset
629 String name = wqkms.getName();
88d9e1d75d64 W and Q curves in longitudinal section curves will now have names.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 422
diff changeset
630 String prefix = name != null && name.indexOf(mode) >= 0 ? null : mode;
88d9e1d75d64 W and Q curves in longitudinal section curves will now have names.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 422
diff changeset
631
88d9e1d75d64 W and Q curves in longitudinal section curves will now have names.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 422
diff changeset
632 return prefix != null && prefix.length() > 0
88d9e1d75d64 W and Q curves in longitudinal section curves will now have names.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 422
diff changeset
633 ? prefix + "(" + name +")"
88d9e1d75d64 W and Q curves in longitudinal section curves will now have names.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 422
diff changeset
634 : name;
359
e5ea6a01526c Added an OutGenerator for creating longitudinal section curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
635 }
2029
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
636
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
637
2104
bb0dede9294f Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2074
diff changeset
638 /** Look up the axis identifier for a given facet type. */
bb0dede9294f Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2074
diff changeset
639 public int axisIdxForFacet(String facetName) {
bb0dede9294f Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2074
diff changeset
640 if (FacetTypes.IS.W(facetName)) {
bb0dede9294f Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2074
diff changeset
641 return YAXIS.W.idx;
bb0dede9294f Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2074
diff changeset
642 }
bb0dede9294f Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2074
diff changeset
643 else if (FacetTypes.IS.Q(facetName)) {
bb0dede9294f Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2074
diff changeset
644 return YAXIS.Q.idx;
bb0dede9294f Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2074
diff changeset
645 }
6794
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
646 else if (FacetTypes.IS.V(facetName)) {
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
647 return YAXIS.V.idx;
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
648 }
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
649 else if (FacetTypes.IS.T(facetName)) {
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
650 return YAXIS.T.idx;
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
651 }
2104
bb0dede9294f Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2074
diff changeset
652 else {
bb0dede9294f Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2074
diff changeset
653 logger.warn("Could not find axis for facet " + facetName);
bb0dede9294f Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2074
diff changeset
654 return YAXIS.W.idx;
bb0dede9294f Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2074
diff changeset
655 }
bb0dede9294f Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2074
diff changeset
656 }
bb0dede9294f Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2074
diff changeset
657
2175
3f90f4d37c8d Render manual points in longitudinal sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2159
diff changeset
658
2029
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
659 /**
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
660 * Do Area out.
2420
65ff8ff20be4 Fix flys/issue150 ('water increasing').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2325
diff changeset
661 * @param theme styling information.
65ff8ff20be4 Fix flys/issue150 ('water increasing').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2325
diff changeset
662 * @param visible whether or not visible.
2029
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
663 */
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
664 protected void doArea(
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
665 Object o,
2325
1fcaeced48f2 #485 Fixed broken renaming of chart themes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2214
diff changeset
666 ArtifactAndFacet aandf,
2029
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
667 Document theme,
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
668 boolean visible
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
669 ) {
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
670 logger.debug("LongitudinalSectionGenerator.doArea");
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
671 StyledAreaSeriesCollection area = new StyledAreaSeriesCollection(theme);
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
672
2325
1fcaeced48f2 #485 Fixed broken renaming of chart themes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2214
diff changeset
673 String seriesName = aandf.getFacetDescription();
1fcaeced48f2 #485 Fixed broken renaming of chart themes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2214
diff changeset
674
2104
bb0dede9294f Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2074
diff changeset
675 AreaFacet.Data data = (AreaFacet.Data) o;
bb0dede9294f Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2074
diff changeset
676
2029
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
677 XYSeries up = null;
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
678 XYSeries down = null;
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
679
2104
bb0dede9294f Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2074
diff changeset
680 if (data.getUpperData() != null) {
2029
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
681 up = new StyledXYSeries(seriesName, false, theme);
2104
bb0dede9294f Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2074
diff changeset
682 if (data.getUpperData() instanceof WQKms) {
bb0dede9294f Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2074
diff changeset
683 if (FacetTypes.IS.Q(data.getRootFacetName())) {
bb0dede9294f Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2074
diff changeset
684 StyledSeriesBuilder.addPointsKmQ(up, (WQKms) data.getUpperData());
bb0dede9294f Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2074
diff changeset
685 }
bb0dede9294f Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2074
diff changeset
686 else {
bb0dede9294f Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2074
diff changeset
687 StyledSeriesBuilder.addPoints(up, (WKms) data.getUpperData());
bb0dede9294f Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2074
diff changeset
688 }
2029
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
689 }
2104
bb0dede9294f Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2074
diff changeset
690 else if (data.getUpperData() instanceof double[][]) {
2685
5652a851f1b4 Fix water-through-mountain in cross sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2664
diff changeset
691 StyledSeriesBuilder.addPoints(up, (double [][]) data.getUpperData(), false);
2029
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
692 }
2567
1d1cf502a360 fix flys/issue638 (area between certain datatypes).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2420
diff changeset
693 else if (data.getUpperData() instanceof WKms) {
1d1cf502a360 fix flys/issue638 (area between certain datatypes).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2420
diff changeset
694 StyledSeriesBuilder.addPoints(up, (WKms) data.getUpperData());
1d1cf502a360 fix flys/issue638 (area between certain datatypes).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2420
diff changeset
695 }
2664
3c4ec3b50af7 Fix area creation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2601
diff changeset
696 else if (data.getUpperData() instanceof Lines.LineData) {
2685
5652a851f1b4 Fix water-through-mountain in cross sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2664
diff changeset
697 StyledSeriesBuilder.addPoints(up, ((Lines.LineData) data.getUpperData()).points, false);
2664
3c4ec3b50af7 Fix area creation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2601
diff changeset
698 }
2029
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
699 else {
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
700 logger.error("Do not know how to deal with (up) area info from: "
2104
bb0dede9294f Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2074
diff changeset
701 + data.getUpperData());
2029
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
702 }
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
703 }
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
704
2420
65ff8ff20be4 Fix flys/issue150 ('water increasing').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2325
diff changeset
705 // TODO Depending on style, the area (e.g. 20m^2) should be added as annotation.
65ff8ff20be4 Fix flys/issue150 ('water increasing').
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2325
diff changeset
706
2104
bb0dede9294f Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2074
diff changeset
707 if (data.getLowerData() != null) {
2029
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
708 // TODO: Sort this out: when the two series have the same name,
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
709 // the renderer (or anything in between) will not work correctly.
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
710 down = new StyledXYSeries(seriesName + " ", false, theme);
2104
bb0dede9294f Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2074
diff changeset
711 if (data.getLowerData() instanceof WQKms) {
bb0dede9294f Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2074
diff changeset
712 if (FacetTypes.IS.Q(data.getRootFacetName())) {
bb0dede9294f Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2074
diff changeset
713 StyledSeriesBuilder.addPointsKmQ(down, (WQKms) data.getLowerData());
bb0dede9294f Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2074
diff changeset
714 }
bb0dede9294f Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2074
diff changeset
715 else {
bb0dede9294f Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2074
diff changeset
716 StyledSeriesBuilder.addPoints(down, (WQKms) data.getLowerData());
bb0dede9294f Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2074
diff changeset
717 }
2029
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
718 }
2104
bb0dede9294f Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2074
diff changeset
719 else if (data.getLowerData() instanceof double[][]) {
2685
5652a851f1b4 Fix water-through-mountain in cross sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2664
diff changeset
720 StyledSeriesBuilder.addPoints(down, (double[][]) data.getLowerData(), false);
2029
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
721 }
2567
1d1cf502a360 fix flys/issue638 (area between certain datatypes).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2420
diff changeset
722 else if (data.getLowerData() instanceof WKms) {
1d1cf502a360 fix flys/issue638 (area between certain datatypes).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2420
diff changeset
723 StyledSeriesBuilder.addPoints(down, (WKms) data.getLowerData());
1d1cf502a360 fix flys/issue638 (area between certain datatypes).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2420
diff changeset
724 }
2664
3c4ec3b50af7 Fix area creation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2601
diff changeset
725 else if (data.getLowerData() instanceof Lines.LineData) {
2685
5652a851f1b4 Fix water-through-mountain in cross sections.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2664
diff changeset
726 StyledSeriesBuilder.addPoints(down, ((Lines.LineData) data.getLowerData()).points, false);
2664
3c4ec3b50af7 Fix area creation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2601
diff changeset
727 }
2029
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
728 else {
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
729 logger.error("Do not know how to deal with (down) area info from: "
2104
bb0dede9294f Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2074
diff changeset
730 + data.getLowerData());
2029
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
731 }
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
732 }
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
733
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
734 if (up == null && down != null) {
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
735 area.setMode(StyledAreaSeriesCollection.FILL_MODE.ABOVE);
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
736 down.setKey(seriesName);
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
737 area.addSeries(down);
2601
9e8459c2e7d4 Fix flys/issue491 (areas over axis stop at zero).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2567
diff changeset
738 area.addSeries(StyledSeriesBuilder.createGroundAtInfinity(down));
2029
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
739 }
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
740 else if (up != null && down == null) {
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
741 area.setMode(StyledAreaSeriesCollection.FILL_MODE.UNDER);
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
742 area.addSeries(up);
2601
9e8459c2e7d4 Fix flys/issue491 (areas over axis stop at zero).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2567
diff changeset
743 area.addSeries(StyledSeriesBuilder.createGroundAtInfinity(up));
2029
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
744 }
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
745 else if (up != null && down != null) {
2104
bb0dede9294f Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2074
diff changeset
746 if (data.doPaintBetween()) {
bb0dede9294f Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2074
diff changeset
747 area.setMode(StyledAreaSeriesCollection.FILL_MODE.BETWEEN);
bb0dede9294f Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2074
diff changeset
748 }
bb0dede9294f Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2074
diff changeset
749 else {
bb0dede9294f Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2074
diff changeset
750 area.setMode(StyledAreaSeriesCollection.FILL_MODE.ABOVE);
bb0dede9294f Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2074
diff changeset
751 }
2029
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
752 area.addSeries(up);
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
753 area.addSeries(down);
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
754 }
2104
bb0dede9294f Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2074
diff changeset
755 // Add area to the respective axis.
bb0dede9294f Implementation towards areas at other than first axis (flys/issue441).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2074
diff changeset
756 addAreaSeries(area, axisIdxForFacet(data.getRootFacetName()), visible);
2029
131842fc6581 Enable basicst area rendering in longitudinal section diagrams.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2022
diff changeset
757 }
6794
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
758
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
759
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
760 /**
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
761 * flow velocity specific outs
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
762 */
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
763
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
764 /**
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
765 * Process the output for flow velocity in main channel in a longitudinal section curve.
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
766 *
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
767 * @param data A FlowVelocityData object
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
768 * @param aandf The facet. This facet does NOT support any data objects. Use
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
769 * D4EArtifact.getNativeFacet() instead to retrieve a Facet which supports
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
770 * data.
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
771 * @param theme The theme that contains styling information.
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
772 * @param visible The visibility of the curve.
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
773 */
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
774 protected void doMainChannelOut(
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
775 FlowVelocityData data,
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
776 ArtifactAndFacet aandf,
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
777 Document theme,
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
778 boolean visible
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
779 ) {
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
780 logger.debug("FlowVelocityGenerator.doMainChannelOut");
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
781
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
782 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme);
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
783
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
784 StyledSeriesBuilder.addPoints(series, data.getMainChannelPoints(), true);
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
785
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
786 addAxisSeries(series, YAXIS.V.idx, visible);
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
787 }
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
788
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
789 /**
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
790 * Process the output for flow velocity in total channel in a longitudinal section curve.
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
791 */
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
792 protected void doTotalChannelOut(
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
793 FlowVelocityData data,
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
794 ArtifactAndFacet aandf,
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
795 Document theme,
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
796 boolean visible
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
797 ) {
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
798 logger.debug("FlowVelocityGenerator.doTotalChannelOut");
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
799
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
800 if (data == null) {
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
801 logger.warn("No data to add to FlowVelocity chart.");
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
802 return;
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
803 }
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
804
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
805 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme);
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
806
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
807 StyledSeriesBuilder.addPoints(series, data.getTotalChannelPoints(), true);
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
808
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
809 addAxisSeries(series, YAXIS.V.idx, visible);
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
810 }
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
811
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
812 /**
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
813 * @param data A FlowVelocityData object
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
814 * @param aandf The facet. This facet does NOT support any data objects. Use
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
815 * D4EArtifact.getNativeFacet() instead to retrieve a Facet which supports
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
816 * data.
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
817 * @param theme The theme that contains styling information.
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
818 * @param visible The visibility of the curve.
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
819 */
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
820 protected void doTauOut(
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
821 FlowVelocityData data,
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
822 ArtifactAndFacet aandf,
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
823 Document theme,
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
824 boolean visible
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
825 ) {
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
826 logger.debug("FlowVelocityGenerator.doTauOut");
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
827
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
828 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme);
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
829
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
830 StyledSeriesBuilder.addPoints(series, data.getTauPoints(), true);
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
831
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
832 addAxisSeries(series, YAXIS.T.idx, visible);
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
833 }
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
834
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
835 protected void doVPointOut (
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
836 Object data,
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
837 ArtifactAndFacet aandf,
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
838 Document theme,
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
839 boolean visible
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
840 ) {
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
841 logger.debug("FlowVelocityGenerator.doVPointOut");
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
842
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
843 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme);
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
844
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
845 FlowVelocityMeasurementValue.FastFlowVelocityMeasurementValue
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
846 value = (FlowVelocityMeasurementValue.FastFlowVelocityMeasurementValue)
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
847 data;
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
848
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
849 StyledSeriesBuilder.addPoints(series, new double[][] {{value.getStation()},{value.getV()}}, true);
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
850
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
851 addAxisSeries(series, YAXIS.V.idx, visible);
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
852 }
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
853
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
854 /**
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
855 * @param data A FlowVelocityData object
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
856 * @param aandf The facet. This facet does NOT support any data objects. Use
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
857 * D4EArtifact.getNativeFacet() instead to retrieve a Facet which supports
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
858 * data.
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
859 * @param theme The theme that contains styling information.
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
860 * @param visible The visibility of the curve.
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
861 */
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
862 protected void doQOut(
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
863 FlowVelocityData data,
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
864 ArtifactAndFacet aandf,
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
865 Document theme,
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
866 boolean visible
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
867 ) {
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
868 logger.debug("FlowVelocityGenerator.doTauOut");
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
869
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
870 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), theme);
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
871
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
872 StyledSeriesBuilder.addPoints(series, data.getQPoints(), true);
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
873
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
874 addAxisSeries(series, YAXIS.Q.idx, visible);
23ab795f2f0e Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents: 6791
diff changeset
875 }
6798
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
876
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
877 private void doBedQualityLoadDiameter(
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
878 BedloadDiameterResult data,
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
879 ArtifactAndFacet aandf,
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
880 Document attr,
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
881 boolean visible) {
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
882 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), attr);
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
883 StyledSeriesBuilder.addPoints(series, data.getDiameterData(), true);
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
884
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
885 addAxisSeries(series, YAXIS.D.idx, visible);
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
886 }
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
887
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
888
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
889 private void doBedQualityTopLayerOut(
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
890 BedDiameterResult data,
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
891 ArtifactAndFacet aandf,
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
892 Document attr,
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
893 boolean visible) {
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
894 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), attr);
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
895 StyledSeriesBuilder.addPoints(series, data.getDiameterSubData(), true);
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
896 addAxisSeries(series, YAXIS.D.idx, visible);
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
897 }
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
898
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
899
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
900 private void doBedQualitySubLayerOut(
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
901 BedDiameterResult data,
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
902 ArtifactAndFacet aandf,
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
903 Document attr,
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
904 boolean visible
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
905 ) {
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
906 logger.debug("Do beddiametersubout");
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
907 XYSeries series = new StyledXYSeries(aandf.getFacetDescription(), attr);
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
908 StyledSeriesBuilder.addPoints(series, data.getDiameterSubData(), true);
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
909 addAxisSeries(series, YAXIS.D.idx, visible);
7089f338138a Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents: 6794
diff changeset
910 }
359
e5ea6a01526c Added an OutGenerator for creating longitudinal section curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
911 }
e5ea6a01526c Added an OutGenerator for creating longitudinal section curves.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
912 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org