changeset 8419:d7d74392cc46

Do not filter bed heights by year in datacage for optional data (plus some cleanup).
author Tom Gottfried <tom@intevation.de>
date Fri, 17 Oct 2014 11:44:01 +0200
parents 536a1c0c8a81
children 8a14605fb64a
files artifacts/doc/conf/meta-data.xml
diffstat 1 files changed, 32 insertions(+), 33 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/doc/conf/meta-data.xml	Thu Oct 16 16:45:53 2014 +0200
+++ b/artifacts/doc/conf/meta-data.xml	Fri Oct 17 11:44:01 2014 +0200
@@ -1796,6 +1796,7 @@
       </rastermap>
     </dc:macro>
 
+    <!-- bed heights -->
     <dc:macro name="minfo-heights-diff">
       <dc:call-macro name="minfo-heights-years">
         <dc:context>
@@ -1881,15 +1882,6 @@
       </dc:group>
     </dc:macro>
 
-    <dc:macro name="minfo-heights">
-      <dc:call-macro name="minfo-heights-years">
-        <bedheights>
-          <dc:call-macro name="bed-heights-single"/>
-          <dc:call-macro name="bed-heights-epoch"/>
-        </bedheights>
-      </dc:call-macro>
-    </dc:macro>
-
     <dc:macro name="minfo-heights-years">
         <dc:comment>
         The input here is a list differenc ids noted in the
@@ -1940,27 +1932,11 @@
       <dc:macro-body/>
     </dc:macro>
 
-    <dc:macro name="bed-heights-statement">
-      <dc:statement>
-        SELECT bhs.id          AS bedh_id,
-            bhs.year        AS bedh_year,
-            bhs.description AS bedh_descr,
-            bhs.description || '&lt;BR&gt;Jahr: ' || bhs.year ||
-            '&lt;BR&gt;Aufnahmeart: ' || bht.name ||
-            '&lt;BR&gt;Lagesystem: ' || ls.name ||
-            '&lt;BR&gt;Höhensystem: ' || cur_em.name ||
-            '&lt;BR&gt;ursprüngliches Höhensystem: ' || old_em.name ||
-            '&lt;BR&gt;Strecke: ' || round(r.a, 1) || '-' || round(r.b, 1) ||
-            '&lt;BR&gt;Auswerter: ' || bhs.evaluation_by AS info
-        FROM bed_height_single bhs
-        JOIN bed_height_type bht ON bht.id = bhs.type_id
-        JOIN location_system ls ON ls.id = location_system_id
-        JOIN elevation_model cur_em ON cur_em.id = cur_elevation_model_id
-        JOIN elevation_model old_em ON old_em.id = old_elevation_model_id
-        JOIN ranges r ON r.id = range_id
-        WHERE bhs.river_id = ${river_id}
-            AND bhs.year BETWEEN ${year_from} AND ${year_to}
-      </dc:statement>
+    <dc:macro name="minfo-heights">
+      <bedheights>
+        <dc:call-macro name="bed-heights-single"/>
+        <dc:call-macro name="bed-heights-epoch"/>
+      </bedheights>
     </dc:macro>
 
     <dc:macro name="bed-heights-factory">
@@ -1979,10 +1955,10 @@
           <dc:call-macro name="bed-heights-statement"/>
           <dc:filter expr="not(contains($bedh_descr, 'Epoche'))">
             <dc:if test="dc:has-result()">
-              <dc:group expr="$bedh_year">
-                <cross-sections name="{dc:group-key()}">
+              <dc:group expr="dc:coalesce($bedh_year, 'sonstige')">
+                <heights name="{dc:group-key()}">
                   <dc:call-macro name="bed-heights-factory"/>
-                </cross-sections>
+                </heights>
               </dc:group>
             </dc:if>
           </dc:filter>
@@ -2001,6 +1977,29 @@
       </epoch>
     </dc:macro>
 
+    <dc:macro name="bed-heights-statement">
+      <dc:statement>
+        SELECT bhs.id       AS bedh_id,
+            bhs.year        AS bedh_year,
+            bhs.description AS bedh_descr,
+            bhs.description || '&lt;BR&gt;Jahr: ' || bhs.year ||
+            '&lt;BR&gt;Aufnahmeart: ' || bht.name ||
+            '&lt;BR&gt;Lagesystem: ' || ls.name ||
+            '&lt;BR&gt;Höhensystem: ' || cur_em.name ||
+            '&lt;BR&gt;ursprüngliches Höhensystem: ' || old_em.name ||
+            '&lt;BR&gt;Strecke: ' || round(r.a, 1) || '-' || round(r.b, 1) ||
+            '&lt;BR&gt;Auswerter: ' || bhs.evaluation_by AS info
+        FROM bed_height_single bhs
+        JOIN bed_height_type bht ON bht.id = bhs.type_id
+        JOIN location_system ls ON ls.id = location_system_id
+        JOIN elevation_model cur_em ON cur_em.id = cur_elevation_model_id
+        JOIN elevation_model old_em ON old_em.id = old_elevation_model_id
+        JOIN ranges r ON r.id = range_id
+        WHERE bhs.river_id = ${river_id}
+      </dc:statement>
+    </dc:macro>
+
+    <!-- flow velocity -->
     <dc:macro name="flow_velocity_models">
       <dc:context>
         <dc:statement>

http://dive4elements.wald.intevation.org