diff artifacts/doc/conf/meta-data.xml @ 9035:c16e90a0baf7

Added datacage select and chart display for modelled flow depth series loaded from database
author mschaefer
date Mon, 30 Apr 2018 16:00:12 +0200
parents 384eee4b4135
children c49b95820d60
line wrap: on
line diff
--- a/artifacts/doc/conf/meta-data.xml	Mon Apr 30 10:13:15 2018 +0200
+++ b/artifacts/doc/conf/meta-data.xml	Mon Apr 30 16:00:12 2018 +0200
@@ -1636,6 +1636,10 @@
           <dc:call-macro name="sinfo_predefined_depthevol-aktuell"/>
           <dc:call-macro name="sinfo_predefined_depthevol-etappe"/>
         </sinfo_predefined_depthevol>
+        
+        <sinfo_predefined_flowdepth>
+          <dc:call-macro name="sinfo_predefined_flowdepth-m"/>
+        </sinfo_predefined_flowdepth>
       </sinfo>
     </dc:macro>
 
@@ -3488,21 +3492,24 @@
     <dc:macro name="sinfo_predefined_tkh">
       <dc:context>
         <dc:statement>
-          SELECT tc.tkh_id AS tkh_id, tc.id AS tkh_col_id, tc.name AS tkh_col_name,
-            MIN(t.filename) AS tkh_name, MIN(tv.station) AS km_min, MAX(tv.station) AS km_max,
-            MIN(t.filename) || '&lt;br /&gt;' || MIN(t.sounding_info) || '&lt;br /&gt;' || MIN(t.evaluation_by) AS info
-          FROM tkh_column tc INNER JOIN tkh t ON tc.tkh_id=t.id
-            INNER JOIN tkh_values tv ON tc.id=tv.tkh_column_id
-          WHERE (t.river_id=${river_id})
-          AND (lower(t.groupname)=${tkh_groupname})
-          GROUP BY tc.tkh_id, tc.id
-          ORDER BY tc.id
+          SELECT sc.tkh_id AS tkh_id, sc.id AS tkh_col_id, sc.name AS tkh_col_name,
+            MIN(s.filename) AS tkh_name, 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.sounding_info) || '&lt;br /&gt;'
+            || 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
+          WHERE (s.river_id=${river_id})
+          AND (lower(s.groupname)=${tkh_groupname})
+          GROUP BY sc.tkh_id, sc.id
+          ORDER BY sc.id
         </dc:statement>
         <dc:if test="dc:has-result()">
           <dc:group expr="$tkh_name">
             <tkhx name="{dc:group-key()}">
               <dc:for-each>
-                <tkhcolumn name="{$tkh_col_name}" ids="tkhx-{$tkh_col_id}-{$tkh_id}" factory="tkhxf" target_out="{$out}" info="{$tkh_name}&lt;br /&gt;[km {$km_min} - {$km_max}]"/>
+                <tkhcolumn name="{$tkh_col_name}" ids="tkhx-{$tkh_col_id}-{$tkh_id}" factory="tkhxf" target_out="{$out}" info="{$info}"/>
               </dc:for-each>
             </tkhx>
           </dc:group>
@@ -3530,9 +3537,10 @@
         <dc:statement>
           SELECT s.id AS depthevol_id, s.filename AS depthevol_name, MIN(v.station) AS km_min, MAX(v.station) AS km_max,
             s.filename || '&lt;br /&gt;'
+            || '[km ' || MIN(v.station) || ' - ' || MAX(v.station) || ']&lt;br /&gt;'
             || MIN(s.start_year) || ' - ' || MIN(s.reference_year) || '&lt;br /&gt;'
             || MIN(s.old_sounding) || ' - ' || MIN(s.curr_sounding) || '&lt;br /&gt;'
-            || MIN(s.old_glw) || ' - ' || MIN(s.curr_glw) AS info
+            || MIN(s.old_glw) || ' - ' || MIN(s.curr_glw)                             AS info
           FROM depth_evolution s INNER JOIN depth_evolution_values v ON s.id=v.depth_evolution_id
           WHERE (s.river_id=${river_id})
           AND (lower(s.groupname)=${depthevol_groupname})
@@ -3540,10 +3548,42 @@
           ORDER BY s.id
         </dc:statement>
         <dc:for-each>
-          <depth_evol name="{$depthevol_name}" ids="depthevolx-{$depthevol_id}-{$depthevol_name}" factory="depthevolxf" target_out="{$out}" info="{$depthevol_name}&lt;br /&gt;[km {$km_min} - {$km_max}]"/>
+          <depth_evol name="{$depthevol_name}" ids="depthevolx-{$depthevol_id}-{$depthevol_name}" factory="depthevolxf" target_out="{$out}" info="{$info}"/>
         </dc:for-each>
       </dc:context>
     </dc:macro>
 
+    <!-- flow depth imported from CSV-files for S-INFO -->
+    <dc:macro name="sinfo_predefined_flowdepth-m">
+      <dc:call-macro name="sinfo_predefined_flowdepth-m1"/>
+    </dc:macro>
+    
+    <dc:macro name="sinfo_predefined_flowdepth-m1">
+      <dc:context>
+        <dc:statement>
+          SELECT sc.flow_depth_id AS flowdepth_id, sc.id AS flowdepth_col_id, sc.name AS flowdepth_col_name,
+            MIN(s.filename) AS flowdepth_name, 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.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_values v ON sc.id=v.flow_depth_column_id
+          WHERE (s.river_id=${river_id})
+          GROUP BY sc.flow_depth_id, sc.id
+          ORDER BY sc.id
+        </dc:statement>
+        <dc:if test="dc:has-result()">
+          <dc:group expr="$flowdepth_name">
+            <flowdepthx name="{dc:group-key()}">
+              <dc:for-each>
+                <flowdepthcolumn name="{$flowdepth_col_name}" ids="flowdepthx-{$flowdepth_col_id}-{$flowdepth_id}" factory="flowdepthxf" target_out="{$out}" info="{$info}"/>
+              </dc:for-each>
+            </flowdepthx>
+          </dc:group>
+        </dc:if>
+      </dc:context>
+    </dc:macro>
+
   </datacage>
 </dc:template>
\ No newline at end of file

http://dive4elements.wald.intevation.org