Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/GaugeDischargeCurveFacet.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 | af13ceeba52a |
children | 8578babdb2c8 |
comparison
equal
deleted
inserted
replaced
6300:0711ce5ca701 | 6301:20a32dbdbb59 |
---|---|
65 | 65 |
66 String name = gauge.getName(); | 66 String name = gauge.getName(); |
67 | 67 |
68 DischargeTables dt = new DischargeTables(river, name); | 68 DischargeTables dt = new DischargeTables(river, name); |
69 | 69 |
70 Map<String, double [][]> map = dt.getValues( | 70 Map<String, double [][]> map = dt.getValues(); |
71 DischargeTables.MASTER_SCALE); | |
72 | 71 |
73 double [][] values = map.get(name); | 72 double [][] values = map.get(name); |
74 if (values == null) { | 73 if (values == null) { |
75 return null; | 74 return null; |
76 } | 75 } |
77 double [] kms = new double[values[0].length]; | 76 double [] kms = new double[values[0].length]; |
78 Arrays.fill(kms, gauge.getStation().doubleValue()); | 77 Arrays.fill(kms, gauge.getStation().doubleValue()); |
79 return new WQKms(kms, values[0], values[1], name); | 78 return new WQKms(kms, values[0], values[1], name, WQKms.CENTIMETER_AT_GAUGE); |
80 } | 79 } |
81 | 80 |
82 @Override | 81 @Override |
83 public Facet deepCopy() { | 82 public Facet deepCopy() { |
84 GaugeDischargeCurveFacet copy = new GaugeDischargeCurveFacet( | 83 GaugeDischargeCurveFacet copy = new GaugeDischargeCurveFacet( |