comparison artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/tkhcalculation/DischargeValuesFinder.java @ 8964:45f1ad66560e

Code cleanup concerning calculations: improved error handling; improved interpolation; bed heights are now always used for spatial discretisation
author gernotbelger
date Thu, 29 Mar 2018 15:48:17 +0200
parents 5d5d482da3e9
children 16df9f7a9815
comparison
equal deleted inserted replaced
8963:b98fbd91f64a 8964:45f1ad66560e
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
80 // IMPORTANT: we first try to retrieve the exact value if it is present, to avoid rounding changes due to interpolation. 82 // IMPORTANT: we first try to retrieve the exact value if it is present, to avoid rounding changes due to interpolation.
81 // This is important because in the WaterlevelExporter code, these values are double-compared (with '==' ...) in order 83 // This is important because in the WaterlevelExporter code, these values are double-compared (with '==' ...) in order
82 // to find the corresponding main-value. 84 // to find the corresponding main-value.
83 if (this.exactValues != null && this.exactValues.contains(station)) 85 if (this.exactValues != null && this.exactValues.contains(station))
84 return this.exactValues.get(station); 86 return this.exactValues.get(station);

http://dive4elements.wald.intevation.org