comparison backend/src/main/java/org/dive4elements/river/model/BedHeightValueType.java @ 8964:45f1ad66560e

Code cleanup concerning calculations: improved error handling; improved interpolation; bed heights are now always used for spatial discretisation
author gernotbelger
date Thu, 29 Mar 2018 15:48:17 +0200
parents
children ecadc9ed0ba0
comparison
equal deleted inserted replaced
8963:b98fbd91f64a 8964:45f1ad66560e
1 /** Copyright (C) 2017 by Bundesanstalt für Gewässerkunde
2 * Software engineering by
3 * Björnsen Beratende Ingenieure GmbH
4 * Dr. Schumacher Ingenieurbüro für Wasser und Umwelt
5 *
6 * This file is Free Software under the GNU AGPL (>=v3)
7 * and comes with ABSOLUTELY NO WARRANTY! Check out the
8 * documentation coming with Dive4Elements River for details.
9 */
10 package org.dive4elements.river.model;
11
12 /**
13 * Enumerations that allows to access min/max/mean value of {@link BedHeight} in the same way.
14 *
15 * @author Gernot Belger
16 *
17 */
18 public enum BedHeightValueType {
19 min {
20 @Override
21 public Double getValue(final BedHeightValue bedheightValue) {
22 return bedheightValue.getMinHeight();
23 }
24 },
25 max {
26 @Override
27 public Double getValue(final BedHeightValue bedheightValue) {
28 return bedheightValue.getMaxHeight();
29 }
30 },
31 value {
32 @Override
33 public Double getValue(final BedHeightValue bedheightValue) {
34 return bedheightValue.getHeight();
35 }
36 };
37
38 public abstract Double getValue(final BedHeightValue bedheightValue);
39 }

http://dive4elements.wald.intevation.org