Mercurial > dive4elements > river
annotate artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoad.java @ 6970:7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Thu, 05 Sep 2013 17:15:04 +0200 |
parents | e6a8255d0764 |
children | 2b022ca95b3b |
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:
5863
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:
5863
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:
5787
diff
changeset
|
9 package org.dive4elements.river.artifacts.model.minfo; |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
10 |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
11 import java.util.Date; |
4370
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
12 import java.util.HashMap; |
6970
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
13 import java.util.Map; |
4370
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
14 import java.util.Set; |
6970
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
15 import java.util.TreeMap; |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
16 |
5831
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5787
diff
changeset
|
17 import org.dive4elements.river.artifacts.model.NamedObjectImpl; |
6374
48e92ff57f23
SedimentLoad*: Set range to fraction/fractions values.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5994
diff
changeset
|
18 import org.dive4elements.river.artifacts.model.Range; |
6970
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
19 import org.dive4elements.river.utils.EpsilonComparator; |
6374
48e92ff57f23
SedimentLoad*: Set range to fraction/fractions values.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5994
diff
changeset
|
20 |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
21 |
5787 | 22 /** Gives access to Fractions (at kms). */ |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
23 public class SedimentLoad |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
24 extends NamedObjectImpl |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
25 { |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
26 protected String description; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
27 protected Date start; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
28 protected Date end; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
29 protected boolean isEpoch; |
6392
9a0f8d532797
Load sedimentload fraction with sedimentload factory and add new facets to artifact.
Raimund Renkert <rrenkert@intevation.de>
parents:
6376
diff
changeset
|
30 protected String unit; |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
31 |
6970
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
32 protected Map<Double, SedimentLoadFraction> kms; |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
33 |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
34 public SedimentLoad() { |
6970
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
35 kms = new TreeMap<Double, SedimentLoadFraction>(EpsilonComparator.CMP); |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
36 } |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
37 |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
38 public SedimentLoad( |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
39 String description, |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
40 Date start, |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
41 Date end, |
6392
9a0f8d532797
Load sedimentload fraction with sedimentload factory and add new facets to artifact.
Raimund Renkert <rrenkert@intevation.de>
parents:
6376
diff
changeset
|
42 boolean isEpoch, |
9a0f8d532797
Load sedimentload fraction with sedimentload factory and add new facets to artifact.
Raimund Renkert <rrenkert@intevation.de>
parents:
6376
diff
changeset
|
43 String unit |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
44 ) { |
4370
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
45 this(); |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
46 this.description = description; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
47 this.start = start; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
48 this.end = end; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
49 this.isEpoch = isEpoch; |
6392
9a0f8d532797
Load sedimentload fraction with sedimentload factory and add new facets to artifact.
Raimund Renkert <rrenkert@intevation.de>
parents:
6376
diff
changeset
|
50 this.unit = unit; |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
51 } |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
52 |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
53 public String getDescription() { |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
54 return description; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
55 } |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
56 |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
57 public void setDescription(String description) { |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
58 this.description = description; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
59 } |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
60 |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
61 public Date getStart() { |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
62 return start; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
63 } |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
64 |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
65 public void setStart(Date start) { |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
66 this.start = start; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
67 } |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
68 |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
69 public Date getEnd() { |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
70 return end; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
71 } |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
72 |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
73 public void setEnd(Date end) { |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
74 this.end = end; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
75 } |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
76 |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
77 public boolean isEpoch() { |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
78 return isEpoch; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
79 } |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
80 |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
81 public void setEpoch(boolean isEpoch) { |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
82 this.isEpoch = isEpoch; |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
83 } |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
84 |
4370
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
85 public Set<Double> getKms() { |
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
86 return kms.keySet(); |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
87 } |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
88 |
4370
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
89 public void addKm(double km, SedimentLoadFraction fraction) { |
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
90 kms.put(km, fraction); |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
91 } |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
92 |
4370
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
93 public SedimentLoadFraction getFraction(double km) { |
6970
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
94 SedimentLoadFraction f = kms.get(km); |
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
95 if (f == null) { |
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
96 f = new SedimentLoadFraction(); |
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
97 kms.put(km, f); |
4370
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
98 } |
6970
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
99 return f; |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
100 } |
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
101 |
6374
48e92ff57f23
SedimentLoad*: Set range to fraction/fractions values.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5994
diff
changeset
|
102 public void setCoarse(double km, double coarse, Range range) { |
6970
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
103 SedimentLoadFraction f = getFraction(km); |
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
104 f.setCoarse(coarse); |
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
105 f.setCoarseRange(range); |
4370
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
106 } |
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
107 |
6374
48e92ff57f23
SedimentLoad*: Set range to fraction/fractions values.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5994
diff
changeset
|
108 public void setFineMiddle(double km, double fine_middle, Range range) { |
6970
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
109 SedimentLoadFraction f = getFraction(km); |
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
110 f.setFineMiddle(fine_middle); |
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
111 f.setFineMiddleRange(range); |
4370
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
112 } |
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
113 |
6970
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
114 |
6374
48e92ff57f23
SedimentLoad*: Set range to fraction/fractions values.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5994
diff
changeset
|
115 public void setSand(double km, double sand, Range range) { |
6970
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
116 SedimentLoadFraction f = getFraction(km); |
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
117 f.setSand(sand); |
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
118 f.setSandRange(range); |
6374
48e92ff57f23
SedimentLoad*: Set range to fraction/fractions values.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5994
diff
changeset
|
119 } |
48e92ff57f23
SedimentLoad*: Set range to fraction/fractions values.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5994
diff
changeset
|
120 |
48e92ff57f23
SedimentLoad*: Set range to fraction/fractions values.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5994
diff
changeset
|
121 public void setSuspSand(double km, double susp_sand, Range range) { |
6970
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
122 SedimentLoadFraction f = getFraction(km); |
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
123 f.setSuspSand(susp_sand); |
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
124 f.setSuspSandRange(range); |
6374
48e92ff57f23
SedimentLoad*: Set range to fraction/fractions values.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5994
diff
changeset
|
125 } |
48e92ff57f23
SedimentLoad*: Set range to fraction/fractions values.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5994
diff
changeset
|
126 |
48e92ff57f23
SedimentLoad*: Set range to fraction/fractions values.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5994
diff
changeset
|
127 public void setSuspSandBed(double km, double susp_sand_bed, Range range) { |
6970
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
128 SedimentLoadFraction f = getFraction(km); |
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
129 f.setSuspSandBed(susp_sand_bed); |
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
130 f.setSuspSandBedRange(range); |
4370
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
131 } |
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
132 |
6374
48e92ff57f23
SedimentLoad*: Set range to fraction/fractions values.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5994
diff
changeset
|
133 public void setSuspSediment(double km, double susp_sediment, Range range) { |
6970
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
134 SedimentLoadFraction f = getFraction(km); |
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
135 f.setSuspSediment(susp_sediment); |
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
136 f.setSuspSedimentRange(range); |
4370
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
137 } |
6a65e7ef43c0
Updated data object and factory for sediment load.
Raimund Renkert <rrenkert@intevation.de>
parents:
4296
diff
changeset
|
138 |
4546
af1938d4e957
New field in sediment load object and calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
4515
diff
changeset
|
139 public void setLoadTotal(double km, double total) { |
6952
e6a8255d0764
SedimentLoad: Allow to set range of total load.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6392
diff
changeset
|
140 setLoadTotal(km, total, null); |
e6a8255d0764
SedimentLoad: Allow to set range of total load.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6392
diff
changeset
|
141 } |
e6a8255d0764
SedimentLoad: Allow to set range of total load.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6392
diff
changeset
|
142 |
e6a8255d0764
SedimentLoad: Allow to set range of total load.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6392
diff
changeset
|
143 public void setLoadTotal(double km, double total, Range range) { |
6970
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
144 SedimentLoadFraction f = getFraction(km); |
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
145 f.setLoadTotal(total); |
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
146 f.setLoadTotalRange(range); |
4546
af1938d4e957
New field in sediment load object and calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
4515
diff
changeset
|
147 } |
af1938d4e957
New field in sediment load object and calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
4515
diff
changeset
|
148 |
6374
48e92ff57f23
SedimentLoad*: Set range to fraction/fractions values.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
5994
diff
changeset
|
149 public void setTotal(double km, double total, Range range) { |
6970
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
150 SedimentLoadFraction f = getFraction(km); |
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
151 f.setTotal(total); |
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
152 f.setTotalRange(range); |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
153 } |
4515
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
154 |
6392
9a0f8d532797
Load sedimentload fraction with sedimentload factory and add new facets to artifact.
Raimund Renkert <rrenkert@intevation.de>
parents:
6376
diff
changeset
|
155 public void setUnknown(double km, double unknown, Range range) { |
6970
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
156 SedimentLoadFraction f = getFraction(km); |
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
157 f.setUnknown(unknown); |
7be97faf5848
flys/issue1235: Same kicks against a few inconsistencies and bugs in the calculation of sediment loads. I believe it _do_not_ delivers the right results.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6952
diff
changeset
|
158 f.setUnknownRange(range); |
6392
9a0f8d532797
Load sedimentload fraction with sedimentload factory and add new facets to artifact.
Raimund Renkert <rrenkert@intevation.de>
parents:
6376
diff
changeset
|
159 } |
9a0f8d532797
Load sedimentload fraction with sedimentload factory and add new facets to artifact.
Raimund Renkert <rrenkert@intevation.de>
parents:
6376
diff
changeset
|
160 |
9a0f8d532797
Load sedimentload fraction with sedimentload factory and add new facets to artifact.
Raimund Renkert <rrenkert@intevation.de>
parents:
6376
diff
changeset
|
161 public String getUnit() { |
9a0f8d532797
Load sedimentload fraction with sedimentload factory and add new facets to artifact.
Raimund Renkert <rrenkert@intevation.de>
parents:
6376
diff
changeset
|
162 return unit; |
9a0f8d532797
Load sedimentload fraction with sedimentload factory and add new facets to artifact.
Raimund Renkert <rrenkert@intevation.de>
parents:
6376
diff
changeset
|
163 } |
9a0f8d532797
Load sedimentload fraction with sedimentload factory and add new facets to artifact.
Raimund Renkert <rrenkert@intevation.de>
parents:
6376
diff
changeset
|
164 |
9a0f8d532797
Load sedimentload fraction with sedimentload factory and add new facets to artifact.
Raimund Renkert <rrenkert@intevation.de>
parents:
6376
diff
changeset
|
165 public void setUnit(String unit) { |
9a0f8d532797
Load sedimentload fraction with sedimentload factory and add new facets to artifact.
Raimund Renkert <rrenkert@intevation.de>
parents:
6376
diff
changeset
|
166 this.unit = unit; |
9a0f8d532797
Load sedimentload fraction with sedimentload factory and add new facets to artifact.
Raimund Renkert <rrenkert@intevation.de>
parents:
6376
diff
changeset
|
167 } |
9a0f8d532797
Load sedimentload fraction with sedimentload factory and add new facets to artifact.
Raimund Renkert <rrenkert@intevation.de>
parents:
6376
diff
changeset
|
168 |
4515
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
169 public boolean hasCoarse() { |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
170 for (SedimentLoadFraction slf : kms.values()) { |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
171 if (slf.getCoarse() > 0d) { |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
172 return true; |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
173 } |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
174 } |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
175 return false; |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
176 } |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
177 |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
178 public boolean hasFineMiddle() { |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
179 for (SedimentLoadFraction slf : kms.values()) { |
6376
8d6f23243d1d
SedimentLoad*: Switch from snake_case to camelCase.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6374
diff
changeset
|
180 if (slf.getFineMiddle() > 0d) { |
4515
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
181 return true; |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
182 } |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
183 } |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
184 return false; |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
185 } |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
186 |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
187 public boolean hasSand() { |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
188 for (SedimentLoadFraction slf : kms.values()) { |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
189 if (slf.getSand() > 0d) { |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
190 return true; |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
191 } |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
192 } |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
193 return false; |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
194 } |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
195 |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
196 public boolean hasSuspSand() { |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
197 for (SedimentLoadFraction slf : kms.values()) { |
6376
8d6f23243d1d
SedimentLoad*: Switch from snake_case to camelCase.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6374
diff
changeset
|
198 if (slf.getSuspSand() > 0d) { |
4515
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
199 return true; |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
200 } |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
201 } |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
202 return false; |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
203 } |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
204 |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
205 public boolean hasSuspSediment() { |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
206 for (SedimentLoadFraction slf : kms.values()) { |
6376
8d6f23243d1d
SedimentLoad*: Switch from snake_case to camelCase.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6374
diff
changeset
|
207 if (slf.getSuspSediment() > 0d) { |
4515
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
208 return true; |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
209 } |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
210 } |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
211 return false; |
17d896822d70
Added methods to sediment load object to check fractions.
Raimund Renkert <rrenkert@intevation.de>
parents:
4483
diff
changeset
|
212 } |
4546
af1938d4e957
New field in sediment load object and calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
4515
diff
changeset
|
213 |
af1938d4e957
New field in sediment load object and calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
4515
diff
changeset
|
214 public boolean hasTotalLoad() { |
af1938d4e957
New field in sediment load object and calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
4515
diff
changeset
|
215 for (SedimentLoadFraction slf : kms.values()) { |
af1938d4e957
New field in sediment load object and calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
4515
diff
changeset
|
216 if (slf.getLoadTotal() > 0d) { |
af1938d4e957
New field in sediment load object and calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
4515
diff
changeset
|
217 return true; |
af1938d4e957
New field in sediment load object and calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
4515
diff
changeset
|
218 } |
af1938d4e957
New field in sediment load object and calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
4515
diff
changeset
|
219 } |
af1938d4e957
New field in sediment load object and calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
4515
diff
changeset
|
220 return false; |
af1938d4e957
New field in sediment load object and calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
4515
diff
changeset
|
221 } |
4296
3051bc28ac43
Added data object and factory for sediment load calculation.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
222 } |
5662
7e3cde8b564c
Cosmetics, docs, vimlines.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
4551
diff
changeset
|
223 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |