Mercurial > dive4elements > river
changeset 3926:e20307be4cc3
Fix issue863.
flys-artifacts/trunk@5618 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Thu, 27 Sep 2012 12:58:55 +0000 |
parents | 36147ddb2c32 |
children | 208a891c21b5 |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/MiddleBedHeightCalculation.java |
diffstat | 2 files changed, 16 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Thu Sep 27 11:54:10 2012 +0000 +++ b/flys-artifacts/ChangeLog Thu Sep 27 12:58:55 2012 +0000 @@ -1,3 +1,10 @@ +2012-09-27 Felix Wolfsteller <felix.wolfsteller@intevation.de> + + Fix issue863 (gaps in middle height bed data). + + * src/main/java/de/intevation/flys/artifacts/model/MiddleBedHeightCalculation.java: + Handle missing data. + 2012-09-27 Ingo Weinzierl <ingo@intevation.de> * src/main/java/de/intevation/flys/wsplgen/FacetCreator.java: Set
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/MiddleBedHeightCalculation.java Thu Sep 27 11:54:10 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/MiddleBedHeightCalculation.java Thu Sep 27 12:58:55 2012 +0000 @@ -172,6 +172,7 @@ } + /** Create MiddleBedHeightData to return. */ protected MiddleBedHeightData prepareEpochData( BedHeightEpoch epoch, double kmLo, @@ -193,7 +194,14 @@ for (BedHeightEpochValue value: values) { data.addKM(value.getStation().doubleValue()); - data.addMiddleHeight(value.getHeight().doubleValue()); + if (value.getHeight() != null) { + data.addMiddleHeight(value.getHeight().doubleValue()); + data.addIsEmpty(false); + } + else { + data.addMiddleHeight(Double.NaN); + data.addIsEmpty(true); + } } logger.debug("Epoch contains " + values.size() + " values");