comparison artifacts/doc/conf/meta-data.xml @ 6717:71da3d4ffb4a 3.0.13

issue1391: Some more unification fix km filtering for calculated discharges The km filtering still remains a problem for fix and historical
author Andre Heinecke <aheinecke@intevation.de>
date Tue, 30 Jul 2013 19:14:49 +0200
parents ed9cff319479
children 0db5f3642335
comparison
equal deleted inserted replaced
6716:b494a9cf25e5 6717:71da3d4ffb4a
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'"> 149 <dc:when test="$out = 'historical_discharge_wq'">
150 <dc:call-macro name="historical-discharge-curve"/> 150 <dc:call-macro name="historical_discharge_curve"/>
151 <dc:call-macro name="discharge_table_gauge"/> 151 <dc:call-macro name="discharge_table_gauge"/>
152 <dc:call-macro name="basedata_2_fixations_wqkms"/> 152 <dc:call-macro name="basedata_2_fixations_wqkms"/>
153 <dc:call-macro name="basedata_5_flood-protections"/> 153 <dc:call-macro name="basedata_5_flood-protections"/>
154 <dc:call-macro name="basedata_0"/> 154 <dc:call-macro name="basedata_0"/>
155 <dc:call-macro name="basedata_1_additionals"/> 155 <dc:call-macro name="basedata_1_additionals"/>
157 <computed_discharge_curve> 157 <computed_discharge_curve>
158 <dc:call-macro name="mainvalues"/> 158 <dc:call-macro name="mainvalues"/>
159 </computed_discharge_curve> 159 </computed_discharge_curve>
160 </dc:when> 160 </dc:when>
161 <dc:when test="$out = 'discharge_curve'"> 161 <dc:when test="$out = 'discharge_curve'">
162 <dc:call-macro name="historical-discharge-curve"/> 162 <dc:call-macro name="historical_discharge_curve"/>
163 <dc:call-macro name="discharge_table_gauge"/> 163 <dc:call-macro name="discharge_table_gauge"/>
164 <dc:call-macro name="basedata_2_fixations_wqkms"/> 164 <dc:call-macro name="basedata_2_fixations_wqkms"/>
165 <dc:call-macro name="basedata_5_flood-protections"/> 165 <dc:call-macro name="basedata_5_flood-protections"/>
166 <dc:call-macro name="basedata_0"/> 166 <dc:call-macro name="basedata_0"/>
167 <dc:call-macro name="basedata_1_additionals"/> 167 <dc:call-macro name="basedata_1_additionals"/>
183 <dc:call-macro name="basedata_2_fixations_relative_point"/> 183 <dc:call-macro name="basedata_2_fixations_relative_point"/>
184 <dc:call-macro name="basedata_4_heightmarks-points-relative_points"/> 184 <dc:call-macro name="basedata_4_heightmarks-points-relative_points"/>
185 <dc:call-macro name="basedata_5_flood-protections_relative_points"/> 185 <dc:call-macro name="basedata_5_flood-protections_relative_points"/>
186 </dc:when> 186 </dc:when>
187 <dc:when test="$out = 'fix_wq_curve'"> 187 <dc:when test="$out = 'fix_wq_curve'">
188 <dc:call-macro name="historical_discharge_curve"/>
189 <dc:call-macro name="discharge_table_gauge"/>
188 <dc:call-macro name="basedata_0_wq"/> 190 <dc:call-macro name="basedata_0_wq"/>
189 <dc:call-macro name="basedata_1_additionals_marks"/> 191 <dc:call-macro name="basedata_1_additionals_marks"/>
190 <dc:call-macro name="basedata_2_fixations_wqkms"/> 192 <dc:call-macro name="basedata_2_fixations_wqkms"/>
191 <dc:call-macro name="basedata_3_officials"/> 193 <dc:call-macro name="basedata_3_officials"/>
192 <dc:call-macro name="basedata_4_heightmarks-points"/> 194 <dc:call-macro name="basedata_4_heightmarks-points"/>
193 <dc:call-macro name="basedata_5_flood-protections_relative_points"/> 195 <dc:call-macro name="basedata_5_flood-protections_relative_points"/>
194 <dc:call-macro name="discharge_table_gauge"/>
195 </dc:when> 196 </dc:when>
196 <dc:when test="$out = 'fix_longitudinal_section_curve'"> 197 <dc:when test="$out = 'fix_longitudinal_section_curve'">
197 <dc:call-macro name="longitudinal-section-prototype"/> 198 <dc:call-macro name="longitudinal-section-prototype"/>
198 </dc:when> 199 </dc:when>
199 <dc:when test="$out = 'map'"> 200 <dc:when test="$out = 'map'">
275 <dc:call-macro name="flood-map-complete"/> 276 <dc:call-macro name="flood-map-complete"/>
276 </dc:otherwise> 277 </dc:otherwise>
277 </dc:choose> 278 </dc:choose>
278 </dc:when> 279 </dc:when>
279 <dc:when test="$out = 'computed_discharge_curve'"> 280 <dc:when test="$out = 'computed_discharge_curve'">
280 <dc:call-macro name="historical-discharge-curve"/> 281 <dc:call-macro name="historical_discharge_curve"/>
281 <dc:call-macro name="discharge_table_gauge"/> 282 <dc:call-macro name="discharge_table_gauge"/>
282 <dc:call-macro name="basedata_2_fixations_wqkms"/> 283 <dc:call-macro name="basedata_2_fixations_wqkms"/>
283 <dc:call-macro name="basedata_5_flood-protections"/> 284 <dc:call-macro name="basedata_5_flood-protections"/>
284 <dc:call-macro name="basedata_0"/> 285 <dc:call-macro name="basedata_0"/>
285 <dc:call-macro name="basedata_1_additionals"/> 286 <dc:call-macro name="basedata_1_additionals"/>
363 <dc:call-macro name="delta-wt"/> 364 <dc:call-macro name="delta-wt"/>
364 </dc:when> 365 </dc:when>
365 <dc:when test="$out = 'reference_curve'"> 366 <dc:when test="$out = 'reference_curve'">
366 <dc:call-macro name="reference-curves"/> 367 <dc:call-macro name="reference-curves"/>
367 </dc:when> 368 </dc:when>
368 <dc:when test="$out = 'computed_discharge_curve'">
369 <dc:call-macro name="computed-discharge-curve"/>
370 </dc:when>
371 <dc:when test="$out = 'cross_section'"> 369 <dc:when test="$out = 'cross_section'">
372 <dc:call-macro name="waterlevels"/> 370 <dc:call-macro name="waterlevels"/>
373 </dc:when> 371 </dc:when>
374 <dc:when test="$out = 'fix_longitudinal_section_curve'"> 372 <dc:when test="$out = 'fix_longitudinal_section_curve'">
375 <dc:call-macro name="longitudinal-section"/> 373 <dc:call-macro name="longitudinal-section"/>
376 </dc:when> 374 </dc:when>
377 <dc:when test="$out = 'fix_derivate_curve'"> 375 <dc:when test="$out = 'fix_derivate_curve'">
378 <dc:call-macro name="fix-derivate-curve"/> 376 <dc:call-macro name="fix-derivate-curve"/>
379 </dc:when> 377 </dc:when>
380 <dc:when test="$out = 'fix_wq_curve'"> 378 <dc:when test="$out = 'fix_wq_curve'">
381 <dc:call-macro name="historical-discharge-curve"/>
382 <dc:call-macro name="fix-wq-curve"/> 379 <dc:call-macro name="fix-wq-curve"/>
383 <dc:call-macro name="waterlevels-fix"/> 380 <dc:call-macro name="waterlevels-fix"/>
384 </dc:when> 381 </dc:when>
385 <dc:when test="$out = 'duration_curve'"> 382 <dc:when test="$out = 'duration_curve'">
386 <dc:call-macro name="duration-curve"/> 383 <dc:call-macro name="duration-curve"/>
482 </dc:if> 479 </dc:if>
483 </dc:filter> 480 </dc:filter>
484 </dc:macro> 481 </dc:macro>
485 482
486 483
487 <dc:macro name="historical-discharge-curve"> 484 <dc:macro name="historical_discharge_curve">
488 <dc:context> 485 <dc:context>
489 <dc:statement> 486 <dc:statement>
490 SELECT g.id AS gauge_id, 487 SELECT g.id AS gauge_id,
491 g.name AS gauge_name, 488 g.name AS gauge_name,
492 dt.id AS dt_id, 489 dt.id AS dt_id,
495 dt.description AS desc, 492 dt.description AS desc,
496 dt.bfg_id AS bfg_id 493 dt.bfg_id AS bfg_id
497 FROM gauges g 494 FROM gauges g
498 JOIN discharge_tables dt ON g.id = dt.gauge_id 495 JOIN discharge_tables dt ON g.id = dt.gauge_id
499 LEFT JOIN time_intervals t ON dt.time_interval_id = t.id 496 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} 497 WHERE g.river_id = ${river_id}
502 AND dt.kind &lt;&gt; 0 498 AND dt.kind &lt;&gt; 0
503 AND NOT((${tokm} &lt; r.a) or (${fromkm} &gt; r.b)) 499 AND g.station = ${fromkm}
500 AND g.station = ${tokm}
504 ORDER BY start_time 501 ORDER BY start_time
505 </dc:statement> 502 </dc:statement>
506 <dc:if test="dc:has-result()"> 503 <dc:if test="dc:has-result()">
507 <historical_discharge_curves> 504 <historical_discharge_curves>
508 <dc:group expr="$gauge_name"> 505 <dc:group expr="$gauge_name">
520 </historical_discharge_curves> 517 </historical_discharge_curves>
521 </dc:if> 518 </dc:if>
522 </dc:context> 519 </dc:context>
523 </dc:macro> 520 </dc:macro>
524 521
525
526 <dc:macro name="computed-discharge-curve">
527 <dc:filter expr="$facet_name = 'computed_discharge_curve.q'">
528 <dc:if test="dc:has-result()">
529 <computed_discharge_curves>
530 <dc:for-each>
531 <dc:element name="${facet_name}">
532 <dc:attribute name="description" value="${facet_description}"/>
533 <dc:attribute name="factory" value="winfo"/>
534 <dc:attribute name="target_out" value="${out}"/>
535 <dc:attribute name="artifact-id" value="${a_id}"/>
536 <dc:attribute name="ids" value="${a_id}"/>
537 <dc:attribute name="out" value="computed_discharge_curve"/>
538 </dc:element>
539 </dc:for-each>
540 </computed_discharge_curves>
541 </dc:if>
542 </dc:filter>
543 </dc:macro>
544 522
545 <dc:macro name="flood-map"> 523 <dc:macro name="flood-map">
546 <dc:filter expr="$facet_name = 'floodmap.wsplgen'"> 524 <dc:filter expr="$facet_name = 'floodmap.wsplgen'">
547 <dc:if test="dc:has-result()"> 525 <dc:if test="dc:has-result()">
548 <floodmap> 526 <floodmap>
1346 1324
1347 <dc:macro name="discharge_table_gauge"> 1325 <dc:macro name="discharge_table_gauge">
1348 <dc:context> 1326 <dc:context>
1349 <dc:statement> 1327 <dc:statement>
1350 SELECT g.id AS gauge_id, 1328 SELECT g.id AS gauge_id,
1351 g.name AS gauge_name 1329 g.name AS gauge_name,
1330 t.start_time AS start_time,
1331 t.stop_time AS stop_time
1352 FROM gauges g 1332 FROM gauges g
1353 LEFT JOIN ranges r ON g.range_id = r.id 1333 JOIN discharge_tables dt ON g.id = dt.gauge_id
1334 LEFT JOIN time_intervals t ON dt.time_interval_id = t.id
1354 WHERE g.river_id = ${river_id} 1335 WHERE g.river_id = ${river_id}
1355 AND NOT((${tokm} &lt; r.a) or (${fromkm} &gt; r.b)) 1336 AND dt.kind = 0
1337 AND g.station = ${fromkm}
1338 AND g.station = ${tokm}
1356 </dc:statement> 1339 </dc:statement>
1357 <dc:if test="dc:has-result()"> 1340 <dc:if test="dc:has-result()">
1358 <discharge_table_gauge> 1341 <current_gauge>
1359 <dc:for-each> 1342 <dc:for-each>
1360 <gauge name="{$gauge_name}" 1343 <gauge name="{$gauge_name} ({dc:date-format('dd.MM.yyyy', $start_time)})"
1361 factory="gaugedischarge" target_out="{$out}" 1344 factory="gaugedischarge" target_out="{$out}"
1362 ids="{$gauge_name}"/> 1345 ids="{$gauge_name}"/>
1363 </dc:for-each> 1346 </dc:for-each>
1364 </discharge_table_gauge> 1347 </current_gauge>
1365 </dc:if> 1348 </dc:if>
1366 </dc:context> 1349 </dc:context>
1367 </dc:macro> 1350 </dc:macro>
1368 1351
1369 <dc:macro name="qsectors"> 1352 <dc:macro name="qsectors">

http://dive4elements.wald.intevation.org