[PATCH 2 of 2] Zusammenführen
Wald Commits
scm-commit at wald.intevation.org
Mon Oct 1 12:57:06 CEST 2018
# HG changeset patch
# User gernotbelger
# Date 1538391430 -7200
# Node ID 5c1e66a3c878df3090dff565b1f22c25abed0901
# Parent 73819a194bfd7649e380af5d775f3a204927949e
# Parent 9ea704de63ee790f5cbafd64204a9026f014a90e
Zusammenführen
diff -r 73819a194bfd -r 5c1e66a3c878 artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/tkhstate/TkhCalculation.java
--- 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);
diff -r 73819a194bfd -r 5c1e66a3c878 artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/vegetationzones/VegetationZonesCrossSectionProcessor.java
--- 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;
diff -r 73819a194bfd -r 5c1e66a3c878 backend/doc/schema/oracle-sinfo-uinfo.sql
--- 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' ;
diff -r 73819a194bfd -r 5c1e66a3c878 backend/doc/schema/postgresql-sinfo-uinfo.sql
--- 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' ;
diff -r 73819a194bfd -r 5c1e66a3c878 backend/src/main/java/org/dive4elements/river/importer/uinfo/parsers/VegetationParser.java
--- 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;
More information about the Dive4Elements-commits
mailing list