Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/RelativePointFacet.java @ 3442:cd5eb8f5f6f1
Cosmetics, docs.
flys-artifacts/trunk@5105 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Mon, 23 Jul 2012 14:57:27 +0000 |
parents | 0f7abd95c6e2 |
children | cce12c06466f |
comparison
equal
deleted
inserted
replaced
3441:bfbd478bd607 | 3442:cd5eb8f5f6f1 |
---|---|
39 StaticWKmsArtifact artifact) | 39 StaticWKmsArtifact artifact) |
40 { | 40 { |
41 // TODO here and in reference curve calc: Do warn if more than 1 | 41 // TODO here and in reference curve calc: Do warn if more than 1 |
42 // provider found or (way better) handle it. | 42 // provider found or (way better) handle it. |
43 Object wqdays = null; | 43 Object wqdays = null; |
44 double km = 0d; | 44 double km = 0d; |
45 List<DataProvider> providers = context. | 45 List<DataProvider> providers = context. |
46 getDataProvider(DurationCurveFacet.BB_DURATIONCURVE); | 46 getDataProvider(DurationCurveFacet.BB_DURATIONCURVE); |
47 if (providers.size() < 1) { | 47 if (providers.size() < 1) { |
48 logger.warn("Could not find durationcurve data provider."); | 48 logger.warn("Could not find durationcurve data provider."); |
49 } | 49 } |
91 } | 91 } |
92 | 92 |
93 double day = 0d; | 93 double day = 0d; |
94 int mod = (wIncreases) ? -1 : +1; | 94 int mod = (wIncreases) ? -1 : +1; |
95 if (idx != 0 && idx <= wqday.size()-1) { | 95 if (idx != 0 && idx <= wqday.size()-1) { |
96 day = Linear.linear(w, wqday.getW(idx +mod), wqday.getW(idx), | 96 day = Linear.linear(w, wqday.getW(idx+mod), wqday.getW(idx), |
97 wqday.getDay(idx+mod), wqday.getDay(idx)); | 97 wqday.getDay(idx+mod), wqday.getDay(idx)); |
98 } | 98 } |
99 | 99 |
100 return new Point2D.Double((double) day, w); | 100 return new Point2D.Double((double) day, w); |
101 } | 101 } |
102 logger.warn("not wqkms / w / day found"); | 102 logger.warn("not wqkms / w / day found"); |
103 // TODO better signal failure. | 103 // TODO better signal failure. |
104 return new Point2D.Double(0d, 0d); | 104 return new Point2D.Double(0d, 0d); |
105 //return null; | |
106 } | 105 } |
107 | 106 |
108 | 107 |
109 /** | 108 /** |
110 * Calculate a reference curve point, that is, a point made of | 109 * Calculate a reference curve point, that is, a point made of |