comparison artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCalculator.java @ 9298:0b1a51b0c42e

Included the infrastructure-less stations in the S-Info flood duration long. sections, and the selected wspls in their w/q duration curves
author mschaefer
date Wed, 25 Jul 2018 11:33:48 +0200
parents 7100a555607c
children 9055afc19ec6
comparison
equal deleted inserted replaced
9297:7100a555607c 9298:0b1a51b0c42e
159 public List<StickyAxisAnnotation> calcMainValueQAnnotations(final Calculation problems, final double station, final FloodDurationCalculationResult result) { 159 public List<StickyAxisAnnotation> calcMainValueQAnnotations(final Calculation problems, final double station, final FloodDurationCalculationResult result) {
160 160
161 // Search the station in the previously calculated result rows and terminate if no infrastructure row found 161 // Search the station in the previously calculated result rows and terminate if no infrastructure row found
162 double station1 = station; 162 double station1 = station;
163 if (Double.isNaN(station)) { 163 if (Double.isNaN(station)) {
164 for (final ResultRow row : result.getRows()) { 164 for (final ResultRow row : result.getAllRows()) {
165 station1 = row.getDoubleValue(GeneralResultType.station); 165 station1 = row.getDoubleValue(GeneralResultType.station);
166 break; 166 break;
167 } 167 }
168 } 168 }
169 final List<ResultRow> stationRows = searchStation(station1, result.getRows()); 169 final List<ResultRow> stationRows = searchStation(station1, result.getAllRows());
170 if (stationRows.isEmpty()) { 170 if (stationRows.isEmpty()) {
171 return new ArrayList<>(); 171 return new ArrayList<>();
172 } 172 }
173 final ResultRow row = stationRows.get(0); 173 final ResultRow row = stationRows.get(0);
174 final List<StickyAxisAnnotation> annotations = new ArrayList<>(); 174 final List<StickyAxisAnnotation> annotations = new ArrayList<>();
189 public List<StickyAxisAnnotation> calcMainValueWAnnotations(final Calculation problems, final double station, final FloodDurationCalculationResult result) { 189 public List<StickyAxisAnnotation> calcMainValueWAnnotations(final Calculation problems, final double station, final FloodDurationCalculationResult result) {
190 190
191 // Search the station in the previously calculated result rows and terminate if no infrastructure row found 191 // Search the station in the previously calculated result rows and terminate if no infrastructure row found
192 double station1 = station; 192 double station1 = station;
193 if (Double.isNaN(station)) { 193 if (Double.isNaN(station)) {
194 for (final ResultRow row : result.getRows()) { 194 for (final ResultRow row : result.getAllRows()) {
195 station1 = row.getDoubleValue(GeneralResultType.station); 195 station1 = row.getDoubleValue(GeneralResultType.station);
196 break; 196 break;
197 } 197 }
198 } 198 }
199 final List<ResultRow> stationRows = searchStation(station1, result.getRows()); 199 final List<ResultRow> stationRows = searchStation(station1, result.getAllRows());
200 if (stationRows.isEmpty()) { 200 if (stationRows.isEmpty()) {
201 return new ArrayList<>(); 201 return new ArrayList<>();
202 } 202 }
203 final List<StickyAxisAnnotation> annotations = new ArrayList<>(); 203 final List<StickyAxisAnnotation> annotations = new ArrayList<>();
204 final ResultRow row = stationRows.get(0); 204 final ResultRow row = stationRows.get(0);

http://dive4elements.wald.intevation.org