diff artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BezugswstCalculation.java @ 9444:ecadc9ed0ba0

Added heights and depths of cross section fields in the bundu bzws calculation and longitudinal section charts
author mschaefer
date Tue, 21 Aug 2018 13:41:18 +0200
parents d2f5375ede26
children e60584f2a531
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BezugswstCalculation.java	Mon Aug 20 18:50:33 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BezugswstCalculation.java	Tue Aug 21 13:41:18 2018 +0200
@@ -34,6 +34,7 @@
 import org.dive4elements.river.artifacts.sinfo.util.RiverInfo;
 import org.dive4elements.river.artifacts.sinfo.util.WstInfo;
 import org.dive4elements.river.exports.WaterlevelDescriptionBuilder;
+import org.dive4elements.river.model.BedHeightValueType;
 import org.dive4elements.river.model.River;
 import org.dive4elements.river.utils.Formatter;
 
@@ -224,6 +225,15 @@
             row.putValue(BunduResultType.channelLowerEdge, Formatter.roundFlowDepth(w).subtract(Formatter.roundFlowDepth(channelDepth)).doubleValue());
         else
             row.putValue(BunduResultType.channelLowerEdge, Double.NaN);
+        final List<Double> fieldHeights = new ArrayList<>();
+        final List<Double> fieldDepths = new ArrayList<>();
+        for (int i = BedHeightValueType.FIELD_FIRST_INDEX; i <= BedHeightValueType.FIELD_LAST_INDEX; i++) {
+            final double h = bedHeightsFinder.getFieldHeight(station, i);
+            fieldHeights.add(Double.valueOf(h));
+            fieldDepths.add(w - h);
+        }
+        row.putValue(BunduResultType.bedHeightFields, fieldHeights);
+        row.putValue(BunduResultType.depthFields, fieldDepths);
         return row;
     }
 }
\ No newline at end of file

http://dive4elements.wald.intevation.org