Mercurial > dive4elements > river
changeset 9529:429b62373633
Reference gauge for salix line always the river's first gauge, all others 'not-in-range'
author | mschaefer |
---|---|
date | Tue, 02 Oct 2018 16:41:35 +0200 (2018-10-02) |
parents | 55c187a0a31e |
children | 144a184a414d |
files | artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/salix/SalixLineCalculation.java artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/salix/SalixLineCalculator.java |
diffstat | 2 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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);
--- 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; }