[Dive4elements-commits] [PATCH] Use maxOverlap to get the correct gauge for the MainValues
Wald Commits
scm-commit at wald.intevation.org
Wed May 22 18:10:51 CEST 2013
# HG changeset patch
# User Andre Heinecke <aheinecke at intevation.de>
# Date 1369239048 -7200
# Node ID e9a76ffa0f9ae1159e19acd625d241b712cefc1f
# Parent 0a200ba544617c4e8030486e4f8fb22a533bb794
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.
diff -r 0a200ba54461 -r e9a76ffa0f9a artifacts/src/main/java/org/dive4elements/river/artifacts/services/MainValuesService.java
--- 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.");
More information about the Dive4elements-commits
mailing list