changeset 9512:5c1e66a3c878

Zusammenführen
author gernotbelger
date Mon, 01 Oct 2018 12:57:10 +0200
parents 73819a194bfd (current diff) 9ea704de63ee (diff)
children 1722727803f7
files
diffstat 5 files changed, 12 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/tkhstate/TkhCalculation.java	Fri Sep 28 18:12:11 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/tkhstate/TkhCalculation.java	Mon Oct 01 12:57:10 2018 +0200
@@ -27,9 +27,9 @@
 import org.dive4elements.river.artifacts.common.ResultRow;
 import org.dive4elements.river.artifacts.model.Calculation;
 import org.dive4elements.river.artifacts.model.Calculation.Problem;
-import org.dive4elements.river.artifacts.model.river.RiverInfoProvider;
 import org.dive4elements.river.artifacts.model.CalculationResult;
 import org.dive4elements.river.artifacts.model.WQKms;
+import org.dive4elements.river.artifacts.model.river.RiverInfoProvider;
 import org.dive4elements.river.artifacts.resources.Resources;
 import org.dive4elements.river.artifacts.sinfo.SINFOArtifact;
 import org.dive4elements.river.artifacts.sinfo.tkhcalculation.DischargeValuesFinder;
@@ -79,6 +79,11 @@
         }
 
         final double[] stations = extractStations(bedHeights);
+        if (stations.length == 0) {
+            final TkhCalculationResults results = new TkhCalculationResults(calcModeLabel, user, riverInfo, calcRange, "");
+            problems.addProblem("sinfo.bedheightsfinder.empty");
+            return new CalculationResult(results, problems);
+        }
 
         /* misuse winfo-artifact to calculate waterlevels in the same way */
         final WINFOArtifact winfo = new WinfoArtifactWrapper(sinfo);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/vegetationzones/VegetationZonesCrossSectionProcessor.java	Fri Sep 28 18:12:11 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/vegetationzones/VegetationZonesCrossSectionProcessor.java	Mon Oct 01 12:57:10 2018 +0200
@@ -96,7 +96,7 @@
 
         // Üfd = -70,559 ∗ ln((DGM - MW) + 0,5) + 80,711
         final double f1 = -70.559;
-        final double f2 = -88.711;
+        final double f2 = 88.711;
 
         final double dgm = Math.exp((uefd - f2) / f1) + mw - 0.5;
         return dgm;
--- a/backend/doc/schema/oracle-sinfo-uinfo.sql	Fri Sep 28 18:12:11 2018 +0200
+++ b/backend/doc/schema/oracle-sinfo-uinfo.sql	Mon Oct 01 12:57:10 2018 +0200
@@ -468,8 +468,8 @@
 );
 
 COMMENT ON TABLE vegetation_zone IS 'Vegetation zone of a river station' ;
-COMMENT ON COLUMN vegetation_zone.min_overflow_days IS 'Minimum number (inclusive) of overflow days in a year for the zone type' ;
-COMMENT ON COLUMN vegetation_zone.max_overflow_days IS 'Maximum number (exclusive) of overflow days in a year for the zone type' ;
+COMMENT ON COLUMN vegetation_zone.min_overflow_days IS 'Minimum number (exclusive) of overflow days in a year for the zone type' ;
+COMMENT ON COLUMN vegetation_zone.max_overflow_days IS 'Maximum number (inclusive) of overflow days in a year for the zone type' ;
 COMMENT ON COLUMN vegetation_zone.color_r IS 'Red value (0-255) of the zone color' ;
 COMMENT ON COLUMN vegetation_zone.color_g IS 'Green value (0-255) of the zone color' ;
 COMMENT ON COLUMN vegetation_zone.color_b IS 'Blue value (0-255) of the zone color' ;
--- a/backend/doc/schema/postgresql-sinfo-uinfo.sql	Fri Sep 28 18:12:11 2018 +0200
+++ b/backend/doc/schema/postgresql-sinfo-uinfo.sql	Mon Oct 01 12:57:10 2018 +0200
@@ -464,8 +464,8 @@
 );
 
 COMMENT ON TABLE vegetation_zone IS 'Vegetation zone of a river station' ;
-COMMENT ON COLUMN vegetation_zone.min_overflow_days IS 'Minimum number (inclusive) of overflow days in a year for the zone type' ;
-COMMENT ON COLUMN vegetation_zone.max_overflow_days IS 'Maximum number (exclusive) of overflow days in a year for the zone type' ;
+COMMENT ON COLUMN vegetation_zone.min_overflow_days IS 'Minimum number (exclusive) of overflow days in a year for the zone type' ;
+COMMENT ON COLUMN vegetation_zone.max_overflow_days IS 'Maximum number (inclusive) of overflow days in a year for the zone type' ;
 COMMENT ON COLUMN vegetation_zone.color_r IS 'Red value (0-255) of the zone color' ;
 COMMENT ON COLUMN vegetation_zone.color_g IS 'Green value (0-255) of the zone color' ;
 COMMENT ON COLUMN vegetation_zone.color_b IS 'Blue value (0-255) of the zone color' ;
--- a/backend/src/main/java/org/dive4elements/river/importer/uinfo/parsers/VegetationParser.java	Fri Sep 28 18:12:11 2018 +0200
+++ b/backend/src/main/java/org/dive4elements/river/importer/uinfo/parsers/VegetationParser.java	Mon Oct 01 12:57:10 2018 +0200
@@ -183,7 +183,7 @@
         // return null;
         // }
         this.previousClassNo = classNo;
-        final int minDays = this.previousDaysLimit + 1;
+        final int minDays = this.previousDaysLimit;
         this.previousDaysLimit = daysLimit;
         final int red = (this.cols.get(ColTitlePattern.COLOR_R) >= 0) ? Integer.parseInt(values[this.cols.get(ColTitlePattern.COLOR_R)]) : 0;
         final int green = (this.cols.get(ColTitlePattern.COLOR_G) >= 0) ? Integer.parseInt(values[this.cols.get(ColTitlePattern.COLOR_G)]) : 0;

http://dive4elements.wald.intevation.org