[PATCH 2 of 2] Reference gauge for salix line always the river's first gauge, all others 'not-in-range'

Wald Commits scm-commit at wald.intevation.org
Tue Oct 2 16:41:49 CEST 2018


# HG changeset patch
# User mschaefer
# Date 1538491295 -7200
# Node ID 429b623736333a38787f7056105e08e74651c202
# Parent  55c187a0a31e327511442611d034f47640342421
Reference gauge for salix line always the river's first gauge, all others 'not-in-range'

diff -r 55c187a0a31e -r 429b62373633 artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/salix/SalixLineCalculation.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/salix/SalixLineCalculation.java	Tue Oct 02 16:39:51 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/salix/SalixLineCalculation.java	Tue Oct 02 16:41:35 2018 +0200
@@ -31,6 +31,7 @@
 import org.dive4elements.river.artifacts.uinfo.UINFOArtifact;
 import org.dive4elements.river.artifacts.uinfo.salix.SalixLineAccess.ScenarioType;
 import org.dive4elements.river.model.BedHeight;
+import org.dive4elements.river.model.Gauge;
 import org.dive4elements.river.model.River;
 
 /**
@@ -68,7 +69,10 @@
 
         final ScenarioType scenarioType = accessSalix.getScenario();
 
-        final RiverInfoProvider riverInfoProvider = RiverInfoProvider.forRange(this.context, river, range, true);
+        final Gauge firstUpstreamGauge = river.firstUpstreamGauge();
+        final DoubleRange maxRange = new DoubleRange(firstUpstreamGauge.getRange().getA(), river.getKmUp() ? -99999.999 : 99999.999);
+        final RiverInfoProvider riverInfoProvider1 = RiverInfoProvider.forRange(this.context, river, maxRange);
+        final RiverInfoProvider riverInfoProvider = riverInfoProvider1.forReferenceRange(maxRange, false);
 
         final SalixLineCalculationResults results = new SalixLineCalculationResults(calcModeLabel, user, riverInfo, range);
 
diff -r 55c187a0a31e -r 429b62373633 artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/salix/SalixLineCalculator.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/salix/SalixLineCalculator.java	Tue Oct 02 16:39:51 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/salix/SalixLineCalculator.java	Tue Oct 02 16:41:35 2018 +0200
@@ -141,6 +141,7 @@
             }
         }
         row.putValue(UInfoResultType.customMultiRowColSalixScenarios, scenarios);
+        // REMARK Ist es sinnvoll, einen Bezugspegel für den Salix-Längsschnitt auszugeben?
         row.putValue(GeneralResultType.gaugeLabel, this.riverInfoProvider.findGauge(station));
         return row;
     }


More information about the Dive4Elements-commits mailing list