comparison artifacts/doc/conf/meta-data.xml @ 6691:f41ba63e7a43

issue1391: Unify datacage elements in discharge curve outs and add historical discharges
author Andre Heinecke <aheinecke@intevation.de>
date Mon, 29 Jul 2013 12:16:12 +0200
parents 0b0325d1ab7f
children ed9cff319479
comparison
equal deleted inserted replaced
6690:0b0325d1ab7f 6691:f41ba63e7a43
144 <dc:call-macro name="bedheight_differences"/> 144 <dc:call-macro name="bedheight_differences"/>
145 </dc:when> 145 </dc:when>
146 <dc:when test="$out = 'discharge_longitudinal_section'"> 146 <dc:when test="$out = 'discharge_longitudinal_section'">
147 <dc:call-macro name="longitudinal-section-prototype"/> 147 <dc:call-macro name="longitudinal-section-prototype"/>
148 </dc:when> 148 </dc:when>
149 <dc:when test="$out = 'historical_discharge_wq'">
150 <dc:call-macro name="historical-discharge-curve"/>
151 <dc:call-macro name="discharge_table_gauge"/>
152 <dc:call-macro name="basedata_2_fixations_wqkms"/>
153 <dc:call-macro name="basedata_5_flood-protections"/>
154 <dc:call-macro name="basedata_0"/>
155 <dc:call-macro name="basedata_1_additionals"/>
156 <dc:call-macro name="basedata_4_heightmarks-points"/>
157 <computed_discharge_curve>
158 <dc:call-macro name="mainvalues"/>
159 </computed_discharge_curve>
160 </dc:when>
149 <dc:when test="$out = 'discharge_curve'"> 161 <dc:when test="$out = 'discharge_curve'">
150 <dc:call-macro name="mainvalues"/> 162 <dc:call-macro name="historical-discharge-curve"/>
163 <dc:call-macro name="discharge_table_gauge"/>
164 <dc:call-macro name="basedata_2_fixations_wqkms"/>
165 <dc:call-macro name="basedata_5_flood-protections"/>
166 <dc:call-macro name="basedata_0"/>
167 <dc:call-macro name="basedata_1_additionals"/>
168 <dc:call-macro name="basedata_4_heightmarks-points"/>
169 <computed_discharge_curve>
170 <dc:call-macro name="mainvalues"/>
171 </computed_discharge_curve>
151 </dc:when> 172 </dc:when>
152 <dc:when test="$out = 'duration_curve'"> 173 <dc:when test="$out = 'duration_curve'">
153 <dc:call-macro name="mainvalues"/> 174 <dc:call-macro name="mainvalues"/>
154 <dc:call-macro name="basedata_2_fixations_relative_point"/> 175 <dc:call-macro name="basedata_2_fixations_relative_point"/>
155 <dc:call-macro name="basedata_4_heightmarks-points-relative_points"/> 176 <dc:call-macro name="basedata_4_heightmarks-points-relative_points"/>
254 <dc:call-macro name="flood-map-complete"/> 275 <dc:call-macro name="flood-map-complete"/>
255 </dc:otherwise> 276 </dc:otherwise>
256 </dc:choose> 277 </dc:choose>
257 </dc:when> 278 </dc:when>
258 <dc:when test="$out = 'computed_discharge_curve'"> 279 <dc:when test="$out = 'computed_discharge_curve'">
280 <dc:call-macro name="historical-discharge-curve"/>
259 <dc:call-macro name="discharge_table_gauge"/> 281 <dc:call-macro name="discharge_table_gauge"/>
260 <dc:call-macro name="basedata_2_fixations_wqkms"/> 282 <dc:call-macro name="basedata_2_fixations_wqkms"/>
261 <dc:call-macro name="basedata_5_flood-protections"/> 283 <dc:call-macro name="basedata_5_flood-protections"/>
262 <dc:call-macro name="basedata_0"/> 284 <dc:call-macro name="basedata_0"/>
263 <dc:call-macro name="basedata_1_additionals"/> 285 <dc:call-macro name="basedata_1_additionals"/>
354 </dc:when> 376 </dc:when>
355 <dc:when test="$out = 'fix_derivate_curve'"> 377 <dc:when test="$out = 'fix_derivate_curve'">
356 <dc:call-macro name="fix-derivate-curve"/> 378 <dc:call-macro name="fix-derivate-curve"/>
357 </dc:when> 379 </dc:when>
358 <dc:when test="$out = 'fix_wq_curve'"> 380 <dc:when test="$out = 'fix_wq_curve'">
381 <dc:call-macro name="historical-discharge-curve"/>
359 <dc:call-macro name="fix-wq-curve"/> 382 <dc:call-macro name="fix-wq-curve"/>
360 <dc:call-macro name="waterlevels-fix"/> 383 <dc:call-macro name="waterlevels-fix"/>
361 </dc:when> 384 </dc:when>
362 <dc:when test="$out = 'duration_curve'"> 385 <dc:when test="$out = 'duration_curve'">
363 <dc:call-macro name="duration-curve"/> 386 <dc:call-macro name="duration-curve"/>
457 </dc:for-each> 480 </dc:for-each>
458 </reference_curves> 481 </reference_curves>
459 </dc:if> 482 </dc:if>
460 </dc:filter> 483 </dc:filter>
461 </dc:macro> 484 </dc:macro>
485
486
487 <dc:macro name="historical-discharge-curve">
488 <dc:context>
489 <dc:statement>
490 SELECT g.id AS gauge_id,
491 g.name AS gauge_name,
492 dt.id AS dt_id,
493 t.start_time AS start_time,
494 t.stop_time AS stop_time,
495 dt.description AS desc,
496 dt.bfg_id AS bfg_id
497 FROM gauges g
498 JOIN discharge_tables dt ON g.id = dt.gauge_id
499 LEFT JOIN time_intervals t ON dt.time_interval_id = t.id
500 LEFT JOIN ranges r ON g.range_id = r.id
501 WHERE g.river_id = ${river_id}
502 AND dt.kind &lt;&gt; 0
503 AND NOT((${tokm} &lt; r.a) or (${fromkm} &gt; r.b))
504 ORDER BY start_time
505 </dc:statement>
506 <dc:if test="dc:has-result()">
507 <historical_discharge_curves>
508 <dc:group expr="$gauge_name">
509 <dc:for-each>
510 <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))"/>
511 <dc:message>
512 Hallo ANDRE23 {dc:dump-variables()}
513 </dc:message>
514 <histdis name="{$combined_desc}"
515 description="{$combined_desc}"
516 factory="gaugedischarge" target_out="{$out}"
517 ids="{$gauge_name};{$dt_id};{$combined_desc}"/>
518 </dc:for-each>
519 </dc:group>
520 </historical_discharge_curves>
521 </dc:if>
522 </dc:context>
523 </dc:macro>
524
462 525
463 <dc:macro name="computed-discharge-curve"> 526 <dc:macro name="computed-discharge-curve">
464 <dc:filter expr="$facet_name = 'computed_discharge_curve.q'"> 527 <dc:filter expr="$facet_name = 'computed_discharge_curve.q'">
465 <dc:if test="dc:has-result()"> 528 <dc:if test="dc:has-result()">
466 <computed_discharge_curves> 529 <computed_discharge_curves>

http://dive4elements.wald.intevation.org