[PATCH] Adding SInfo results to datacage

Wald Commits scm-commit at wald.intevation.org
Thu Feb 22 18:44:33 CET 2018


# HG changeset patch
# User gernotbelger
# Date 1519321468 -3600
# Node ID 31dff17c68287f0fd1182f8ec96dd3a3c44bae7e
# Parent  9459d15d5c96e768b9fd66e452b4759b0cd4a3bb
Adding SInfo results to datacage

diff -r 9459d15d5c96 -r 31dff17c6828 artifacts/doc/conf/meta-data.xml
--- a/artifacts/doc/conf/meta-data.xml	Thu Feb 22 18:43:34 2018 +0100
+++ b/artifacts/doc/conf/meta-data.xml	Thu Feb 22 18:44:28 2018 +0100
@@ -345,6 +345,9 @@
                     <dc:when test="$out = 'bed_difference_height_year'">
                       <dc:call-macro name="longitudinal-section-user-prototype"/>
                     </dc:when>
+                    <dc:when test="$out = 'sinfo_flow_depth'">
+                      <dc:call-macro name="longitudinal-section-user-prototype"/>
+                    </dc:when>
                     <dc:comment> Discharge curves </dc:comment>
                     <dc:when test="$out = 'computed_discharge_curve'">
                       <dc:call-macro name="discharge-curve-user-prototype"/>
@@ -1594,9 +1597,12 @@
       <dc:call-macro name="bedquality"/>
       <dc:call-macro name="flow-velocity"/>
       <dc:call-macro name="sediment-load"/>
+      
+      <dc:comment> SINFO </dc:comment>
+      <dc:call-macro name="sinfo_flowdepths"/>
+      <dc:call-macro name="sinfo_tkh"/>
     </dc:macro>
 
-
     <!-- porosities -->
     <dc:macro name="porosities">
       <porosities>
@@ -3250,5 +3256,51 @@
       <dc:macro-body/>
     </dc:macro>
 
+    <dc:macro name="sinfo_flowdepths">
+      <dc:filter expr="($out_name = 'sinfo_flow_depth' and ($facet_name = 'sinfo_flow_depth.filtered' or $facet_name = 'sinfo_flow_depth.tkh.filtered' ) )">
+        <dc:if test="dc:has-result()">
+          <sinfo_flow_depths>
+            <dc:call-macro name="collection-group">
+              <sinfo_flow_depth description="{dc:group-key()}">
+                <dc:for-each>
+                  <dc:element name="${facet_name}">
+                    <dc:attribute name="factory" value="sinfo"/>
+                    <dc:attribute name="target_out" value="${out}"/>
+                    <dc:attribute name="description" value="${facet_description}"/>
+                    <dc:attribute name="ids" value="${facet_num}"/>
+                    <dc:attribute name="artifact-id" value="${a_gid}"/>
+                    <dc:attribute name="out" value="${out_name}"/>
+                  </dc:element>
+                </dc:for-each>
+              </sinfo_flow_depth>
+            </dc:call-macro>
+          </sinfo_flow_depths>
+        </dc:if>
+      </dc:filter>
+    </dc:macro>
+
+    <dc:macro name="sinfo_tkh">
+      <dc:filter expr="($out_name = 'sinfo_flow_depth' and $facet_name = 'sinfo_flow_depth.tkh')">
+        <dc:if test="dc:has-result()">
+          <sinfo_tkhs>
+            <dc:call-macro name="collection-group">
+              <sinfo_tkh description="{dc:group-key()}">
+                <dc:for-each>
+                  <dc:element name="${facet_name}">
+                    <dc:attribute name="factory" value="sinfo"/>
+                    <dc:attribute name="target_out" value="${out}"/>
+                    <dc:attribute name="description" value="${facet_description}"/>
+                    <dc:attribute name="ids" value="${facet_num}"/>
+                    <dc:attribute name="artifact-id" value="${a_gid}"/>
+                    <dc:attribute name="out" value="${out_name}"/>
+                  </dc:element>
+                </dc:for-each>
+              </sinfo_tkh>
+            </dc:call-macro>
+          </sinfo_tkhs>
+        </dc:if>
+      </dc:filter>
+    </dc:macro>
+
   </datacage>
 </dc:template>


More information about the Dive4Elements-commits mailing list