[PATCH 4 of 5] issue1345: Added macro for the differing epoch-description, extended query

Wald Commits scm-commit at wald.intevation.org
Thu Oct 10 11:16:59 CEST 2013


# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1381396936 -7200
# Node ID 237d5305b1a9f804fe726559267c2ffa02af17c4
# Parent  03fa985dd0440b5fdb4857f851d7b3f464dd214c
issue1345: Added macro for the differing epoch-description, extended query.

diff -r 03fa985dd044 -r 237d5305b1a9 artifacts/doc/conf/meta-data.xml
--- a/artifacts/doc/conf/meta-data.xml	Thu Oct 10 11:19:30 2013 +0200
+++ b/artifacts/doc/conf/meta-data.xml	Thu Oct 10 11:22:16 2013 +0200
@@ -1306,6 +1306,18 @@
       </dc:for-each>
     </dc:macro>
 
+    <dc:macro name="epoch-load">
+      <dc:for-each>
+          <dc:variable name="syear" type="string" expr="dc:date-format('yyyy', $startyear)"/>
+          <dc:variable name="eyear" type="string" expr="dc:date-format('yyyy', $stopyear)"/>
+          <year description="{$syear}-${eyear}"
+                 factory="sedimentyield"
+                 target_out="{$out}"
+                 info="{$description}"
+                ids="{$syid}" />
+      </dc:for-each>
+    </dc:macro>
+
     <dc:macro name="loads">
      <dc:if test="dc:has-result()">
        <dc:filter expr="$fraction='sand'">
@@ -1382,7 +1394,8 @@
             SELECT DISTINCT
                 sy.id          AS syid,
                 sy.description AS description,
-                ti.start_time  AS year,
+                ti.start_time  AS startyear,
+                ti.stop_time   AS endyear,
                 gf.name        AS fraction
             FROM     sediment_yield sy
                 JOIN rivers r ON sy.river_id = r.id


More information about the Dive4elements-commits mailing list