comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixWQCurveFacet.java @ 7299:cde863b2dae3

(issue1529) Only interpolate within a step limit in WQ diagram Created together with Sascha Teichmann
author Andre Heinecke <aheinecke@intevation.de>
date Fri, 11 Oct 2013 17:11:15 +0200
parents 08e3c22500f3
children e4606eae8ea5
comparison
equal deleted inserted replaced
7298:5b2126d21c2e 7299:cde863b2dae3
95 } 95 }
96 96
97 Parameters params = result.getParameters(); 97 Parameters params = result.getParameters();
98 String[] paramNames = ff.getParameterNames(); 98 String[] paramNames = ff.getParameterNames();
99 99
100 double [] coeffs = params.interpolate("km", currentKm, paramNames); 100 double [] coeffs = params.interpolateWithLimit(
101 "km", currentKm, paramNames, access.getStep() / 1000 + 1E-3);
101 102
102 if (coeffs == null) { 103 if (coeffs == null) {
103 logger.warn("getData: coeffs == null"); 104 logger.warn("getData: coeffs not in interpolation limits");
104 return null; 105 return null;
105 } 106 }
106 107
107 org.dive4elements.river.artifacts.math.Function mf = 108 org.dive4elements.river.artifacts.math.Function mf =
108 ff.instantiate(coeffs); 109 ff.instantiate(coeffs);

http://dive4elements.wald.intevation.org