comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/Calculation6.java @ 6301:20a32dbdbb59

Remove discharge table scaling but add reference system to W - Discharge_Tables are now always W[cm] Q[m³] no need for special case handling depending on historical / master tables - W now has a referenceSystem value that can be CENTIMETER_AT_GAUGE or METER_OVER_REFPOINT. The default is METER_OVER_REFPOINT as this is the case for everything except the objects created from discharge tables Known issue: WINFO input validation is currently broken as it still scales the user input.
author Andre Heinecke <aheinecke@intevation.de>
date Wed, 12 Jun 2013 10:54:27 +0200
parents 9e84e323bdf6
children fe03337c8011
comparison
equal deleted inserted replaced
6300:0711ce5ca701 6301:20a32dbdbb59
36 private int mode; 36 private int mode;
37 private long [] timerange; 37 private long [] timerange;
38 private double [] values; 38 private double [] values;
39 private Long officialGaugeNumber; 39 private Long officialGaugeNumber;
40 40
41
42 public static final double SCALE = 1d;
43 41
44 public Calculation6(HistoricalDischargeAccess access) { 42 public Calculation6(HistoricalDischargeAccess access) {
45 EvaluationMode mode = access.getEvaluationMode(); 43 EvaluationMode mode = access.getEvaluationMode();
46 Timerange tr = access.getEvaluationTimerange(); 44 Timerange tr = access.getEvaluationTimerange();
47 double [] vs = mode != null && mode == EvaluationMode.W 45 double [] vs = mode != null && mode == EvaluationMode.W
327 325
328 double [][] getValues(DischargeTable dt) { 326 double [][] getValues(DischargeTable dt) {
329 Integer id = dt.getId(); 327 Integer id = dt.getId();
330 double [][] vs = cache.get(id); 328 double [][] vs = cache.get(id);
331 if (vs == null) { 329 if (vs == null) {
332 vs = DischargeTables.loadDischargeTableValues( 330 vs = DischargeTables.loadDischargeTableValues(dt);
333 dt, DischargeTables.HISTORICAL_SCALE);
334 cache.put(id, vs); 331 cache.put(id, vs);
335 } 332 }
336 return vs; 333 return vs;
337 } 334 }
338 335

http://dive4elements.wald.intevation.org