diff 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
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/GaugeDischargeCurveFacet.java	Wed Jun 12 16:36:34 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/GaugeDischargeCurveFacet.java	Wed Jun 12 10:54:27 2013 +0200
@@ -67,8 +67,7 @@
 
         DischargeTables dt = new DischargeTables(river, name);
 
-        Map<String, double [][]> map = dt.getValues(
-                DischargeTables.MASTER_SCALE);
+        Map<String, double [][]> map = dt.getValues();
 
         double [][] values = map.get(name);
         if (values == null) {
@@ -76,7 +75,7 @@
         }
         double [] kms = new double[values[0].length];
         Arrays.fill(kms, gauge.getStation().doubleValue());
-        return new WQKms(kms, values[0], values[1], name);
+        return new WQKms(kms, values[0], values[1], name, WQKms.CENTIMETER_AT_GAUGE);
     }
 
     @Override

http://dive4elements.wald.intevation.org