comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadFactory.java @ 6969:c137f5028591

Doc.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Thu, 05 Sep 2013 15:47:24 +0200
parents 6b9402377d07
children 7be97faf5848
comparison
equal deleted inserted replaced
6968:6b9402377d07 6969:c137f5028591
484 return load; 484 return load;
485 } 485 }
486 return new SedimentLoad(); 486 return new SedimentLoad();
487 } 487 }
488 488
489
490 /**
491 * Returns range of matching measurementstation.
492 * If no direct match is found, the measurement-station with
493 * the next lower station is taken - but only if km is still in
494 * its range.
495 *
496 * The end of the range is the beginning of the next range (next as in
497 * next greater station), or if it is the last, by its own ranges end.
498 *
499 * @param stations Map of station to measurementstation (attention:
500 * the range of a m.station does not necessarily
501 * begin at the registered station).
502 * @param km The station for which to find a measurementstation.
503 *
504 * @return The validity range of a station (interereted as described above
505 * for given km or null if none found.
506 */
489 protected static Range findMeasurementStationRange( 507 protected static Range findMeasurementStationRange(
490 TreeMap<Double, MeasurementStation> stations, 508 TreeMap<Double, MeasurementStation> stations,
491 double km 509 double km
492 ) { 510 ) {
493 MeasurementStation station = stations.floorEntry(km).getValue(); 511 MeasurementStation station = stations.floorEntry(km).getValue();
508 526
509 return new Range( 527 return new Range(
510 station.getRange().getA().doubleValue(), 528 station.getRange().getA().doubleValue(),
511 endKm); 529 endKm);
512 } 530 }
531
513 532
514 /** 533 /**
515 * Run query with grain parameter set to fraction, feed result into 534 * Run query with grain parameter set to fraction, feed result into
516 * load. Create load if null. 535 * load. Create load if null.
517 * 536 *

http://dive4elements.wald.intevation.org