[PATCH 1 of 5] Minor refactoring in MainValuesArtifact

Wald Commits scm-commit at wald.intevation.org
Tue Jul 2 08:13:11 CEST 2013


# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1372741759 -7200
# Node ID 5afb1cda5885d993ba3d4ec5c13ebcdb9dabca9f
# Parent  263ea424f24c43860018e8b5b81658edb844ce61
Minor refactoring in MainValuesArtifact.

diff -r 263ea424f24c -r 5afb1cda5885 artifacts/src/main/java/org/dive4elements/river/artifacts/MainValuesArtifact.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/MainValuesArtifact.java	Mon Jul 01 09:47:43 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/MainValuesArtifact.java	Tue Jul 02 07:09:19 2013 +0200
@@ -403,7 +403,6 @@
         double gaugeStation = gauge.getStation().doubleValue();
         double w_out[] = {0.0f};
         double q_out[] = {0.0f};
-        double kms[] = {getLocation()};
         if (gauge != null) {
             List<MainValue> orig = gauge.getMainValues();
             for (MainValue mv : orig) {
@@ -431,6 +430,16 @@
 
 
     /**
+     * Get a list of "W" main values.
+     * @param atGauge if true, do not interpolate
+     * @return list of W main values.
+     */
+    public List<NamedDouble> getMainValuesW(boolean atGauge) {
+        return getMainValuesW(atGauge, new double[] {getLocation()});
+    }
+
+
+    /**
      * Returns the name of this artifact ('mainvalue').
      *
      * @return 'mainvalue'


More information about the Dive4elements-commits mailing list