diff artifacts/doc/conf/meta-data.xml @ 9499:853f2dafc16e

VegetationZones in CrossSectionsDiagram
author gernotbelger
date Thu, 27 Sep 2018 18:06:26 +0200
parents bb278c927b66
children 8b7bf26b8782
line wrap: on
line diff
--- a/artifacts/doc/conf/meta-data.xml	Wed Sep 26 15:48:05 2018 +0200
+++ b/artifacts/doc/conf/meta-data.xml	Thu Sep 27 18:06:26 2018 +0200
@@ -256,6 +256,7 @@
                     <dc:call-macro name="cross_sections" />
                     <dc:call-macro name="basedata_5_flood-protections" />
                     <dc:call-macro name="hyks" />
+                    <dc:call-macro name="predefined_vegetation_zones_cs" />
                   </dc:when>
                   <dc:comment> Duration curve </dc:comment>
                   <dc:when test="$out = 'duration_curve'">
@@ -492,8 +493,8 @@
                     </dc:when>
                     <dc:comment> Cross sections </dc:comment>
                     <dc:when test="$out = 'cross_section'">
-                      <dc:call-macro name="waterlevels" />
-                    </dc:when>
+                      <dc:call-macro name="cross_section_user_content" />
+                    </dc:when>                    
                     <dc:comment> Duration curve </dc:comment>
                     <dc:when test="$out = 'duration_curve'">
                       <dc:call-macro name="duration-curve" />
@@ -512,7 +513,6 @@
 
                     <dc:when test="$out = 'sinfo_flowdepth_waterlevels'">
                       <dc:call-macro name="longitudinal-section-fix-vollmer_w" />
-                      <!-- TODO: 'Frühere Berechnungen//Bezugswasserstände' -->
                     </dc:when>
                   </dc:choose>
                 </dc:iterate>
@@ -614,6 +614,11 @@
         </dc:if>
       </dc:filter>
     </dc:macro>
+    
+    <dc:macro name="cross_section_user_content">
+      <dc:call-macro name="waterlevels" />                    
+      <dc:call-macro name="vegetationzones" />
+    </dc:macro>
 
     <dc:macro name="waterlevels">
       <dc:filter expr="$out_name = 'cross_section'">
@@ -639,6 +644,8 @@
       </dc:filter>
     </dc:macro>
 
+
+
     <dc:macro name="collection-group">
       <dc:group expr="concat($river, ' ', dc:date-format('dd.MM.yyyy - H:mm:ss', $a_creation), ' ', $collection_name)">
         <dc:macro-body />
@@ -1324,6 +1331,15 @@
       </hyks>
     </dc:macro>
 
+ <!-- Default Vegetation Zones -->
+    <dc:macro name="predefined_vegetation_zones_cs">
+      <U-INFO>
+        <vegetation_zones> 
+          <dc:variable name="vegzonedata" expr="dc:defaultvegetationzone($river)"></dc:variable>
+            <defaultVegetationZone factory="dummy" target_out="{$out}" data="{$vegzonedata}"/>         
+        </vegetation_zones>
+      </U-INFO>
+    </dc:macro>
 
     <!-- wst-data -->
 
@@ -3297,6 +3313,7 @@
         </dc:comment>
         <dc:statement>
           SELECT c.name AS collection_name,
+          c.gid AS collection_gid,
           ma.id AS a_id,
           ma.state AS a_state,
           ma.gid AS a_gid,
@@ -3757,31 +3774,34 @@
 
     <!-- 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:filter expr="$a_state = 'state.uinfo.vegetation_zones' and $facet_name = 'uinfo_facet_vegetation_zones_cross_section'"> <!--'uinfo_facet_vegetation_zones_cross_section'" >  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:variable name="fromkm" type="number" expr="dc:fromValue(dc:get('ld_mode'),
-                             dc:get('ld_locations'), dc:get('ld_from'))" />
-            <dc:variable name="tokm" type="number" expr="dc:fromValue(dc:get('ld_mode'),
-                               dc:get('ld_locations'), dc:get('ld_to'))" />
-            <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}" />
-              <!-- veg zones string as attribute -->
-              <dc:attribute name="data" value="${vegzonedata}" />
-              <dc:attribute name="from_km" value="${fromkm}" />
-              <dc:attribute name="to_km" value="${tokm}" />
-            </dc:element>
-          </dc:for-each>
+          <vegetation_zones>
+            <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($collection_gid))" />
+              <dc:variable name="fromkm" type="number" expr="dc:fromValue(dc:get('ld_mode'), dc:get('ld_locations'), dc:get('ld_from'))" />
+              <dc:variable name="tokm" type="number" expr="dc:fromValue(dc:get('ld_mode'), dc:get('ld_locations'), dc:get('ld_to'))" />
+
+              <dc:element name="${facet_name}">
+                <dc:attribute name="factory" value="uinfo" />
+                <dc:attribute name="target_out" value="${out}" />
+                <dc:attribute name="description" value="${label_temp}" />
+                <dc:attribute name="artifact-id" value="${a_gid}" />
+                <dc:attribute name="out" value="${out_name}" />
+                <dc:attribute name="ids" value="${facet_num}" />
+                <!-- veg zones string as attribute -->
+                <dc:attribute name="data" value="${vegzonedata}" />
+                <dc:attribute name="from_km" value="${fromkm}" />
+                <dc:attribute name="to_km" value="${tokm}" /> 
+              </dc:element>
+            </dc:for-each>
+          </vegetation_zones>
         </dc:if>
       </dc:filter>
     </dc:macro>
 
-
     <!-- U-INFO -->
     <dc:macro name="bundu_bezugswst">
       <dc:filter

http://dive4elements.wald.intevation.org