Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java @ 3272:31168ac9c7e7
Partial fix for issue694 (heightmarks snap to nearest cross section).
flys-artifacts/trunk@4916 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Tue, 10 Jul 2012 15:31:56 +0000 |
parents | 7e5460d08eb0 |
children | f903f1e5aed6 |
comparison
equal
deleted
inserted
replaced
3271:4c4ec9e9650a | 3272:31168ac9c7e7 |
---|---|
207 /** | 207 /** |
208 * Computes the data of a waterlevel computation based on the interpolation | 208 * Computes the data of a waterlevel computation based on the interpolation |
209 * in WstValueTable. | 209 * in WstValueTable. |
210 * | 210 * |
211 * @param kms The kilometer values. | 211 * @param kms The kilometer values. |
212 * @param qa The discharge values. | 212 * @param qs The discharge values. |
213 * @param wst The WstValueTable used for the interpolation. | 213 * @param wst The WstValueTable used for the interpolation. |
214 * | 214 * |
215 * @return an array of data triples that consist of W, Q and Kms. | 215 * @return an array of data triples that consist of W, Q and Kms. |
216 */ | 216 */ |
217 public static CalculationResult computeWaterlevelData( | 217 public static CalculationResult computeWaterlevelData( |
327 | 327 |
328 | 328 |
329 /** | 329 /** |
330 * Computes the data used to create computed discharge curves. | 330 * Computes the data used to create computed discharge curves. |
331 * | 331 * |
332 * @param wst The WstValueTable that is used for the interpolation. | 332 * @param wst The WstValueTable that is used for the interpolation (river- |
333 * bound). | |
333 * @param location The location where the computation should be based on. | 334 * @param location The location where the computation should be based on. |
334 * | 335 * |
335 * @return an object that contains tuples of W/Q values at the specified | 336 * @return an object that contains tuples of W/Q values at the specified |
336 * location. | 337 * location. |
337 */ | 338 */ |
344 Calculation2 calculation = new Calculation2(location); | 345 Calculation2 calculation = new Calculation2(location); |
345 | 346 |
346 return calculation.calculate(wst); | 347 return calculation.calculate(wst); |
347 } | 348 } |
348 | 349 |
350 | |
351 /** Create CalculationResult with data and message. */ | |
349 protected static final CalculationResult error(Object data, String msg) { | 352 protected static final CalculationResult error(Object data, String msg) { |
350 return new CalculationResult(data, new Calculation(msg)); | 353 return new CalculationResult(data, new Calculation(msg)); |
351 } | 354 } |
352 | 355 |
353 | 356 |
578 /** | 581 /** |
579 * Get points of line describing the surface of water at cross section. | 582 * Get points of line describing the surface of water at cross section. |
580 * | 583 * |
581 * @param idx Index for getWaterlevelData. | 584 * @param idx Index for getWaterlevelData. |
582 * @param csl The profile/surface to fill with water. | 585 * @param csl The profile/surface to fill with water. |
586 * @param nextIgnored Ignored in this implementation of WaterLineArtifact. | |
587 * @param prevIgnored Ignored in this implementation of WaterLineArtifact. | |
583 * | 588 * |
584 * @return an array holding coordinates of points of surface of water ( | 589 * @return an array holding coordinates of points of surface of water ( |
585 * in the form {{x1, x2} {y1, y2}} ). | 590 * in the form {{x1, x2} {y1, y2}} ). |
586 */ | 591 */ |
587 @Override | 592 @Override |
588 public Lines.LineData getWaterLines(int idx, FastCrossSectionLine csl) { | 593 public Lines.LineData getWaterLines(int idx, FastCrossSectionLine csl, |
594 double nextIgnored, double prevIgnored) { | |
589 logger.debug("getWaterLines(" + idx + ")"); | 595 logger.debug("getWaterLines(" + idx + ")"); |
590 | 596 |
591 List<Point2D> points = csl.getPoints(); | 597 List<Point2D> points = csl.getPoints(); |
592 | 598 |
593 // Need W at km | 599 // Need W at km |
1186 private static final String [] INACTIVES = new String[] { | 1192 private static final String [] INACTIVES = new String[] { |
1187 LONGITUDINAL_Q, | 1193 LONGITUDINAL_Q, |
1188 DURATION_Q | 1194 DURATION_Q |
1189 }; | 1195 }; |
1190 | 1196 |
1191 /** | 1197 |
1192 * Returns the WstValueTable. | 1198 /** |
1199 * Returns the WstValueTable of current river. | |
1193 */ | 1200 */ |
1194 public WstValueTable getWstValueTable() { | 1201 public WstValueTable getWstValueTable() { |
1195 River r = FLYSUtils.getRiver(this); | 1202 River r = FLYSUtils.getRiver(this); |
1196 return WstValueTableFactory.getTable(r); | 1203 return WstValueTableFactory.getTable(r); |
1197 } | 1204 } |