comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/MiddleBedHeightCalculation.java @ 3924:5fced192b95c

Towards fix of issue863 (gaps in middle heigh bed data). flys-artifacts/trunk@5613 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Thu, 27 Sep 2012 11:12:38 +0000
parents 0f7abd95c6e2
children e20307be4cc3
comparison
equal deleted inserted replaced
3923:9fac337192c9 3924:5fced192b95c
61 61
62 if (s != null) { 62 if (s != null) {
63 singles.add(s); 63 singles.add(s);
64 } 64 }
65 else { 65 else {
66 logger.warn("Cannot find Sngle by id: " + id); 66 logger.warn("Cannot find Single by id: " + id);
67 // TODO ADD WARNING 67 // TODO ADD WARNING
68 } 68 }
69 } 69 }
70 70
71 return singles; 71 return singles;
144 single.getYear(), 144 single.getYear(),
145 single.getEvaluationBy(), 145 single.getEvaluationBy(),
146 single.getDescription()); 146 single.getDescription());
147 147
148 for (BedHeightSingleValue value: values) { 148 for (BedHeightSingleValue value: values) {
149 data.addKM(value.getStation().doubleValue()); 149 if (value.getHeight() != null) {
150 data.addMiddleHeight(value.getHeight().doubleValue()); 150 data.addAll(value.getStation().doubleValue(),
151 data.addUncertainty(value.getUncertainty().doubleValue()); 151 value.getHeight().doubleValue(),
152 data.addSoundingWidth(value.getSoundingWidth().doubleValue()); 152 value.getUncertainty().doubleValue(),
153 data.addDataGap(value.getDataGap().doubleValue()); 153 value.getSoundingWidth().doubleValue(),
154 data.addWidth(value.getWidth().doubleValue()); 154 value.getDataGap().doubleValue(),
155 value.getWidth().doubleValue(),
156 false);
157 }
158 else {
159 data.addAll(value.getStation().doubleValue(),
160 0,
161 0,
162 0,
163 0,
164 0,
165 true);
166 }
155 } 167 }
156 168
157 logger.debug("Single contains " + values.size() + " values"); 169 logger.debug("Single contains " + values.size() + " values");
158 170
159 return data; 171 return data;

http://dive4elements.wald.intevation.org