changeset 9297:7100a555607c

Small fixes of the S-Info flood duration outputs
author mschaefer
date Wed, 25 Jul 2018 10:12:27 +0200
parents 77f24792d75f
children 0b1a51b0c42e
files artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCalculationResult.java artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCalculator.java artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodHeightProcessor.java artifacts/src/main/resources/messages.properties artifacts/src/main/resources/messages_de.properties
diffstat 5 files changed, 11 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCalculationResult.java	Tue Jul 24 18:52:40 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCalculationResult.java	Wed Jul 25 10:12:27 2018 +0200
@@ -146,7 +146,7 @@
         header.add(exportContextCSV.formatCsvHeader(SInfoResultType.riverside));
         header.add(exportContextCSV.formatCsvHeader(SInfoResultType.floodDuration));
         header.add(exportContextCSV.msgUnitCSV(SInfoResultType.floodDischarge, SInfoResultType.floodDischarge.getUnit()));
-        header.add(exportContextCSV.msgUnitCSV(SInfoResultType.infrastructureHeight, SInfoResultType.infrastructureHeight.getUnit()));
+        header.add(exportContextCSV.msgUnitCSV(SInfoResultType.infrastructureHeight, river.getWstUnit()));
         header.add(exportContextCSV.formatCsvHeader(SInfoResultType.infrastructuretype));
 
         // add dynamic headers
@@ -154,7 +154,7 @@
                 getWaterlevelCount();
         for (int i = 0; i < waterlevelCount; i++) {
             final String appendIndex = "_" + Integer.toString(i + 1);
-            header.add(exportContextCSV.msg(DurationWaterlevel.getHeaderWCsv(), appendIndex, "results.getRiver().getWstUnit()"));
+            header.add(exportContextCSV.msg(DurationWaterlevel.getHeaderWCsv(), appendIndex, river.getWstUnit()));
             header.add(exportContextCSV.msg(DurationWaterlevel.getHeaderFloodDurPerYearCsv(), appendIndex));
             header.add(exportContextCSV.msg(DurationWaterlevel.getHeaderQ(), appendIndex));
             header.add(exportContextCSV.msg(DurationWaterlevel.getHeaderBezeichnCsv(), appendIndex));
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCalculator.java	Tue Jul 24 18:52:40 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCalculator.java	Wed Jul 25 10:12:27 2018 +0200
@@ -167,7 +167,7 @@
             }
         }
         final List<ResultRow> stationRows = searchStation(station1, result.getRows());
-        if (stationRows.isEmpty() || (stationRows.get(0).getValue(SInfoResultType.infrastructuretype) == null)) {
+        if (stationRows.isEmpty()) {
             return new ArrayList<>();
         }
         final ResultRow row = stationRows.get(0);
@@ -197,7 +197,7 @@
             }
         }
         final List<ResultRow> stationRows = searchStation(station1, result.getRows());
-        if (stationRows.isEmpty() || (stationRows.get(0).getValue(SInfoResultType.infrastructuretype) == null)) {
+        if (stationRows.isEmpty()) {
             return new ArrayList<>();
         }
         final List<StickyAxisAnnotation> annotations = new ArrayList<>();
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodHeightProcessor.java	Tue Jul 24 18:52:40 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodHeightProcessor.java	Wed Jul 25 10:12:27 2018 +0200
@@ -24,7 +24,6 @@
 import org.dive4elements.river.artifacts.sinfo.flood_duration.FloodDurationCalculationResult.ValueGetter;
 import org.dive4elements.river.artifacts.states.DefaultState.ComputeType;
 import org.dive4elements.river.exports.DiagramGenerator;
-import org.dive4elements.river.exports.LongitudinalSectionGenerator;
 import org.dive4elements.river.model.Attribute.AttributeKey;
 import org.dive4elements.river.themes.ThemeDocument;
 
@@ -46,7 +45,7 @@
 
     private static final String FACET_MAIN_VALUE_HEIGHT_DESCRIPTION = "mainvalue.w.description";
 
-    private static final String I18N_AXIS_LABEL = LongitudinalSectionGenerator.I18N_YAXIS_LABEL;
+    private static final String I18N_AXIS_LABEL = "sinfo.chart.flood_duration.height.section.yaxis.label";
 
     private static final Set<String> HANDLED_FACET_TYPES = new HashSet<>();
 
--- a/artifacts/src/main/resources/messages.properties	Tue Jul 24 18:52:40 2018 +0200
+++ b/artifacts/src/main/resources/messages.properties	Wed Jul 25 10:12:27 2018 +0200
@@ -1011,7 +1011,7 @@
 sinfo.flood_duration.header.duration_index = \u00dcberflutungsdauer WSPL{0} [d/a]
 sinfo.flood_duration.header.fd_per_year_index = \u00dcberflutungsdauer WSPL{0} [d/a]
 sinfo.flood_duration.header.pdf.fd_per_year_index = \u00dcberflu-tungs-dauer WSPL{0} [d/a]
-sinfo.flood_duration.header.w_index = Wasserstand/Wasserspiegellage{0}
+sinfo.flood_duration.header.w_index = Wasserstand/Wasserspiegellage{0} [{1}]
 sinfo.flood_duration.header.pdf.w_index = Wasser-stand/ Wasser-spiegel-lage{0} 
 sinfo.flood_duration.header.q_index =  Q{0} [m\u00b3/s]
 
@@ -1091,7 +1091,7 @@
 state.uinfo.calculation_mode=Berechnungsart
 
 mainvalue.w = Wasserstand/Wasserspiegellage
-mainvalue.w.description = Wasserstand/Wasserspiegel-lage ({0})
+mainvalue.w.description = Wasserstand/Wasserspiegellage ({0})
 mainvalue.duration = \u00dcberflutungsdauer
 mainvalue.duration.description = \u00dcberflutungsdauer ({0})
 state.uinfo.salix.historical.km_range_part = Ausgewertete Strecke
@@ -1162,6 +1162,7 @@
 gauge_main_values.missing = No named main values available for gauge {0}
 wq_base_data.missing = No base waterlevel/discharge available
 sinfo.chart.flood_duration.height.section.title = H\u00f6he Infrastrukturen BWaStr
+sinfo.chart.flood_duration.height.section.yaxis.label = H\u00f6he [{0}]
 sinfo_facet_flood_height = Geod\u00e4tische H\u00f6he Infrastrukturen BWaStr
 sinfo_facet_flood_height.description = Geod\u00e4tische H\u00f6he Infrastrukturen BWaStr ({0})
 sinfo.chart.flood_duration.curve.section.title = \u00dcberflutungsdauer Infrastrukturen BWaStr - Dauerlinie
--- a/artifacts/src/main/resources/messages_de.properties	Tue Jul 24 18:52:40 2018 +0200
+++ b/artifacts/src/main/resources/messages_de.properties	Wed Jul 25 10:12:27 2018 +0200
@@ -1011,7 +1011,7 @@
 sinfo.flood_duration.header.duration_index = \u00dcberflutungsdauer WSPL{0} [d/a]
 sinfo.flood_duration.header.fd_per_year_index = \u00dcberflutungsdauer WSPL{0} [d/a]
 sinfo.flood_duration.header.pdf.fd_per_year_index = \u00dcberflu-tungs-dauer WSPL{0} [d/a]
-sinfo.flood_duration.header.w_index = Wasserstand/Wasserspiegellage{0}
+sinfo.flood_duration.header.w_index = Wasserstand/Wasserspiegellage{0} [{1}]
 sinfo.flood_duration.header.pdf.w_index = Wasser-stand/ Wasser-spiegel-lage{0} 
 sinfo.flood_duration.header.q_index =  Q{0} [m\u00b3/s]
 
@@ -1091,7 +1091,7 @@
 state.uinfo.calculation_mode=Berechnungsart
 
 mainvalue.w = Wasserstand/Wasserspiegellage
-mainvalue.w.description = Wasserstand/Wasserspiegel-lage ({0})
+mainvalue.w.description = Wasserstand/Wasserspiegellage ({0})
 mainvalue.duration = \u00dcberflutungsdauer
 mainvalue.duration.description = \u00dcberflutungsdauer ({0})
 state.uinfo.salix.historical.km_range_part = Ausgewertete Strecke
@@ -1163,6 +1163,7 @@
 wq_base_data.missing = W/Q-Daten fehlen oder sind ung\00fcltig
 sinfo.chart.flood_duration.height.section.title = H\u00f6he Infrastrukturen BWaStr
 sinfo_facet_flood_height = Geod\u00e4tische H\u00f6he Infrastrukturen BWaStr
+sinfo.chart.flood_duration.height.section.yaxis.label = H\u00f6he [{0}]
 sinfo_facet_flood_height.description = Geod\u00e4tische H\u00f6he Infrastrukturen BWaStr ({0})
 sinfo.chart.flood_duration.curve.section.title = \u00dcberflutungsdauer Infrastrukturen BWaStr - Dauerlinie
 sinfo.chart.flood_duration.curve.xaxis.label = \u00dcberflutungsdauer [d/a]

http://dive4elements.wald.intevation.org