[Dive4elements-commits] [PATCH 4 of 6] Add datacage logic for MINFO bed differences

Wald Commits scm-commit at wald.intevation.org
Fri Nov 2 15:57:13 CET 2012


# HG changeset patch
# User Björn Ricks <bjoern.ricks at intevation.de>
# Date 1351867965 -3600
# Node ID 8c7e765219041a1acd230a9b38e5c92c38bd8277
# Parent  8eb1d6dc96a99f8c5c1eabcead64547011249d6d
Add datacage logic for MINFO bed differences

The datacage will display already calculated fixanalysis data for longitudinal
section curves.

diff -r 8eb1d6dc96a9 -r 8c7e76521904 flys-artifacts/doc/conf/meta-data.xml
--- a/flys-artifacts/doc/conf/meta-data.xml	Fri Nov 02 15:50:35 2012 +0100
+++ b/flys-artifacts/doc/conf/meta-data.xml	Fri Nov 02 15:52:45 2012 +0100
@@ -1939,6 +1939,49 @@
           </floodmap>
         </dc:if>
 
+        <dc:comment>
+          MINFO bedheight difference
+        </dc:comment>
+
+        <dc:if test="dc:contains($artifact-outs, 'bed_difference_year') or dc:contains($artifact-outs, 'bed_difference_height_year')">
+          <fix_longitudinal_section_curve>
+            <dc:elements>
+                <dc:context>
+                  <dc:statement>
+                    SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation
+                    FROM   master_artifacts m
+                    WHERE  m.collection_id = ${collection_id} AND m.gid <> CAST(${artifact-id} AS uuid)
+                    AND EXISTS (
+                        SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river})
+                  </dc:statement>
+                  <dc:elements>
+                      <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>
+                            <dc:attribute name="description" value="${river} ${a_creation} ${collection_name}"/>
+                            <dc:elements>
+                            <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:elements>
+                        </fix_longitudinal_section_curve>
+                        </dc:context>
+                    </dc:elements>
+                </dc:context>
+            </dc:elements>
+          </fix_longitudinal_section_curve>
+        </dc:if>
+
       </dc:context>
       </old_calculations>
 


More information about the Dive4elements-commits mailing list