diff artifacts/doc/conf/meta-data.xml @ 9112:189cc8ededbd

Added datacage select and chart display for river channel sizes loaded from database
author mschaefer
date Mon, 04 Jun 2018 08:36:09 +0200
parents ee77e544e890
children bfc0da2aa3aa
line wrap: on
line diff
--- a/artifacts/doc/conf/meta-data.xml	Mon Jun 04 08:32:25 2018 +0200
+++ b/artifacts/doc/conf/meta-data.xml	Mon Jun 04 08:36:09 2018 +0200
@@ -1614,6 +1614,10 @@
           <dc:call-macro name="sinfo_predefined_flowdepth-m"/>
         </sinfo_predefined_flowdepths>
 
+        <sinfo_predefined_channel>
+          <dc:call-macro name="sinfo_predefined_channel"/>
+        </sinfo_predefined_channel>
+
         <sinfo_predefined_tkh>
           <dc:call-macro name="sinfo_predefined_tkh-berechnung"/>
           <dc:call-macro name="sinfo_predefined_tkh-messung"/>
@@ -3411,6 +3415,28 @@
       </dc:filter>
     </dc:macro>
 
+    <!-- channel size imported from CSV-files for S-INFO -->
+    <dc:macro name="sinfo_predefined_channel">
+      <dc:context>
+        <dc:statement>
+          SELECT s.id AS id, MIN(s.filename) AS seriesname, MIN(v.station) AS km_min, MAX(v.station) AS km_max,
+          MIN(s.filename) || '&lt;br /&gt;'
+          || '[km ' || MIN(v.station) || ' - ' || MAX(v.station) || ']&lt;br /&gt;'
+          || MIN(s.year_from) || ' - ' || MIN(s.year_to) || '&lt;br /&gt;' AS info
+          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)
+          GROUP BY s.id
+          ORDER BY MIN(s.year_to) DESC;
+        </dc:statement>
+        <dc:if test="dc:has-result()">
+          <dc:for-each>
+            <channelseries name="{$seriesname}" ids="channelx-{$id}-{$seriesname}" factory="channelf" target_out="{$out}" info="{$info}"/>
+          </dc:for-each>
+        </dc:if>
+      </dc:context>
+    </dc:macro>
+
     <!-- tkh imported from CSV-files for S-INFO -->
     <dc:macro name="sinfo_predefined_tkh-berechnung">
       <predefined_tkh_berechnung>

http://dive4elements.wald.intevation.org