[PATCH 7 of 7] issue1435: meta-data.xml: Add sedimentload/yield- part to minfo part of dc

Wald Commits scm-commit at wald.intevation.org
Fri Sep 27 14:33:31 CEST 2013


# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1380285723 -7200
# Node ID 851fc99be4bcc67835d6d116db4a032d22fe3aed
# Parent  4c8ce0c41dc244695ef9b03639f7a0ec00ffe9ba
issue1435: meta-data.xml: Add sedimentload/yield- part to minfo part of dc.

diff -r 4c8ce0c41dc2 -r 851fc99be4bc artifacts/doc/conf/meta-data.xml
--- a/artifacts/doc/conf/meta-data.xml	Fri Sep 27 14:40:39 2013 +0200
+++ b/artifacts/doc/conf/meta-data.xml	Fri Sep 27 14:42:03 2013 +0200
@@ -1225,9 +1225,39 @@
           <dc:call-macro name="basedata_7_waterlevels"/>
           <dc:call-macro name="minfo-heights"/>
           <dc:call-macro name="sounding-width"/>
+          <dc:call-macro name="yields"/>
       </minfo>
     </dc:macro>
 
+    <dc:macro name="yields">
+      <dc:context>
+        <dc:statement>
+            SELECT DISTINCT
+                sy.id AS syid,
+                sy.description AS description,
+                ti.start_time AS year
+            FROM     sediment_yield sy
+                JOIN rivers r ON sy.river_id = r.id
+                JOIN sediment_yield_values syv ON sy.id = syv.sediment_yield_id
+                JOIN time_intervals ti ON sy.time_interval_id = ti.id
+            WHERE   r.name = 'Elbe'
+                AND ti.stop_time IS NULL
+                AND syv.station BETWEEN ${fromkm} AND ${tokm}
+        </dc:statement>
+        <dc:if test="dc:has-result()">
+          <dc:for-each>
+            <year description="{$description}"
+                    factory="sedimentyield"
+                    target_out="{$out}"
+                    info="infome"
+                  ids="{$syid}" />
+<!-- or epoch -->
+          </dc:for-each>
+        </dc:if>
+      </dc:context>
+    </dc:macro>
+
+
     <dc:macro name="basedata_5_flood-protections">
       <dc:filter expr="$kind=5">
         <dc:if test="dc:has-result()">


More information about the Dive4elements-commits mailing list