[PATCH] For fixation analysis, allow loading discharge curves from multiple gauges on calculation range via datacage
Wald Commits
scm-commit at wald.intevation.org
Mon Oct 20 12:23:30 CEST 2014
# HG changeset patch
# User "Tom Gottfried <tom at intevation.de>"
# Date 1413800591 -7200
# Node ID 48ed9019d8a14a86f947d0e68c3f1c4172b674e3
# Parent 706668b19b04c7f3fcdeabf7749ab250ee39a120
For fixation analysis, allow loading discharge curves from multiple gauges on calculation range via datacage.
diff -r 706668b19b04 -r 48ed9019d8a1 artifacts/doc/conf/meta-data.xml
--- 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>
More information about the Dive4Elements-commits
mailing list