[Dive4elements-commits] [PATCH 4 of 5] Added basedata and old calculations to middle bedheight dc and added new macros

Wald Commits scm-commit at wald.intevation.org
Fri Apr 12 09:42:36 CEST 2013


# HG changeset patch
# User Raimund Renkert <rrenkert at intevation.de>
# Date 1365752516 -7200
# Node ID dc731d2937f9e71b7e335a4f3756b0332e03ec82
# Parent  ab5db981044c5bfa9d735634de5b3a6a037c389c
Added basedata and old calculations to middle bedheight dc and added new macros.

diff -r ab5db981044c -r dc731d2937f9 flys-artifacts/doc/conf/meta-data.xml
--- a/flys-artifacts/doc/conf/meta-data.xml	Fri Apr 12 09:40:40 2013 +0200
+++ b/flys-artifacts/doc/conf/meta-data.xml	Fri Apr 12 09:41:56 2013 +0200
@@ -768,6 +768,11 @@
             </dc:comment>
             <dc:if test="dc:contains($artifact-outs, 'bedheight_middle')">
               <dc:call-macro name="sounding-width"/>
+              <dc:call-macro name="basedata_0"/>
+              <dc:call-macro name="basedata_1_additionals"/>
+              <dc:call-macro name="basedata_2_fixations"/>
+              <dc:call-macro name="basedata_3_officials"/>
+              <dc:call-macro name="annotations_per_type"/>
             </dc:if>
            <dc:comment comment="--- non-recommendations---"/>
           </dc:otherwise>
@@ -2884,6 +2889,99 @@
               </bedheight-differences>
             </dc:macro>
 
+            <dc:macro name="fixings-year">
+              <fixings>
+                <dc:for-each>
+                  <dc:context>
+                    <dc:call-macro name="range-filter">
+                      <dc:context>
+                        <dc:statement>
+                          SELECT ou.id AS oid
+                          FROM outs AS ou, artifacts AS ar
+                          WHERE
+                            ar.state = 'state.fix.vollmer.compute' AND
+                            ou.name = 'longitudinal_section'
+                        </dc:statement>
+                        <dc:for-each>
+                          <fix description="{$river} {$a_id} {$a_creation} {$collection_name}">
+                            <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 = 'longitudinal_section.w' AND
+                                      f.out_id = o.id         AND
+                                      o.artifact_id = ${a_id} AND
+                                      a.id = ${a_id}
+                              </dc:statement>
+                              <dc:for-each>
+                                <dc:element name="${facet_name}">
+                                  <dc:attribute name="factory" value="fixanalysis"/>
+                                  <dc:attribute name="description" value="${facet_description}"/>
+                                  <dc:attribute name="ids" value="${facet_num}-${facet_name}"/>
+                                  <dc:attribute name="artifact-id" value="${aid}"/>
+                                  <dc:attribute name="out" value="longitudinal_section"/>
+                                </dc:element>
+                              </dc:for-each>
+                            </dc:context>
+                          </fix>
+                        </dc:for-each>
+                      </dc:context>
+                    </dc:call-macro>
+                  </dc:context>
+                </dc:for-each>
+              </fixings>
+            </dc:macro>
+
+            <dc:macro name="waterlevels-discharge">
+              <waterlevels-discharge>
+                <dc:for-each>
+                  <dc:context>
+                    <dc:call-macro name="range-filter">
+                      <dc:context>
+                        <dc:statement>
+                          SELECT id AS oid
+                          FROM outs AS o
+                          WHERE
+                            o.artifact_id = ${a_id} AND
+                            o.name = 'discharge_longitudinal_section'
+                        </dc:statement>
+                        <dc:for-each>
+                          <discharge description="{$oid} {$river} {$a_id} {$a_creation} {$collection_name}">
+                            <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 = 'discharge_longitudinal_section.w' AND
+                                      f.out_id = o.id         AND
+                                      o.artifact_id = ${a_id} AND
+                                      a.id = ${a_id}
+                              </dc:statement>
+                              <dc:for-each>
+                                <dc:element name="${facet_name}">
+                                  <dc:attribute name="factory" value="winfo"/>
+                                  <dc:attribute name="description" value="${facet_description}"/>
+                                  <dc:attribute name="ids" value="${facet_num}-${facet_name}"/>
+                                  <dc:attribute name="artifact-id" value="${aid}"/>
+                                  <dc:attribute name="out" value="longitudinal_section"/>
+                                </dc:element>
+                              </dc:for-each>
+                            </dc:context>
+                          </discharge>
+                        </dc:for-each>
+                      </dc:context>
+                    </dc:call-macro>
+                  </dc:context>
+                </dc:for-each>
+              </waterlevels-discharge>
+            </dc:macro>
 
             <dc:if test="dc:contains($artifact-outs, 'longitudinal_section') or (dc:contains($artifact-outs, 'discharge_longitudinal_section') or (dc:contains($artifact-outs, 'w_differences')))">
               <dc:call-macro name="longitudinal"/>
@@ -2925,7 +3023,8 @@
               <dc:call-macro name="bed-difference"/>
             </dc:if>
             <dc:if test="dc:contains($artifact-outs, 'bedheight_middle')">
-              <dc:call-macro name="bed-height"/>
+              <dc:call-macro name="waterlevels-discharge"/>
+              <dc:call-macro name="waterlevels-fix"/>
             </dc:if>
             <dc:if test="dc:contains($artifact-outs, 'floodmap-hws')">
               <dc:call-macro name="floodmap-hws-user"/>


More information about the Dive4elements-commits mailing list