# HG changeset patch # User Felix Wolfsteller # 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 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; }