# HG changeset patch
# User gernotbelger
# Date 1521130948 -3600
# Node ID b0aeed4c97c18d024a74276b069a09b719511955
# Parent 09e4a4909814faeb2ff56a709ed8e684e0a8ace9
Implemented chart output for sinfo flow depth min/max calculation
diff -r 09e4a4909814 -r b0aeed4c97c1 artifacts/doc/conf/artifacts/sinfo.xml
--- a/artifacts/doc/conf/artifacts/sinfo.xml Wed Mar 14 18:34:34 2018 +0100
+++ b/artifacts/doc/conf/artifacts/sinfo.xml Thu Mar 15 17:22:28 2018 +0100
@@ -106,18 +106,14 @@
-
@@ -133,7 +129,6 @@
-
diff -r 09e4a4909814 -r b0aeed4c97c1 artifacts/doc/conf/generators/generators.xml
--- a/artifacts/doc/conf/generators/generators.xml Wed Mar 14 18:34:34 2018 +0100
+++ b/artifacts/doc/conf/generators/generators.xml Thu Mar 15 17:22:28 2018 +0100
@@ -58,7 +58,7 @@
-
+
@@ -67,5 +67,4 @@
-
-
+
\ No newline at end of file
diff -r 09e4a4909814 -r b0aeed4c97c1 artifacts/doc/conf/generators/longitudinal-diagrams.xml
--- a/artifacts/doc/conf/generators/longitudinal-diagrams.xml Wed Mar 14 18:34:34 2018 +0100
+++ b/artifacts/doc/conf/generators/longitudinal-diagrams.xml Thu Mar 15 17:22:28 2018 +0100
@@ -105,6 +105,19 @@
+
+ &longitudinal-defaults;
+
+
+
+
+
+
+
diff -r 09e4a4909814 -r b0aeed4c97c1 artifacts/doc/conf/meta-data.xml
--- a/artifacts/doc/conf/meta-data.xml Wed Mar 14 18:34:34 2018 +0100
+++ b/artifacts/doc/conf/meta-data.xml Thu Mar 15 17:22:28 2018 +0100
@@ -121,6 +121,9 @@
+
+
+
@@ -266,7 +269,9 @@
-
+
+
+
@@ -353,6 +358,9 @@
+
+
+
@@ -1532,6 +1540,7 @@
SINFO
+
@@ -3107,6 +3116,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 09e4a4909814 -r b0aeed4c97c1 artifacts/doc/conf/themes.xml
--- a/artifacts/doc/conf/themes.xml Wed Mar 14 18:34:34 2018 +0100
+++ b/artifacts/doc/conf/themes.xml Thu Mar 15 17:22:28 2018 +0100
@@ -408,6 +408,8 @@
+
+
diff -r 09e4a4909814 -r b0aeed4c97c1 artifacts/doc/conf/themes/default.xml
--- a/artifacts/doc/conf/themes/default.xml Wed Mar 14 18:34:34 2018 +0100
+++ b/artifacts/doc/conf/themes/default.xml Thu Mar 15 17:22:28 2018 +0100
@@ -2890,6 +2890,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 09e4a4909814 -r b0aeed4c97c1 artifacts/doc/conf/themes/second.xml
--- a/artifacts/doc/conf/themes/second.xml Wed Mar 14 18:34:34 2018 +0100
+++ b/artifacts/doc/conf/themes/second.xml Thu Mar 15 17:22:28 2018 +0100
@@ -2879,6 +2879,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 09e4a4909814 -r b0aeed4c97c1 artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/FlowDepthProcessor.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/FlowDepthProcessor.java Wed Mar 14 18:34:34 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/FlowDepthProcessor.java Thu Mar 15 17:22:28 2018 +0100
@@ -18,7 +18,7 @@
import org.dive4elements.river.artifacts.resources.Resources;
import org.dive4elements.river.artifacts.states.DefaultState.ComputeType;
-public final class FlowDepthProcessor extends AbstractSInfoLineProcessor {
+public final class FlowDepthProcessor extends AbstractSInfoLineProcessor {
private static final String I18N_AXIS_LABEL = "sinfo.chart.flow_depth.section.yaxis.label";
@@ -35,11 +35,21 @@
private static final String I18N_FACET_FLOW_DEPTH_TKH_FILTERED_DESCRIPTION = "sinfo.facet.flow_depth_with_tkh.filtered.description";
+ public static final String FACET_FLOW_DEPTH_MIN_FILTERED = "sinfo_facet_flow_depth_min.filtered";
+
+ private static final String I18N_FACET_FLOW_DEPTH_MIN_FILTERED_DESCRIPTION = "sinfo.facet.flow_depth_min.filtered.description";
+
+ public static final String FACET_FLOW_DEPTH_MAX_FILTERED = "sinfo_facet_flow_depth_max.filtered";
+
+ private static final String I18N_FACET_FLOW_DEPTH_MAX_FILTERED_DESCRIPTION = "sinfo.facet.flow_depth_max.filtered.description";
+
private static final Set HANDLED_FACET_TYPES = new HashSet<>();
static {
HANDLED_FACET_TYPES.add(FACET_FLOW_DEPTH_FILTERED);
HANDLED_FACET_TYPES.add(FACET_FLOW_DEPTH_TKH_FILTERED);
+ HANDLED_FACET_TYPES.add(FACET_FLOW_DEPTH_MIN_FILTERED);
+ HANDLED_FACET_TYPES.add(FACET_FLOW_DEPTH_MAX_FILTERED);
}
public FlowDepthProcessor() {
@@ -47,7 +57,7 @@
}
@Override
- protected double[][] doGetPoints(final AbstractTkhCalculationResult data, final String facetName) {
+ protected double[][] doGetPoints(final AbstractSInfoCalculationResult data, final String facetName) {
if (FACET_FLOW_DEPTH_FILTERED.contentEquals(facetName))
return data.getStationPoints(SInfoResultType.flowdepth);
@@ -55,6 +65,12 @@
if (FACET_FLOW_DEPTH_TKH_FILTERED.contentEquals(facetName))
return data.getStationPoints(SInfoResultType.flowdepthtkh);
+ if (FACET_FLOW_DEPTH_MIN_FILTERED.contentEquals(facetName))
+ return data.getStationPoints(SInfoResultType.flowdepthmin);
+
+ if (FACET_FLOW_DEPTH_MAX_FILTERED.contentEquals(facetName))
+ return data.getStationPoints(SInfoResultType.flowdepthmax);
+
final String error = String.format("Unknown facet name: %s", facetName);
throw new UnsupportedOperationException(error);
}
@@ -74,4 +90,22 @@
return new SInfoResultFacet(index, FlowDepthProcessor.FACET_FLOW_DEPTH_TKH_FILTERED, facetFlowDepthTkhFilteredDescription,
SINFO_CHART_FLOW_DEPTH_YAXIS_LABEL, ComputeType.ADVANCE, id, hash);
}
+
+ public static Facet createFlowDepthMinFacet(final CallContext context, final String hash, final String id, final AbstractSInfoCalculationResult result,
+ final int index) {
+
+ final String facetFlowDepthFilteredDescription = Resources.getMsg(context.getMeta(), I18N_FACET_FLOW_DEPTH_MIN_FILTERED_DESCRIPTION,
+ I18N_FACET_FLOW_DEPTH_MIN_FILTERED_DESCRIPTION, result.getLabel());
+ return new SInfoResultFacet(index, FlowDepthProcessor.FACET_FLOW_DEPTH_MIN_FILTERED, facetFlowDepthFilteredDescription,
+ SINFO_CHART_FLOW_DEPTH_YAXIS_LABEL, ComputeType.ADVANCE, id, hash);
+ }
+
+ public static Facet createFlowDepthMaxFacet(final CallContext context, final String hash, final String id, final AbstractSInfoCalculationResult result,
+ final int index) {
+
+ final String facetFlowDepthFilteredDescription = Resources.getMsg(context.getMeta(), I18N_FACET_FLOW_DEPTH_MAX_FILTERED_DESCRIPTION,
+ I18N_FACET_FLOW_DEPTH_MAX_FILTERED_DESCRIPTION, result.getLabel());
+ return new SInfoResultFacet(index, FlowDepthProcessor.FACET_FLOW_DEPTH_MAX_FILTERED, facetFlowDepthFilteredDescription,
+ SINFO_CHART_FLOW_DEPTH_YAXIS_LABEL, ComputeType.ADVANCE, id, hash);
+ }
}
\ No newline at end of file
diff -r 09e4a4909814 -r b0aeed4c97c1 artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/SInfoResultType.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/SInfoResultType.java Wed Mar 14 18:34:34 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/SInfoResultType.java Thu Mar 15 17:22:28 2018 +0100
@@ -84,8 +84,6 @@
}
},
- // FIXME: use pgetPdfHeader instead of getCsvHeader
-
meanBedHeight(null, SInfoI18NStrings.CSV_MEAN_BED_HEIGHT_HEADER, SInfoI18NStrings.CSV_MEAN_BED_HEIGHT_HEADER_SHORT) {
@Override
public String exportValue(final CallContext context, final Object value) {
@@ -160,6 +158,7 @@
throw new UnsupportedOperationException();
}
},
+
soilkind(SInfoI18NStrings.UNIT_NONE, SInfoI18NStrings.CSV_TKHKIND_HEADER) {
@Override
public String exportValue(final CallContext context, final Object value) {
@@ -178,6 +177,7 @@
throw new UnsupportedOperationException();
}
},
+
flowdepth(SInfoI18NStrings.UNIT_M, SInfoI18NStrings.CSV_FLOWDEPTH_HEADER) {
@Override
public String exportValue(final CallContext context, final Object value) {
@@ -190,6 +190,7 @@
return Formatter.getFlowDepth(context);
}
},
+
d50(null, null) {
@Override
public String exportValue(final CallContext context, final Object value) {
@@ -202,6 +203,7 @@
throw new UnsupportedOperationException();
}
},
+
velocity(null, null) {
@Override
public String exportValue(final CallContext context, final Object value) {
@@ -214,6 +216,7 @@
throw new UnsupportedOperationException();
}
},
+
tau(null, null) {
@Override
public String exportValue(final CallContext context, final Object value) {
@@ -226,6 +229,7 @@
throw new UnsupportedOperationException();
}
},
+
tkh(SInfoI18NStrings.UNIT_CM, SInfoI18NStrings.CSV_TKH_HEADER, SInfoI18NStrings.CSV_TKH_HEADER_SHORT) {
@Override
public String exportValue(final CallContext context, final Object value) {
@@ -238,6 +242,7 @@
return Formatter.getTkh(context);
}
},
+
tkhup(SInfoI18NStrings.UNIT_CM, null) {
@Override
public String exportValue(final CallContext context, final Object value) {
@@ -250,6 +255,7 @@
throw new UnsupportedOperationException();
}
},
+
tkhdown(SInfoI18NStrings.UNIT_CM, null) {
@Override
public String exportValue(final CallContext context, final Object value) {
@@ -262,6 +268,7 @@
throw new UnsupportedOperationException();
}
},
+
flowdepthtkh(SInfoI18NStrings.UNIT_M, SInfoI18NStrings.CSV_FLOWDEPTHTKH_HEADER) {
@Override
public String exportValue(final CallContext context, final Object value) {
@@ -342,7 +349,7 @@
return this.csvHeader;
}
- public String getPdfHeader(final CallMeta meta) {
+ public final String getPdfHeader(final CallMeta meta) {
return Resources.getMsg(meta, this.pdfHeader, this.pdfHeader);
}
diff -r 09e4a4909814 -r b0aeed4c97c1 artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepthminmax/FlowDepthMinMaxCalculationResult.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepthminmax/FlowDepthMinMaxCalculationResult.java Wed Mar 14 18:34:34 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepthminmax/FlowDepthMinMaxCalculationResult.java Thu Mar 15 17:22:28 2018 +0100
@@ -51,4 +51,12 @@
return this.maxSounding;
}
+
+ public boolean hasMin() {
+ return this.minSounding != null;
+ }
+
+ public boolean hasMax() {
+ return this.maxSounding != null;
+ }
}
\ No newline at end of file
diff -r 09e4a4909814 -r b0aeed4c97c1 artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepthminmax/FlowDepthMinMaxState.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepthminmax/FlowDepthMinMaxState.java Wed Mar 14 18:34:34 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepthminmax/FlowDepthMinMaxState.java Thu Mar 15 17:22:28 2018 +0100
@@ -21,6 +21,7 @@
import org.dive4elements.river.artifacts.model.FacetTypes;
import org.dive4elements.river.artifacts.model.ReportFacet;
import org.dive4elements.river.artifacts.sinfo.SINFOArtifact;
+import org.dive4elements.river.artifacts.sinfo.common.FlowDepthProcessor;
import org.dive4elements.river.artifacts.states.DefaultState;
/** State in which a waterlevel has been calculated. */
@@ -81,16 +82,16 @@
final FlowDepthMinMaxCalculationResult result = resultList.get(index);
/* filtered (zoom dependent mean) flow depth */
- // facets.add(FlowDepthProcessor.createFlowDepthFacet(context, hash, this.id, result, index));
+ if (result.hasMin())
+ facets.add(FlowDepthProcessor.createFlowDepthMinFacet(context, hash, this.id, result, index));
+ if (result.hasMax())
+ facets.add(FlowDepthProcessor.createFlowDepthMaxFacet(context, hash, this.id, result, index));
}
if (!resultList.isEmpty()) {
- final Facet csv = new DataFacet(FacetTypes.CSV, "CSV data", ComputeType.ADVANCE, hash, this.id);
- final Facet pdf = new DataFacet(FacetTypes.PDF, "PDF data", ComputeType.ADVANCE, hash, this.id);
-
- facets.add(csv);
- facets.add(pdf);
+ facets.add(new DataFacet(FacetTypes.CSV, "CSV data", ComputeType.ADVANCE, hash, this.id));
+ facets.add(new DataFacet(FacetTypes.PDF, "PDF data", ComputeType.ADVANCE, hash, this.id));
}
final Calculation report = res.getReport();
diff -r 09e4a4909814 -r b0aeed4c97c1 artifacts/src/main/resources/messages.properties
--- a/artifacts/src/main/resources/messages.properties Wed Mar 14 18:34:34 2018 +0100
+++ b/artifacts/src/main/resources/messages.properties Thu Mar 15 17:22:28 2018 +0100
@@ -814,6 +814,9 @@
state.sinfo.use_transport_bodies=Transportk\u00f6rperh\u00f6hen
help.state.sinfo.use_transport_bodies=${help.url}/OnlineHilfe/SINFO#help.state.sinfo.use_transport_bodies
+state.sinfo.flow_depth_minmax = minimale/maximale Flie\u00dftiefen
+help.state.sinfo.use_transport_bodies = ${help.url}/OnlineHilfe/SINFO#help.state.sinfo.use_transport_bodies
+
useTransportBodies.option = Transportk\u00f6rperh\u00f6hen miteinbeziehen?
useTransportBodies.active = Activ
useTransportBodies.inactive = Inactiv
@@ -865,6 +868,10 @@
sinfo.facet.flow_depth.filtered.description = h ({0})
sinfo.facet.flow_depth_with_tkh.filtered.description = h + \u0394d ({0})
+sinfo.chart.flow_depth_minmax.section.title = min/max h-L\u00e4ngsschnitt
+sinfo.facet.flow_depth_min.filtered.description = h-min ({0})
+sinfo.facet.flow_depth_max.filtered.description = h-max ({0})
+
sinfo.chart.tkh.section.title=Transportk\u00f6rperh\u00f6hen
sinfo.chart.tkh.section.yaxis.label = Transportk\u00f6rperh\u00f6hen [cm]
sinfo.chart.tkh.yaxis.label = Transportk\u00f6rperh\u00f6hen [cm]
diff -r 09e4a4909814 -r b0aeed4c97c1 artifacts/src/main/resources/messages_de.properties
--- a/artifacts/src/main/resources/messages_de.properties Wed Mar 14 18:34:34 2018 +0100
+++ b/artifacts/src/main/resources/messages_de.properties Thu Mar 15 17:22:28 2018 +0100
@@ -814,6 +814,9 @@
state.sinfo.use_transport_bodies=Transportk\u00f6rperh\u00f6hen
help.state.sinfo.use_transport_bodies=${help.url}/OnlineHilfe/SINFO#help.state.sinfo.use_transport_bodies
+state.sinfo.flow_depth_minmax = minimale/maximale Flie\u00dftiefen
+help.state.sinfo.use_transport_bodies = ${help.url}/OnlineHilfe/SINFO#help.state.sinfo.use_transport_bodies
+
useTransportBodies.option = Transportk\u00f6rperh\u00f6hen miteinbeziehen?
useTransportBodies.active = Aktiv
useTransportBodies.inactive = Inaktiv
@@ -865,6 +868,10 @@
sinfo.facet.flow_depth.filtered.description = h ({0})
sinfo.facet.flow_depth_with_tkh.filtered.description = h + \u0394d ({0})
+sinfo.chart.flow_depth_minmax.section.title = min/max h-L\u00e4ngsschnitt
+sinfo.facet.flow_depth_min.filtered.description = h-min ({0})
+sinfo.facet.flow_depth_max.filtered.description = h-max ({0})
+
sinfo.chart.tkh.section.title=Transportk\u00f6rperh\u00f6hen
sinfo.chart.tkh.section.yaxis.label = Transportk\u00f6rperh\u00f6hen [cm]
sinfo.chart.tkh.yaxis.label = Transportk\u00f6rperh\u00f6hen [cm]
diff -r 09e4a4909814 -r b0aeed4c97c1 gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.java
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.java Wed Mar 14 18:34:34 2018 +0100
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.java Thu Mar 15 17:22:28 2018 +0100
@@ -1436,6 +1436,10 @@
String sinfo_flow_depths();
+ String sinfo_flow_depths_minmax();
+
+ String sinfo_flow_depth_minmax();
+
String sinfo_tkh_export();
String sinfo_tkh_report();
@@ -1443,13 +1447,15 @@
String sinfo_tkhs();
String sinfo_tkk();
-
+
String sinfo_velocities();
-
+
String sinfo_taus();
-
+
String sinfo_bedqualities();
-
+
String sinfo_d50s();
+
+ String sinfo_flowdepthminmax_export();
}
// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
\ No newline at end of file
diff -r 09e4a4909814 -r b0aeed4c97c1 gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.properties
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.properties Wed Mar 14 18:34:34 2018 +0100
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants.properties Thu Mar 15 17:22:28 2018 +0100
@@ -762,7 +762,8 @@
sinfo_flow_depth = Flie\u00dftiefen
sinfo_flowdepth_twinpanel_no_pair_selected = Error - at least one input pair must be selected
sinfo_flow_depths = Flie\u00dftiefen
-
+sinfo_flow_depths_minmax = Min./max. Flie\u00dftiefen
+sinfo_flow_depth_minmax = Min./max. Flie\u00dftiefen
sinfo_tkh_export = Transportk\u00f6rperh\u00f6hen Export
sinfo_tkh_report = Transportk\u00f6rperh\u00f6hen Bericht
sinfo_tkhs = Transportk\u00f6rperh\u00f6hen
@@ -771,4 +772,6 @@
sinfo_velocities = Flie\u00dfgeschwindigkeiten
sinfo_taus = Sohlschubspannung
sinfo_bedqualities = Sohlbeschaffenheit
-sinfo_d50s = Korndurchmesser
\ No newline at end of file
+sinfo_d50s = Korndurchmesser
+
+sinfo_flowdepthminmax_export = min/max Flie\u00dftiefen Export
\ No newline at end of file
diff -r 09e4a4909814 -r b0aeed4c97c1 gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_de.properties
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_de.properties Wed Mar 14 18:34:34 2018 +0100
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYSConstants_de.properties Thu Mar 15 17:22:28 2018 +0100
@@ -762,6 +762,8 @@
sinfo_flow_depth = Flie\u00dftiefen
sinfo_flowdepth_twinpanel_no_pair_selected = Fehler - kein Paar zur Differenzenbildung gew\u00e4hlt.
sinfo_flow_depths = Flie\u00dftiefen
+sinfo_flow_depths_minmax = Min./max. Flie\u00dftiefen
+sinfo_flow_depth_minmax = Min./max. Flie\u00dftiefen
sinfo_tkh_export = Transportk\u00f6rperh\u00f6hen Export
sinfo_tkh_report = Transportk\u00f6rperh\u00f6hen Bericht
@@ -771,4 +773,6 @@
sinfo_velocities = Flie\u00dfgeschwindigkeiten
sinfo_taus = Sohlschubspannung
sinfo_bedqualities = Sohlbeschaffenheit
-sinfo_d50s = Korndurchmesser
\ No newline at end of file
+sinfo_d50s = Korndurchmesser
+
+sinfo_flowdepthminmax_export = min/max Flie\u00dftiefen Export
\ No newline at end of file