Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepthminmax/FlowDepthMinMaxCalculation.java @ 8997:d5802f22e4f5
Work on uinfo
author | gernotbelger |
---|---|
date | Thu, 12 Apr 2018 19:14:19 +0200 |
parents | 0adc6d04de95 |
children | 740d65e4aa14 |
comparison
equal
deleted
inserted
replaced
8996:fb9430250899 | 8997:d5802f22e4f5 |
---|---|
12 import java.util.ArrayList; | 12 import java.util.ArrayList; |
13 import java.util.Collection; | 13 import java.util.Collection; |
14 | 14 |
15 import org.apache.commons.lang.math.DoubleRange; | 15 import org.apache.commons.lang.math.DoubleRange; |
16 import org.dive4elements.artifacts.CallContext; | 16 import org.dive4elements.artifacts.CallContext; |
17 import org.dive4elements.river.artifacts.common.GeneralResultType; | |
18 import org.dive4elements.river.artifacts.common.ResultRow; | |
17 import org.dive4elements.river.artifacts.model.Calculation; | 19 import org.dive4elements.river.artifacts.model.Calculation; |
18 import org.dive4elements.river.artifacts.model.CalculationResult; | 20 import org.dive4elements.river.artifacts.model.CalculationResult; |
19 import org.dive4elements.river.artifacts.model.WKms; | 21 import org.dive4elements.river.artifacts.model.WKms; |
20 import org.dive4elements.river.artifacts.resources.Resources; | 22 import org.dive4elements.river.artifacts.resources.Resources; |
21 import org.dive4elements.river.artifacts.sinfo.SINFOArtifact; | 23 import org.dive4elements.river.artifacts.sinfo.SINFOArtifact; |
22 import org.dive4elements.river.artifacts.sinfo.common.RiverInfoProvider; | 24 import org.dive4elements.river.artifacts.sinfo.common.RiverInfoProvider; |
23 import org.dive4elements.river.artifacts.sinfo.common.SInfoResultRow; | |
24 import org.dive4elements.river.artifacts.sinfo.common.SInfoResultType; | 25 import org.dive4elements.river.artifacts.sinfo.common.SInfoResultType; |
25 import org.dive4elements.river.artifacts.sinfo.flowdepth.FlowDepthUtils; | 26 import org.dive4elements.river.artifacts.sinfo.flowdepth.FlowDepthUtils; |
26 import org.dive4elements.river.artifacts.sinfo.flowdepth.WstSoundingIdPair; | 27 import org.dive4elements.river.artifacts.sinfo.flowdepth.WstSoundingIdPair; |
27 import org.dive4elements.river.artifacts.sinfo.tkhcalculation.DischargeValuesFinder; | 28 import org.dive4elements.river.artifacts.sinfo.tkhcalculation.DischargeValuesFinder; |
28 import org.dive4elements.river.artifacts.sinfo.tkhcalculation.WaterlevelValuesFinder; | 29 import org.dive4elements.river.artifacts.sinfo.tkhcalculation.WaterlevelValuesFinder; |
118 | 119 |
119 final String waterlevelLabel = waterlevel.getName(); | 120 final String waterlevelLabel = waterlevel.getName(); |
120 final String soundingLabel = bedHeightInfo.getDescription(); | 121 final String soundingLabel = bedHeightInfo.getDescription(); |
121 | 122 |
122 /* real calculation loop */ | 123 /* real calculation loop */ |
123 final Collection<SInfoResultRow> rows = new ArrayList<>(); | 124 final Collection< ResultRow> rows = new ArrayList<>(); |
124 | 125 |
125 final Collection<Double> stations = bedHeight.getStations(); | 126 final Collection<Double> stations = bedHeight.getStations(); |
126 for (final double station : stations) { | 127 for (final double station : stations) { |
127 if (calcRange.containsDouble(station)) { | 128 if (calcRange.containsDouble(station)) { |
128 | 129 |
144 | 145 |
145 /* ignore invalid lines */ | 146 /* ignore invalid lines */ |
146 if (Double.isNaN(wst) || Double.isNaN(minBedHeightValue) || Double.isNaN(maxBedHeightValue)) | 147 if (Double.isNaN(wst) || Double.isNaN(minBedHeightValue) || Double.isNaN(maxBedHeightValue)) |
147 continue; | 148 continue; |
148 | 149 |
149 final SInfoResultRow row = SInfoResultRow.create().// | 150 final ResultRow row = ResultRow.create().// |
150 putValue(SInfoResultType.station, station). // | 151 putValue(GeneralResultType.station, station). // |
151 putValue(SInfoResultType.flowdepthmin, minFlowDepth). // | 152 putValue(SInfoResultType.flowdepthmin, minFlowDepth). // |
152 putValue(SInfoResultType.flowdepthmax, maxFlowDepth). // | 153 putValue(SInfoResultType.flowdepthmax, maxFlowDepth). // |
153 putValue(SInfoResultType.waterlevel, wst). // | 154 putValue(SInfoResultType.waterlevel, wst). // |
154 putValue(SInfoResultType.discharge, discharge). // | 155 putValue(SInfoResultType.discharge, discharge). // |
155 putValue(SInfoResultType.waterlevelLabel, waterlevelLabel). // | 156 putValue(SInfoResultType.waterlevelLabel, waterlevelLabel). // |