[Dive4elements-commits] [PATCH] Added new macro for deltaW ls and removed the old one. Use the new macro in bed

Wald Commits scm-commit at wald.intevation.org
Thu Apr 18 11:52:28 CEST 2013


# HG changeset patch
# User Raimund Renkert <rrenkert at intevation.de>
# Date 1366278713 -7200
# Node ID c59ba0eade8e42896851f3714a86c45e4d384469
# Parent  036d5591e65df2845c9b8bb4982cafe400e80b7f
Added new macro for deltaW ls and removed the old one. Use the new macro in bed
differences.

diff -r 036d5591e65d -r c59ba0eade8e flys-artifacts/doc/conf/meta-data.xml
--- a/flys-artifacts/doc/conf/meta-data.xml	Thu Apr 18 11:41:55 2013 +0200
+++ b/flys-artifacts/doc/conf/meta-data.xml	Thu Apr 18 11:51:53 2013 +0200
@@ -2233,6 +2233,47 @@
               </waterlevels>
             </dc:macro>
 
+            <dc:macro name="delta-wt-ls">
+              <waterlevels>
+                <dc:for-each>
+                  <dc:context>
+                    <dc:call-macro name="range-filter">
+                      <dc:context>
+                        <dc:statement>
+                          SELECT id AS out_id
+                          FROM outs
+                          WHERE artifact_id = ${a_id} AND name = 'fix_deltawt_curve'
+                        </dc:statement>
+                        <dc:for-each>
+                          <dc:context>
+                            <dc:statement>
+                              SELECT name AS facet_name, num AS facet_num, description AS facet_description
+                              FROM facets
+                              WHERE out_id = ${out_id} and (
+                                name LIKE 'fix_sector_average_dwt%' OR
+                                name LIKE 'fix_deviation_dwt%')
+                              ORDER BY num ASC, name DESC
+                            </dc:statement>
+                            <waterlevels description="{$river} {$a_creation} {$collection_name}">
+                              <dc:for-each>
+                                <dc:element name="${facet_name}">
+                                  <dc:attribute name="description" value="${facet_description}"/>
+                                  <dc:attribute name="ids" value="${facet_num}"/>
+                                  <dc:attribute name="factory" value="fixanalysis"/>
+                                  <dc:attribute name="artifact-id" value="${a_gid}"/>
+                                  <dc:attribute name="out" value="fix_deltawt_curve"/>
+                                </dc:element>
+                              </dc:for-each>
+                            </waterlevels>
+                          </dc:context>
+                        </dc:for-each>
+                      </dc:context>
+                    </dc:call-macro>
+                  </dc:context>
+                </dc:for-each>
+              </waterlevels>
+            </dc:macro>
+
             <dc:macro name="fix-derivate-curve">
               <waterlevels>
                 <dc:for-each>
@@ -2434,50 +2475,6 @@
             </dc:macro>
 
             <dc:comment>
-              MINFO bedheight difference
-            </dc:comment>
-
-            <dc:macro name="bed-difference">
-              <fix_longitudinal_section_curve>
-                <dc:for-each>
-                  <dc:context>
-                    <dc:call-macro name="range-filter">
-                      <dc:context>
-                        <dc:statement>
-                          SELECT a.gid         AS aid,
-                                 f.id          AS fid,
-                                 f.name        AS facet_name,
-                                 f.num         AS facet_num,
-                                 f.description AS facet_description
-                          FROM outs AS o, facets AS f, artifacts AS a
-                          WHERE (
-                              f.name = 'fix_sector_average_ls_0' OR
-                              f.name = 'fix_sector_average_ls_1' OR
-                              f.name = 'fix_sector_average_ls_2' OR
-                              f.name = 'fix_sector_average_ls_3' OR
-                              f.name = 'fix_analysis_events_ls'  OR
-                              f.name = 'fix_reference_events_ls'
-                              ) AND f.out_id = o.id AND o.artifact_id = ${a_id} AND a.id = ${a_id}
-                        </dc:statement>
-                        <fix_longitudinal_section_curve description="{$river} {$a_creation} {$collection_name}">
-                          <dc:for-each>
-                            <dc:element name="${facet_name}">
-                              <dc:attribute name="description" value="${facet_description}"/>
-                              <dc:attribute name="factory" value="fixanalysis"/>
-                              <dc:attribute name="artifact-id" value="${aid}"/>
-                              <dc:attribute name="ids" value="${facet_num}"/>
-                              <dc:attribute name="out" value="fix_longitudinal_section_curve"/>
-                            </dc:element>
-                          </dc:for-each>
-                        </fix_longitudinal_section_curve>
-                      </dc:context>
-                    </dc:call-macro>
-                  </dc:context>
-                </dc:for-each>
-              </fix_longitudinal_section_curve>
-            </dc:macro>
-
-            <dc:comment>
               MINFO bedheight middle
             </dc:comment>
 
@@ -3060,6 +3057,7 @@
               <dc:call-macro name="bedheight-differences"/>
               <dc:call-macro name="differences"/>
               <dc:call-macro name="waterlevels-fix"/>
+              <dc:call-macro name="delta-wt-ls"/>
             </dc:if>
           </dc:context>
         </dc:call-macro>


More information about the Dive4elements-commits mailing list