changeset 8434:48ed9019d8a1

For fixation analysis, allow loading discharge curves from multiple gauges on calculation range via datacage.
author "Tom Gottfried <tom@intevation.de>"
date Mon, 20 Oct 2014 12:23:11 +0200
parents 706668b19b04
children 6ebad936d82b
files artifacts/doc/conf/meta-data.xml
diffstat 1 files changed, 24 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/doc/conf/meta-data.xml	Fri Oct 17 19:21:45 2014 +0200
+++ b/artifacts/doc/conf/meta-data.xml	Mon Oct 20 12:23:11 2014 +0200
@@ -1024,10 +1024,14 @@
       <dc:context>
         <dc:call-macro name="discharge_curves"/>
         <dc:filter expr="$kind = 0">
-          <dc:for-each>
-            <current_gauge factory="gaugedischarge" target_out="{$out}"
-                           ids="{$gauge_name}"/>
-          </dc:for-each>
+          <dc:group expr="$gauge_name">
+            <gauge name="{dc:group-key()}">
+              <dc:for-each>
+                <current_gauge factory="gaugedischarge" target_out="{$out}"
+                               ids="{$gauge_name}"/>
+              </dc:for-each>
+            </gauge>
+          </dc:group>
         </dc:filter>
       </dc:context>
     </dc:macro>
@@ -1039,17 +1043,21 @@
         <dc:call-macro name="discharge_curves"/>
         <dc:filter expr="$kind = 1">
           <historical_discharge_curves>
-            <dc:for-each>
-              <dc:variable name="combined_desc"
-                           expr="concat($bfg_id, ' ',
-                                 dc:date-format('dd.MM.yyyy', $start_time),
-                                 ' - ',
-                                 dc:date-format('dd.MM.yyyy', $stop_time))"/>
-              <histdis name="{$combined_desc}"
-                       description="{$combined_desc}"
-                       factory="gaugedischarge" target_out="{$out}"
-                       ids="{$gauge_name};{$dt_id};{$combined_desc}"/>
-            </dc:for-each>
+            <dc:group expr="$gauge_name">
+              <gauge name="{dc:group-key()}">
+                <dc:for-each>
+                  <dc:variable name="combined_desc"
+                               expr="concat($bfg_id, ' ',
+                                     dc:date-format('dd.MM.yyyy', $start_time),
+                                     ' - ',
+                                     dc:date-format('dd.MM.yyyy', $stop_time))"/>
+                  <histdis name="{$combined_desc}"
+                           description="{$combined_desc}"
+                           factory="gaugedischarge" target_out="{$out}"
+                           ids="{$gauge_name};{$dt_id};{$combined_desc}"/>
+                </dc:for-each>
+              </gauge>
+            </dc:group>
           </historical_discharge_curves>
         </dc:filter>
       </dc:context>
@@ -1067,7 +1075,7 @@
           JOIN discharge_tables dt ON g.id = dt.gauge_id
           LEFT JOIN time_intervals t ON dt.time_interval_id = t.id
           WHERE g.river_id = ${river_id}
-            AND ((g.station = ${fromkm} AND g.station = ${tokm})
+            AND ((g.station BETWEEN ${fromkm} AND ${tokm})
               OR g.official_number = ${refgauge})
           ORDER BY start_time
       </dc:statement>

http://dive4elements.wald.intevation.org