diff artifacts/doc/conf/meta-data.xml @ 9299:4a6cc7c6716a

uinfo.inundation_duration veg'zone select
author gernotbelger
date Wed, 25 Jul 2018 14:42:44 +0200
parents 77f24792d75f
children 517b93254995
line wrap: on
line diff
--- a/artifacts/doc/conf/meta-data.xml	Wed Jul 25 11:33:48 2018 +0200
+++ b/artifacts/doc/conf/meta-data.xml	Wed Jul 25 14:42:44 2018 +0200
@@ -142,7 +142,7 @@
                   <dc:when test="$out = 'sinfo_flood_height'">
                     <dc:call-macro name="annotations" />
                   </dc:when>
-                  
+
                   <dc:when test="$out = 'uinfo_salix_line'">
                     <dc:call-macro name="annotations" />
                   </dc:when>
@@ -322,10 +322,14 @@
                   <dc:when test="$out = 'sinfo_flood_duration_curve'">
                     <dc:call-macro name="longitudinal-section-prototype" />
                   </dc:when>
-                  
+
                   <dc:when test="$out = 'uinfo_salix_line'">
                     <dc:call-macro name="longitudinal-section-prototype" />
                   </dc:when>
+                  <dc:when test="$out = 'uinfo.inundation_duration.vegzoneselect'">
+                    <dc:variable name="vegzonedata" expr="dc:defaultvegetationzone()"></dc:variable>
+                    <defaultVegetationZone factory="dummy" target_out="{$out}" data="{$vegzonedata}"></defaultVegetationZone>
+                  </dc:when>
                 </dc:choose>
               </dc:iterate>
             </dc:otherwise>
@@ -421,6 +425,9 @@
                     <dc:when test="$out = 'sinfo_tkk'">
                       <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:comment> Discharge curves </dc:comment>
                     <dc:when test="$out = 'computed_discharge_curve'">
                       <dc:call-macro name="discharge-curve-user-prototype" />
@@ -1445,7 +1452,7 @@
 
     <dc:macro name="basedata_3_officials">
       <dc:call-macro name="basedata_3_macro">
-        <dc:variable name="start_year" expr="dc:date-format('yyyy', $start_time)" />      
+        <dc:variable name="start_year" expr="dc:date-format('yyyy', $start_time)" />
         <column name="{$wst_column_name}" ids="additionals-wstv-{$wst_column_position}-{$wst_id}" factory="staticwqkms" target_out="{$out}" info="{$info} [km {$deffrom} - {$defto}]" year="{dc:date-format('yyyy', $start_time)}" />
       </dc:call-macro>
     </dc:macro>
@@ -1577,7 +1584,7 @@
 
     <dc:macro name="basedata_7_waterlevels">
       <dc:call-macro name="basedata_7_macro">
-        <dc:variable name="start_year" expr="dc:date-format('yyyy', $start_time)" />      
+        <dc:variable name="start_year" expr="dc:date-format('yyyy', $start_time)" />
         <column name="{$wst_column_name}" ids="additionals-wstv-{$wst_column_position}-{$wst_id}" factory="staticwqkms" target_out="{$out}" info="{$info} [km {$deffrom} - {$defto}]" year="{dc:date-format('yyyy', $start_time)}" />
       </dc:call-macro>
     </dc:macro>
@@ -2075,7 +2082,7 @@
     <dc:macro name="bed-heights-single">
       <single>
         <dc:context>
-          <dc:call-macro name="bed-heights-statement" />  
+          <dc:call-macro name="bed-heights-statement" />
           <dc:if test="dc:has-result()">
             <dc:group expr="dc:coalesce($bedh_year, 'sonstige')">
               <heights name="{dc:group-key()}" description="{dc:group-key()}">
@@ -3224,8 +3231,9 @@
           w.sinfo_selection
           FROM wst_columns wc
           JOIN wsts w ON wc.wst_id = w.id
-          JOIN wst_ranges wr ON wc.id = wr.wst_column_id
-          LEFT JOIN time_intervals ti ON wc.time_interval_id = ti.id          
+          JOIN wst_ranges wr ON wc.id =
+          wr.wst_column_id
+          LEFT JOIN time_intervals ti ON wc.time_interval_id = ti.id
           WHERE w.river_id = ${river_id} AND
           NOT((${tokm} &lt; wr.a) or (${fromkm} &gt; wr.b))
           ORDER BY wst_column_position
@@ -3477,7 +3485,8 @@
           FROM channel s
           INNER JOIN channel_values v ON s.id=v.channel_id
           WHERE (s.river_id=${river_id})
-          AND (v.station BETWEEN ${fromkm}-0.0001 AND ${tokm}+0.0001)
+          AND (v.station BETWEEN ${fromkm}-0.0001
+          AND ${tokm}+0.0001)
           GROUP BY s.id
           ORDER BY MIN(s.year_to) DESC
         </dc:statement>
@@ -3515,7 +3524,8 @@
           || MIN(s.evaluation_by) AS info
           FROM tkh_column sc
           INNER JOIN tkh s ON sc.tkh_id=s.id
-          INNER JOIN tkh_values v ON sc.id=v.tkh_column_id
+          INNER JOIN tkh_values
+          v ON sc.id=v.tkh_column_id
           WHERE (s.river_id=${river_id})
           AND (lower(s.groupname)=${tkh_groupname})
           AND (v.station BETWEEN ${fromkm}-0.0001 AND ${tokm}+0.0001)
@@ -3588,7 +3598,8 @@
           || MIN(s.sounding_info) || '&lt;br /&gt;'
           || MIN(s.evaluation_by) AS info
           FROM flow_depth_column sc
-          INNER JOIN flow_depth s ON sc.flow_depth_id=s.id
+          INNER JOIN
+          flow_depth s ON sc.flow_depth_id=s.id
           INNER JOIN flow_depth_values v ON sc.id=v.flow_depth_column_id
           WHERE (s.river_id=${river_id})
           AND (v.station BETWEEN ${fromkm}-0.0001 AND ${tokm}+0.0001)
@@ -3644,7 +3655,8 @@
           FROM collision s
           INNER JOIN collision_values v ON s.id=v.collision_id
           WHERE (s.river_id=${river_id})
-          AND (v.station BETWEEN ${fromkm}-0.0001 AND ${tokm}+0.0001)
+          AND (v.station BETWEEN ${fromkm}-0.0001 AND
+          ${tokm}+0.0001)
           GROUP BY s.id
           ORDER BY MIN(s.year)
         </dc:statement>
@@ -3656,5 +3668,33 @@
       </dc:context>
     </dc:macro>
 
+    <!-- Vegetation zones, edited by the user -->
+    <dc:macro name="vegetationzones">
+      <dc:filter expr="$a_state = 'state.uinfo.vegetation_zones' and $facet_name = 'csv'"> <!-- we misuse the csv-facet -->
+        <dc:if test="dc:has-result()">
+          <dc:for-each>
+            <dc:variable name="vegzonedata" expr="dc:data_from_artifact($a_gid,'vegzones')" />
+            <dc:variable name="vegzonedatalabel" expr="dc:get('ld_from'))" />
+            <dc:variable name="label_temp" type="string" expr="dc:coalesce($collection_name, dc:toString($a_gid))" />
+
+            <dc:element name="${facet_name}">
+              <dc:attribute name="factory" value="dummy" />
+              <dc:attribute name="target_out" value="${out}" /> 
+              <dc:attribute name="description" value="${label_temp}" />
+              <!--
+
+                <dc:attribute name="ids" value="${facet_num}" />
+                <dc:attribute name="artifact-id" value="${a_gid}" />
+                <dc:attribute name="out" value="${out_name}" />
+              -->
+
+              <!-- veg zones string as attribute -->
+              <dc:attribute name="data" value="${vegzonedata}" />
+            </dc:element>
+          </dc:for-each>
+        </dc:if>
+      </dc:filter>
+    </dc:macro>
+
   </datacage>
 </dc:template>
\ No newline at end of file

http://dive4elements.wald.intevation.org