[PATCH] Included the infrastructure-less stations in the S-Info flood duration long. sections, and the selected wspls in their w/q duration curves

Wald Commits scm-commit at wald.intevation.org
Wed Jul 25 11:34:02 CEST 2018


# HG changeset patch
# User mschaefer
# Date 1532511228 -7200
# Node ID 0b1a51b0c42eb77cc31c12766d885b8cfb4fe282
# Parent  7100a555607c9800782ee081c3bce7b03be6f13d
Included the infrastructure-less stations in the S-Info flood duration long. sections, and the selected wspls in their w/q duration curves

diff -r 7100a555607c -r 0b1a51b0c42e artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCalculationResult.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCalculationResult.java	Wed Jul 25 10:12:27 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCalculationResult.java	Wed Jul 25 11:33:48 2018 +0200
@@ -89,6 +89,14 @@
         return Collections.unmodifiableCollection(infrasOnlyRows);
     }
 
+    /**
+     * Collection of all result rows
+     */
+    public Collection<ResultRow> getAllRows() {
+
+        return super.getRows();
+    }
+
     @Override
     protected void writeCSVResultMetadata(final ExportContextCSV exportContextCSV) {
         /* nothing to do, as we never have several results, everything is written into the general header */
@@ -236,7 +244,7 @@
      */
     public final double[][] getMainValueDurationPoints(final ValueGetter valuegetter, final int dataIndex) {
 
-        final Collection<ResultRow> rows = getRows();
+        final Collection<ResultRow> rows = getAllRows();
 
         final TDoubleArrayList xPoints = new TDoubleArrayList(rows.size());
         final TDoubleArrayList yPoints = new TDoubleArrayList(rows.size());
diff -r 7100a555607c -r 0b1a51b0c42e artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCalculator.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCalculator.java	Wed Jul 25 10:12:27 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCalculator.java	Wed Jul 25 11:33:48 2018 +0200
@@ -161,12 +161,12 @@
         // Search the station in the previously calculated result rows and terminate if no infrastructure row found
         double station1 = station;
         if (Double.isNaN(station)) {
-            for (final ResultRow row : result.getRows()) {
+            for (final ResultRow row : result.getAllRows()) {
                 station1 = row.getDoubleValue(GeneralResultType.station);
                 break;
             }
         }
-        final List<ResultRow> stationRows = searchStation(station1, result.getRows());
+        final List<ResultRow> stationRows = searchStation(station1, result.getAllRows());
         if (stationRows.isEmpty()) {
             return new ArrayList<>();
         }
@@ -191,12 +191,12 @@
         // Search the station in the previously calculated result rows and terminate if no infrastructure row found
         double station1 = station;
         if (Double.isNaN(station)) {
-            for (final ResultRow row : result.getRows()) {
+            for (final ResultRow row : result.getAllRows()) {
                 station1 = row.getDoubleValue(GeneralResultType.station);
                 break;
             }
         }
-        final List<ResultRow> stationRows = searchStation(station1, result.getRows());
+        final List<ResultRow> stationRows = searchStation(station1, result.getAllRows());
         if (stationRows.isEmpty()) {
             return new ArrayList<>();
         }


More information about the Dive4Elements-commits mailing list