Mercurial > dive4elements > river
changeset 6061:e9a76ffa0f9a
Use maxOverlap to get the correct gauge for the MainValues
Previously just the first matching gauge was taken even if it's
range ended with the minimum value. This code is clearly intended
to get one gauge for one range so the best match should be taken.
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Wed, 22 May 2013 18:10:48 +0200 |
parents | 0a200ba54461 |
children | 1a169e10c0f3 |
files | artifacts/src/main/java/org/dive4elements/river/artifacts/services/MainValuesService.java |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/services/MainValuesService.java Wed May 22 17:08:06 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/services/MainValuesService.java Wed May 22 18:10:48 2013 +0200 @@ -79,7 +79,7 @@ } double[] minmax = getRequestedStartEnd(data, river); - Gauge gauge = river.determineGauge(minmax[0], minmax[1]); + Gauge gauge = river.maxOverlap(minmax[0], minmax[1]); if (gauge == null) { return error("no gauge found.");