Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/salix/SalixLineCalculationResult.java @ 9430:e8b1255fc89e
Added calculation of salix hw5 and salix line w
author | mschaefer |
---|---|
date | Mon, 20 Aug 2018 09:41:07 +0200 |
parents | bd5f5d2220fa |
children | 515643b2c49a |
comparison
equal
deleted
inserted
replaced
9429:bd5f5d2220fa | 9430:e8b1255fc89e |
---|---|
185 | 185 |
186 final ResultRow row = getRowForStation(currentKm, STATION_TOLERANCE); | 186 final ResultRow row = getRowForStation(currentKm, STATION_TOLERANCE); |
187 if (row == null) | 187 if (row == null) |
188 return Double.NaN; | 188 return Double.NaN; |
189 | 189 |
190 // FIXME: hier wird die geodätische Höhe der SalixLinie benötigt; am besten auch schon in die Ergebnistzeilen einbauen | 190 return row.getDoubleValue(UInfoResultType.salixw); |
191 return 84.0; | |
192 // return row.getDoubleValue(UInfoResultType.salixline); | |
193 } | 191 } |
194 | 192 |
195 public final double getSalixScenarioValue(final double currentKm, final double nextKm, final double prevKm, final int scenarioIndex) { | 193 public final double getSalixScenarioValue(final double currentKm, final double nextKm, final double prevKm, final int scenarioIndex) { |
196 final ResultRow row = getRowForStation(currentKm, STATION_TOLERANCE); | 194 final ResultRow row = getRowForStation(currentKm, STATION_TOLERANCE); |
197 if (row == null) | 195 if (row == null) |
200 final List<SalixScenario> scenarios = (List<SalixScenario>) row.getValue(UInfoResultType.customMultiRowColSalixScenarios); | 198 final List<SalixScenario> scenarios = (List<SalixScenario>) row.getValue(UInfoResultType.customMultiRowColSalixScenarios); |
201 final SalixScenario salixScenario = scenarios.get(scenarioIndex); | 199 final SalixScenario salixScenario = scenarios.get(scenarioIndex); |
202 if (salixScenario == null) | 200 if (salixScenario == null) |
203 return Double.NaN; | 201 return Double.NaN; |
204 | 202 |
205 // FIXME: hier wird die geodätische Höhe der SalixLinie benötigt; ggf schon als weiteres Feld an SalixScenario dranbauen | 203 return salixScenario.getSalixW(); |
206 return 89; | |
207 // return salixScenario.getSalixValue(); | |
208 } | 204 } |
209 | 205 |
210 public final double getWaterlevelValue(final double currentKm, final double nextKm, final double prevKm, final SalixWaterlevel waterlevel) { | 206 public final double getWaterlevelValue(final double currentKm, final double nextKm, final double prevKm, final SalixWaterlevel waterlevel) { |
211 | 207 |
212 final ResultRow row = getRowForStation(currentKm, STATION_TOLERANCE); | 208 final ResultRow row = getRowForStation(currentKm, STATION_TOLERANCE); |
218 return row.getDoubleValue(UInfoResultType.waterlevelMNW); | 214 return row.getDoubleValue(UInfoResultType.waterlevelMNW); |
219 case mw: | 215 case mw: |
220 return row.getDoubleValue(UInfoResultType.waterlevelMW); | 216 return row.getDoubleValue(UInfoResultType.waterlevelMW); |
221 case mhw: | 217 case mhw: |
222 return row.getDoubleValue(UInfoResultType.waterlevelMHW); | 218 return row.getDoubleValue(UInfoResultType.waterlevelMHW); |
223 case mh5: | 219 case hw5: |
224 return row.getDoubleValue(UInfoResultType.waterlevelMH5); | 220 return row.getDoubleValue(UInfoResultType.waterlevelMH5); |
225 | 221 |
226 default: | 222 default: |
227 throw new UnsupportedOperationException(); | 223 throw new UnsupportedOperationException(); |
228 } | 224 } |