diff artifacts/doc/conf/meta-data.xml @ 9548:669ab639c56b

Implemented datacage for sinfo - ueberflutungsdauern Implemented h/Q mainvalues in sinfo - ueberflutungsdauern chart
author gernotbelger
date Fri, 19 Oct 2018 17:19:09 +0200
parents abf4d0b10270
children b9c87bbff6a4
line wrap: on
line diff
--- a/artifacts/doc/conf/meta-data.xml	Fri Oct 19 16:27:07 2018 +0200
+++ b/artifacts/doc/conf/meta-data.xml	Fri Oct 19 17:19:09 2018 +0200
@@ -142,10 +142,9 @@
                   <dc:when test="$out = 'sinfo_flood_height'">
                     <dc:call-macro name="annotations"/>
                   </dc:when>
-                  <!--TODO sinfo_floodduration_curve: mainvalues wie in winfo-duration_curve unterstuetzen -->
-                  <!--dc:when test="$out = 'sinfo_floodduration_curve'">
+                  <dc:when test="$out = 'sinfo_floodduration_curve'">
                     <dc:call-macro name="mainvalues" />
-                    </dc:when -->
+                  </dc:when>
                   <dc:when test="$out = 'uinfo_salix_line'">
                     <dc:call-macro name="annotations"/>
                   </dc:when>
@@ -260,10 +259,7 @@
                   </dc:when>
                   <dc:comment> Duration curve </dc:comment>
                   <dc:when test="$out = 'duration_curve'">
-                    <dc:call-macro name="mainvalues"/>
-                    <dc:call-macro name="basedata_2_fixations_relative_point"/>
-                    <dc:call-macro name="basedata_4_heightmarks-points-relative_points"/>
-                    <dc:call-macro name="basedata_5_flood-protections_relative_points"/>
+                    <dc:call-macro name="duration_curve_system"/>
                   </dc:when>
                   <dc:comment> Reference curve </dc:comment>
                   <dc:when test="$out = 'reference_curve'">
@@ -329,14 +325,9 @@
                   <dc:when test="$out = 'sinfo_flood_height'">
                     <dc:call-macro name="longitudinal-section-prototype"/>
                   </dc:when>
-                  <!--TODO sinfo_floodduration_curve: mainvalues wie in winfo-duration_curve unterstuetzen -->
-                  <!--dc:when test="$out = 'sinfo_floodduration_curve'">
-                    <dc:call-macro name="mainvalues" />
-                    <dc:call-macro name="basedata_2_fixations_relative_point" />
-                    <dc:call-macro name="basedata_4_heightmarks-points-relative_points" />
-                    <dc:call-macro name="basedata_5_flood-protections_relative_points" />
-                    </dc:when -->
-
+                  <dc:when test="$out = 'sinfo_floodduration_curve'">
+                    <dc:call-macro name="floodduration_curve_system" />
+                  </dc:when>
                   <dc:when test="$out = 'uinfo_salix_line'">
                     <dc:call-macro name="longitudinal-section-prototype"/>
                   </dc:when>
@@ -450,15 +441,23 @@
                     <dc:when test="$out = 'sinfo_flood_duration'">
                       <dc:call-macro name="longitudinal-section-user-prototype"/>
                     </dc:when>
+                    <dc:when test="$out = 'sinfo_floodduration_curve'">
+                      <dc:call-macro name="floodduration-curve-user"/>
+                    </dc:when>
                     <dc:when test="$out = 'sinfo_flood_height'">
                       <dc:call-macro name="longitudinal-section-user-prototype"/>
                     </dc:when>
+                    <dc:when test="$out = 'sinfo_flowdepth_waterlevels'">
+                      <dc:call-macro name="longitudinal-section-fix-vollmer_w"/>
+                    </dc:when>
+
                     <dc:when test="$out = 'uinfo_salix_line'">
                       <dc:call-macro name="longitudinal-section-user-prototype"/>
                     </dc:when>
                     <dc:when test="$out = 'uinfo.inundation_duration.vegzoneselect'">
                       <dc:call-macro name="vegetationzones"/>
                     </dc:when>
+
                     <dc:when test="$out = 'bundu_wspl_longitudinal_section'">
                       <dc:call-macro name="longitudinal-section-user-prototype"/>
                     </dc:when>
@@ -497,7 +496,7 @@
                     </dc:when>
                     <dc:comment> Duration curve </dc:comment>
                     <dc:when test="$out = 'duration_curve'">
-                      <dc:call-macro name="duration-curve"/>
+                      <dc:call-macro name="duration-curve-user"/>
                     </dc:when>
                     <dc:comment> Reference curve </dc:comment>
                     <dc:when test="$out = 'reference_curve'">
@@ -510,10 +509,6 @@
                     <dc:when test="$out = 'map'">
                       <dc:call-macro name="flood-map"/>
                     </dc:when>
-
-                    <dc:when test="$out = 'sinfo_flowdepth_waterlevels'">
-                      <dc:call-macro name="longitudinal-section-fix-vollmer_w"/>
-                    </dc:when>
                   </dc:choose>
                 </dc:iterate>
               </dc:otherwise>
@@ -881,18 +876,30 @@
       </dc:filter>
     </dc:macro>
 
-    <dc:macro name="duration-curve">
-      <dc:filter expr="$facet_name = 'duration_curve.q' or $facet_name = 'duration_curve.w'">
+    <!-- Unterschreitungsdauern aus WINFO -->
+    <dc:macro name="duration-curve-user">
+      <dc:call-macro name="duration-curve-user_winfo-duration-curve"/>
+    </dc:macro>
+
+    <!-- Überschrautungsdauern aus SINFO -->
+    <dc:macro name="floodduration-curve-user">
+      <dc:call-macro name="duration-curve-user_sinfo-flood-duration"/>
+    </dc:macro>
+
+    <dc:macro name="duration-curve-user_winfo-duration-curve">
+      <!-- Restults of WINFO-DurationCurve calculation -->
+      <dc:filter expr="$a_state = 'state.winfo.durationcurve' and ( $facet_name = 'duration_curve.q' or $facet_name = 'duration_curve.w' )">
         <dc:if test="dc:has-result()">
+          <!-- FIXME: this label is wrong, should be rather 'winfo - duration curve' or something -->
           <computed_discharge_curves>
             <dc:for-each>
               <dc:element name="${facet_name}">
                 <dc:attribute name="description" value="${facet_description}"/>
                 <dc:attribute name="factory" value="winfo"/>
                 <dc:attribute name="target_out" value="${out}"/>
-                <dc:attribute name="artifact-id" value="${a_id}"/>
-                <dc:attribute name="ids" value="${a_id}"/>
-                <dc:attribute name="out" value="duration_curve"/>
+                <dc:attribute name="artifact-id" value="${a_gid}"/>
+                <dc:attribute name="ids" value="${facet_num}"/>
+                <dc:attribute name="out" value="${out_name}"/>
               </dc:element>
             </dc:for-each>
           </computed_discharge_curves>
@@ -900,6 +907,31 @@
       </dc:filter>
     </dc:macro>
 
+    <dc:macro name="duration-curve-user_sinfo-flood-duration">
+      <!-- Restults of SINFO-Überflutungsdauern-Aue calculation -->
+      <dc:filter expr="$a_state = 'state.sinfo.flood_duration' and $out_name = 'sinfo_floodduration_curve'">
+      <!-- FIXME: group by calculation? -->
+        <dc:if test="dc:has-result()">
+          <sinfo_flood_durations>
+          
+            <dc:call-macro name="collection-group">
+              <sinfo_flood_durations description="{dc:group-key()}">
+                <dc:for-each>
+                  <dc:element name="${facet_name}">
+                    <dc:attribute name="description" value="${facet_description}"/>
+                    <dc:attribute name="factory" value="sinfo"/>
+                    <dc:attribute name="target_out" value="${out}"/>
+                    <dc:attribute name="artifact-id" value="${a_gid}"/>
+                    <dc:attribute name="ids" value="${facet_num}"/>
+                    <dc:attribute name="out" value="${out_name}"/>
+                  </dc:element>
+                </dc:for-each>
+              </sinfo_flood_durations>
+            </dc:call-macro>
+          </sinfo_flood_durations>
+        </dc:if>
+      </dc:filter>
+    </dc:macro>
 
     <dc:macro name="waterlevels-user">
       <dc:filter expr="($out_name = 'longitudinal_section'
@@ -1198,6 +1230,17 @@
 
     <!-- Macros to load system data -->
 
+    <dc:macro name="duration_curve_system">
+      <dc:call-macro name="mainvalues"/>
+      <dc:call-macro name="basedata_2_fixations_relative_point"/>
+      <dc:call-macro name="basedata_4_heightmarks-points-relative_points"/>
+      <dc:call-macro name="basedata_5_flood-protections_relative_points"/>
+    </dc:macro>
+
+    <dc:macro name="floodduration_curve_system">
+      <dc:call-macro name="mainvalues"/>
+    </dc:macro>
+
     <dc:macro name="qmainvalues">
       <qmainvalue factory="mainvalue" ids="{$river_id}:q" target_out="{$out}"/>
     </dc:macro>

http://dive4elements.wald.intevation.org