# HG changeset patch # User Felix Wolfsteller # Date 1378388844 -7200 # Node ID c137f5028591c28bebf400c22992a6b998c131fa # Parent 6b9402377d076fbac45fa7205f9e53e3494535eb Doc. diff -r 6b9402377d07 -r c137f5028591 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:46:57 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadFactory.java Thu Sep 05 15:47:24 2013 +0200 @@ -486,6 +486,24 @@ return new SedimentLoad(); } + + /** + * Returns range of matching measurementstation. + * If no direct match is found, the measurement-station with + * the next lower station is taken - but only if km is still in + * its range. + * + * The end of the range is the beginning of the next range (next as in + * next greater station), or if it is the last, by its own ranges end. + * + * @param stations Map of station to measurementstation (attention: + * the range of a m.station does not necessarily + * begin at the registered station). + * @param km The station for which to find a measurementstation. + * + * @return The validity range of a station (interereted as described above + * for given km or null if none found. + */ protected static Range findMeasurementStationRange( TreeMap stations, double km @@ -511,6 +529,7 @@ endKm); } + /** * Run query with grain parameter set to fraction, feed result into * load. Create load if null.