[PATCH 6 of 7] issue1465: Fetch correct measurement station (also if the km does not
Wald Commits
scm-commit at wald.intevation.org
Thu Sep 5 15:37:51 CEST 2013
# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1378388817 -7200
# Node ID 6b9402377d076fbac45fa7205f9e53e3494535eb
# Parent 3a987e9af2561228e89fb9e52832872489f6f5d9
issue1465: Fetch correct measurement station (also if the km does not
match the measurementstation.station, but falls within its range.
diff -r 3a987e9af256 -r 6b9402377d07 artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadFactory.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadFactory.java Thu Sep 05 15:31:58 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadFactory.java Thu Sep 05 15:46:57 2013 +0200
@@ -490,8 +490,8 @@
TreeMap<Double, MeasurementStation> stations,
double km
) {
- MeasurementStation station = stations.get(km);
- if (station == null) {
+ MeasurementStation station = stations.floorEntry(km).getValue();
+ if (station == null || !station.getRange().contains(km)) {
return null;
}
More information about the Dive4elements-commits
mailing list