Mercurial > dive4elements > river
annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/RelativePointFacet.java @ 2749:5eb3edb4f37b
Add relative-points-fixations for duration curves in dc conf.
flys-artifacts/trunk@4484 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Wed, 23 May 2012 20:42:29 +0000 |
parents | 94c6f4ad9b98 |
children | b05faaa9099b |
rev | line source |
---|---|
2743
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.artifacts.model; |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
2 |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
3 import java.util.List; |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
4 import java.awt.geom.Point2D; |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
5 |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
6 import org.apache.log4j.Logger; |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
7 |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
8 import de.intevation.artifacts.Artifact; |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
9 import de.intevation.artifacts.CallContext; |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
10 import de.intevation.artifacts.DataProvider; |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
11 |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
12 import de.intevation.flys.artifacts.StaticWKmsArtifact; |
2747
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
13 import de.intevation.flys.artifacts.math.Linear; |
2743
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
14 import de.intevation.flys.artifacts.model.FacetTypes; |
2747
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
15 import de.intevation.flys.artifacts.model.RelativePointFacet; |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
16 import de.intevation.flys.artifacts.model.WQDay; |
2743
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
17 |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
18 /** |
2747
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
19 * Facet to access a point. |
2743
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
20 */ |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
21 public class RelativePointFacet |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
22 extends BlackboardDataFacet |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
23 implements FacetTypes { |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
24 |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
25 private static Logger logger = Logger.getLogger(RelativePointFacet.class); |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
26 |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
27 /** Trivial Constructor. */ |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
28 public RelativePointFacet(String description) { |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
29 this(RELATIVE_POINT, description); |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
30 } |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
31 |
2747
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
32 |
2743
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
33 public RelativePointFacet(String name, String description) { |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
34 this.name = name; |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
35 this.description = description; |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
36 this.index = 0; |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
37 } |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
38 |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
39 |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
40 /** |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
41 * Returns the data this facet requires. |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
42 * |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
43 * @param artifact the owner artifact. |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
44 * @param context the CallContext (ignored). |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
45 * |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
46 * @return the data. |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
47 */ |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
48 @Override |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
49 public Object getData(Artifact artifact, CallContext context) { |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
50 // Find out whether we live in a duration curve context, there we would |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
51 // provide only a single point. |
2747
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
52 Object wqdays = null; |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
53 double km = 0d; |
2743
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
54 List<DataProvider> providers = context. |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
55 getDataProvider("durationcurve"); |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
56 if (providers.size() < 1) { |
2747
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
57 logger.warn("Could not find durationcurve data provider."); |
2743
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
58 } |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
59 else { |
2747
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
60 wqdays = providers.get(0).provideData( |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
61 DurationCurveFacet.BB_DURATIONCURVE, |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
62 null, |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
63 context); |
2743
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
64 } |
2747
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
65 List<DataProvider> kmproviders = context. |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
66 getDataProvider(DurationCurveFacet.BB_DURATIONCURVE_KM); |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
67 if (kmproviders.size() < 1) { |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
68 logger.warn("Could not find durationcurve.km data provider."); |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
69 } |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
70 else { |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
71 logger.debug("Found durationcurve.km data provider."); |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
72 String dckm = providers.get(0).provideData( |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
73 DurationCurveFacet.BB_DURATIONCURVE_KM, |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
74 null, |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
75 context).toString(); |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
76 km = Double.valueOf(dckm); |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
77 } |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
78 |
2743
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
79 StaticWKmsArtifact staticData = |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
80 (StaticWKmsArtifact) artifact; |
2747
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
81 |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
82 if (wqdays != null) { |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
83 // Which W at this km? |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
84 double w = staticData.getWAtKmLin(staticData.getWKms(0), km); |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
85 if (w == -1) { |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
86 logger.warn("w is -1, already bad sign!"); |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
87 } |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
88 // Where is this W passed by in the wq-curve? |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
89 WQDay wqday = (WQDay) wqdays; |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
90 // Doing a linear Day Of KM. |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
91 int idx = 0; |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
92 boolean wIncreases = wqday.getW(0) < wqday.getW(wqday.size()-1); |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
93 if (wIncreases) { |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
94 while (idx < wqday.size() && wqday.getW(idx) < w) { |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
95 idx++; |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
96 } |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
97 } |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
98 else { |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
99 idx = wqday.size() -1; |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
100 while (idx > 0 && wqday.getW(idx) > w) { |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
101 idx--; |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
102 } |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
103 } |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
104 |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
105 double day = 0d; |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
106 int mod = (wIncreases) ? -1 : +1; |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
107 if (idx != 0 && idx <= wqday.size()-1) { |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
108 day = Linear.linear(w, wqday.getW(idx +mod), wqday.getW(idx), |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
109 wqday.getDay(idx+mod), wqday.getDay(idx)); |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
110 } |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
111 |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
112 return new Point2D.Double((double) day, w); |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
113 } |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
114 logger.warn("not wqkms / w / day found"); |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
115 |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
116 // TODO better signal failure. |
94c6f4ad9b98
Handle case of points in wqday (durationcurve) scenarios.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2743
diff
changeset
|
117 return new Point2D.Double(0d, 0d); |
2743
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
118 } |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
119 |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
120 |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
121 /** |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
122 * Create a deep copy of this Facet. |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
123 * @return a deep copy. |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
124 */ |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
125 @Override |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
126 public RelativePointFacet deepCopy() { |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
127 RelativePointFacet copy = new RelativePointFacet(description); |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
128 copy.set(this); |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
129 return copy; |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
130 } |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
131 } |
10e6400d4166
Added (dummy-) implementation of relative point facet in staticwkms case.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
132 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |