Mercurial > dive4elements > river
annotate artifacts/src/main/java/org/dive4elements/river/exports/FlowVelocityGenerator.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 | 372c255714df |
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:
5549
diff
changeset
|
9 package org.dive4elements.river.exports; |
2706
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
10 |
4626
5b551e3a58d5
Add start and end km of current chart zoomlevel to the context and use these
Raimund Renkert <rrenkert@intevation.de>
parents:
4468
diff
changeset
|
11 import java.util.Arrays; |
5b551e3a58d5
Add start and end km of current chart zoomlevel to the context and use these
Raimund Renkert <rrenkert@intevation.de>
parents:
4468
diff
changeset
|
12 |
2706
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
13 import org.apache.log4j.Logger; |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
14 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
15 import org.jfree.data.xy.XYSeries; |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
16 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
17 import org.w3c.dom.Document; |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
18 |
5831
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5549
diff
changeset
|
19 import org.dive4elements.artifactdatabase.state.ArtifactAndFacet; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5549
diff
changeset
|
20 import org.dive4elements.artifactdatabase.state.Facet; |
2706
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
21 |
5867
59ff03ff48f1
River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5865
diff
changeset
|
22 import org.dive4elements.river.artifacts.D4EArtifact; |
2706
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
23 |
5831
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5549
diff
changeset
|
24 import org.dive4elements.river.artifacts.access.FlowVelocityAccess; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5549
diff
changeset
|
25 import org.dive4elements.river.artifacts.model.FacetTypes; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5549
diff
changeset
|
26 import org.dive4elements.river.artifacts.model.FlowVelocityData; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5549
diff
changeset
|
27 import org.dive4elements.river.artifacts.model.minfo.BedDiameterResult; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5549
diff
changeset
|
28 import org.dive4elements.river.artifacts.model.minfo.BedloadDiameterResult; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5549
diff
changeset
|
29 import org.dive4elements.river.model.FlowVelocityMeasurementValue; |
2706
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
30 |
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.jfree.Bounds; |
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.jfree.DoubleBounds; |
7089f338138a
Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents:
6794
diff
changeset
|
33 // import org.dive4elements.river.jfree.RiverAnnotation; |
7089f338138a
Move Funcionality related to bed quality from FlowVelocityGenerator to LongitudinalSectionGenerator (previously left over).
Tom Gottfried <tom.gottfried@intevation.de>
parents:
6794
diff
changeset
|
34 // import org.dive4elements.river.jfree.StyledXYSeries; |
5831
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5549
diff
changeset
|
35 |
5865
73da40528cf2
River artifacts: Renamed FLYSUtils to RiverUtils.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5864
diff
changeset
|
36 import org.dive4elements.river.utils.RiverUtils; |
2706
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
37 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
38 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
39 /** |
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:
6517
diff
changeset
|
40 * An OutGenerator that generates flow velocity diagramms. |
2706
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
41 * |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
42 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
43 */ |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
44 public class FlowVelocityGenerator |
6517
ef3b02034f6a
More consistent labeling for longitudinal section diagrams
Tom Gottfried <tom@intevation.de>
parents:
6101
diff
changeset
|
45 extends LongitudinalSectionGenerator |
2706
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
46 implements FacetTypes |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
47 { |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
48 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:
6517
diff
changeset
|
49 V(0), // 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:
6517
diff
changeset
|
50 T(1), // 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:
6517
diff
changeset
|
51 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:
6517
diff
changeset
|
52 O(3), // diameter |
23ab795f2f0e
Moved most of the functionality of FlowVelocityGenerator to LongitudinalSectionGenerator on the way to longitudinal-section symmetry. ToDos left.
Tom Gottfried <tom@intevation.de>
parents:
6517
diff
changeset
|
53 W(4), // 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:
6517
diff
changeset
|
54 D(5); // waterlevel-difference |
2706
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
55 protected int idx; |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
56 private YAXIS(int c) { |
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:
6517
diff
changeset
|
57 idx = c; |
2706
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
58 } |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
59 } |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
60 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
61 /** The logger that is used in this generator. */ |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
62 private static Logger logger = Logger.getLogger(FlowVelocityGenerator.class); |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
63 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
64 /** |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
65 * Key to look up internationalized String for LongitudinalSection diagrams |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
66 * titles. |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
67 */ |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
68 public static final String I18N_CHART_TITLE = |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
69 "chart.flow_velocity.section.title"; |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
70 |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
71 } |
d8444fcb4e44
Create chart facets for flow velocity calculation and a chart generator for this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
72 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |