comparison artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/tkhcalculation/DischargeValuesFinder.java @ 9040:5294114b1df4

Fixed/changed some FIXMEs/TODOs
author gernotbelger
date Wed, 02 May 2018 12:19:31 +0200
parents 16df9f7a9815
children
comparison
equal deleted inserted replaced
9039:13b5b515c61f 9040:5294114b1df4
75 } 75 }
76 76
77 public double getDischarge(final double station) { 77 public double getDischarge(final double station) {
78 78
79 try { 79 try {
80 // FIXME: check: ich dachte wir interpolieren den abfluss nicht linear?
81
82 // IMPORTANT: we first try to retrieve the exact value if it is present, to avoid rounding changes due to interpolation. 80 // IMPORTANT: we first try to retrieve the exact value if it is present, to avoid rounding changes due to interpolation.
83 // This is important because in the WaterlevelExporter code, these values are double-compared (with '==' ...) in order 81 // This is important because in the WaterlevelExporter code, these values are double-compared (with '==' ...) in order
84 // to find the corresponding main-value. 82 // to find the corresponding main-value.
85 if (this.exactValues != null && this.exactValues.contains(station)) 83 if (this.exactValues != null && this.exactValues.contains(station))
86 return this.exactValues.get(station); 84 return this.exactValues.get(station);
88 if (this.qInterpolator == null) 86 if (this.qInterpolator == null)
89 return Double.NaN; 87 return Double.NaN;
90 88
91 return this.qInterpolator.value(station); 89 return this.qInterpolator.value(station);
92 } 90 }
93 catch (final FunctionEvaluationException e) { 91 catch (@SuppressWarnings("unused") final FunctionEvaluationException e) {
92 // ignore exception because this can/will happen regularly
94 return Double.NaN; 93 return Double.NaN;
95 } 94 }
96 } 95 }
97 } 96 }

http://dive4elements.wald.intevation.org