Mercurial > dive4elements > river
diff artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/tkhstate/TkhCalculation.java @ 9205:3dae6b78e1da
inundationDuration/floodDuration multiple columns+chartLines refactoring
author | gernotbelger |
---|---|
date | Mon, 02 Jul 2018 19:01:09 +0200 |
parents | 0a19a79663dd |
children | 740d65e4aa14 |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/tkhstate/TkhCalculation.java Mon Jul 02 17:40:39 2018 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/tkhstate/TkhCalculation.java Mon Jul 02 19:01:09 2018 +0200 @@ -156,13 +156,12 @@ final RiverInfoProvider riverInfoProvider = riverInfo.forWaterlevel(waterlevel); - // FIXME: check with winfo how the name is generated - final String wstLabel = waterlevel.getName(); + final String waterlevelLabel = descBuilder.getDesc(wkms); - final WstInfo wstInfo = new WstInfo(wstLabel, wspYear, riverInfoProvider.getReferenceGauge()); + final WstInfo wstInfo = new WstInfo(waterlevelLabel, wspYear, riverInfoProvider.getReferenceGauge()); /* build tkh calculators per bedheight */ - final Map<NumberRange, TkhCalculator> calculatorsByRanges = buildCalculators(calcRange, wkms, bedHeights, problems, riverInfoProvider, wstLabel); + final Map<NumberRange, TkhCalculator> calculatorsByRanges = buildCalculators(calcRange, wkms, bedHeights, problems, riverInfoProvider, waterlevelLabel); if (calculatorsByRanges.isEmpty()) { /* there should already be some problems, so just abort */ return null; @@ -170,8 +169,6 @@ final Collection<ResultRow> rows = new ArrayList<>(); - final String waterlevelLabel = descBuilder.getDesc(wkms); - for (final Double stationDbl : allStations) { final double station = stationDbl; @@ -191,7 +188,7 @@ rows.add(row); } - return new TkhCalculationResult(wstLabel, wstInfo, true, rows); + return new TkhCalculationResult(waterlevelLabel, wstInfo, true, rows); } private TkhCalculator findCalculator(final Map<NumberRange, TkhCalculator> calculators, final double station) {