Mercurial > dive4elements > river
changeset 6968:6b9402377d07
issue1465: Fetch correct measurement station (also if the km does not
match the measurementstation.station, but falls within its range.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Thu, 05 Sep 2013 15:46:57 +0200 |
parents | 3a987e9af256 |
children | c137f5028591 |
files | artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadFactory.java |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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; }