# HG changeset patch
# User mschaefer
# Date 1570641466 -7200
# Node ID ca492336570bfe6d4f1158f3323553ad636efb63
# Parent d889ffe2fb050b3b3bc7ca4565dfa5f49642d915# Parent f2473dc34535fd33cf09c7d47901c2ec8cd6aa6f
Merge
diff -r f2473dc34535 -r ca492336570b artifacts/doc/conf/artifacts/sinfo.xml
--- a/artifacts/doc/conf/artifacts/sinfo.xml Tue Oct 08 15:03:24 2019 +0200
+++ b/artifacts/doc/conf/artifacts/sinfo.xml Wed Oct 09 19:17:46 2019 +0200
@@ -27,9 +27,9 @@
+ It is ugly to put it here, but we cannot set the state-data of the current state inside the state calculation (only the data of the previous states is put into the collection description).
+ So this is the only way to safely transport this information to the client.
+ -->
@@ -263,7 +263,7 @@
-
+
@@ -315,7 +315,7 @@
-
+
@@ -323,16 +323,26 @@
+
+
+
+
+
+
+
+
+
+
-
+
@@ -359,35 +369,35 @@
-
-
-
+
+
+
-
-
-
-
+
+
+
+
-
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
+
@@ -397,8 +407,8 @@
-
-
+
+
@@ -428,8 +438,8 @@
-
-
+
+
diff -r f2473dc34535 -r ca492336570b artifacts/doc/conf/jasper/templates/sinfo.floodduration.jrxml
--- a/artifacts/doc/conf/jasper/templates/sinfo.floodduration.jrxml Tue Oct 08 15:03:24 2019 +0200
+++ b/artifacts/doc/conf/jasper/templates/sinfo.floodduration.jrxml Wed Oct 09 19:17:46 2019 +0200
@@ -1,6 +1,6 @@
-
+
@@ -58,6 +58,7 @@
+
@@ -152,10 +153,10 @@
-
+
-
+
@@ -165,67 +166,73 @@
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
@@ -235,7 +242,7 @@
-
+
@@ -246,7 +253,7 @@
-
+
@@ -257,7 +264,7 @@
-
+
@@ -268,7 +275,7 @@
-
+
@@ -279,7 +286,7 @@
-
+
@@ -290,7 +297,7 @@
-
+
@@ -301,18 +308,18 @@
-
+
-
+
-
+
@@ -323,7 +330,7 @@
-
+
@@ -334,18 +341,18 @@
-
+
-
+
-
+
@@ -356,7 +363,7 @@
-
+
@@ -366,6 +373,17 @@
+
+
+
+
+
+
+
+
+
+
+
diff -r f2473dc34535 -r ca492336570b artifacts/doc/conf/jasper/templates/sinfo.floodduration2.jrxml
--- a/artifacts/doc/conf/jasper/templates/sinfo.floodduration2.jrxml Tue Oct 08 15:03:24 2019 +0200
+++ b/artifacts/doc/conf/jasper/templates/sinfo.floodduration2.jrxml Wed Oct 09 19:17:46 2019 +0200
@@ -1,6 +1,6 @@
-
+
@@ -58,6 +58,7 @@
+
@@ -152,10 +153,10 @@
-
+
-
+
@@ -165,115 +166,121 @@
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -283,7 +290,7 @@
-
+
@@ -294,7 +301,7 @@
-
+
@@ -305,7 +312,7 @@
-
+
@@ -316,7 +323,7 @@
-
+
@@ -327,7 +334,7 @@
-
+
@@ -338,7 +345,7 @@
-
+
@@ -349,18 +356,18 @@
-
+
-
+
-
+
@@ -371,7 +378,7 @@
-
+
@@ -382,7 +389,18 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -390,21 +408,10 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -415,7 +422,7 @@
-
+
@@ -426,7 +433,18 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -434,21 +452,10 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -459,7 +466,7 @@
-
+
@@ -470,18 +477,18 @@
-
+
-
+
-
+
@@ -492,7 +499,7 @@
-
+
@@ -502,6 +509,17 @@
+
+
+
+
+
+
+
+
+
+
+
diff -r f2473dc34535 -r ca492336570b artifacts/doc/conf/modules/wms_uedauern_jahre_Beispielfluss.tsv
--- a/artifacts/doc/conf/modules/wms_uedauern_jahre_Beispielfluss.tsv Tue Oct 08 15:03:24 2019 +0200
+++ b/artifacts/doc/conf/modules/wms_uedauern_jahre_Beispielfluss.tsv Wed Oct 09 19:17:46 2019 +0200
@@ -1,38 +1,40 @@
-# Konfigurationsdatei für die in der Berechnungsart UINFO-Überflutungsdauern auszugebenden URLs
-# Je Gewässer ist zwingend eine Datei mit Namen 'wms_uedauern_jahre_.tsv' anzulegen. Groß-/Kleinschriebung beim Gewässernamen ist zu beachten!
-
-# Die Datei definiert für beliebig viele Layer individuell konfigurierbare Bezeichnungen und URLs.
-# Pro Layer ist eine Zeile folgender Form anzulegen:
-#
-
+# Konfigurationsdatei für die in der Berechnungsart UINFO-Überflutungsdauern auszugebenden URLs
+# Je Gewässer ist zwingend eine Datei mit Namen 'wms_uedauern_jahre_.tsv' anzulegen. Groß-/Kleinschriebung beim Gewässernamen ist zu beachten!
+
+# Die Datei definiert für beliebig viele Layer individuell konfigurierbare Bezeichnungen und URLs.
+# Für jede Auswahlmöglichkeit ist eine Zeile folgender Form anzulegen:
+#
+
+# Die Angabe einer Vegetationszonen-URL mit dazugehöriger Vegetationszonen-Layer-Nummer ist dabei optional.
+
# Änderungen werden erst nach einem Neustart des Servers wirksam.
-
-1990 0 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer 0 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer
-1991 1 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer 1 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer
-1992 2 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer 2 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer
-1993 3 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer 3 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer
-1994 4 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer 4 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer
-1995 5 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer 5 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer
+
+1990 0 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer
+1991 1 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer
+1992 2 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer
+1993 3 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer
+1994 4 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer
+1995 5 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer
1996 6 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer
-1997 7 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer 7 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer
-1998 8 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer 8 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer
-1999 9 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer 9 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer
-
-2000 0 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer 0 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer
-2001 1 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer 1 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer
-2002 2 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer 2 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer
-2003 3 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer 3 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer
-2004 4 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer 4 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer
-2005 5 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer 5 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer
-2006 6 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer 6 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer
-2007 7 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer 7 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer
-2008 8 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer 8 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer
-2009 9 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer 9 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer
-
-2010 0 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer 0 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer
-2011 1 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer 1 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer
-2012 2 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer 2 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer
-2013 3 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer 3 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer
-2014 4 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer 4 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer
-2015 5 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer 5 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer
-2016 6 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer 6 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer
+1997 7 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer
+1998 8 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer
+1999 9 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer
+
+2000 0 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer
+2001 1 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer
+2002 2 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer
+2003 3 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer
+2004 4 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer
+2005 5 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer
+2006 6 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer
+2007 7 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer
+2008 8 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer
+2009 9 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer
+
+2010 0 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer
+2011 1 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer
+2012 2 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer
+2013 3 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer
+2014 4 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer
+2015 5 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer
+2016 6 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer
\ No newline at end of file
diff -r f2473dc34535 -r ca492336570b artifacts/doc/conf/modules/wms_uedauern_jahre_Elbe.tsv
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/artifacts/doc/conf/modules/wms_uedauern_jahre_Elbe.tsv Wed Oct 09 19:17:46 2019 +0200
@@ -0,0 +1,40 @@
+# Konfigurationsdatei für die in der Berechnungsart UINFO-Überflutungsdauern auszugebenden URLs
+# Je Gewässer ist zwingend eine Datei mit Namen 'wms_uedauern_jahre_.tsv' anzulegen. Groß-/Kleinschriebung beim Gewässernamen ist zu beachten!
+
+# Die Datei definiert für beliebig viele Layer individuell konfigurierbare Bezeichnungen und URLs.
+# Für jede Auswahlmöglichkeit ist eine Zeile folgender Form anzulegen:
+#
+
+# Die Angabe einer Vegetationszonen-URL mit dazugehöriger Vegetationszonen-Layer-Nummer ist dabei optional.
+
+# Änderungen werden erst nach einem Neustart des Servers wirksam.
+
+1990 0 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer
+1991 1 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer
+1992 2 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer
+1993 3 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer
+1994 4 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer
+1995 5 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer
+1996 6 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer
+1997 7 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer
+1998 8 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer
+1999 9 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer
+
+2000 0 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer
+2001 1 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer
+2002 2 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer
+2003 3 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer
+2004 4 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer
+2005 5 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer
+2006 6 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer
+2007 7 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer
+2008 8 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer
+2009 9 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer
+
+2010 0 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer
+2011 1 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer
+2012 2 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer
+2013 3 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer
+2014 4 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer
+2015 5 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer
+2016 6 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer
\ No newline at end of file
diff -r f2473dc34535 -r ca492336570b artifacts/doc/conf/modules/wms_uedauern_jahre_Rhein.tsv
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/artifacts/doc/conf/modules/wms_uedauern_jahre_Rhein.tsv Wed Oct 09 19:17:46 2019 +0200
@@ -0,0 +1,40 @@
+# Konfigurationsdatei für die in der Berechnungsart UINFO-Überflutungsdauern auszugebenden URLs
+# Je Gewässer ist zwingend eine Datei mit Namen 'wms_uedauern_jahre_.tsv' anzulegen. Groß-/Kleinschriebung beim Gewässernamen ist zu beachten!
+
+# Die Datei definiert für beliebig viele Layer individuell konfigurierbare Bezeichnungen und URLs.
+# Für jede Auswahlmöglichkeit ist eine Zeile folgender Form anzulegen:
+#
+
+# Die Angabe einer Vegetationszonen-URL mit dazugehöriger Vegetationszonen-Layer-Nummer ist dabei optional.
+
+# Änderungen werden erst nach einem Neustart des Servers wirksam.
+
+1990 0 https://geoportal.bafg.de/arcgis3/services/Flut3/Rhein_1990_1999/MapServer/WMSServer
+1991 1 https://geoportal.bafg.de/arcgis3/services/Flut3/Rhein_1990_1999/MapServer/WMSServer
+1992 2 https://geoportal.bafg.de/arcgis3/services/Flut3/Rhein_1990_1999/MapServer/WMSServer
+1993 3 https://geoportal.bafg.de/arcgis3/services/Flut3/Rhein_1990_1999/MapServer/WMSServer
+1994 4 https://geoportal.bafg.de/arcgis3/services/Flut3/Rhein_1990_1999/MapServer/WMSServer
+1995 5 https://geoportal.bafg.de/arcgis3/services/Flut3/Rhein_1990_1999/MapServer/WMSServer
+1996 6 https://geoportal.bafg.de/arcgis3/services/Flut3/Rhein_1990_1999/MapServer/WMSServer
+1997 7 https://geoportal.bafg.de/arcgis3/services/Flut3/Rhein_1990_1999/MapServer/WMSServer
+1998 8 https://geoportal.bafg.de/arcgis3/services/Flut3/Rhein_1990_1999/MapServer/WMSServer
+1999 9 https://geoportal.bafg.de/arcgis3/services/Flut3/Rhein_1990_1999/MapServer/WMSServer
+
+2000 0 https://geoportal.bafg.de/arcgis3/services/Flut3/Rhein_2000_2009/MapServer/WMSServer
+2001 1 https://geoportal.bafg.de/arcgis3/services/Flut3/Rhein_2000_2009/MapServer/WMSServer
+2002 2 https://geoportal.bafg.de/arcgis3/services/Flut3/Rhein_2000_2009/MapServer/WMSServer
+2003 3 https://geoportal.bafg.de/arcgis3/services/Flut3/Rhein_2000_2009/MapServer/WMSServer
+2004 4 https://geoportal.bafg.de/arcgis3/services/Flut3/Rhein_2000_2009/MapServer/WMSServer
+2005 5 https://geoportal.bafg.de/arcgis3/services/Flut3/Rhein_2000_2009/MapServer/WMSServer
+2006 6 https://geoportal.bafg.de/arcgis3/services/Flut3/Rhein_2000_2009/MapServer/WMSServer
+2007 7 https://geoportal.bafg.de/arcgis3/services/Flut3/Rhein_2000_2009/MapServer/WMSServer
+2008 8 https://geoportal.bafg.de/arcgis3/services/Flut3/Rhein_2000_2009/MapServer/WMSServer
+2009 9 https://geoportal.bafg.de/arcgis3/services/Flut3/Rhein_2000_2009/MapServer/WMSServer
+
+2010 0 https://geoportal.bafg.de/arcgis3/services/Flut3/Rhein_2010_2019/MapServer/WMSServer
+2011 1 https://geoportal.bafg.de/arcgis3/services/Flut3/Rhein_2010_2019/MapServer/WMSServer
+2012 2 https://geoportal.bafg.de/arcgis3/services/Flut3/Rhein_2010_2019/MapServer/WMSServer
+2013 3 https://geoportal.bafg.de/arcgis3/services/Flut3/Rhein_2010_2019/MapServer/WMSServer
+2014 4 https://geoportal.bafg.de/arcgis3/services/Flut3/Rhein_2010_2019/MapServer/WMSServer
+2015 5 https://geoportal.bafg.de/arcgis3/services/Flut3/Rhein_2010_2019/MapServer/WMSServer
+2016 6 https://geoportal.bafg.de/arcgis3/services/Flut3/Rhein_2010_2019/MapServer/WMSServer
\ No newline at end of file
diff -r f2473dc34535 -r ca492336570b artifacts/doc/conf/modules/wms_uedauern_mittel_Beispielfluss.tsv
--- a/artifacts/doc/conf/modules/wms_uedauern_mittel_Beispielfluss.tsv Tue Oct 08 15:03:24 2019 +0200
+++ b/artifacts/doc/conf/modules/wms_uedauern_mittel_Beispielfluss.tsv Wed Oct 09 19:17:46 2019 +0200
@@ -1,14 +1,16 @@
-# Konfigurationsdatei für die in der Berechnungsart UINFO-Überflutungsdauern auszugebenden URLs
-# Je Gewässer ist zwingend eine Datei mit Namen 'wms_uedauern_mittel_.tsv' anzulegen. Groß-/Kleinschriebung beim Gewässernamen ist zu beachten!
-
-# Die Datei definiert für beliebig viele Layer individuell konfigurierbare Bezeichnungen und URLs.
-# Pro Layer ist eine Zeile folgender Form anzulegen:
-#
-
-# Änderungen werden erst nach einem Neustart des Servers wirksam.
+# Konfigurationsdatei für die in der Berechnungsart UINFO-Überflutungsdauern auszugebenden URLs
+# Je Gewässer ist zwingend eine Datei mit Namen 'wms_uedauern_mittel_.tsv' anzulegen. Groß-/Kleinschriebung beim Gewässernamen ist zu beachten!
+
+# Die Datei definiert für beliebig viele Layer individuell konfigurierbare Bezeichnungen und URLs.
+# Für jede Auswahlmöglichkeit ist eine Zeile folgender Form anzulegen:
+#
-Mittelwert (1990-2016) 1 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_Statistik_1990_2016/MapServer/WMSServer 1 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_Statistik_1990_2016/MapServer/WMSServer
-Median (1990-2016) 2 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_Statistik_1990_2016/MapServer/WMSServer 2 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_Statistik_1990_2016/MapServer/WMSServer
-Minimum (1990-2016) 3 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_Statistik_1990_2016/MapServer/WMSServer 3 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_Statistik_1990_2016/MapServer/WMSServer
-Maximum (1990-2016) 0 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_Statistik_1990_2016/MapServer/WMSServer 0 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_Statistik_1990_2016/MapServer/WMSServer
-Standardabweichung (1990-2016) 4 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_Statistik_1990_2016/MapServer/WMSServer 4 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_Statistik_1990_2016/MapServer/WMSServer
+# Die Angabe einer Vegetationszonen-URL mit dazugehöriger Vegetationszonen-Layer-Nummer ist dabei optional.
+
+# Änderungen werden erst nach einem Neustart des Servers wirksam.
+
+Mittelwert (1990-2016) 1 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_Statistik_1990_2016/MapServer/WMSServer 6 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_Statistik_1990_2016/MapServer/WMSServer
+Median (1990-2016) 2 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_Statistik_1990_2016/MapServer/WMSServer 7 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_Statistik_1990_2016/MapServer/WMSServer
+Minimum (1990-2016) 3 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_Statistik_1990_2016/MapServer/WMSServer 8 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_Statistik_1990_2016/MapServer/WMSServer
+Maximum (1990-2016) 0 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_Statistik_1990_2016/MapServer/WMSServer 5 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_Statistik_1990_2016/MapServer/WMSServer
+Standardabweichung (1990-2016) 4 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_Statistik_1990_2016/MapServer/WMSServer
\ No newline at end of file
diff -r f2473dc34535 -r ca492336570b artifacts/doc/conf/modules/wms_uedauern_mittel_Elbe.tsv
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/artifacts/doc/conf/modules/wms_uedauern_mittel_Elbe.tsv Wed Oct 09 19:17:46 2019 +0200
@@ -0,0 +1,16 @@
+# Konfigurationsdatei für die in der Berechnungsart UINFO-Überflutungsdauern auszugebenden URLs
+# Je Gewässer ist zwingend eine Datei mit Namen 'wms_uedauern_mittel_.tsv' anzulegen. Groß-/Kleinschriebung beim Gewässernamen ist zu beachten!
+
+# Die Datei definiert für beliebig viele Layer individuell konfigurierbare Bezeichnungen und URLs.
+# Für jede Auswahlmöglichkeit ist eine Zeile folgender Form anzulegen:
+#
+
+# Die Angabe einer Vegetationszonen-URL mit dazugehöriger Vegetationszonen-Layer-Nummer ist dabei optional.
+
+# Änderungen werden erst nach einem Neustart des Servers wirksam.
+
+Mittelwert (1990-2016) 1 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_Statistik_1990_2016/MapServer/WMSServer 6 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_Statistik_1990_2016/MapServer/WMSServer
+Median (1990-2016) 2 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_Statistik_1990_2016/MapServer/WMSServer 7 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_Statistik_1990_2016/MapServer/WMSServer
+Minimum (1990-2016) 3 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_Statistik_1990_2016/MapServer/WMSServer 8 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_Statistik_1990_2016/MapServer/WMSServer
+Maximum (1990-2016) 0 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_Statistik_1990_2016/MapServer/WMSServer 5 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_Statistik_1990_2016/MapServer/WMSServer
+Standardabweichung (1990-2016) 4 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_Statistik_1990_2016/MapServer/WMSServer
\ No newline at end of file
diff -r f2473dc34535 -r ca492336570b artifacts/doc/conf/modules/wms_uedauern_mittel_Rhein.tsv
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/artifacts/doc/conf/modules/wms_uedauern_mittel_Rhein.tsv Wed Oct 09 19:17:46 2019 +0200
@@ -0,0 +1,16 @@
+# Konfigurationsdatei für die in der Berechnungsart UINFO-Überflutungsdauern auszugebenden URLs
+# Je Gewässer ist zwingend eine Datei mit Namen 'wms_uedauern_mittel_.tsv' anzulegen. Groß-/Kleinschriebung beim Gewässernamen ist zu beachten!
+
+# Die Datei definiert für beliebig viele Layer individuell konfigurierbare Bezeichnungen und URLs.
+# Für jede Auswahlmöglichkeit ist eine Zeile folgender Form anzulegen:
+#
+
+# Die Angabe einer Vegetationszonen-URL mit dazugehöriger Vegetationszonen-Layer-Nummer ist dabei optional.
+
+# Änderungen werden erst nach einem Neustart des Servers wirksam.
+
+Mittelwert (1990-2016) 1 https://geoportal.bafg.de/arcgis3/services/Flut3/Rhein_Statistik_1990_2016/MapServer/WMSServer 6 https://geoportal.bafg.de/arcgis3/services/Flut3/Rhein_Statistik_1990_2016/MapServer/WMSServer
+Median (1990-2016) 2 https://geoportal.bafg.de/arcgis3/services/Flut3/Rhein_Statistik_1990_2016/MapServer/WMSServer 7 https://geoportal.bafg.de/arcgis3/services/Flut3/Rhein_Statistik_1990_2016/MapServer/WMSServer
+Minimum (1990-2016) 3 https://geoportal.bafg.de/arcgis3/services/Flut3/Rhein_Statistik_1990_2016/MapServer/WMSServer 8 https://geoportal.bafg.de/arcgis3/services/Flut3/Rhein_Statistik_1990_2016/MapServer/WMSServer
+Maximum (1990-2016) 0 https://geoportal.bafg.de/arcgis3/services/Flut3/Rhein_Statistik_1990_2016/MapServer/WMSServer 5 https://geoportal.bafg.de/arcgis3/services/Flut3/Rhein_Statistik_1990_2016/MapServer/WMSServer
+Standardabweichung (1990-2016) 4 https://geoportal.bafg.de/arcgis3/services/Flut3/Rhein_Statistik_1990_2016/MapServer/WMSServer
\ No newline at end of file
diff -r f2473dc34535 -r ca492336570b artifacts/doc/conf/modules/wms_uedauern_szenario_Beispielfluss.tsv
--- a/artifacts/doc/conf/modules/wms_uedauern_szenario_Beispielfluss.tsv Tue Oct 08 15:03:24 2019 +0200
+++ b/artifacts/doc/conf/modules/wms_uedauern_szenario_Beispielfluss.tsv Wed Oct 09 19:17:46 2019 +0200
@@ -2,49 +2,50 @@
# Je Gewässer ist zwingend eine Datei mit Namen 'wms_uedauern_jahre_.tsv' anzulegen. Groß-/Kleinschriebung beim Gewässernamen ist zu beachten!
# Die Datei definiert für beliebig viele Layer individuell konfigurierbare Bezeichnungen und URLs.
-# Pro Layer ist eine Zeile folgender Form anzulegen:
-#
-
-# Änderungen werden erst nach einem Neustart des Servers wirksam.
+# Für jede Auswahlmöglichkeit ist eine Zeile folgender Form anzulegen:
+#
--200 0 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer 0 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer
--190 1 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer 1 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer
--180 2 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer 2 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer
--170 3 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer 3 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer
--160 4 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer 4 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer
--150 5 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer 5 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer
--140 6 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer 6 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer
--130 7 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer 7 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer
--120 8 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer 8 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer
--110 9 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer 9 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer
--100 0 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer 0 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_1990_1999/MapServer/WMSServer
--90 1 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer 1 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer
--80 2 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer 2 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer
--70 3 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer 3 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer
--60 4 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer 4 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer
--50 5 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer 5 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer
--40 6 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer 6 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer
--30 7 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer 7 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer
--20 8 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer 8 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer
--10 9 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer 9 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer
-0 0 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer 0 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer
-10 1 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer 1 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2000_2009/MapServer/WMSServer
-20 2 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer 2 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer
-30 3 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer 3 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer
-40 4 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer 4 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer
-50 5 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer 5 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer
-60 6 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer 6 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer
-70 7 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer 7 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer
-80 8 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer 8 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer
-90 9 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer 9 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer
-100 0 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer 0 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer
-110 1 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer 1 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer
-120 2 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer 2 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer
-130 3 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer 3 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer
-140 4 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer 4 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer
-150 5 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer 5 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer
-160 6 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer 6 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer
-170 7 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer 7 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer
-180 8 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer 8 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer
-190 9 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer 9 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer
-200 0 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer 0 https://geoportal.bafg.de/arcgis3/services/Flut3/Elbe_2010_2019/MapServer/WMSServer
+# Die Angabe einer Vegetationszonen-URL mit dazugehöriger Vegetationszonen-Layer-Nummer ist dabei optional.
+
+# Änderungen werden erst nach einem Neustart des Servers wirksam.
+
+-200 9 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_m110200/MapServer/WMSServer
+-190 8 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_m110200/MapServer/WMSServer
+-180 7 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_m110200/MapServer/WMSServer
+-170 6 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_m110200/MapServer/WMSServer
+-160 5 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_m110200/MapServer/WMSServer
+-150 4 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_m110200/MapServer/WMSServer
+-140 3 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_m110200/MapServer/WMSServer
+-130 2 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_m110200/MapServer/WMSServer
+-120 1 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_m110200/MapServer/WMSServer
+-110 0 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_m110200/MapServer/WMSServer
+-100 9 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_m010100/MapServer/WMSServer
+-90 8 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_m010100/MapServer/WMSServer
+-80 7 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_m010100/MapServer/WMSServer
+-70 6 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_m010100/MapServer/WMSServer
+-60 5 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_m010100/MapServer/WMSServer
+-50 4 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_m010100/MapServer/WMSServer
+-40 3 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_m010100/MapServer/WMSServer
+-30 2 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_m010100/MapServer/WMSServer
+-20 1 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_m010100/MapServer/WMSServer
+-10 0 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_m010100/MapServer/WMSServer
+10 9 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_p110200/MapServer/WMSServer
+20 8 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_p110200/MapServer/WMSServer
+30 7 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_p110200/MapServer/WMSServer
+40 6 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_p110200/MapServer/WMSServer
+50 5 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_p110200/MapServer/WMSServer
+60 4 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_p110200/MapServer/WMSServer
+70 3 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_p110200/MapServer/WMSServer
+80 2 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_p110200/MapServer/WMSServer
+90 1 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_p110200/MapServer/WMSServer
+100 0 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_p110200/MapServer/WMSServer
+110 9 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_p010100/MapServer/WMSServer
+120 8 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_p010100/MapServer/WMSServer
+130 7 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_p010100/MapServer/WMSServer
+140 6 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_p010100/MapServer/WMSServer
+150 5 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_p010100/MapServer/WMSServer
+160 4 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_p010100/MapServer/WMSServer
+170 3 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_p010100/MapServer/WMSServer
+180 2 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_p010100/MapServer/WMSServer
+190 1 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_p010100/MapServer/WMSServer
+200 0 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_p010100/MapServer/WMSServer
\ No newline at end of file
diff -r f2473dc34535 -r ca492336570b artifacts/doc/conf/modules/wms_uedauern_szenario_Elbe.tsv
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/artifacts/doc/conf/modules/wms_uedauern_szenario_Elbe.tsv Wed Oct 09 19:17:46 2019 +0200
@@ -0,0 +1,51 @@
+# Konfigurationsdatei für die in der Berechnungsart UINFO-Überflutungsdauern auszugebenden URLs
+# Je Gewässer ist zwingend eine Datei mit Namen 'wms_uedauern_jahre_.tsv' anzulegen. Groß-/Kleinschriebung beim Gewässernamen ist zu beachten!
+
+# Die Datei definiert für beliebig viele Layer individuell konfigurierbare Bezeichnungen und URLs.
+# Für jede Auswahlmöglichkeit ist eine Zeile folgender Form anzulegen:
+#
+
+# Die Angabe einer Vegetationszonen-URL mit dazugehöriger Vegetationszonen-Layer-Nummer ist dabei optional.
+
+# Änderungen werden erst nach einem Neustart des Servers wirksam.
+
+-200 9 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_m110200/MapServer/WMSServer
+-190 8 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_m110200/MapServer/WMSServer
+-180 7 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_m110200/MapServer/WMSServer
+-170 6 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_m110200/MapServer/WMSServer
+-160 5 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_m110200/MapServer/WMSServer
+-150 4 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_m110200/MapServer/WMSServer
+-140 3 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_m110200/MapServer/WMSServer
+-130 2 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_m110200/MapServer/WMSServer
+-120 1 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_m110200/MapServer/WMSServer
+-110 0 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_m110200/MapServer/WMSServer
+-100 9 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_m010100/MapServer/WMSServer
+-90 8 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_m010100/MapServer/WMSServer
+-80 7 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_m010100/MapServer/WMSServer
+-70 6 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_m010100/MapServer/WMSServer
+-60 5 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_m010100/MapServer/WMSServer
+-50 4 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_m010100/MapServer/WMSServer
+-40 3 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_m010100/MapServer/WMSServer
+-30 2 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_m010100/MapServer/WMSServer
+-20 1 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_m010100/MapServer/WMSServer
+-10 0 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_m010100/MapServer/WMSServer
+10 9 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_p010100/MapServer/WMSServer
+20 8 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_p010100/MapServer/WMSServer
+30 7 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_p010100/MapServer/WMSServer
+40 6 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_p010100/MapServer/WMSServer
+50 5 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_p010100/MapServer/WMSServer
+60 4 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_p010100/MapServer/WMSServer
+70 3 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_p010100/MapServer/WMSServer
+80 2 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_p010100/MapServer/WMSServer
+90 1 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_p010100/MapServer/WMSServer
+100 0 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_p010100/MapServer/WMSServer
+110 9 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_p110200/MapServer/WMSServer
+120 8 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_p110200/MapServer/WMSServer
+130 7 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_p110200/MapServer/WMSServer
+140 6 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_p110200/MapServer/WMSServer
+150 5 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_p110200/MapServer/WMSServer
+160 4 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_p110200/MapServer/WMSServer
+170 3 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_p110200/MapServer/WMSServer
+180 2 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_p110200/MapServer/WMSServer
+190 1 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_p110200/MapServer/WMSServer
+200 0 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Elbe_p110200/MapServer/WMSServer
\ No newline at end of file
diff -r f2473dc34535 -r ca492336570b artifacts/doc/conf/modules/wms_uedauern_szenario_Rhein.tsv
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/artifacts/doc/conf/modules/wms_uedauern_szenario_Rhein.tsv Wed Oct 09 19:17:46 2019 +0200
@@ -0,0 +1,51 @@
+# Konfigurationsdatei für die in der Berechnungsart UINFO-Überflutungsdauern auszugebenden URLs
+# Je Gewässer ist zwingend eine Datei mit Namen 'wms_uedauern_jahre_.tsv' anzulegen. Groß-/Kleinschriebung beim Gewässernamen ist zu beachten!
+
+# Die Datei definiert für beliebig viele Layer individuell konfigurierbare Bezeichnungen und URLs.
+# Für jede Auswahlmöglichkeit ist eine Zeile folgender Form anzulegen:
+#
+
+# Die Angabe einer Vegetationszonen-URL mit dazugehöriger Vegetationszonen-Layer-Nummer ist dabei optional.
+
+# Änderungen werden erst nach einem Neustart des Servers wirksam.
+
+-200 9 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Rhein_m110200/MapServer/WMSServer
+-190 8 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Rhein_m110200/MapServer/WMSServer
+-180 7 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Rhein_m110200/MapServer/WMSServer
+-170 6 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Rhein_m110200/MapServer/WMSServer
+-160 5 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Rhein_m110200/MapServer/WMSServer
+-150 4 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Rhein_m110200/MapServer/WMSServer
+-140 3 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Rhein_m110200/MapServer/WMSServer
+-130 2 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Rhein_m110200/MapServer/WMSServer
+-120 1 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Rhein_m110200/MapServer/WMSServer
+-110 0 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Rhein_m110200/MapServer/WMSServer
+-100 9 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Rhein_m010100/MapServer/WMSServer
+-90 8 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Rhein_m010100/MapServer/WMSServer
+-80 7 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Rhein_m010100/MapServer/WMSServer
+-70 6 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Rhein_m010100/MapServer/WMSServer
+-60 5 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Rhein_m010100/MapServer/WMSServer
+-50 4 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Rhein_m010100/MapServer/WMSServer
+-40 3 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Rhein_m010100/MapServer/WMSServer
+-30 2 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Rhein_m010100/MapServer/WMSServer
+-20 1 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Rhein_m010100/MapServer/WMSServer
+-10 0 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Rhein_m010100/MapServer/WMSServer
+10 9 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Rhein_p010100/MapServer/WMSServer
+20 8 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Rhein_p010100/MapServer/WMSServer
+30 7 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Rhein_p010100/MapServer/WMSServer
+40 6 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Rhein_p010100/MapServer/WMSServer
+50 5 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Rhein_p010100/MapServer/WMSServer
+60 4 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Rhein_p010100/MapServer/WMSServer
+70 3 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Rhein_p010100/MapServer/WMSServer
+80 2 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Rhein_p010100/MapServer/WMSServer
+90 1 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Rhein_p010100/MapServer/WMSServer
+100 0 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Rhein_p010100/MapServer/WMSServer
+110 9 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Rhein_p110200/MapServer/WMSServer
+120 8 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Rhein_p110200/MapServer/WMSServer
+130 7 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Rhein_p110200/MapServer/WMSServer
+140 6 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Rhein_p110200/MapServer/WMSServer
+150 5 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Rhein_p110200/MapServer/WMSServer
+160 4 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Rhein_p110200/MapServer/WMSServer
+170 3 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Rhein_p110200/MapServer/WMSServer
+180 2 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Rhein_p110200/MapServer/WMSServer
+190 1 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Rhein_p110200/MapServer/WMSServer
+200 0 https://geoportal.bafg.de/arcgis3/services/Flut3/UFD_Salix231_Rhein_p110200/MapServer/WMSServer
\ No newline at end of file
diff -r f2473dc34535 -r ca492336570b artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BezugswstDepthProcessor.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BezugswstDepthProcessor.java Tue Oct 08 15:03:24 2019 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BezugswstDepthProcessor.java Wed Oct 09 19:17:46 2019 +0200
@@ -76,8 +76,11 @@
public static Facet createFieldDepthFacet(final CallContext context, final String hash, final String id, final int facetIndex, final int resultIndex,
final int fieldIndex) {
+ final String leftRightAppendixKey = BedHeightValueType.field(fieldIndex).getLeftRightStringAppendix();
+ final String leftRightAppendix = Resources.getMsg(context.getMeta(), leftRightAppendixKey, leftRightAppendixKey);
- final String description = Resources.getMsg(context.getMeta(), FACET_FIELD_DEPTH_DESCRIPTION, FACET_FIELD_DEPTH_DESCRIPTION, fieldIndex);
+ final String description = Resources.getMsg(context.getMeta(), FACET_FIELD_DEPTH_DESCRIPTION, FACET_FIELD_DEPTH_DESCRIPTION, fieldIndex,
+ leftRightAppendix);
final String facetName = String.format(FACET_FIELD_DEPTH_FORMAT, fieldIndex);
return new BezugswstResultFacet(facetIndex, resultIndex, facetName, description, AXIS_LABEL, id, hash);
}
diff -r f2473dc34535 -r ca492336570b artifacts/src/main/java/org/dive4elements/river/artifacts/common/ResultFacet.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/common/ResultFacet.java Tue Oct 08 15:03:24 2019 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/common/ResultFacet.java Wed Oct 09 19:17:46 2019 +0200
@@ -20,7 +20,6 @@
/**
* Facet of one of the S-Info curves.
*/
-// TODO: rename: hat nichts mehr mit sinfo zu tun
public class ResultFacet extends DataFacet {
private static final long serialVersionUID = 1L;
diff -r f2473dc34535 -r ca492336570b artifacts/src/main/java/org/dive4elements/river/artifacts/math/MovingAverage.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/math/MovingAverage.java Tue Oct 08 15:03:24 2019 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/math/MovingAverage.java Wed Oct 09 19:17:46 2019 +0200
@@ -12,21 +12,18 @@
import java.util.SortedMap;
import java.util.TreeMap;
-
-public class MovingAverage
-{
+public class MovingAverage {
- public static double[][] simple(double[][] values, double radius) {
- TreeMap map = toMap(values);
- int N = map.size();
- double [] xs = new double[N];
- double [] ys = new double[N];
+ public static double[][] simple(final double[][] values, final double radius) {
+ final TreeMap map = toMap(values);
+ final int N = map.size();
+ final double[] xs = new double[N];
+ final double[] ys = new double[N];
int ndx = 0;
- for (double x: map.keySet()) {
- SortedMap range =
- map.subMap(x-radius, true, x+radius, true);
+ for (final double x : map.keySet()) {
+ final SortedMap range = map.subMap(x - radius, true, x + radius, true);
double avg = 0d;
- for (double v: range.values()) {
+ for (final double v : range.values()) {
avg += v;
}
avg /= range.size();
@@ -34,43 +31,43 @@
ys[ndx] = avg;
ndx++;
}
- return new double [][] { xs, ys };
+ return new double[][] { xs, ys };
}
/** Build moving average over values. Weight them. */
- public static double[][] weighted(
- double[][] values,
- double radius
- ) {
- TreeMap map = toMap(values);
- int N = map.size();
- double [] xs = new double[N];
- double [] ys = new double[N];
+ public static double[][] weighted(final double[][] values, final double radius) {
+ final TreeMap map = toMap(values);
+ final int N = map.size();
+ final double[] xs = new double[N];
+ final double[] ys = new double[N];
int ndx = 0;
- double _1radius = 1d/radius;
- for (double x: map.keySet()) {
+ final double _1radius = 1d / radius;
+ for (final double x : map.keySet()) {
double avg = 0d;
double weights = 0d;
- for (Map.Entry e:
- map.subMap(x-radius, false, x+radius, false).entrySet()
- ) {
- double weight = 1d - Math.abs(x - e.getKey())*_1radius;
- avg += weight*e.getValue();
- weights += weight;
+ for (final Map.Entry e : map.subMap(x - radius, false, x + radius, false).entrySet()) {
+ final Double value = e.getValue();
+
+ if (!value.isNaN()) {
+ final double weight = 1d - Math.abs(x - e.getKey()) * _1radius;
+ weights += weight;
+ avg += weight * value;
+ }
}
+
avg /= weights;
xs[ndx] = x;
- ys[ndx] = avg;
+ ys[ndx] = Double.isNaN(map.get(x)) ? Double.NaN : avg;
ndx++;
}
- return new double [][] { xs, ys };
+ return new double[][] { xs, ys };
}
/** From [x1,x2][y1,y2] makes {x1:y1,x2:y2}. Sorted by x! */
- private static TreeMap toMap(double[][] values) {
- TreeMap map = new TreeMap();
- double [] xs = values[0];
- double [] ys = values[1];
+ private static TreeMap toMap(final double[][] values) {
+ final TreeMap map = new TreeMap<>();
+ final double[] xs = values[0];
+ final double[] ys = values[1];
for (int i = 0; i < xs.length; i++) {
map.put(xs[i], ys[i]);
}
diff -r f2473dc34535 -r ca492336570b 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 Tue Oct 08 15:03:24 2019 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/SInfoResultType.java Wed Oct 09 19:17:46 2019 +0200
@@ -10,6 +10,7 @@
package org.dive4elements.river.artifacts.sinfo.common;
import java.text.NumberFormat;
+import java.text.ParseException;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
@@ -64,12 +65,20 @@
@Override
public String exportValue(final CallContext context, final Object value) {
final double doubleValue = asDouble(value);
- return exportDoubleValue(context, doubleValue);
+ final String significant = Formatter.SIGINIFICANT_FORMATTER_3.format(doubleValue);
+ try {
+ final Number significantD = Formatter.SIGINIFICANT_FORMATTER_3.parse(significant);
+ return exportDoubleValue(context, asDouble(significantD));
+ }
+ catch (final ParseException e) {
+ e.printStackTrace();
+ return "";
+ }
}
@Override
protected NumberFormat createFormatter(final CallContext context) {
- return Formatter.getWaterlevelQ(context);
+ return Formatter.getFormatter(context, 0, 3);
}
};
@@ -107,6 +116,22 @@
}
};
+ // TODO: check, if it is being used correctly
+ public static final SInfoResultType infrastructuregroup = new SInfoResultType(I18NStrings.UNIT_NONE,
+ "sinfo.export.flood_duration.csv.header.infrastructure_group", "sinfo.export.flood_duration.pdf.header.infrastructure_group") {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public String exportValue(final CallContext context, final Object value) {
+ return exportStringValue(value);
+ }
+
+ @Override
+ protected NumberFormat createFormatter(final CallContext context) {
+ throw new UnsupportedOperationException();
+ }
+ };
+ //
public static final SInfoResultType infrastructuretype = new SInfoResultType(I18NStrings.UNIT_NONE,
"sinfo.export.flood_duration.csv.header.infrastructure_type", "sinfo.export.flood_duration.pdf.header.infrastructure_type") {
private static final long serialVersionUID = 1L;
@@ -122,6 +147,13 @@
}
};
+ /**
+ * Gets the label of the type and bank location of an infrastructure
+ */
+ public static final String getInfrastructureLabel(final CallContext context, final String group, final String type, final AttributeKey riverside) {
+ return group + " - " + type + " (" + localizeRiverside(context, riverside) + ")";
+ }
+
public static final SInfoResultType dischargeLong = new SInfoResultType(I18NStrings.UNIT_CUBIC_M, "sinfo.export.collision.csv.header.discharge_long") {
private static final long serialVersionUID = 1L;
@@ -205,6 +237,36 @@
}
};
+ public static final SInfoResultType maxBedHeight = new SInfoResultType(null, null, null) {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public String exportValue(final CallContext context, final Object value) {
+ final double doubleValue = asDouble(value);
+ return exportDoubleValue(context, doubleValue);
+ }
+
+ @Override
+ protected NumberFormat createFormatter(final CallContext context) {
+ return Formatter.getMeanBedHeight(context);
+ }
+ };
+
+ public static final SInfoResultType minBedHeight = new SInfoResultType(null, null, null) {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public String exportValue(final CallContext context, final Object value) {
+ final double doubleValue = asDouble(value);
+ return exportDoubleValue(context, doubleValue);
+ }
+
+ @Override
+ protected NumberFormat createFormatter(final CallContext context) {
+ return Formatter.getMeanBedHeight(context);
+ }
+ };
+
public static final SInfoResultType meanBedHeight = new SInfoResultType(null, SInfoI18NStrings.CSV_MEAN_BED_HEIGHT_HEADER,
SInfoI18NStrings.CSV_MEAN_BED_HEIGHT_HEADER_SHORT) {
private static final long serialVersionUID = 1L;
@@ -280,7 +342,8 @@
}
};
- public static final SInfoResultType riverside = new SInfoResultType(I18NStrings.UNIT_NONE, "sinfo.export.flood_duration.csv.header.riverside") {
+ public static final SInfoResultType riverside = new SInfoResultType(I18NStrings.UNIT_NONE, "sinfo.export.flood_duration.csv.header.riverside",
+ "sinfo.export.flood_duration.pdf.header.riverside") {
private static final long serialVersionUID = 1L;
@Override
diff -r f2473dc34535 -r ca492336570b artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FacetCalculator.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FacetCalculator.java Wed Oct 09 19:17:46 2019 +0200
@@ -0,0 +1,186 @@
+/** Copyright (C) 2017 by Bundesanstalt für Gewässerkunde
+ * Software engineering by
+ * Björnsen Beratende Ingenieure GmbH
+ * Dr. Schumacher Ingenieurbüro für Wasser und Umwelt
+ *
+ * This file is Free Software under the GNU AGPL (>=v3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out the
+ * documentation coming with Dive4Elements River for details.
+ */
+package org.dive4elements.river.artifacts.sinfo.flood_duration;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+
+import org.dive4elements.artifacts.CallContext;
+import org.dive4elements.river.artifacts.common.GeneralResultType;
+import org.dive4elements.river.artifacts.common.ResultRow;
+import org.dive4elements.river.artifacts.model.Calculation;
+import org.dive4elements.river.artifacts.resources.Resources;
+import org.dive4elements.river.artifacts.sinfo.common.SInfoResultType;
+import org.dive4elements.river.jfree.StickyAxisAnnotation;
+import org.dive4elements.river.jfree.StickyAxisAnnotation.SimpleAxis;
+import org.dive4elements.river.model.Attribute.AttributeKey;
+
+/**
+ * @author Domenico Nardi Tironi
+ *
+ */
+public class FacetCalculator {
+
+ private static final double DELTA_KM = 0.0001;
+
+ private final CallContext m_context;
+
+ public FacetCalculator(final CallContext context) {
+ this.m_context = context;
+ }
+
+ /**
+ * Calculates the data for the W main value lines in the duration curve chart
+ */
+ public List calcMainValueWAnnotations(final Calculation problems, final double station, final FloodDurationCalculationResult result) {
+
+ final List stationRows = searchStation(station, result.getAllRows(), AttributeKey.NONE);
+ if (stationRows.isEmpty())
+ return Collections.emptyList();
+
+ final List annotations = new ArrayList<>();
+ final ResultRow row = stationRows.get(0);
+ final List wqds = (List) row.getValue(SInfoResultType.customMultiRowColWaterlevel);
+ for (final DurationWaterlevel wqd : wqds) {
+ final String label = !wqd.getBezeichnung().startsWith("W=") ? "W(" + wqd.getBezeichnung() + ")" : wqd.getBezeichnung();
+ final StickyAxisAnnotation annotation = new StickyAxisAnnotation(label, (float) wqd.getWaterlevel(), SimpleAxis.Y_AXIS,
+ FloodDurationCurveGenerator.YAXIS.W.idx);
+ annotation.setHitPoint((float) wqd.getFloodDurDaysPerYear());
+ annotations.add(annotation);
+ }
+ return annotations;
+ }
+
+ /**
+ * Calculates the data for the Q main value lines in the duration curve chart
+ *
+ * @param infrastructure
+ */
+ public List calcMainValueQAnnotations(final Calculation problems, final double station, final FloodDurationCalculationResult result) {
+
+ final List stationRows = searchStation(station, result.getAllRows(), AttributeKey.NONE);
+ if (stationRows.isEmpty())
+ return Collections.emptyList();
+
+ final ResultRow row = stationRows.get(0);
+ final List annotations = new ArrayList<>();
+ final List wqds = (List) row.getValue(SInfoResultType.customMultiRowColWaterlevel);
+ for (final DurationWaterlevel wqd : wqds) {
+ final String label = wqd.getBezeichnung().startsWith("W=") ? "Q(" + wqd.getBezeichnung() + ")" : wqd.getBezeichnung();
+ final StickyAxisAnnotation annotation = new StickyAxisAnnotation(label, (float) wqd.getDischarge(), SimpleAxis.Y_AXIS,
+ FloodDurationCurveGenerator.YAXIS.Q.idx);
+ annotation.setHitPoint((float) wqd.getFloodDurDaysPerYear());
+ annotations.add(annotation);
+ }
+ return annotations;
+ }
+
+ /**
+ * Find and return the W or Q annotation(s) of a station and a riverside in a previously calculated result
+ *
+ * @param key
+ */
+ public List calcInfrastructureAnnotations(final Calculation problems, final double station, final boolean isW,
+ final FloodDurationCalculationResult result, final AttributeKey riverside) {
+
+ final List stationRows = searchStation(station, result.getAllRows(), riverside);
+ if (stationRows.isEmpty())
+ return Collections.emptyList();
+
+ // Same way as in MainValueWFacet and ..QFacet
+ final List annotations = new ArrayList<>();
+ for (final ResultRow row : stationRows) {
+ if (isW)
+ annotations.add(calcInfrastructureWAnnotation(row));
+ else
+ annotations.add(calcInfrastructureQAnnotation(row));
+ }
+ return annotations;
+ }
+
+ /**
+ * Calculates the Q annotation lines of an infrastructure
+ */
+ private StickyAxisAnnotation calcInfrastructureQAnnotation(final ResultRow row) {
+ final String label = Resources.getMsg(this.m_context.getMeta(), "sinfo.chart.flood_duration.curve.infrastructure",
+ "sinfo.chart.flood_duration.curve.infrastructure", getInfrastructureLabel(row));
+ final StickyAxisAnnotation annotation = new StickyAxisAnnotation(label, (float) row.getDoubleValue(SInfoResultType.floodDischarge), SimpleAxis.Y_AXIS,
+ FloodDurationCurveGenerator.YAXIS.Q.idx);
+ annotation.setHitPoint((float) row.getDoubleValue(SInfoResultType.floodDuration));
+ return annotation;
+ }
+
+ /**
+ * Calculates the W annotation lines of an infrastructure
+ */
+ private StickyAxisAnnotation calcInfrastructureWAnnotation(final ResultRow row) {
+ final String label = Resources.getMsg(this.m_context.getMeta(), "sinfo.chart.flood_duration.curve.infrastructure",
+ "sinfo.chart.flood_duration.curve.infrastructure", getInfrastructureLabel(row));
+ final StickyAxisAnnotation annotation = new StickyAxisAnnotation(label, (float) row.getDoubleValue(SInfoResultType.infrastructureHeight),
+ SimpleAxis.Y_AXIS, FloodDurationCurveGenerator.YAXIS.W.idx);
+ annotation.setHitPoint((float) row.getDoubleValue(SInfoResultType.floodDuration));
+ return annotation;
+ }
+
+ /**
+ * Builds the label of the type and bank location of the infrastructure of a result row
+ */
+ private String getInfrastructureLabel(final ResultRow row) {
+ return SInfoResultType.getInfrastructureLabel(this.m_context, (String) row.getValue(SInfoResultType.infrastructuregroup),
+ (String) row.getValue(SInfoResultType.infrastructuretype), (AttributeKey) row.getValue(SInfoResultType.riverside));
+ }
+
+ /**
+ * Searches the one or two rows of a station in a result rows collection
+ *
+ * @param m_riverside
+ */
+ private List searchStation(final double station, final Collection rows, final AttributeKey riverside) {
+
+ final double searchStation = findSearchStation(rows, station, riverside);
+ if (Double.isNaN(searchStation))
+ return Collections.emptyList();
+
+ final List found = new ArrayList<>();
+
+ for (final ResultRow row : rows) { // rows are not sorted
+ final String riversideStr = String.valueOf(row.getValue(SInfoResultType.riverside));
+ if (riversideStr.equals("null"))
+ continue;
+
+ if (Math.abs(row.getDoubleValue(GeneralResultType.station) - station) > DELTA_KM)
+ continue;
+
+ if (riverside.equals(AttributeKey.NONE) || riverside.equals(AttributeKey.valueOf(String.valueOf(row.getValue(SInfoResultType.riverside)))))
+ found.add(row);
+ }
+ return found;
+ }
+
+ @Deprecated
+ private double findSearchStation(final Collection rows, final double station, final AttributeKey riverside) {
+
+ if (!Double.isNaN(station))
+ return station;
+
+ for (final ResultRow row : rows) {
+ final String riversideStr = String.valueOf(row.getValue(SInfoResultType.riverside));
+ if (riversideStr.equals("null"))
+ continue;
+
+ if (riverside.equals(AttributeKey.NONE) || riverside.equals(AttributeKey.valueOf(riversideStr)))
+ return row.getDoubleValue(GeneralResultType.station);
+ }
+
+ return Double.NaN;
+ }
+}
diff -r f2473dc34535 -r ca492336570b artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCalculation.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCalculation.java Tue Oct 08 15:03:24 2019 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCalculation.java Wed Oct 09 19:17:46 2019 +0200
@@ -9,7 +9,7 @@
*/
package org.dive4elements.river.artifacts.sinfo.flood_duration;
-import java.util.List;
+import java.util.Set;
import org.apache.commons.lang.math.DoubleRange;
import org.dive4elements.artifacts.CallContext;
@@ -20,11 +20,10 @@
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.flood_duration.FloodDurationCalculationResult.Infrastructure;
import org.dive4elements.river.artifacts.sinfo.tkhstate.WinfoArtifactWrapper;
import org.dive4elements.river.artifacts.sinfo.util.CalculationUtils;
import org.dive4elements.river.artifacts.sinfo.util.RiverInfo;
-import org.dive4elements.river.jfree.StickyAxisAnnotation;
-import org.dive4elements.river.model.Attribute.AttributeKey;
import org.dive4elements.river.model.River;
/**
@@ -72,11 +71,15 @@
/**
* Calculates the flood durations of the infrastructures of a km range of a river
*/
- private void calculateResult(final String label, final DoubleRange calcRange, final RiverInfoProvider riverInfoProvider,
- final FloodDurationAccess access, final Calculation problems, final WINFOArtifact winfo, final FloodDurationCalculationResults results) {
+ private void calculateResult(final String label, final DoubleRange calcRange, final RiverInfoProvider riverInfoProvider, final FloodDurationAccess access,
+ final Calculation problems, final WINFOArtifact winfo, final FloodDurationCalculationResults results) {
final FloodDurationCalculator calculator = new FloodDurationCalculator(this.context, riverInfoProvider);
- calculator.execute(problems, label, calcRange, access.getRiverside(), access.getIsWspl(), winfo, results);
+
+ // FIXME: fetch from access; maybe we need database for that... whatever
+ final Set infrastructureKeys = null;
+
+ calculator.execute(problems, label, calcRange, access.getRiverside(), infrastructureKeys, access.getIsWspl(), winfo, results);
}
/**
@@ -100,44 +103,9 @@
if (!Double.isNaN(station)) {
winfo.addStringData("ld_locations", Double.toString(station));
return calculator.calcWQDays(problems, station, winfo);
- }
- else {
+ } else {
winfo.addStringData("ld_locations", Double.toString(calcRange.getMinimumDouble()));
return calculator.calcWQDays(problems, calcRange.getMinimumDouble(), winfo);
}
}
-
- /**
- * Calculates the annotations of the infrastructure(s) of a station for a flood duration calculation
- */
- public List calcInfrastructureAnnotations(final double station, final AttributeKey riverside, final boolean isW,
- final FloodDurationCalculationResult result) {
-
- final Calculation problems = new Calculation();
-
- final FloodDurationCalculator calculator = new FloodDurationCalculator(this.context, null);
- return calculator.calcInfrastructureAnnotations(problems, station, riverside, isW, result);
- }
-
- /**
- * Calculates the annotations of the W main values of a station
- */
- public List calcMainValueWAnnotations(final double station, final FloodDurationCalculationResult result) {
-
- final Calculation problems = new Calculation();
-
- final FloodDurationCalculator calculator = new FloodDurationCalculator(this.context, null);
- return calculator.calcMainValueWAnnotations(problems, station, result);
- }
-
- /**
- * Calculates the annotations of the Q main values of a station
- */
- public List calcMainValueQAnnotations(final double station, final FloodDurationCalculationResult result) {
-
- final Calculation problems = new Calculation();
-
- final FloodDurationCalculator calculator = new FloodDurationCalculator(this.context, null);
- return calculator.calcMainValueQAnnotations(problems, station, result);
- }
}
\ No newline at end of file
diff -r f2473dc34535 -r ca492336570b 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 Tue Oct 08 15:03:24 2019 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCalculationResult.java Wed Oct 09 19:17:46 2019 +0200
@@ -9,13 +9,19 @@
*/
package org.dive4elements.river.artifacts.sinfo.flood_duration;
+import java.io.Serializable;
import java.text.NumberFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
+import java.util.Map.Entry;
+import java.util.Set;
import org.apache.commons.collections.Predicate;
+import org.apache.commons.lang.builder.EqualsBuilder;
+import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.dive4elements.artifacts.CallContext;
import org.dive4elements.river.artifacts.common.AbstractCalculationExportableResult;
import org.dive4elements.river.artifacts.common.AbstractExportContext;
import org.dive4elements.river.artifacts.common.ExportContextCSV;
@@ -24,6 +30,7 @@
import org.dive4elements.river.artifacts.common.IResultType;
import org.dive4elements.river.artifacts.common.MetaAndTableJRDataSource;
import org.dive4elements.river.artifacts.common.ResultRow;
+import org.dive4elements.river.artifacts.resources.Resources;
import org.dive4elements.river.artifacts.sinfo.common.SInfoResultType;
import org.dive4elements.river.artifacts.sinfo.util.RiverInfo;
import org.dive4elements.river.model.Attribute.AttributeKey;
@@ -37,19 +44,19 @@
*/
public final class FloodDurationCalculationResult extends AbstractCalculationExportableResult {
- private final static class RiversidePredicate implements Predicate {
+ private final static class InfrastructurePredicate implements Predicate {
- private final AttributeKey riverside;
+ private final Infrastructure m_infrastructure;
- public RiversidePredicate(final AttributeKey riverside) {
- this.riverside = riverside;
+ public InfrastructurePredicate(final Infrastructure infrastructure) {
+ this.m_infrastructure = infrastructure;
}
@Override
public boolean evaluate(final Object object) {
final ResultRow row = (ResultRow) object;
-
- return row.getValue(SInfoResultType.riverside) == this.riverside;
+ final Infrastructure test = new Infrastructure(row);
+ return this.m_infrastructure.equals(test);
}
}
@@ -63,6 +70,69 @@
}
}
+ public static final class Infrastructure implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ private final String m_group;
+
+ private final String m_type;
+
+ private final AttributeKey m_riverside;
+
+ private static final String FACET_FLOOD_DURATION_DESCRIPTION = "sinfo_facet_flood_duration";
+
+ private static final String FACET_ABSOLUTE_HEIGHT = "sinfo.flood_duration.absolute.height";
+
+ public Infrastructure(final ResultRow row) {
+ this.m_group = String.valueOf(row.getValue(SInfoResultType.infrastructuregroup));
+ this.m_type = String.valueOf(row.getValue(SInfoResultType.infrastructuretype));
+ final String riversideStr = String.valueOf(row.getValue(SInfoResultType.riverside));
+ this.m_riverside = riversideStr.equals("null") ? AttributeKey.NONE : AttributeKey.valueOf(riversideStr);
+ }
+
+ public AttributeKey getRiverside() {
+ return this.m_riverside;
+ }
+
+ @Override
+ public int hashCode() {
+ return new HashCodeBuilder() //
+ .append(this.m_group)//
+ .append(this.m_type)//
+ .append(this.m_riverside)//
+ .toHashCode();
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+
+ if (obj == null)
+ return false;
+ if (obj == this)
+ return true;
+ if (obj.getClass() != getClass())
+ return false;
+
+ final Infrastructure other = (Infrastructure) obj;
+ return new EqualsBuilder() //
+ .append(this.m_group, other.m_group) //
+ .append(this.m_type, other.m_type) //
+ .append(this.m_riverside, other.m_riverside) //
+ .isEquals();
+ }
+
+ public String getFloodHeightLabel(final CallContext context) {
+ return Resources.getMsg(context.getMeta(), FACET_ABSOLUTE_HEIGHT, FACET_ABSOLUTE_HEIGHT)
+ + " " + SInfoResultType.getInfrastructureLabel(context, this.m_group, this.m_type, this.m_riverside);
+ }
+
+ public String getFloodDurationLabel(final CallContext context) {
+ return Resources.getMsg(context.getMeta(), FACET_FLOOD_DURATION_DESCRIPTION, FACET_FLOOD_DURATION_DESCRIPTION)
+ + " " + SInfoResultType.getInfrastructureLabel(context, this.m_group, this.m_type, this.m_riverside);
+ }
+ }
+
private static final long serialVersionUID = 1L;
private final boolean isUseWspl;
@@ -71,6 +141,8 @@
private final int maxWaterlevelPdf = 3;
+ private final Set m_infrastructures;
+
public interface ValueGetter {
double getValue(DurationWaterlevel waterlevel);
}
@@ -79,10 +151,16 @@
pdf, csv
}
- public FloodDurationCalculationResult(final String label, final String[] mainvalueLabels, final Collection rows, final boolean isUseWspl) {
+ public FloodDurationCalculationResult(final String label, final String[] mainvalueLabels, final Collection rows, final boolean isUseWspl,
+ final Set infrastructures) {
super(label, rows);
this.waterlevelLabels = mainvalueLabels;
this.isUseWspl = isUseWspl;
+ this.m_infrastructures = infrastructures;
+ }
+
+ public Set getInfrastructureMap() {
+ return this.m_infrastructures;
}
/**
@@ -96,7 +174,7 @@
final List infrasOnlyRows = new ArrayList<>();
for (final ResultRow row : rows) {
- if (row.getValue(SInfoResultType.infrastructuretype) != null)
+ if (row.getValue(SInfoResultType.infrastructuregroup) != null && row.getValue(SInfoResultType.infrastructuretype) != null)
infrasOnlyRows.add(row);
}
return Collections.unmodifiableCollection(infrasOnlyRows);
@@ -130,8 +208,11 @@
lines.add(exportContextCSV.formatRowValue(row, GeneralResultType.station));
lines.add(exportContextCSV.formatRowValue(row, SInfoResultType.riverside));
lines.add(exportContextCSV.formatRowValue(row, SInfoResultType.floodDuration));
+
lines.add(exportContextCSV.formatRowValue(row, SInfoResultType.floodDischarge));
+
lines.add(exportContextCSV.formatRowValue(row, SInfoResultType.infrastructureHeight));
+ lines.add(exportContextCSV.formatRowValue(row, SInfoResultType.infrastructuregroup));
lines.add(exportContextCSV.formatRowValue(row, SInfoResultType.infrastructuretype));
final List waterlevelList = (List) row.getValue(SInfoResultType.customMultiRowColWaterlevel);
@@ -177,6 +258,7 @@
header.add(exportContextCSV.formatCsvHeader(SInfoResultType.floodDuration));
header.add(exportContextCSV.msgUnitCSV(SInfoResultType.floodDischarge, SInfoResultType.floodDischarge.getUnit()));
header.add(exportContextCSV.msgUnitCSV(SInfoResultType.infrastructureHeight, river.getWstUnit()));
+ header.add(exportContextCSV.formatCsvHeader(SInfoResultType.infrastructuregroup));
header.add(exportContextCSV.formatCsvHeader(SInfoResultType.infrastructuretype));
// add dynamic headers
@@ -226,7 +308,9 @@
exportContextPDF.addJRMetadata(source, "inundationduration_header", SInfoResultType.floodDuration);
exportContextPDF.addJRMetadata(source, "inundationduration_q_header", SInfoResultType.floodDischarge);
exportContextPDF.addJRMetadata(source, "infrastructure_height_header", SInfoResultType.infrastructureHeight);
- exportContextPDF.addJRMetadata(source, "infrastructure_type_header", SInfoResultType.infrastructuretype);
+ // FIXME Tironi: report-keys ..type => ..group und ..part => ..type umbenennen zwecks Einheitlichkeit
+ exportContextPDF.addJRMetadata(source, "infrastructure_type_header", SInfoResultType.infrastructuregroup);
+ exportContextPDF.addJRMetadata(source, "infrastructure_part_header", SInfoResultType.infrastructuretype);
for (int i = 1; i <= this.getWaterlevelCount(); i++) {
@@ -262,8 +346,9 @@
/**
* Gets the longitudinal section of a result value type for one river side
*/
- public final double[][] getInfrastructurePoints(final IResultType type, final AttributeKey riverside) {
- return getPoints(GeneralResultType.station, type, new RiversidePredicate(riverside));
+ public final double[][] getInfrastructurePoints(final IResultType type, final Infrastructure infrastructure) {
+
+ return getPoints(GeneralResultType.station, type, new InfrastructurePredicate(infrastructure));
}
/**
@@ -295,4 +380,9 @@
public boolean isUseWspl() {
return this.isUseWspl;
}
+
+ public Collection> getUniqueInfrastruktureTypes() {
+ // TODO Auto-generated method stub
+ return null;
+ }
}
\ No newline at end of file
diff -r f2473dc34535 -r ca492336570b 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 Tue Oct 08 15:03:24 2019 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCalculator.java Wed Oct 09 19:17:46 2019 +0200
@@ -10,8 +10,8 @@
package org.dive4elements.river.artifacts.sinfo.flood_duration;
import java.util.ArrayList;
-import java.util.Collection;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -31,13 +31,11 @@
import org.dive4elements.river.artifacts.model.WstValueTable.QPosition;
import org.dive4elements.river.artifacts.model.WstValueTableFactory;
import org.dive4elements.river.artifacts.model.river.RiverInfoProvider;
-import org.dive4elements.river.artifacts.resources.Resources;
import org.dive4elements.river.artifacts.sinfo.common.GaugeDurationValuesFinder;
import org.dive4elements.river.artifacts.sinfo.common.SInfoResultType;
+import org.dive4elements.river.artifacts.sinfo.flood_duration.FloodDurationCalculationResult.Infrastructure;
import org.dive4elements.river.artifacts.sinfo.flood_duration.RiversideRadioChoice.RiversideChoiceKey;
import org.dive4elements.river.exports.WaterlevelDescriptionBuilder;
-import org.dive4elements.river.jfree.StickyAxisAnnotation;
-import org.dive4elements.river.jfree.StickyAxisAnnotation.SimpleAxis;
import org.dive4elements.river.model.Attribute.AttributeKey;
import org.dive4elements.river.model.Gauge;
import org.dive4elements.river.model.sinfo.InfrastructureValue;
@@ -68,8 +66,13 @@
/**
* Calculate the infrastructures flood duration result rows
*/
- public void execute(final Calculation problems, final String label, final DoubleRange calcRange, final RiversideChoiceKey riverside, final boolean withWspl,
- final WINFOArtifact winfo, final FloodDurationCalculationResults results) {
+ public void execute(final Calculation problems, final String label, final DoubleRange calcRange, final RiversideChoiceKey riverside,
+ final Set infrastruktureKey, final boolean withWspl, final WINFOArtifact winfo, final FloodDurationCalculationResults results) {
+
+ // FIXME Schäfer:
+ // filter by infrastructureKey
+ // FIXME: Tironi: api gscheit benennen;
+ // Lösung finden für: Infrastructure enthält riverside, wird hier aber nicht benötigt (weil schon im choice)
// Find all gauges of the calc range, and create the duration finders
final Map durFinders = new HashMap<>();
@@ -108,18 +111,22 @@
// (should be in cache since already used in calculateWaterlevels (winfo.computeWaterlevelData)
final WstValueTable wst = WstValueTableFactory.getTable(this.riverInfoProvider2.getRiver());
+ final Set infrastructures = new HashSet<>();
+
// Create the result rows, and calculate and add the flood durations etc.
for (int i = 0; i <= stationsSorted.length - 1; i++) {
final Gauge gauge = this.riverInfoProvider2.getGauge(stationsSorted[i], true);
final ResultRow row = createRow(stationsSorted[i], wqkmsArray, gaugeWstDurations.get(gauge), i);
if (allStations.containsKey(stationsSorted[i]) && (allStations.get(stationsSorted[i]) != null))
- calculateInfrastructure(row, gauge, allStations.get(stationsSorted[i]), wst, durFinders);
+ calculateInfrastructure(row, gauge, allStations.get(stationsSorted[i]), wst, durFinders, infrastructures);
+
this.rows.add(row);
if (secondBank.containsKey(stationsSorted[i])) {
final ResultRow row2 = ResultRow.create(row);
- calculateInfrastructure(row2, gauge, secondBank.get(stationsSorted[i]), wst, durFinders);
+ calculateInfrastructure(row2, gauge, secondBank.get(stationsSorted[i]), wst, durFinders, infrastructures);
this.rows.add(row2);
}
+
}
// Get the labels of the selected waterlevels
@@ -127,7 +134,7 @@
for (int i = 0; i <= wqkmsArray.length - 1; i++)
wstLabels[i] = wqkmsArray[i].getName();
- results.addResult(new FloodDurationCalculationResult(label, wstLabels, this.rows, withWspl), problems);
+ results.addResult(new FloodDurationCalculationResult(label, wstLabels, this.rows, withWspl, infrastructures), problems);
}
/**
@@ -149,140 +156,6 @@
}
/**
- * Calculates the data for the Q main value lines in the duration curve chart
- */
- public List calcMainValueQAnnotations(final Calculation problems, final double station, final FloodDurationCalculationResult result) {
-
- // 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.getAllRows()) {
- station1 = row.getDoubleValue(GeneralResultType.station);
- break;
- }
- }
- final List stationRows = searchStation(station1, AttributeKey.NONE, result.getAllRows());
- if (stationRows.isEmpty()) {
- return new ArrayList<>();
- }
- final ResultRow row = stationRows.get(0);
- final List annotations = new ArrayList<>();
- final List wqds = (List) row.getValue(SInfoResultType.customMultiRowColWaterlevel);
- for (final DurationWaterlevel wqd : wqds) {
- final String label = wqd.getBezeichnung().startsWith("W=") ? "Q(" + wqd.getBezeichnung() + ")" : wqd.getBezeichnung();
- final StickyAxisAnnotation annotation = new StickyAxisAnnotation(label, (float) wqd.getDischarge(), SimpleAxis.Y_AXIS,
- FloodDurationCurveGenerator.YAXIS.Q.idx);
- annotation.setHitPoint((float) wqd.getFloodDurDaysPerYear());
- annotations.add(annotation);
- }
- return annotations;
- }
-
- /**
- * Calculates the data for the W main value lines in the duration curve chart
- */
- public List calcMainValueWAnnotations(final Calculation problems, final double station, final FloodDurationCalculationResult result) {
-
- // 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.getAllRows()) {
- station1 = row.getDoubleValue(GeneralResultType.station);
- break;
- }
- }
- final List stationRows = searchStation(station1, AttributeKey.NONE, result.getAllRows());
- if (stationRows.isEmpty()) {
- return new ArrayList<>();
- }
- final List annotations = new ArrayList<>();
- final ResultRow row = stationRows.get(0);
- final List wqds = (List) row.getValue(SInfoResultType.customMultiRowColWaterlevel);
- for (final DurationWaterlevel wqd : wqds) {
- final String label = !wqd.getBezeichnung().startsWith("W=") ? "W(" + wqd.getBezeichnung() + ")" : wqd.getBezeichnung();
- final StickyAxisAnnotation annotation = new StickyAxisAnnotation(label, (float) wqd.getWaterlevel(), SimpleAxis.Y_AXIS,
- FloodDurationCurveGenerator.YAXIS.W.idx);
- annotation.setHitPoint((float) wqd.getFloodDurDaysPerYear());
- annotations.add(annotation);
- }
- return annotations;
- }
-
- /**
- * Find and return the W or Q annotation(s) of a station and a riverside in a previously calculated result
- */
- public List calcInfrastructureAnnotations(final Calculation problems, final double station, final AttributeKey riverside,
- final boolean isW, final FloodDurationCalculationResult result) {
-
- // 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()) {
- if (row.getValue(SInfoResultType.riverside) == riverside) {
- station1 = row.getDoubleValue(GeneralResultType.station);
- break;
- }
- }
- }
- final List stationRows = searchStation(station1, riverside, result.getRows());
- if (stationRows.isEmpty() || (stationRows.get(0).getValue(SInfoResultType.infrastructuretype) == null)) {
- return new ArrayList<>();
- }
- // Same way as in MainValueWFacet and ..QFacet
- final List annotations = new ArrayList<>();
- for (final ResultRow row : stationRows) {
- if (isW)
- annotations.add(calcInfrastructureWAnnotation(row));
- else
- annotations.add(calcInfrastructureQAnnotation(row));
- }
- return annotations;
- }
-
- /**
- * Searches the one or two rows of a station in a result rows collection
- */
- private List searchStation(final double station, final AttributeKey riverside, final Collection rows) {
- final List found = new ArrayList<>();
- for (final ResultRow row : rows) {
- if (row.getDoubleValue(GeneralResultType.station) > station + 0.0001)
- break;
- else if ((row.getDoubleValue(GeneralResultType.station) > station - 0.0001)
- && ((riverside == AttributeKey.NONE) || (row.getValue(SInfoResultType.riverside) == riverside)))
- found.add(row);
- }
- return found;
- }
-
- /**
- * Calculates the Q annotation lines of an infrastructure
- */
- private StickyAxisAnnotation calcInfrastructureQAnnotation(final ResultRow row) {
- final String label = Resources.getMsg(this.context.getMeta(), "sinfo.chart.flood_duration.curve.infrastructure",
- "sinfo.chart.flood_duration.curve.infrastructure",
- SInfoResultType.infrastructuretype.exportValue(this.context, row.getValue(SInfoResultType.infrastructuretype)) + ", "
- + SInfoResultType.riverside.exportValue(this.context, row.getValue(SInfoResultType.riverside)));
- final StickyAxisAnnotation annotation = new StickyAxisAnnotation(label, (float) row.getDoubleValue(SInfoResultType.floodDischarge), SimpleAxis.Y_AXIS,
- FloodDurationCurveGenerator.YAXIS.Q.idx);
- annotation.setHitPoint((float) row.getDoubleValue(SInfoResultType.floodDuration));
- return annotation;
- }
-
- /**
- * Calculates the W annotation lines of an infrastructure
- */
- private StickyAxisAnnotation calcInfrastructureWAnnotation(final ResultRow row) {
- final String label = Resources.getMsg(this.context.getMeta(), "sinfo.chart.flood_duration.curve.infrastructure",
- "sinfo.chart.flood_duration.curve.infrastructure",
- SInfoResultType.infrastructuretype.exportValue(this.context, row.getValue(SInfoResultType.infrastructuretype)) + ", "
- + SInfoResultType.riverside.exportValue(this.context, row.getValue(SInfoResultType.riverside)));
- final StickyAxisAnnotation annotation = new StickyAxisAnnotation(label, (float) row.getDoubleValue(SInfoResultType.infrastructureHeight),
- SimpleAxis.Y_AXIS, FloodDurationCurveGenerator.YAXIS.W.idx);
- annotation.setHitPoint((float) row.getDoubleValue(SInfoResultType.floodDuration));
- return annotation;
- }
-
- /**
* Adds to a stations map all stations corresponding to the active range and step
*/
private void addRangeStations(final Map allStations, final WINFOArtifact winfo) {
@@ -413,7 +286,8 @@
final ResultRow row = ResultRow.create();
row.putValue(GeneralResultType.station, station);
- row.putValue(SInfoResultType.infrastructuretype, null); // is replaced later for an infrastructure
+ row.putValue(SInfoResultType.infrastructuregroup, null); // is replaced later for an infrastructure type
+ row.putValue(SInfoResultType.infrastructuretype, null); // is replaced later for an infrastructure part
row.putValue(SInfoResultType.floodDuration, Double.NaN); // is replaced later for an infrastructure
final String gaugeLabel = this.riverInfoProvider2.findGauge(station);
@@ -438,7 +312,7 @@
* Calculate the result row fields for one infrastructure
*/
private void calculateInfrastructure(final ResultRow row, final Gauge gauge, final InfrastructureValue infrastructure, final WstValueTable wst,
- final Map durFinders) {
+ final Map durFinders, final Set infrastructures) {
// Interpolate the infrastructure height in the wst table to get the corresponding Q
final Calculation problems = new Calculation();
@@ -449,7 +323,9 @@
row.putValue(SInfoResultType.riverside, infrastructure.getAttributeKey());
row.putValue(SInfoResultType.floodDischarge, q);
row.putValue(SInfoResultType.infrastructureHeight, infrastructure.getHeight());
+ row.putValue(SInfoResultType.infrastructuregroup, infrastructure.getInfrastructure().getGroup().getName());
row.putValue(SInfoResultType.infrastructuretype, infrastructure.getInfrastructure().getType().getName());
+
// Determine the relative column position of the Q of the infrastructure height
final QPosition qPos = wst.getQPosition(infrastructure.getStation().doubleValue(), q);
if (qPos == null)
@@ -460,6 +336,9 @@
final double dur = underflowDaysToOverflowDays(durFinders.get(gauge).getDuration(qGauge));
// Set D in the result row
row.putValue(SInfoResultType.floodDuration, dur);
+
+ final FloodDurationCalculationResult.Infrastructure groupType = new FloodDurationCalculationResult.Infrastructure(row);
+ infrastructures.add(groupType);
}
/**
diff -r f2473dc34535 -r ca492336570b artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCurveProcessor.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCurveProcessor.java Tue Oct 08 15:03:24 2019 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCurveProcessor.java Wed Oct 09 19:17:46 2019 +0200
@@ -17,6 +17,8 @@
import org.dive4elements.artifacts.CallContext;
import org.dive4elements.river.artifacts.common.AbstractCalculationResult;
import org.dive4elements.river.artifacts.model.FacetTypes;
+import org.dive4elements.river.artifacts.resources.Resources;
+import org.dive4elements.river.artifacts.sinfo.flood_duration.FloodDurationCalculationResult.Infrastructure;
import org.dive4elements.river.exports.DiagramGenerator;
import org.dive4elements.river.exports.DurationCurveGenerator;
import org.dive4elements.river.exports.process.DefaultProcessor;
@@ -83,25 +85,53 @@
}
public static Facet createMainValuesQFacet(final CallContext context, final String hash, final String id, final AbstractCalculationResult result,
- final int facetIndex, final int resultIndex, final String description) {
+ final int facetIndex, final int resultIndex, final String description, final Infrastructure infrastructure) {
- return new FloodDurationMainValuesQFacet(FACET_FLOOD_DURATION_MAINVALUES_Q, description);
+ return new FloodDurationMainValuesQFacet(FACET_FLOOD_DURATION_MAINVALUES_Q, description, facetIndex, infrastructure);
}
public static Facet createInfrastructureFacet(final CallContext context, final String hash, final String id, final AbstractCalculationResult result,
- final int facetIndex, final int resultIndex, final String description, final AttributeKey riverside, final boolean isW) {
+ final int facetIndex, final int resultIndex, final boolean isW, final AttributeKey riverside) {
- if (riverside == AttributeKey.LEFT) {
+ final String description = getLabel(context, isW, riverside);
+ final String facetName = getFacetName(riverside, isW);
+
+ return new FloodDurationInfrastructureFacet(facetName, isW, resultIndex, riverside, facetIndex, description);
+ }
+
+ private static String getFacetName(final AttributeKey riverside, final boolean isW) {
+ switch (riverside) {
+ case LEFT:
if (isW)
- return new FloodDurationInfrastructureFacet(FACET_FLOOD_DURATION_INFRASTRUCTURE_W_LEFT, description, riverside, isW);
+ return FACET_FLOOD_DURATION_INFRASTRUCTURE_W_LEFT;
else
- return new FloodDurationInfrastructureFacet(FACET_FLOOD_DURATION_INFRASTRUCTURE_Q_LEFT, description, riverside, isW);
+ return FACET_FLOOD_DURATION_INFRASTRUCTURE_Q_LEFT;
+
+ case RIGHT:
+ if (isW)
+ return FACET_FLOOD_DURATION_INFRASTRUCTURE_W_RIGHT;
+ else
+ return FACET_FLOOD_DURATION_INFRASTRUCTURE_Q_RIGHT;
+ default:
+ throw new IllegalStateException();
}
- else {
+ }
+
+ private static String getLabel(final CallContext context, final boolean isW, final AttributeKey riverside) {
+ switch (riverside) {
+ case LEFT:
if (isW)
- return new FloodDurationInfrastructureFacet(FACET_FLOOD_DURATION_INFRASTRUCTURE_W_RIGHT, description, riverside, isW);
+ return Resources.getMsg(context.getMeta(), "sinfo_facet_flood_duration_curve.infra.w.left.description");
else
- return new FloodDurationInfrastructureFacet(FACET_FLOOD_DURATION_INFRASTRUCTURE_Q_RIGHT, description, riverside, isW);
+ return Resources.getMsg(context.getMeta(), "sinfo_facet_flood_duration_curve.infra.q.left.description");
+ case RIGHT:
+ if (isW)
+ return Resources.getMsg(context.getMeta(), "sinfo_facet_flood_duration_curve.infra.w.right.description");
+ else
+ return Resources.getMsg(context.getMeta(), "sinfo_facet_flood_duration_curve.infra.q.right.description");
+
+ default:
+ throw new IllegalStateException();
}
}
diff -r f2473dc34535 -r ca492336570b artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationInfrastructureFacet.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationInfrastructureFacet.java Tue Oct 08 15:03:24 2019 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationInfrastructureFacet.java Wed Oct 09 19:17:46 2019 +0200
@@ -17,6 +17,7 @@
import org.dive4elements.artifacts.Artifact;
import org.dive4elements.artifacts.CallContext;
import org.dive4elements.river.artifacts.D4EArtifact;
+import org.dive4elements.river.artifacts.model.Calculation;
import org.dive4elements.river.artifacts.model.CalculationResult;
import org.dive4elements.river.artifacts.states.DefaultState.ComputeType;
import org.dive4elements.river.exports.fixings.FixChartGenerator;
@@ -24,28 +25,32 @@
import org.dive4elements.river.jfree.StickyAxisAnnotation;
import org.dive4elements.river.model.Attribute.AttributeKey;
-
/**
* Facet to show W and Q annotation lines of an infrastructure height.
*/
public class FloodDurationInfrastructureFacet extends DefaultFacet {
+ private static final long serialVersionUID = 1L;
+
/** Own log. */
private static Logger log = Logger.getLogger(FloodDurationInfrastructureFacet.class);
- private final AttributeKey riverBankKey;
-
private final boolean isW;
- public FloodDurationInfrastructureFacet(final String name, final String description, final AttributeKey riverside, final boolean isW) {
+ private final int m_resultIndex;
+
+ private final AttributeKey m_riverside;
+
+ public FloodDurationInfrastructureFacet(final String name, final boolean isW, final int resultIndex, final AttributeKey attributeKey, final int facetIndex,
+ final String description) {
this.description = description;
this.name = name;
- this.index = 0;
- this.riverBankKey = riverside;
+ this.index = facetIndex;
+ this.m_riverside = attributeKey;
this.isW = isW;
+ this.m_resultIndex = resultIndex;
}
-
/**
* Returns the data this facet requires.
*/
@@ -60,24 +65,28 @@
final FloodDurationCalculationResults data = (FloodDurationCalculationResults) res.getData();
+ final FloodDurationCalculationResult result = data.getResults().get(this.m_resultIndex);
+
final double currentKm = FixChartGenerator.getCurrentKm(context);
- final List annotations = new FloodDurationCalculation(context).calcInfrastructureAnnotations(currentKm,
- this.riverBankKey, this.isW, data.getResults().get(this.index));
+ final Calculation problems = new Calculation();
+
+ final FacetCalculator calculator = new FacetCalculator(context);
+ final List annotations = calculator.calcInfrastructureAnnotations(problems, currentKm, this.isW, result, this.m_riverside);
return new RiverAnnotation(this.description, annotations);
}
-
/**
* Create a deep copy of this Facet.
+ *
* @return a deep copy.
*/
@Override
public FloodDurationInfrastructureFacet deepCopy() {
- final FloodDurationInfrastructureFacet copy = new FloodDurationInfrastructureFacet(this.name, this.description, this.riverBankKey, this.isW);
+ final FloodDurationInfrastructureFacet copy = new FloodDurationInfrastructureFacet(this.name, this.isW, this.m_resultIndex, this.m_riverside,
+ this.index, this.description);
copy.set(this);
return copy;
}
}
-
diff -r f2473dc34535 -r ca492336570b artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationMainValuesQFacet.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationMainValuesQFacet.java Tue Oct 08 15:03:24 2019 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationMainValuesQFacet.java Wed Oct 09 19:17:46 2019 +0200
@@ -17,29 +17,34 @@
import org.dive4elements.artifacts.Artifact;
import org.dive4elements.artifacts.CallContext;
import org.dive4elements.river.artifacts.D4EArtifact;
+import org.dive4elements.river.artifacts.model.Calculation;
import org.dive4elements.river.artifacts.model.CalculationResult;
+import org.dive4elements.river.artifacts.sinfo.flood_duration.FloodDurationCalculationResult.Infrastructure;
import org.dive4elements.river.artifacts.states.DefaultState.ComputeType;
import org.dive4elements.river.exports.fixings.FixChartGenerator;
import org.dive4elements.river.jfree.RiverAnnotation;
import org.dive4elements.river.jfree.StickyAxisAnnotation;
-
/**
* Facet to show Main Q Values.
*/
public class FloodDurationMainValuesQFacet extends DefaultFacet {
+ private static final long serialVersionUID = 1L;
+
/** Own log. */
private static Logger log = Logger.getLogger(FloodDurationMainValuesQFacet.class);
+ private final Infrastructure m_infrastructure;
+
/** Trivial Constructor. */
- public FloodDurationMainValuesQFacet(final String name, final String description) {
+ public FloodDurationMainValuesQFacet(final String name, final String description, final int facetIndex, final Infrastructure infrastructure) {
this.description = description;
this.name = name;
- this.index = 1;
+ this.index = facetIndex;
+ this.m_infrastructure = infrastructure;
}
-
/**
* Returns the data this facet requires.
*/
@@ -56,21 +61,25 @@
final double currentKm = FixChartGenerator.getCurrentKm(context);
- final List annotations = new FloodDurationCalculation(context).calcMainValueQAnnotations(currentKm,
- data.getResults().get(0));
+ final FloodDurationCalculationResult result = data.getResults().get(0);
+
+ final Calculation problems = new Calculation();
+
+ final FacetCalculator calculator = new FacetCalculator(context);
+ final List annotations = calculator.calcMainValueQAnnotations(problems, currentKm, result);
return new RiverAnnotation(this.description, annotations);
}
-
/**
* Create a deep copy of this Facet.
+ *
* @return a deep copy.
*/
@Override
public FloodDurationMainValuesQFacet deepCopy() {
- final FloodDurationMainValuesQFacet copy = new FloodDurationMainValuesQFacet(this.name, this.description);
+ final FloodDurationMainValuesQFacet copy = new FloodDurationMainValuesQFacet(this.name, this.description, this.index, this.m_infrastructure);
copy.set(this);
return copy;
}
-}
+}
\ No newline at end of file
diff -r f2473dc34535 -r ca492336570b artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationMainValuesWFacet.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationMainValuesWFacet.java Tue Oct 08 15:03:24 2019 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationMainValuesWFacet.java Wed Oct 09 19:17:46 2019 +0200
@@ -17,6 +17,7 @@
import org.dive4elements.artifacts.Artifact;
import org.dive4elements.artifacts.CallContext;
import org.dive4elements.river.artifacts.D4EArtifact;
+import org.dive4elements.river.artifacts.model.Calculation;
import org.dive4elements.river.artifacts.model.CalculationResult;
import org.dive4elements.river.artifacts.states.DefaultState.ComputeType;
import org.dive4elements.river.exports.fixings.FixChartGenerator;
@@ -28,6 +29,8 @@
*/
public class FloodDurationMainValuesWFacet extends DefaultFacet {
+ private static final long serialVersionUID = 1L;
+
/** Own log. */
private static Logger log = Logger.getLogger(FloodDurationMainValuesWFacet.class);
@@ -52,14 +55,20 @@
final double currentKm = FixChartGenerator.getCurrentKm(context);
- final List annotations = new FloodDurationCalculation(context).calcMainValueWAnnotations(currentKm,
- data.getResults().get(0));
+ final FloodDurationCalculationResult result = data.getResults().get(0);
+
+ final Calculation problems = new Calculation();
+
+ final FacetCalculator calculator = new FacetCalculator(context);
+
+ final List annotations = calculator.calcMainValueWAnnotations(problems, currentKm, result);
return new RiverAnnotation(this.description, annotations);
}
/**
* Create a deep copy of this Facet.
+ *
* @return a deep copy.
*/
@Override
@@ -68,4 +77,4 @@
copy.set(this);
return copy;
}
-}
+}
\ No newline at end of file
diff -r f2473dc34535 -r ca492336570b artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationProcessor.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationProcessor.java Tue Oct 08 15:03:24 2019 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationProcessor.java Wed Oct 09 19:17:46 2019 +0200
@@ -18,9 +18,9 @@
import org.dive4elements.artifacts.CallContext;
import org.dive4elements.river.artifacts.common.AbstractCalculationResult;
import org.dive4elements.river.artifacts.common.AbstractProcessor;
-import org.dive4elements.river.artifacts.common.ResultFacet;
import org.dive4elements.river.artifacts.resources.Resources;
import org.dive4elements.river.artifacts.sinfo.common.SInfoResultType;
+import org.dive4elements.river.artifacts.sinfo.flood_duration.FloodDurationCalculationResult.Infrastructure;
import org.dive4elements.river.artifacts.sinfo.flood_duration.FloodDurationCalculationResult.ValueGetter;
import org.dive4elements.river.artifacts.states.DefaultState.ComputeType;
import org.dive4elements.river.exports.DiagramGenerator;
@@ -39,8 +39,6 @@
private static final String FACET_FLOOD_DURATION_RIGHT = "sinfo_facet_flood_duration.right";
- private static final String FACET_FLOOD_DURATION_DESCRIPTION = "sinfo_facet_flood_duration.description";
-
private static final String FACET_MAIN_VALUE_DURATION = "mainvalue.duration";
private static final String FACET_MAIN_VALUE_DURATION_DESCRIPTION = "mainvalue.duration.description";
@@ -60,18 +58,11 @@
}
public static Facet createFloodDurationFacet(final CallContext context, final String hash, final String id, final AbstractCalculationResult result,
- final int facetIndex, final int resultIndex) {
+ final int facetIndex, final int resultIndex, final Infrastructure infrastructure) {
- if (facetIndex == 0) {
- final String description = Resources.getMsg(context.getMeta(), FACET_FLOOD_DURATION_DESCRIPTION, FACET_FLOOD_DURATION_DESCRIPTION,
- SInfoResultType.localizeRiverside(context, AttributeKey.LEFT));
- return new ResultFacet(facetIndex, resultIndex, FACET_FLOOD_DURATION_LEFT, description, I18N_AXIS_LABEL, ComputeType.ADVANCE, id, hash);
- }
- else {
- final String description = Resources.getMsg(context.getMeta(), FACET_FLOOD_DURATION_DESCRIPTION, FACET_FLOOD_DURATION_DESCRIPTION,
- SInfoResultType.localizeRiverside(context, AttributeKey.RIGHT));
- return new ResultFacet(facetIndex, resultIndex, FACET_FLOOD_DURATION_RIGHT, description, I18N_AXIS_LABEL, ComputeType.ADVANCE, id, hash);
- }
+ final String description = infrastructure.getFloodDurationLabel(context);
+ final String facetName = infrastructure.getRiverside() == AttributeKey.LEFT ? FACET_FLOOD_DURATION_LEFT : FACET_FLOOD_DURATION_RIGHT;
+ return new InfrastructureResultFacet(facetIndex, resultIndex, facetName, description, I18N_AXIS_LABEL, id, hash, infrastructure);
}
public static Facet createMainValueDurationFacet(final CallContext context, final String hash, final String id, final FloodDurationCalculationResult result,
@@ -89,12 +80,8 @@
final String facetName = bundle.getFacetName();
- if (FACET_FLOOD_DURATION_LEFT.contentEquals(facetName)) {
- return buildInfrastructureSeries(generator, bundle, theme, visible, AttributeKey.LEFT);
- }
-
- if (FACET_FLOOD_DURATION_RIGHT.contentEquals(facetName))
- return buildInfrastructureSeries(generator, bundle, theme, visible, AttributeKey.RIGHT);
+ if (FACET_FLOOD_DURATION_LEFT.contentEquals(facetName) || FACET_FLOOD_DURATION_RIGHT.contentEquals(facetName))
+ return buildInfrastructureSeries(generator, bundle, theme, visible);
if (FACET_MAIN_VALUE_DURATION.contentEquals(facetName)) {
@@ -119,12 +106,15 @@
throw new UnsupportedOperationException(error);
}
- private String buildInfrastructureSeries(final DiagramGenerator generator, final ArtifactAndFacet bundle, final ThemeDocument theme, final boolean visible,
- final AttributeKey riverside) {
+ private String buildInfrastructureSeries(final DiagramGenerator generator, final ArtifactAndFacet bundle, final ThemeDocument theme,
+ final boolean visible) {
+
+ final InfrastructureResultFacet infFacet = (InfrastructureResultFacet) bundle.getFacet();
+ final Infrastructure infrastructure = infFacet.getInfrastructure();
final FloodDurationCalculationResult data = (FloodDurationCalculationResult) getResult(generator, bundle);
- final double[][] points = data.getInfrastructurePoints(SInfoResultType.floodDuration, riverside);
+ final double[][] points = data.getInfrastructurePoints(SInfoResultType.floodDuration, infrastructure);
return buildSeriesForPoints(points, generator, bundle, theme, visible, null);
}
diff -r f2473dc34535 -r ca492336570b artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationState.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationState.java Tue Oct 08 15:03:24 2019 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationState.java Wed Oct 09 19:17:46 2019 +0200
@@ -10,7 +10,9 @@
package org.dive4elements.river.artifacts.sinfo.flood_duration;
+import java.util.HashSet;
import java.util.List;
+import java.util.Set;
import org.apache.commons.lang.StringUtils;
import org.dive4elements.artifactdatabase.state.Facet;
@@ -25,7 +27,7 @@
import org.dive4elements.river.artifacts.model.ReportFacet;
import org.dive4elements.river.artifacts.resources.Resources;
import org.dive4elements.river.artifacts.sinfo.SINFOArtifact;
-import org.dive4elements.river.artifacts.sinfo.flood_duration.RiversideRadioChoice.RiversideChoiceKey;
+import org.dive4elements.river.artifacts.sinfo.flood_duration.FloodDurationCalculationResult.Infrastructure;
import org.dive4elements.river.artifacts.states.DefaultState;
import org.dive4elements.river.model.Attribute.AttributeKey;
@@ -80,6 +82,7 @@
int resultIndex = 0;
int themeCount = 0;
+
for (final FloodDurationCalculationResult result : resultList) {
if (resultIndex == 0) {
@@ -92,51 +95,45 @@
}
final FloodDurationAccess access = new FloodDurationAccess(sinfo);
- if ((access.getRiverside() == RiversideChoiceKey.LEFT) || (access.getRiverside() == RiversideChoiceKey.BOTH))
- facets.add(FloodDurationProcessor.createFloodDurationFacet(context, hash, this.id, result, 0, resultIndex));
- if ((access.getRiverside() == RiversideChoiceKey.RIGHT) || (access.getRiverside() == RiversideChoiceKey.BOTH))
- facets.add(FloodDurationProcessor.createFloodDurationFacet(context, hash, this.id, result, 1, resultIndex));
final int waterlevelCount = result.getWaterlevelCount();
- if ((access.getRiverside() == RiversideChoiceKey.LEFT) || (access.getRiverside() == RiversideChoiceKey.BOTH))
- facets.add(FloodHeightProcessor.createFloodHeightFacet(context, hash, this.id, result, 0, resultIndex));
- if ((access.getRiverside() == RiversideChoiceKey.RIGHT) || (access.getRiverside() == RiversideChoiceKey.BOTH))
- facets.add(FloodHeightProcessor.createFloodHeightFacet(context, hash, this.id, result, 1, resultIndex));
-
for (int j = 0; j < waterlevelCount; j++) {
// final String waterlevelLabel = result.getMainValueLabel(j);
// FIXME: use label as label for theme
// final int facetIndex, final int resultIndex, final int dataIndex
- facets.add(FloodDurationProcessor.createMainValueDurationFacet(context, hash, this.id, result, themeCount, resultIndex, j));
- facets.add(FloodHeightProcessor.createMainValueHeightFacet(context, hash, this.id, result, themeCount, resultIndex, j));
+ facets.add(FloodDurationProcessor.createMainValueDurationFacet(context, hash, this.id, result, themeCount++, resultIndex, j));
+ facets.add(FloodHeightProcessor.createMainValueHeightFacet(context, hash, this.id, result, themeCount++, resultIndex, j));
- themeCount++;
}
final String nameW = Resources.getMsg(context.getMeta(), "sinfo.chart.flood_duration.curve.w");
final String nameQ = Resources.getMsg(context.getMeta(), "sinfo.chart.flood_duration.curve.q");
- facets.add(FloodDurationCurveProcessor.createFloodDurationWCurveFacet(context, hash, this.id, result, 0, resultIndex, nameW));
- facets.add(FloodDurationCurveProcessor.createFloodDurationQCurveFacet(context, hash, this.id, result, 1, resultIndex, nameQ));
+ facets.add(FloodDurationCurveProcessor.createFloodDurationWCurveFacet(context, hash, this.id, result, themeCount++, resultIndex, nameW));
+ facets.add(FloodDurationCurveProcessor.createFloodDurationQCurveFacet(context, hash, this.id, result, themeCount++, resultIndex, nameQ));
if (waterlevelCount >= 1) {
- facets.add(FloodDurationCurveProcessor.createMainValuesWFacet(context, hash, this.id, result, 0, resultIndex,
+ facets.add(FloodDurationCurveProcessor.createMainValuesWFacet(context, hash, this.id, result, themeCount++, resultIndex,
Resources.getMsg(context.getMeta(), "sinfo.chart.flood_duration.curve.mainw")));
- facets.add(FloodDurationCurveProcessor.createMainValuesQFacet(context, hash, this.id, result, 1, resultIndex,
- Resources.getMsg(context.getMeta(), "sinfo.chart.flood_duration.curve.mainq")));
+ facets.add(FloodDurationCurveProcessor.createMainValuesQFacet(context, hash, this.id, result, themeCount++, resultIndex,
+ Resources.getMsg(context.getMeta(), "sinfo.chart.flood_duration.curve.mainq"), null));
}
- if ((access.getRiverside() == RiversideChoiceKey.LEFT) || (access.getRiverside() == RiversideChoiceKey.BOTH)) {
- facets.add(FloodDurationCurveProcessor.createInfrastructureFacet(context, hash, this.id, result, 0, resultIndex,
- Resources.getMsg(context.getMeta(), "sinfo_facet_flood_duration_curve.infra.w.left.description"), AttributeKey.LEFT, true));
- facets.add(FloodDurationCurveProcessor.createInfrastructureFacet(context, hash, this.id, result, 0, resultIndex,
- Resources.getMsg(context.getMeta(), "sinfo_facet_flood_duration_curve.infra.q.left.description"), AttributeKey.LEFT, false));
+
+ final AttributeKey choice = access.getRiverside().getAttributeKey();
+
+ for (final AttributeKey riversideC : getRiversides(choice)) {
+ facets.add(FloodDurationCurveProcessor.createInfrastructureFacet(context, hash, this.id, result, themeCount++, resultIndex, true, riversideC));
+
+ facets.add(FloodDurationCurveProcessor.createInfrastructureFacet(context, hash, this.id, result, themeCount++, resultIndex, false, riversideC));
}
- if ((access.getRiverside() == RiversideChoiceKey.RIGHT) || (access.getRiverside() == RiversideChoiceKey.BOTH)) {
- facets.add(FloodDurationCurveProcessor.createInfrastructureFacet(context, hash, this.id, result, 0, resultIndex,
- Resources.getMsg(context.getMeta(), "sinfo_facet_flood_duration_curve.infra.w.right.description"), AttributeKey.RIGHT, true));
- facets.add(FloodDurationCurveProcessor.createInfrastructureFacet(context, hash, this.id, result, 0, resultIndex,
- Resources.getMsg(context.getMeta(), "sinfo_facet_flood_duration_curve.infra.q.right.description"), AttributeKey.RIGHT, false));
+
+ final Set infrastructures = result.getInfrastructureMap();
+ for (final Infrastructure entry : infrastructures) {
+
+ facets.add(FloodDurationProcessor.createFloodDurationFacet(context, hash, this.id, result, themeCount++, resultIndex, entry));
+
+ facets.add(FloodHeightProcessor.createFloodHeightFacet(context, hash, this.id, result, themeCount++, resultIndex, entry));
}
facets.add(new DataFacet(FacetTypes.CSV, "CSV data", ComputeType.ADVANCE, hash, this.id));
@@ -152,6 +149,20 @@
return res;
}
+ private Set getRiversides(final AttributeKey choice) {
+ final Set usedRiversides = new HashSet<>();
+ if (choice.equals(AttributeKey.LEFT))
+ usedRiversides.add(AttributeKey.LEFT);
+ else if (choice.equals(AttributeKey.RIGHT))
+ usedRiversides.add(AttributeKey.RIGHT);
+
+ else {
+ usedRiversides.add(AttributeKey.RIGHT);
+ usedRiversides.add(AttributeKey.LEFT);
+ }
+ return usedRiversides;
+ }
+
private CalculationResult doCompute(final SINFOArtifact sinfo, final CallContext context, final Object old) {
if (old instanceof CalculationResult)
return (CalculationResult) old;
diff -r f2473dc34535 -r ca492336570b artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodHeightProcessor.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodHeightProcessor.java Tue Oct 08 15:03:24 2019 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodHeightProcessor.java Wed Oct 09 19:17:46 2019 +0200
@@ -18,9 +18,9 @@
import org.dive4elements.artifacts.CallContext;
import org.dive4elements.river.artifacts.common.AbstractCalculationResult;
import org.dive4elements.river.artifacts.common.AbstractProcessor;
-import org.dive4elements.river.artifacts.common.ResultFacet;
import org.dive4elements.river.artifacts.resources.Resources;
import org.dive4elements.river.artifacts.sinfo.common.SInfoResultType;
+import org.dive4elements.river.artifacts.sinfo.flood_duration.FloodDurationCalculationResult.Infrastructure;
import org.dive4elements.river.artifacts.sinfo.flood_duration.FloodDurationCalculationResult.ValueGetter;
import org.dive4elements.river.artifacts.states.DefaultState.ComputeType;
import org.dive4elements.river.exports.DiagramGenerator;
@@ -39,12 +39,10 @@
private static final String FACET_FLOOD_HEIGHT_RIGHT = "sinfo_facet_flood_height.right";
- private static final String FACET_FLOOD_HEIGHT_DESCRIPTION = "sinfo_facet_flood_height.description";
+ private static final String FACET_MAIN_VALUE_HEIGHT_DESCRIPTION = "mainvalue.w.description";
private static final String FACET_MAIN_VALUE_HEIGHT = "mainvalue.w";
- private static final String FACET_MAIN_VALUE_HEIGHT_DESCRIPTION = "mainvalue.w.description";
-
private static final String I18N_AXIS_LABEL = "sinfo.chart.flood_duration.height.section.yaxis.label";
private static final Set HANDLED_FACET_TYPES = new HashSet<>();
@@ -60,18 +58,11 @@
}
public static Facet createFloodHeightFacet(final CallContext context, final String hash, final String id, final AbstractCalculationResult result,
- final int facetIndex, final int resultIndex) {
+ final int facetIndex, final int resultIndex, final Infrastructure infrastructure) {
- if (facetIndex == 0) {
- final String description = Resources.getMsg(context.getMeta(), FACET_FLOOD_HEIGHT_DESCRIPTION, FACET_FLOOD_HEIGHT_DESCRIPTION,
- SInfoResultType.localizeRiverside(context, AttributeKey.LEFT));
- return new ResultFacet(facetIndex, resultIndex, FACET_FLOOD_HEIGHT_LEFT, description, I18N_AXIS_LABEL, ComputeType.ADVANCE, id, hash);
- }
- else {
- final String description = Resources.getMsg(context.getMeta(), FACET_FLOOD_HEIGHT_DESCRIPTION, FACET_FLOOD_HEIGHT_DESCRIPTION,
- SInfoResultType.localizeRiverside(context, AttributeKey.RIGHT));
- return new ResultFacet(facetIndex, resultIndex, FACET_FLOOD_HEIGHT_RIGHT, description, I18N_AXIS_LABEL, ComputeType.ADVANCE, id, hash);
- }
+ final String facetName = infrastructure.getRiverside().equals(AttributeKey.LEFT) ? FACET_FLOOD_HEIGHT_LEFT : FACET_FLOOD_HEIGHT_RIGHT;
+ final String description = infrastructure.getFloodHeightLabel(context);
+ return new InfrastructureResultFacet(facetIndex, resultIndex, facetName, description, I18N_AXIS_LABEL, id, hash, infrastructure);
}
public static Facet createMainValueHeightFacet(final CallContext context, final String hash, final String id, final FloodDurationCalculationResult result,
@@ -87,12 +78,8 @@
final String facetName = bundle.getFacetName();
- if (FACET_FLOOD_HEIGHT_LEFT.contentEquals(facetName)) {
- return buildInfrastructureSeries(generator, bundle, theme, visible, AttributeKey.LEFT);
- }
-
- if (FACET_FLOOD_HEIGHT_RIGHT.contentEquals(facetName))
- return buildInfrastructureSeries(generator, bundle, theme, visible, AttributeKey.RIGHT);
+ if (FACET_FLOOD_HEIGHT_LEFT.contentEquals(facetName) || FACET_FLOOD_HEIGHT_RIGHT.contentEquals(facetName))
+ return buildInfrastructureSeries(generator, bundle, theme, visible);
if (FACET_MAIN_VALUE_HEIGHT.contentEquals(facetName)) {
@@ -117,12 +104,15 @@
throw new UnsupportedOperationException(error);
}
- private String buildInfrastructureSeries(final DiagramGenerator generator, final ArtifactAndFacet bundle, final ThemeDocument theme, final boolean visible,
- final AttributeKey riverside) {
+ private String buildInfrastructureSeries(final DiagramGenerator generator, final ArtifactAndFacet bundle, final ThemeDocument theme,
+ final boolean visible) {
+
+ final InfrastructureResultFacet infFacet = (InfrastructureResultFacet) bundle.getFacet();
+ final Infrastructure infrastructure = infFacet.getInfrastructure();
final FloodDurationCalculationResult data = (FloodDurationCalculationResult) getResult(generator, bundle);
- final double[][] points = data.getInfrastructurePoints(SInfoResultType.infrastructureHeight, riverside);
+ final double[][] points = data.getInfrastructurePoints(SInfoResultType.infrastructureHeight, infrastructure);
return buildSeriesForPoints(points, generator, bundle, theme, visible, null);
}
diff -r f2473dc34535 -r ca492336570b artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodInfrastructure.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodInfrastructure.java Wed Oct 09 19:17:46 2019 +0200
@@ -0,0 +1,29 @@
+/* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU AGPL (>=v3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out the
+ * documentation coming with Dive4Elements River for details.
+ */
+
+package org.dive4elements.river.artifacts.sinfo.flood_duration;
+
+import org.dive4elements.river.artifacts.states.DefaultState;
+
+/**
+ * @author Ingo Weinzierl
+ */
+public class FloodInfrastructure extends DefaultState {
+
+ private static final long serialVersionUID = 1L;
+
+ protected final String getDatakey() {
+ return "flood_infrastructure";
+ }
+
+ @Override
+ protected String getUIProvider() {
+
+ return "flood_infrastructure_panel";
+ }
+}
\ No newline at end of file
diff -r f2473dc34535 -r ca492336570b artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/InfrastructureResultFacet.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/InfrastructureResultFacet.java Wed Oct 09 19:17:46 2019 +0200
@@ -0,0 +1,35 @@
+/** Copyright (C) 2017 by Bundesanstalt für Gewässerkunde
+ * Software engineering by
+ * Björnsen Beratende Ingenieure GmbH
+ * Dr. Schumacher Ingenieurbüro für Wasser und Umwelt
+ *
+ * This file is Free Software under the GNU AGPL (>=v3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out the
+ * documentation coming with Dive4Elements River for details.
+ */
+package org.dive4elements.river.artifacts.sinfo.flood_duration;
+
+import org.dive4elements.river.artifacts.common.ResultFacet;
+import org.dive4elements.river.artifacts.sinfo.flood_duration.FloodDurationCalculationResult.Infrastructure;
+import org.dive4elements.river.artifacts.states.DefaultState.ComputeType;
+
+/**
+ * @author Domenico Nardi Tironi
+ *
+ */
+public class InfrastructureResultFacet extends ResultFacet {
+
+ private static final long serialVersionUID = 1L;
+
+ private final Infrastructure m_infrastructure;
+
+ public InfrastructureResultFacet(final int facetIndex, final int resultIndex, final String name, final String description, final String axisLabel,
+ final String id, final String hash, final Infrastructure infrastructure) {
+ super(facetIndex, resultIndex, name, description, axisLabel, ComputeType.ADVANCE, id, hash);
+ this.m_infrastructure = infrastructure;
+ }
+
+ public Infrastructure getInfrastructure() {
+ return this.m_infrastructure;
+ }
+}
diff -r f2473dc34535 -r ca492336570b artifacts/src/main/java/org/dive4elements/river/exports/LegendAggregator.java
--- a/artifacts/src/main/java/org/dive4elements/river/exports/LegendAggregator.java Tue Oct 08 15:03:24 2019 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/LegendAggregator.java Wed Oct 09 19:17:46 2019 +0200
@@ -17,7 +17,6 @@
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
-import java.util.IdentityHashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -144,8 +143,7 @@
*/
private List findDistinctItems(final List items) {
- // HACKY: we hash by unique shape, because we know that the used shapes are cashed in a static cache.
- final Map shapeMap = new IdentityHashMap<>();
+ final Map shapeMap = new HashMap<>();
for (final LegendItem item : items) {
diff -r f2473dc34535 -r ca492336570b artifacts/src/main/java/org/dive4elements/river/utils/Formatter.java
--- a/artifacts/src/main/java/org/dive4elements/river/utils/Formatter.java Tue Oct 08 15:03:24 2019 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/utils/Formatter.java Wed Oct 09 19:17:46 2019 +0200
@@ -101,6 +101,15 @@
public static final int FLOWDEPTH_MAX_DIGITS = 2;
/**
+ * Creates a NumberFormatter to format numbers with 3 significant figures.
+ *
+ * not used as real string output, only used to 'trim' numbers
+ *
+ */
+
+ public static final NumberFormat SIGINIFICANT_FORMATTER_3 = new DecimalFormat("##.#E0");
+
+ /**
* Creates a localized NumberFormatter with given range of decimal digits.
*
* @param m
diff -r f2473dc34535 -r ca492336570b artifacts/src/main/resources/messages.properties
--- a/artifacts/src/main/resources/messages.properties Tue Oct 08 15:03:24 2019 +0200
+++ b/artifacts/src/main/resources/messages.properties Wed Oct 09 19:17:46 2019 +0200
@@ -338,7 +338,12 @@
facet.flow_velocity.totalchannel.raw = v Totalchannel at {0} (raw)
facet.flow_velocity.tauchannel.raw = Bottom Shear Stress Mainchannel at {0} (raw)
facet.flow_velocity.velocity = V {0}
-facet.flow_velocity.waterlevel = Waterlevel {0}
+facet.flow_velocity.waterlevel = W {0}
+facet.flow_depth.waterlevel = W {0}
+facet.flow_depth.bedheight = Mean Bedheight {0}
+facet.flow_depth.bedheight.min = Min. Bedheight ({0})
+facet.flow_depth.bedheight.max = Max. Bedheight ({0})
+facet.waterlevel = W ({0})
facet.bedheight_middle.single = Bed Level {0,number,####}
facet.bedheight_middle.epoch = Bed Level Epoch {0,number,####} - {1,number,####}
facet.bedquality.bed.porosity.toplayer = Porosity ({0,date} - {1,date}) ({2})
@@ -967,13 +972,16 @@
common.export.csv.header.location = Location
sinfo.export.flood_duration.csv.header.riverside = Bank
+sinfo.export.flood_duration.pdf.header.riverside = Bank
sinfo.export.flood_duration.csv.header.infrastructure.height = Infrastructure Height
sinfo.export.flood_duration.csv.header.duration = Flooding Duration [d/a]
sinfo.export.flood_duration.csv.header.discharge = Flooding Duration Discharge Q
-sinfo.export.flood_duration.csv.header.infrastructure_type = Infrastructure Type
+sinfo.export.flood_duration.csv.header.infrastructure_group = Infrastructure
+sinfo.export.flood_duration.csv.header.infrastructure_type = Type/Name
+sinfo.export.flood_duration.pdf.header.infrastructure_type = Type/ Name
sinfo.export.flood_duration.pdf.header.duration = Flooding Duration Discharge [d/a]
sinfo.export.flood_duration.pdf.header.discharge = Flooding Duration Discharge Q [m\u00b3/s]
-sinfo.export.flood_duration.pdf.header.infrastructure_type = Infrastruc-ture Type
+sinfo.export.flood_duration.pdf.header.infrastructure_group = Infrastruc-ture
sinfo.export.flood_duration.pdf.header.infrastructure.height = Infrastruc-ture Height
sinfo.chart.flow_depth.section.title=h-Longitudinal Section
@@ -1034,9 +1042,11 @@
sinfo_facet_waterlevel_difference.filtered = \u0394WL [cm]
sinfo.facet.waterlevel_difference.filtered.description = \u0394WL ({0})
+sinfo.facet.waterlevel_difference.raw.description = \u0394WL ({0}) (raw)
sinfo_facet_bedheight_difference.filtered = \u0394WL [cm]
sinfo.facet.bedheight_difference.filtered.description = \u0394MBL ({0})
+sinfo.facet.bedheight_difference.raw.description = \u0394MBL ({0}) (raw)
sinfo_facet_flow_depth_current.filtered = h-current [m]
sinfo.facet.flow_depth_current.filtered.description = h-current ({0})
@@ -1054,6 +1064,11 @@
sinfo.flood_duration.header.w_index = Waterlevel {0} [{1}]
sinfo.flood_duration.header.pdf.w_index = Waterlevel {0}
sinfo.flood_duration.header.q_index = Q{0} [m\u00b3/s]
+sinfo.flood_duration.absolute.height = Absolute Height
+sinfo.flood_duration.absolute.height.left = Absolute Height Infrastructures BWaStr (left)
+sinfo.flood_duration.absolute.height.right = Absolute Height Infrastructures BWaStr (right)
+sinfo.flood_duration.infrastructures.left = Flooding Durations Infrastructures BWaStr (left)
+sinfo.flood_duration.infrastructures.right = Flooding Durations Infrastructures BWaStr (right)
sinfo.export.flow_depth_minmax.csv.header.min = Minimum Flow Depth
sinfo.export.flow_depth_minmax.csv.header.max = Maximum Flow Depth
@@ -1186,8 +1201,8 @@
uinfo.export.csv.meta.header.veg.dauerbis = Flooding Duration to [d/a]
uinfo.export.csv.meta.header.veg.color = Color
uinfo.export.url.inundationduration.inundationduration = Flooding Duration ({0})
-uinfo.export.url.inundationduration.vegetation = Vegetation Zones ({0})
-uinfo.export.url.inundationduration.vegetation_scenario= Vegetation Zones Scenario ({0} cm)
+uinfo.export.url.inundationduration.vegetation = Potentially natural Vegetation ({0})
+uinfo.export.url.inundationduration.vegetation_scenario= Potentially natural Vegetation - Scenario ({0} cm)
uinfo.export.url.inundationduration.scenario = Flooding Duration Scenario ({0} cm)
uinfo.chart.salix_line.section.title = Iota (River/Floodplain Connectivity) - Longitudinal Section
uinfo.chart.salix_line.section.yaxis.label = [m]
@@ -1200,7 +1215,7 @@
uinfo_facet_salix_scenario = Iota Scenario, {0}
uinfo_facet_salix_scenario.filtered.description = Iota Scenario, {0}
uinfo_facet_salix_scenario.raw.description = Iota Scenario, {0} (raw data)
-uinfo_facet_vegetation_zones_cross_section.description = Vegetation Zones ({0})
+uinfo_facet_vegetation_zones_cross_section.description = Potentially natural Vegetation ({0})
uinfo_facet_vegetation_default_zones_cross_section.description = Standard Vegetation Zones
uinfo_salix_scenario_deltaw = \u0394MW={0}
uinfo_salix_scenario_supraregional = Large Scale impacts
@@ -1347,7 +1362,7 @@
bundu.chart.depth.section.title = h-L\u00e4ngsschnitt
bundu_facet_flowdepth.filtered.description = h (BZWS, {0})
bundu_facet_channeldepth.description = h (design depth)
-bundu_facet_field_depth.description = h Field {0}
+bundu_facet_field_depth.description = h Field {0} {1}
bundu.channelfinder.empty = The database does not contain any values for the river and the reference year
bundu.channelfinder.missing = no navigation channel data available
diff -r f2473dc34535 -r ca492336570b artifacts/src/main/resources/messages_de.properties
--- a/artifacts/src/main/resources/messages_de.properties Tue Oct 08 15:03:24 2019 +0200
+++ b/artifacts/src/main/resources/messages_de.properties Wed Oct 09 19:17:46 2019 +0200
@@ -338,7 +338,12 @@
facet.flow_velocity.tauchannel.raw = Sohlschubspannung Hauptgerinne bei {0} (Rohdaten)
facet.flow_velocity.discharge = Abfluss bei {0}
facet.flow_velocity.velocity = V ({0})
-facet.flow_velocity.waterlevel = W ({0})
+facet.flow_depth.waterlevel = W ({0})
+facet.flow_depth.bedheight = Mittl. Sohlh\u00f6he ({0})
+facet.flow_depth.bedheight.min = Min. Sohlh\u00f6he ({0})
+facet.flow_depth.bedheight.max = Max. Sohlh\u00f6he ({0})
+facet.flow_depth.discharge = Q ({0})
+facet.waterlevel = W ({0})
facet.bedheight_middle.single = Sohlh\u00f6he {0,number,####}
facet.bedheight_middle.epoch = Sohlh\u00f6he Epoche {0,number,####} - {1,number,####}
facet.bedquality.bed.porosity.toplayer = Porosit\u00e4t ({0,date} - {1,date}) ({2})
@@ -967,13 +972,16 @@
common.export.csv.header.location = Lage
sinfo.export.flood_duration.csv.header.riverside = Uferseite
+sinfo.export.flood_duration.pdf.header.riverside = Ufer-seite
sinfo.export.flood_duration.csv.header.infrastructure.height = H\u00f6he der Infrastruktur
sinfo.export.flood_duration.csv.header.duration = \u00dcberflutungsdauer [d/a]
sinfo.export.flood_duration.csv.header.discharge = \u00dcberflutungsdauerabfluss Q
-sinfo.export.flood_duration.csv.header.infrastructure_type = Infrastrukturtyp
+sinfo.export.flood_duration.csv.header.infrastructure_group = Infrastruktur
+sinfo.export.flood_duration.csv.header.infrastructure_type = Typ/Bezeichnung
+sinfo.export.flood_duration.pdf.header.infrastructure_type = Typ/ Bezeich-nung
sinfo.export.flood_duration.pdf.header.duration = \u00dcber-flutungs-dauer [d/a]
sinfo.export.flood_duration.pdf.header.discharge = \u00dcber-flutungs-dauer-abfluss Q [m\u00b3/s]
-sinfo.export.flood_duration.pdf.header.infrastructure_type = Infra-struktur-typ
+sinfo.export.flood_duration.pdf.header.infrastructure_group = Infra-struktur
sinfo.export.flood_duration.pdf.header.infrastructure.height = H\u00f6he der Infra-struktur
sinfo.chart.flow_depth.section.title=h-L\u00e4ngsschnitt
@@ -1034,9 +1042,11 @@
sinfo_facet_waterlevel_difference.filtered = \u0394WSPL [cm]
sinfo.facet.waterlevel_difference.filtered.description = \u0394WSPL ({0})
+sinfo.facet.waterlevel_difference.raw.description = \u0394WSPL ({0}) (Rohdaten)
sinfo_facet_bedheight_difference.filtered = \u0394WSPL [cm]
sinfo.facet.bedheight_difference.filtered.description = \u0394MSH ({0})
+sinfo.facet.bedheight_difference.raw.description = \u0394MSH ({0}) (Rohdaten)
sinfo_facet_flow_depth_current.filtered = h-aktuell [m]
sinfo.facet.flow_depth_current.filtered.description = h-aktuell ({0})
@@ -1054,6 +1064,11 @@
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]
+sinfo.flood_duration.absolute.height = Absolute H\u00f6he
+sinfo.flood_duration.absolute.height.left = Absolute H\u00f6he Infrastrukturen BWaStr (links)
+sinfo.flood_duration.absolute.height.right = Absolute H\u00f6he Infrastrukturen BWaStr (rechts)
+sinfo.flood_duration.infrastructures.left = \u00dcberflutungsdauern Infrastrukturen BWaStr (links)
+sinfo.flood_duration.infrastructures.right = \u00dcberflutungsdauern Infrastrukturen BWaStr (rechts)
sinfo.export.flow_depth_minmax.csv.header.min = Minimale Flie\u00dftiefe
sinfo.export.flow_depth_minmax.csv.header.max = Maximale Flie\u00dftiefe
@@ -1186,8 +1201,8 @@
uinfo.export.csv.meta.header.veg.dauerbis = \u00dcberflutungsdauer bis [d/a]
uinfo.export.csv.meta.header.veg.color = Farbe
uinfo.export.url.inundationduration.inundationduration = \u00dcberflutungsdauer ({0})
-uinfo.export.url.inundationduration.vegetation = Vegetationszonen ({0})
-uinfo.export.url.inundationduration.vegetation_scenario= Vegetationszonen Szenario ({0} cm)
+uinfo.export.url.inundationduration.vegetation = Potenziell nat\u00fcrliche Vegetation ({0})
+uinfo.export.url.inundationduration.vegetation_scenario= Potenziell nat\u00fcrliche Vegetation - Szenario ({0} cm)
uinfo.export.url.inundationduration.scenario = \u00dcberflutungsdauer Szenario ({0} cm)
uinfo.chart.salix_line.section.title = Iota (Fluss/Aue-Konnektivit\u00e4t) - L\u00e4ngsschnitt
uinfo.chart.salix_line.section.yaxis.label=[m]
@@ -1200,7 +1215,7 @@
uinfo_facet_salix_scenario = Iota Szenario, {0}
uinfo_facet_salix_scenario.filtered.description = Iota Szenario, {0}
uinfo_facet_salix_scenario.raw.description = Iota Szenario, {0} (Rohdaten)
-uinfo_facet_vegetation_zones_cross_section.description = Vegetationszonen ({0})
+uinfo_facet_vegetation_zones_cross_section.description = Potenziell nat\u00fcrliche Vegetation ({0})
uinfo_facet_vegetation_default_zones_cross_section.description = Standardvegetationszonen
uinfo_salix_scenario_deltaw = \u0394MW={0}
uinfo_salix_scenario_supraregional = \u00fcberregional
@@ -1347,7 +1362,7 @@
bundu.chart.depth.section.title = h-L\u00e4ngsschnitt
bundu_facet_flowdepth.filtered.description = h (BZWS, {0})
bundu_facet_channeldepth.description = h (Solltiefe)
-bundu_facet_field_depth.description = h Feld {0}
+bundu_facet_field_depth.description = h Feld {0} {1}
bundu.channelfinder.empty = Die Datenbank enth\u00e4lt keine Fahrrinnedaten f\u00fcr das Gew\u00e4sser und das Bezugsjahr
bundu.channelfinder.missing = keine Fahrrinnedaten vorhanden
diff -r f2473dc34535 -r ca492336570b backend/doc/schema/oracle-sinfo-uinfo.sql
--- a/backend/doc/schema/oracle-sinfo-uinfo.sql Tue Oct 08 15:03:24 2019 +0200
+++ b/backend/doc/schema/oracle-sinfo-uinfo.sql Wed Oct 09 19:17:46 2019 +0200
@@ -85,6 +85,7 @@
id NUMBER(9,0) PRIMARY KEY,
river_id NUMBER(38,0) NOT NULL CONSTRAINT cInfrastructureRivers REFERENCES rivers(id) ON DELETE CASCADE,
annotation_type_id NUMBER(38,0) NOT NULL CONSTRAINT cInfrastructureAnnotationType REFERENCES annotation_types(id),
+ group_id NUMBER(38,0) NOT NULL CONSTRAINT cInfrastructureGroupAnnoType REFERENCES annotation_types(id),
year NUMBER(4,0) CHECK((year >= 1700) AND (year <= 2199)),
dataprovider VARCHAR2(256),
evaluation_by VARCHAR2(256),
@@ -93,6 +94,7 @@
notes VARCHAR2(256)
);
COMMENT ON TABLE infrastructure IS 'Longitudinal section of infrastructures of a river and a type' ;
+COMMENT ON COLUMN infrastructure.group_id IS 'Reference to the infrastructure type group';
COMMENT ON COLUMN infrastructure.year IS 'File header line info "Stand"' ;
COMMENT ON COLUMN infrastructure.dataprovider IS 'File header line info "Datenherkunft"' ;
COMMENT ON COLUMN infrastructure.evaluation_by IS 'File header line info "Auswerter"' ;
diff -r f2473dc34535 -r ca492336570b backend/doc/schema/postgresql-sinfo-uinfo.sql
--- a/backend/doc/schema/postgresql-sinfo-uinfo.sql Tue Oct 08 15:03:24 2019 +0200
+++ b/backend/doc/schema/postgresql-sinfo-uinfo.sql Wed Oct 09 19:17:46 2019 +0200
@@ -81,6 +81,7 @@
id NUMERIC(9,0) PRIMARY KEY,
river_id integer NOT NULL CONSTRAINT cInfrastructureRivers REFERENCES rivers(id) ON DELETE CASCADE,
annotation_type_id integer NOT NULL CONSTRAINT cInfrastructureAnnotationType REFERENCES annotation_types(id),
+ group_id integer NOT NULL CONSTRAINT cInfrastructureGroupAnnoType REFERENCES annotation_types(id),
year NUMERIC(4,0) CHECK((year >= 1700) AND (year <= 2199)),
dataprovider VARCHAR(256),
evaluation_by VARCHAR(256),
@@ -89,6 +90,7 @@
notes VARCHAR(256)
);
COMMENT ON TABLE infrastructure IS 'Longitudinal section of infrastructures of a river and a type' ;
+COMMENT ON COLUMN infrastructure.group_id IS 'Reference to the infrastructure type group';
COMMENT ON COLUMN infrastructure.year IS 'File header line info "Stand"' ;
COMMENT ON COLUMN infrastructure.dataprovider IS 'File header line info "Datenherkunft"' ;
COMMENT ON COLUMN infrastructure.evaluation_by IS 'File header line info "Auswerter"' ;
diff -r f2473dc34535 -r ca492336570b backend/src/main/java/org/dive4elements/river/model/sinfo/Infrastructure.java
--- a/backend/src/main/java/org/dive4elements/river/model/sinfo/Infrastructure.java Tue Oct 08 15:03:24 2019 +0200
+++ b/backend/src/main/java/org/dive4elements/river/model/sinfo/Infrastructure.java Wed Oct 09 19:17:46 2019 +0200
@@ -27,6 +27,7 @@
import org.dive4elements.river.backend.SessionHolder;
import org.dive4elements.river.model.AnnotationType;
+import org.dive4elements.river.model.Attribute.AttributeKey;
import org.dive4elements.river.model.River;
import org.hibernate.Query;
import org.hibernate.Session;
@@ -58,6 +59,8 @@
private AnnotationType type;
+ private AnnotationType group;
+
private Integer year;
private String dataprovider;
@@ -74,13 +77,13 @@
public Infrastructure(final River river, final String filename, final String kmrange_info, final String notes, final AnnotationType type,
- final Integer year,
- final String dataprovider, final String evaluation_by) {
+ final AnnotationType group, final Integer year, final String dataprovider, final String evaluation_by) {
this.river = river;
this.filename = filename;
this.kmrange_info = kmrange_info;
this.notes = notes;
this.type = type;
+ this.group = group;
this.year = year;
this.dataprovider = dataprovider;
this.evaluation_by = evaluation_by;
@@ -149,6 +152,16 @@
this.type = type;
}
+ @OneToOne
+ @JoinColumn(name = "group_id")
+ public AnnotationType getGroup() {
+ return this.group;
+ }
+
+ public void setGroup(final AnnotationType group) {
+ this.group = group;
+ }
+
@Column(name = "year")
public Integer getYear() {
return this.year;
@@ -213,4 +226,29 @@
else
return null;
}
+
+ /**
+ * Fetches from the database the list of infrastructure types of a river's km range and river side(s)
+ * ordered by type group
+ */
+ public static List fetchInfrastructureTypes(final River river, final double kmLo, final double kmHi,
+ final AttributeKey riverside) {
+
+ final Session session = SessionHolder.HOLDER.get();
+
+ final Query query = session.createQuery("FROM Infrastructure"
+ + " WHERE (river=:river)"
+ + " AND (id IN (SELECT v.infrastructure.id FROM InfrastructureValue v"
+ + " WHERE (v.station BETWEEN (:kmLo - 0.0001) AND (:kmHi + 0.0001))"
+ + InfrastructureValue.getRiversideClause(riverside, "v", "attr_id")
+ + "))"
+ + " ORDER BY group, type");
+ query.setParameter("river", river);
+ query.setParameter("kmLo", new Double(kmLo));
+ query.setParameter("kmHi", new Double(kmHi));
+ if (!InfrastructureValue.getRiversideClause(riverside, "v", "attr_id").isEmpty())
+ query.setParameter("attr_id", riverside.getId());
+
+ return query.list();
+ }
}
\ No newline at end of file
diff -r f2473dc34535 -r ca492336570b backend/src/main/java/org/dive4elements/river/model/sinfo/InfrastructureValue.java
--- a/backend/src/main/java/org/dive4elements/river/model/sinfo/InfrastructureValue.java Tue Oct 08 15:03:24 2019 +0200
+++ b/backend/src/main/java/org/dive4elements/river/model/sinfo/InfrastructureValue.java Wed Oct 09 19:17:46 2019 +0200
@@ -152,19 +152,26 @@
*/
public static List getValues(final River river, final double kmLo, final double kmHi, final AttributeKey riverside) {
final Session session = SessionHolder.HOLDER.get();
- String riversideClause = "";
- if ((riverside == AttributeKey.LEFT) || (riverside == AttributeKey.RIGHT))
- riversideClause = " AND (v.attribute.id=:attr_id)";
final Query query = session.createQuery("FROM InfrastructureValue v"
+ " WHERE (v.infrastructure.river=:river)"
+ " AND (v.station BETWEEN :kmLo - 0.0001 AND :kmHi + 0.0001)"
- + riversideClause
+ + getRiversideClause(riverside, "v", "attr_id")
+ " ORDER BY v.station, v.attribute.id");
query.setParameter("river", river);
query.setParameter("kmLo", new Double(kmLo));
query.setParameter("kmHi", new Double(kmHi));
- if (!riversideClause.isEmpty())
+ if (!getRiversideClause(riverside, "v", "attr_id").isEmpty())
query.setParameter("attr_id", riverside.getId());
return query.list();
}
+
+ /**
+ * Gets a query's and-where-clause for a riverside key
+ */
+ public static String getRiversideClause(final AttributeKey riverside, final String tablealias, final String variable) {
+ if ((riverside == AttributeKey.LEFT) || (riverside == AttributeKey.RIGHT))
+ return " AND (" + tablealias + ".attribute.id=:" + variable + ")";
+ else
+ return "";
+ }
}
diff -r f2473dc34535 -r ca492336570b gwt-client/src/main/java/org/dive4elements/river/client/client/ui/UIProviderFactory.java
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/UIProviderFactory.java Tue Oct 08 15:03:24 2019 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/UIProviderFactory.java Wed Oct 09 19:17:46 2019 +0200
@@ -31,6 +31,7 @@
import org.dive4elements.river.client.client.ui.sinfo.CollisionLoadEpochPanel;
import org.dive4elements.river.client.client.ui.sinfo.CollisionLoadYearPanel;
import org.dive4elements.river.client.client.ui.sinfo.DiffPairTwinPanel;
+import org.dive4elements.river.client.client.ui.sinfo.FloodInfrastructurePanel;
import org.dive4elements.river.client.client.ui.sinfo.FlowDepthMinMaxTwinPanel;
import org.dive4elements.river.client.client.ui.sq.SQPeriodPanel;
import org.dive4elements.river.client.client.ui.uinfo.InundationWMSInputPanel;
@@ -241,6 +242,8 @@
return new StaticDataPanel();
} else if (uiProvider.equals("uinfo.salix.supraregional.table")) {
return new SupraRegionalTablePanel();
+ } else if (uiProvider.equals("flood_infrastructure_panel")) {
+ return new FloodInfrastructurePanel(user);
} else if ("sinfo_flowdepth_development_twin_panel".equals(uiProvider))
return new DiffPairTwinPanel(user, 1, getMSG().sinfo_flow_depth_development_twin_panel_max_count_msg(), true);// if switched here, also switch on
// server side
diff -r f2473dc34535 -r ca492336570b gwt-client/src/main/java/org/dive4elements/river/client/client/ui/sinfo/FloodInfrastructurePanel.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/sinfo/FloodInfrastructurePanel.java Wed Oct 09 19:17:46 2019 +0200
@@ -0,0 +1,291 @@
+/** Copyright (C) 2017 by Bundesanstalt für Gewässerkunde
+ * Software engineering by
+ * Björnsen Beratende Ingenieure GmbH
+ * Dr. Schumacher Ingenieurbüro für Wasser und Umwelt
+ *
+ * This file is Free Software under the GNU AGPL (>=v3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out the
+ * documentation coming with Dive4Elements River for details.
+ */
+package org.dive4elements.river.client.client.ui.sinfo;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.dive4elements.river.client.client.ui.AbstractUIProvider;
+import org.dive4elements.river.client.client.ui.DatacageWidget;
+import org.dive4elements.river.client.client.ui.DatacageWidgetData;
+import org.dive4elements.river.client.client.ui.PanelHelper;
+import org.dive4elements.river.client.shared.model.Data;
+import org.dive4elements.river.client.shared.model.DataItem;
+import org.dive4elements.river.client.shared.model.DataList;
+import org.dive4elements.river.client.shared.model.DefaultData;
+import org.dive4elements.river.client.shared.model.DefaultDataItem;
+import org.dive4elements.river.client.shared.model.User;
+import org.dive4elements.river.client.shared.model.VegetationZoneServerClientXChange;
+
+import com.google.gwt.core.client.GWT;
+import com.smartgwt.client.types.ListGridFieldType;
+import com.smartgwt.client.util.SC;
+import com.smartgwt.client.widgets.Button;
+import com.smartgwt.client.widgets.Canvas;
+import com.smartgwt.client.widgets.Label;
+import com.smartgwt.client.widgets.events.ClickEvent;
+import com.smartgwt.client.widgets.events.ClickHandler;
+import com.smartgwt.client.widgets.form.DynamicForm;
+import com.smartgwt.client.widgets.form.fields.ColorItem;
+import com.smartgwt.client.widgets.grid.ListGrid;
+import com.smartgwt.client.widgets.grid.ListGridField;
+import com.smartgwt.client.widgets.grid.ListGridRecord;
+import com.smartgwt.client.widgets.grid.events.CellSavedEvent;
+import com.smartgwt.client.widgets.grid.events.CellSavedHandler;
+import com.smartgwt.client.widgets.grid.events.RecordClickEvent;
+import com.smartgwt.client.widgets.grid.events.RecordClickHandler;
+import com.smartgwt.client.widgets.layout.HLayout;
+import com.smartgwt.client.widgets.layout.Layout;
+import com.smartgwt.client.widgets.layout.VLayout;
+import com.smartgwt.client.widgets.tree.TreeNode;
+
+/**
+ * @author Domenico Nardi Tironi
+ *
+ */
+public class FloodInfrastructurePanel extends AbstractUIProvider {
+ private static final long serialVersionUID = 1L;
+
+ private static final String datakey = "flood_infrastructure";
+ final protected List records = new ArrayList();
+ private ListGrid elements = new ListGrid();
+
+ private final User m_user;
+
+ public FloodInfrastructurePanel(final User user) {
+ this.m_user = user;
+ }
+
+ protected final ListGrid createTable(final Layout root, final DataList data, final String width, final boolean editable) {
+
+ final Label title = new Label(data.get(0).getDescription());
+ title.setHeight("35px");
+
+ this.elements.setWidth(width);
+ this.elements.setHeight(300);
+ this.elements.setShowHeaderContextMenu(false);
+ this.elements.setCanReorderFields(false);
+ this.elements.setCanSort(true);
+ this.elements.setSortField("to");
+ this.elements.setCanResizeFields(false);
+
+ this.elements.setCanEdit(editable);
+
+ final ListGridField internalNumber = new ListGridField("number", "number"); // valid only if no data is to be added
+ internalNumber.setCanSort(false);
+ internalNumber.setHidden(true);
+
+ final ListGridField infrstrField = new ListGridField("infrstr", "Infrastruktur BWaStr");// this.MSG.uinfo_vegetation_zones_label());
+ infrstrField.setType(ListGridFieldType.TEXT);
+ infrstrField.setWidth("*"); // 245
+ infrstrField.setCanSort(false);
+ infrstrField.setCanDragResize(true);
+ infrstrField.setCanEdit(true); // neue Anforderung - doch nicht? ???
+
+ final ListGridField fromField = new ListGridField("type", "Typ/Bezeichnung"); // VegZonePanelHelper.createIntTableField("from",
+ // this.MSG.uinfo_vegetation_zones_from(), true,
+ // getNormalizer(), getValidator()
+ // );
+ fromField.addCellSavedHandler(new CellSavedHandler() {
+ @Override
+ public void onCellSaved(final CellSavedEvent event) {
+ // updateValidationMsgLabel();
+ }
+ });
+
+ fromField.setCanEdit(false);
+
+ final ListGridField removeField = PanelHelper.createRemoveField(this.elements, GWT.getHostPageBaseURL() + this.MSG.removeFeature());
+ this.elements.addRecordClickHandler(new RecordClickHandler() { // adding another custom record-Remove-Handler which is not included in the
+ // Panelhelper TODO: MERGE WITH SupraRegionalPanel!!
+ @Override
+ public void onRecordClick(final RecordClickEvent event) {
+ if (event.getField().getName().equals(removeField.getName())) {
+ // updateValidationMsgLabel();
+ }
+ }
+ });
+ this.elements.setFields(infrstrField, fromField, removeField);
+
+ root.setWidth(width);
+ root.addMember(title);
+ root.addMember(this.elements);
+ root.addMember(PanelHelper.getSpacer(3));
+ root.addMember(PanelHelper.getSpacer(3));
+ return this.elements;
+
+ }
+
+ @Override
+ public final VLayout create(final DataList data) {
+ final VLayout layout = new VLayout();
+
+ final Canvas helper = createHelper(data);
+ if (helper != null)
+ this.helperContainer.addMember(helper);
+
+ final Canvas submit = getNextButton();
+
+ final VLayout root = new VLayout();
+ root.setWidth(450);
+ createWidget(root, data);
+
+ layout.addMember(root);
+ layout.addMember(submit);
+
+ // updateValidationMsgLabel();// init Text
+
+ return layout;
+ }
+
+ protected Canvas createHelper(final DataList dataList) {
+
+ final DatacageWidgetData data = new DatacageWidgetData(this.artifact, this.m_user, "uinfo.inundation_duration.vegZoneSelect", "load-system:true",
+ false);
+
+ final DatacageWidget datacage = new DatacageWidget(data);
+
+ final Button plusBtn = new Button("Hinzufügen"); // this.MSG.uinfo_inundation_duration_set_vegetation_zone()
+ plusBtn.addClickHandler(new ClickHandler() {
+ @Override
+ public void onClick(final ClickEvent event) {
+ handlePlusClicked(datacage);
+ }
+ });
+
+ final VLayout helperLayout = new VLayout();
+ helperLayout.addMember(datacage);
+ helperLayout.addMember(plusBtn);
+
+ return helperLayout;
+ }
+
+ private void handlePlusClicked(final DatacageWidget datacage) {
+ final List selection = datacage.getPlainSelection();
+ if (selection == null || selection.isEmpty()) {
+ SC.say("VegetationzonesTablePanel.this.MSG.warning()");
+ return;
+ }
+
+ final TreeNode selectedNode = selection.get(0);
+
+ /*
+ * the encoded veg-zones is either in 'data' or 'ids'. We need both, because we have the cases of stadnard vegzones and
+ * user-defined vegzones.
+ */
+ final String dataAttribute = selectedNode.getAttribute("data");
+ final String idsAttribute = selectedNode.getAttribute("ids");
+ final String vegZoneData = (dataAttribute == null || dataAttribute.trim().length() == 0) ? idsAttribute : dataAttribute;
+
+ // for (final ListGridRecord r : this.elements.getRecords()) {
+ // this.elements.removeData(r);
+ // }
+ // final List rows = VegetationZoneServerClientXChange.parse(data);
+ // for (final VegetationZoneServerClientXChange row : rows) {
+ // this.elements.addData(createEntry(row));
+ // }
+
+ }
+
+ public final ListGridRecord createEntry(final VegetationZoneServerClientXChange row) {
+
+ final String vegzone = row.getZoneName();
+ final Integer from = row.getMin_day_overflow();
+ final Integer to = row.getMax_day_overflow();
+ final String colorStr = row.getHexColor();
+
+ if (vegzone == null)
+ return null;
+
+ final ListGridRecord r = new ListGridRecord();
+ r.setAttribute("vegzone", vegzone);
+ r.setAttribute("from", from);
+ r.setAttribute("to", to);
+ r.setAttribute("color", colorStr);
+ r.setAttribute("number", this.records.size());
+ this.records.add(r);
+ return r;
+
+ }
+
+ public void createWidget(final Layout root, final DataList data) {
+
+ this.elements = createTable(root, data, "420", true);
+
+ // this.vegzone = PanelHelper.createItem("uinfo_vegetation_zone_label", this.MSG.uinfo_vegetation_zone_label(), "*");
+ // this.vegzone.setColSpan(4);
+ // this.start = PanelHelper.createIntegerItem("uinfo_vegetation_zones_from", this.MSG.uinfo_vegetation_zones_from(),
+ // "*");
+ // this.end = PanelHelper.createIntegerItem("uinfo_vegetation_zones_to", this.MSG.uinfo_vegetation_zones_to(), "*");
+ final VLayout fields = new VLayout();
+
+ final ColorItem colorPicker = new ColorItem();
+ colorPicker.setTitle(this.MSG.uinfo_vegetation_zone_color());
+
+ colorPicker.setShowTitle(true);
+ colorPicker.setShowValueIconOnly(false);
+ colorPicker.setShowPickerIcon(true);
+ colorPicker.setColSpan(2);
+ colorPicker.setWidth(110);
+
+ final Button add = new Button(this.MSG.add_date()); // TODO: make key more generic or change to more specific
+
+ final DynamicForm form1 = new DynamicForm();
+
+ form1.setNumCols(5); // für Layout untereinander muss 2 eingestellt werden
+ // form1.setFields(this.vegzone, this.start, this.end, colorPicker);
+
+ fields.addMember(form1);
+ root.addMember(fields);
+ root.addMember(PanelHelper.getSpacer(10));
+ }
+
+ @Override
+ public Canvas createOld(final DataList dataList) {
+ final HLayout layout = new HLayout();
+ layout.setWidth("400px");
+ final VLayout vLayout = new VLayout();
+ vLayout.setWidth(130);
+ final Label label = new Label(dataList.getLabel());
+ label.setWidth("200px");
+ label.setHeight("25px");
+
+ final List items = dataList.getAll();
+ final Data str = getData(items, datakey);
+ final DataItem[] strItems = str.getItems();
+
+ // for (final VegetationZoneServerClientXChange entry : entries) {
+ final Label dateLabel = new Label("zone ( asfd - asdf )");
+ dateLabel.setHeight("20px");
+ vLayout.addMember(dateLabel);
+
+ final Canvas back = getBackButton(dataList.getState());
+ layout.addMember(label);
+ layout.addMember(vLayout);
+ layout.addMember(back);
+
+ return layout;
+ }
+
+ @Override
+ protected final Data[] getData() {
+ final List data = new ArrayList();
+
+ final ListGridRecord[] lgr = this.elements.getRecords();
+ if (lgr.length == 0) {
+ // return new Data[0]; // TODO: Klären, ob Vegetationszonen-Auswahl Pflicht ist, ob es ein Fallback geben soll usw.
+ }
+
+ final DataItem item = new DefaultDataItem(datakey, null, "VegetationZoneServerClientXChange.parseListToDataString(getZones(lgr))"); // DATA-key
+ data.add(new DefaultData(datakey, null, null, new DataItem[] { item }));
+ return data.toArray(new Data[data.size()]);
+ }
+
+}
\ No newline at end of file
diff -r f2473dc34535 -r ca492336570b gwt-client/src/main/webapp/WEB-INF/features.xml
--- a/gwt-client/src/main/webapp/WEB-INF/features.xml Tue Oct 08 15:03:24 2019 +0200
+++ b/gwt-client/src/main/webapp/WEB-INF/features.xml Wed Oct 09 19:17:46 2019 +0200
@@ -10,10 +10,49 @@
module:new_chart
module:fixanalysis
river:Beispielfluss
+ river:Elbe
+ river:Rhein
module:winfo
module:minfo
river:Beispielfluss
+
+
+ module:winfo
+ module:minfo
+ module:sinfo
+ module:uinfo
+ module:bundu
+ module:new_map
+ module:new_chart
+ module:fixanalysis
+ river:Saar
+ river:Saar (Wiltinger Bogen)
+ river:Rhein bis 2013
+ river:Rhein
+ river:Mosel
+ river:Elbe
+ river:Donau (Regensburg Nordarm)
+ river:Donau (Schleusenkanaele)
+ river:Donau
+ river:Fulda (Winter)
+ river:Fulda (Sommer)
+ river:Untere Havel-Wasserstraße (UHW)
+ river:Lahn (ueber Wehrarme)
+ river:Main
+ river:Main2014
+ river:Main (Wehrarm Volkach)
+ river:Main (Wehrarm Limbach)
+ river:Neckar
+ river:Neckar (ueber Wehrarme)
+ river:Oder
+ river:Saale
+ river:Saale-Thueringen
+ river:Werra (Winter)
+ river:Werra (Sommer)
+ river:Weser
+
+