Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/tkhstate/BedHeightsFinder.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 | 439699ff9b2d |
children | 7228bd10a8cc |
comparison
equal
deleted
inserted
replaced
9443:515643b2c49a | 9444:ecadc9ed0ba0 |
---|---|
169 | 169 |
170 public double getMaxBedHeight(final double km) { | 170 public double getMaxBedHeight(final double km) { |
171 return interpolateBedHeights(km, BedHeightValueType.max); | 171 return interpolateBedHeights(km, BedHeightValueType.max); |
172 } | 172 } |
173 | 173 |
174 public double getFieldHeight(final double km, final int index) { | |
175 return interpolateBedHeights(km, BedHeightValueType.field(index)); | |
176 } | |
177 | |
174 private double interpolateBedHeights(final double km, final BedHeightValueType type) { | 178 private double interpolateBedHeights(final double km, final BedHeightValueType type) { |
175 if (this.values.containsKey(km)) | 179 if (this.values.containsKey(km)) |
176 { | 180 { |
177 final Double value = type.getValue(this.values.get(km)); | 181 final Double value = type.getValue(this.values.get(km)); |
178 return value == null ? Double.NaN : value.doubleValue(); | 182 return value == null ? Double.NaN : value.doubleValue(); |