Mercurial > dive4elements > river
comparison flys-artifacts/doc/conf/meta-data.xml @ 3786:4adc35aa655c
merged flys-artifacts/2.9.1
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Fri, 28 Sep 2012 12:14:47 +0200 |
parents | 096598c3bd30 |
children | 2ca035dbc838 |
comparison
equal
deleted
inserted
replaced
3719:e82acd5c86f7 | 3786:4adc35aa655c |
---|---|
1 <?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
2 <dc:template xmlns:dc="http://www.intevation.org/2011/Datacage"> | |
3 <datacage> | |
4 <dc:macro name="load-system"> | |
5 <dc:context connection="system"> | |
6 <dc:statement> | |
7 SELECT id AS river_id, name as river_name FROM rivers | |
8 WHERE lower(name) LIKE lower(${river}) | |
9 </dc:statement> | |
10 <dc:elements> | |
11 <dc:comment> | |
12 Base-data macros (mostly data imported from wst-files) | |
13 </dc:comment> | |
14 <dc:macro name="basedata_0"> | |
15 <dc:comment comment=" BASEDATA ---------------------------"/> | |
16 <basedata> | |
17 <dc:context> | |
18 <dc:statement> | |
19 SELECT id AS prot_id, | |
20 description AS prot_description | |
21 FROM wsts WHERE kind = 0 AND river_id = ${river_id} | |
22 </dc:statement> | |
23 <dc:elements> | |
24 <basedata> | |
25 <dc:attribute name="name" value="${prot_description}"/> | |
26 <dc:context> | |
27 <dc:statement> | |
28 SELECT id AS prot_column_id, | |
29 name AS prot_column_name, | |
30 position AS prot_rel_pos, | |
31 description AS info | |
32 FROM wst_columns WHERE wst_id = ${prot_id} | |
33 ORDER by position | |
34 </dc:statement> | |
35 <dc:elements> | |
36 <column> | |
37 <dc:attribute name="name" value="${prot_column_name}"/> | |
38 <dc:attribute name="ids" value="base_data-wstv-${prot_rel_pos}-${prot_id}"/> | |
39 <dc:attribute name="factory" value="staticwkms"/> | |
40 <dc:attribute name="info" value="${info}"/> | |
41 </column> | |
42 </dc:elements> | |
43 </dc:context> | |
44 </basedata> | |
45 </dc:elements> | |
46 </dc:context> | |
47 </basedata> | |
48 </dc:macro> | |
49 <dc:macro name="basedata_0_wq"> | |
50 <dc:comment comment=" BASEDATA ---------------------------"/> | |
51 <basedata> | |
52 <dc:context> | |
53 <dc:statement> | |
54 SELECT id AS prot_id, | |
55 description AS prot_description | |
56 FROM wsts WHERE kind = 0 AND river_id = ${river_id} | |
57 </dc:statement> | |
58 <dc:elements> | |
59 <basedata> | |
60 <dc:attribute name="name" value="${prot_description}"/> | |
61 <dc:context> | |
62 <dc:statement> | |
63 SELECT id AS prot_column_id, | |
64 name AS prot_column_name, | |
65 position AS prot_rel_pos, | |
66 description AS info | |
67 FROM wst_columns WHERE wst_id = ${prot_id} | |
68 ORDER by position | |
69 </dc:statement> | |
70 <dc:elements> | |
71 <column> | |
72 <dc:attribute name="name" value="${prot_column_name}"/> | |
73 <dc:attribute name="ids" value="base_data-wstv-${prot_rel_pos}-${prot_id}"/> | |
74 <dc:attribute name="factory" value="wqinterpol"/> | |
75 <dc:attribute name="info" value="${info}"/> | |
76 </column> | |
77 </dc:elements> | |
78 </dc:context> | |
79 </basedata> | |
80 </dc:elements> | |
81 </dc:context> | |
82 </basedata> | |
83 </dc:macro> | |
84 | |
85 <dc:macro name="basedata_1_additionals"> | |
86 <dc:comment comment=".ZUS -------------------------------"/> | |
87 <additionals> | |
88 <dc:context> | |
89 <dc:statement> | |
90 SELECT id AS prot_id, | |
91 description AS prot_description | |
92 FROM wsts WHERE kind = 1 AND river_id = ${river_id} | |
93 </dc:statement> | |
94 <dc:elements> | |
95 <additional> | |
96 <dc:attribute name="name" value="${prot_description}"/> | |
97 <dc:context> | |
98 <dc:statement> | |
99 SELECT id AS prot_column_id, | |
100 name AS prot_column_name, | |
101 position AS prot_rel_pos, | |
102 description AS info | |
103 FROM wst_columns WHERE wst_id = ${prot_id} | |
104 ORDER by position | |
105 </dc:statement> | |
106 <dc:elements> | |
107 <column> | |
108 <dc:attribute name="name" value="${prot_column_name}"/> | |
109 <dc:attribute name="ids" value="additionals-wstv-${prot_rel_pos}-${prot_id}"/> | |
110 <dc:attribute name="factory" value="staticwkms"/> | |
111 <dc:attribute name="info" value="${info}"/> | |
112 </column> | |
113 </dc:elements> | |
114 </dc:context> | |
115 </additional> | |
116 </dc:elements> | |
117 </dc:context> | |
118 </additionals> | |
119 </dc:macro> | |
120 | |
121 <dc:macro name="basedata_1_additionals-relative_point"> | |
122 <dc:comment comment=".ZUS -------------------------------"/> | |
123 <additionals> | |
124 <dc:context> | |
125 <dc:statement> | |
126 SELECT id AS prot_id, | |
127 description AS prot_description | |
128 FROM wsts WHERE kind = 1 AND river_id = ${river_id} | |
129 </dc:statement> | |
130 <dc:elements> | |
131 <relativepoint> | |
132 <dc:attribute name="name" value="${prot_description}"/> | |
133 <dc:context> | |
134 <dc:statement> | |
135 SELECT id AS prot_column_id, | |
136 name AS prot_column_name, | |
137 position AS prot_rel_pos, | |
138 description AS info | |
139 FROM wst_columns WHERE wst_id = ${prot_id} | |
140 ORDER by position | |
141 </dc:statement> | |
142 <dc:elements> | |
143 <column> | |
144 <dc:attribute name="name" value="${prot_column_name}"/> | |
145 <dc:attribute name="ids" value="additionals-wstv-${prot_rel_pos}-${prot_id}"/> | |
146 <dc:attribute name="factory" value="staticwkms"/> | |
147 <dc:attribute name="info" value="${info}"/> | |
148 </column> | |
149 </dc:elements> | |
150 </dc:context> | |
151 </relativepoint> | |
152 </dc:elements> | |
153 </dc:context> | |
154 </additionals> | |
155 </dc:macro> | |
156 | |
157 <dc:macro name="basedata_2_fixations_wst"> | |
158 <fixations> | |
159 <dc:context> | |
160 <dc:statement> | |
161 SELECT id AS prot_id, | |
162 description AS prot_description | |
163 FROM wsts WHERE kind = 2 AND river_id = ${river_id} | |
164 </dc:statement> | |
165 <dc:elements> | |
166 <fixation> | |
167 <dc:attribute name="name" value="${prot_description}"/> | |
168 <!--dc:attribute name="ids" value="fixations-wstv-A-${prot_id}"/--> | |
169 <dc:context> | |
170 <dc:statement> | |
171 SELECT id AS prot_column_id, | |
172 name AS prot_column_name, | |
173 position AS prot_rel_pos, | |
174 description AS info | |
175 FROM wst_columns WHERE wst_id = ${prot_id} | |
176 ORDER by position | |
177 </dc:statement> | |
178 <dc:elements> | |
179 <column> | |
180 <dc:attribute name="name" value="${prot_column_name}"/> | |
181 <dc:attribute name="ids" value="fixations-wstv-${prot_rel_pos}-${prot_id}"/> | |
182 <dc:attribute name="factory" value="wqinterpol"/> | |
183 <dc:attribute name="info" value="${info}"/> | |
184 </column> | |
185 </dc:elements> | |
186 </dc:context> | |
187 </fixation> | |
188 </dc:elements> | |
189 </dc:context> | |
190 </fixations> | |
191 </dc:macro> | |
192 | |
193 <dc:macro name="basedata_2_fixations_wqkms"> | |
194 <fixations> | |
195 <dc:context> | |
196 <dc:statement> | |
197 SELECT id AS prot_id, | |
198 description AS prot_description | |
199 FROM wsts WHERE kind = 2 AND river_id = ${river_id} | |
200 </dc:statement> | |
201 <dc:elements> | |
202 <fixation> | |
203 <dc:attribute name="name" value="${prot_description}"/> | |
204 <dc:context> | |
205 <dc:statement> | |
206 SELECT id AS prot_column_id, | |
207 name AS prot_column_name, | |
208 position AS prot_rel_pos, | |
209 desciption AS info | |
210 FROM wst_columns WHERE wst_id = ${prot_id} | |
211 ORDER by position | |
212 </dc:statement> | |
213 <dc:elements> | |
214 <column> | |
215 <dc:attribute name="name" value="${prot_column_name}"/> | |
216 <dc:attribute name="ids" value="fixations-wstv-${prot_rel_pos}-${prot_id}"/> | |
217 <dc:attribute name="factory" value="wqinterpol"/> | |
218 <dc:attribute name="info" value="${info}"/> | |
219 </column> | |
220 </dc:elements> | |
221 </dc:context> | |
222 </fixation> | |
223 </dc:elements> | |
224 </dc:context> | |
225 </fixations> | |
226 </dc:macro> | |
227 | |
228 <dc:macro name="basedata_2_fixations"> | |
229 <fixations> | |
230 <dc:context> | |
231 <dc:statement> | |
232 SELECT id AS prot_id, | |
233 description AS prot_description | |
234 FROM wsts WHERE kind = 2 AND river_id = ${river_id} | |
235 </dc:statement> | |
236 <dc:elements> | |
237 <fixation> | |
238 <dc:attribute name="name" value="${prot_description}"/> | |
239 <dc:context> | |
240 <dc:statement> | |
241 SELECT id AS prot_column_id, | |
242 name AS prot_column_name, | |
243 position AS prot_rel_pos, | |
244 description AS info | |
245 FROM wst_columns WHERE wst_id = ${prot_id} | |
246 ORDER by position | |
247 </dc:statement> | |
248 <dc:elements> | |
249 <column> | |
250 <dc:attribute name="name" value="${prot_column_name}"/> | |
251 <dc:attribute name="ids" value="fixations-wstv-${prot_rel_pos}-${prot_id}"/> | |
252 <dc:attribute name="factory" value="staticwkms"/> | |
253 <dc:attribute name="info" value="${info}"/> | |
254 </column> | |
255 </dc:elements> | |
256 </dc:context> | |
257 </fixation> | |
258 </dc:elements> | |
259 </dc:context> | |
260 </fixations> | |
261 </dc:macro> | |
262 | |
263 <dc:macro name="basedata_2_fixations_relative_point"> | |
264 <fixations> | |
265 <dc:context> | |
266 <dc:statement> | |
267 SELECT id AS prot_id, | |
268 description AS prot_description | |
269 FROM wsts WHERE kind = 2 AND river_id = ${river_id} | |
270 </dc:statement> | |
271 <dc:elements> | |
272 <relativepoint> | |
273 <dc:attribute name="name" value="${prot_description}"/> | |
274 <dc:context> | |
275 <dc:statement> | |
276 SELECT id AS prot_column_id, | |
277 name AS prot_column_name, | |
278 position AS prot_rel_pos, | |
279 description AS info | |
280 FROM wst_columns WHERE wst_id = ${prot_id} | |
281 ORDER by position | |
282 </dc:statement> | |
283 <dc:elements> | |
284 <column> | |
285 <dc:attribute name="name" value="${prot_column_name}"/> | |
286 <dc:attribute name="ids" value="fixations-wstv-${prot_rel_pos}-${prot_id}"/> | |
287 <dc:attribute name="factory" value="staticwkms"/> | |
288 <dc:attribute name="info" value="${info}"/> | |
289 </column> | |
290 </dc:elements> | |
291 </dc:context> | |
292 </relativepoint> | |
293 </dc:elements> | |
294 </dc:context> | |
295 </fixations> | |
296 </dc:macro> | |
297 | |
298 <dc:macro name="basedata_3_officials"> | |
299 <dc:comment comment=".wst -------------------------------"/> | |
300 <officiallines> | |
301 <dc:context> | |
302 <dc:statement> | |
303 SELECT id AS prot_id, | |
304 description AS prot_description | |
305 FROM wsts WHERE kind = 3 AND river_id = ${river_id} | |
306 </dc:statement> | |
307 <dc:elements> | |
308 <official> | |
309 <dc:attribute name="name" value="${prot_description}"/> | |
310 <dc:context> | |
311 <dc:statement> | |
312 SELECT id AS prot_column_id, | |
313 name AS prot_column_name, | |
314 position AS prot_rel_pos, | |
315 description AS info | |
316 FROM wst_columns WHERE wst_id = ${prot_id} | |
317 ORDER by position | |
318 </dc:statement> | |
319 <dc:elements> | |
320 <column> | |
321 <dc:attribute name="name" value="${prot_column_name}"/> | |
322 <dc:attribute name="ids" value="additionals-wstv-${prot_rel_pos}-${prot_id}"/> | |
323 <dc:attribute name="factory" value="staticwkms"/> | |
324 <dc:attribute name="info" value="${info}"/> | |
325 </column> | |
326 </dc:elements> | |
327 </dc:context> | |
328 </official> | |
329 </dc:elements> | |
330 </dc:context> | |
331 </officiallines> | |
332 </dc:macro> | |
333 | |
334 <dc:macro name="basedata_4_heightmarks-points-relative_points"> | |
335 <heightmarks> | |
336 <dc:context> | |
337 <dc:statement> | |
338 SELECT id AS prot_id, | |
339 description AS prot_description | |
340 FROM wsts WHERE kind = 4 AND river_id = ${river_id} | |
341 </dc:statement> | |
342 <dc:elements> | |
343 <relativepoint> | |
344 <dc:attribute name="name" value="${prot_description}"/> | |
345 <dc:context> | |
346 <dc:statement> | |
347 SELECT id AS prot_column_id, | |
348 name AS prot_column_name, | |
349 position AS prot_rel_pos, | |
350 description AS info | |
351 FROM wst_columns WHERE wst_id = ${prot_id} | |
352 ORDER by position | |
353 </dc:statement> | |
354 <dc:elements> | |
355 <column> | |
356 <dc:attribute name="name" value="${prot_column_name}"/> | |
357 <dc:attribute name="ids" value="heightmarks_points-wstv-${prot_rel_pos}-${prot_id}"/> | |
358 <dc:attribute name="factory" value="staticwkms"/> | |
359 <dc:attribute name="info" value="${info}"/> | |
360 </column> | |
361 </dc:elements> | |
362 </dc:context> | |
363 </relativepoint> | |
364 </dc:elements> | |
365 </dc:context> | |
366 </heightmarks> | |
367 </dc:macro> | |
368 | |
369 <dc:macro name="basedata_4_heightmarks-points"> | |
370 <heightmarks> | |
371 <dc:context> | |
372 <dc:statement> | |
373 SELECT id AS prot_id, | |
374 description AS prot_description | |
375 FROM wsts WHERE kind = 4 AND river_id = ${river_id} | |
376 </dc:statement> | |
377 <dc:elements> | |
378 <heightmark> | |
379 <dc:attribute name="name" value="${prot_description}"/> | |
380 <dc:context> | |
381 <dc:statement> | |
382 SELECT id AS prot_column_id, | |
383 name AS prot_column_name, | |
384 position AS prot_rel_pos, | |
385 description AS info | |
386 FROM wst_columns WHERE wst_id = ${prot_id} | |
387 ORDER by position | |
388 </dc:statement> | |
389 <dc:elements> | |
390 <column> | |
391 <dc:attribute name="name" value="${prot_column_name}"/> | |
392 <dc:attribute name="ids" value="heightmarks_points-wstv-${prot_rel_pos}-${prot_id}"/> | |
393 <dc:attribute name="factory" value="staticwkms"/> | |
394 <dc:attribute name="info" value="${info}"/> | |
395 </column> | |
396 </dc:elements> | |
397 </dc:context> | |
398 </heightmark> | |
399 </dc:elements> | |
400 </dc:context> | |
401 </heightmarks> | |
402 </dc:macro> | |
403 | |
404 <dc:macro name="basedata_4_heightmarks-wq"> | |
405 <heightmarks> | |
406 <dc:context> | |
407 <dc:statement> | |
408 SELECT id AS prot_id, | |
409 description AS prot_description | |
410 FROM wsts WHERE kind = 4 AND river_id = ${river_id} | |
411 </dc:statement> | |
412 <dc:elements> | |
413 <heightmark> | |
414 <dc:attribute name="name" value="${prot_description}"/> | |
415 <dc:context> | |
416 <dc:statement> | |
417 SELECT id AS prot_column_id, | |
418 name AS prot_column_name, | |
419 position AS prot_rel_pos, | |
420 description AS info | |
421 FROM wst_columns WHERE wst_id = ${prot_id} | |
422 ORDER by position | |
423 </dc:statement> | |
424 <dc:elements> | |
425 <column> | |
426 <dc:attribute name="name" value="${prot_column_name}"/> | |
427 <dc:attribute name="ids" value="heightmarks_annotations-wstv-${prot_rel_pos}-${prot_id}"/> | |
428 <dc:attribute name="factory" value="wqinterpol"/> | |
429 <dc:attribute name="info" value="${info}"/> | |
430 </column> | |
431 </dc:elements> | |
432 </dc:context> | |
433 </heightmark> | |
434 </dc:elements> | |
435 </dc:context> | |
436 </heightmarks> | |
437 </dc:macro> | |
438 | |
439 <dc:macro name="basedata_5_flood-protections_relative_points"> | |
440 <flood_protections> | |
441 <dc:attribute name="id" value="flood-protections-${river_id}"/> | |
442 <dc:context> | |
443 <dc:statement> | |
444 SELECT id AS prot_id, | |
445 description AS prot_description | |
446 FROM wsts WHERE kind = 5 AND river_id = ${river_id} | |
447 </dc:statement> | |
448 <dc:elements> | |
449 <relativepoint> | |
450 <dc:attribute name="name" value="${prot_description}"/> | |
451 <dc:attribute name="db-id" value="${prot_id}"/> | |
452 <dc:attribute name="factory" value="staticwkms"/> | |
453 <columns> | |
454 <dc:context> | |
455 <dc:statement> | |
456 SELECT id AS prot_column_id, | |
457 name AS prot_column_name, | |
458 position AS prot_rel_pos, | |
459 description AS info | |
460 FROM wst_columns WHERE wst_id = ${prot_id} | |
461 ORDER by position | |
462 </dc:statement> | |
463 <dc:elements> | |
464 <column> | |
465 <dc:attribute name="name" value="${prot_column_name}"/> | |
466 <dc:attribute name="ids" value="flood_protection-wstv-${prot_rel_pos}-${prot_id}"/> | |
467 <dc:attribute name="factory" value="staticwkms"/> | |
468 <dc:attribute name="info" value="${info}"/> | |
469 </column> | |
470 </dc:elements> | |
471 </dc:context> | |
472 </columns> | |
473 </relativepoint> | |
474 </dc:elements> | |
475 </dc:context> | |
476 </flood_protections> | |
477 </dc:macro> | |
478 | |
479 <dc:macro name="basedata_5_flood-protections"> | |
480 <flood_protections> | |
481 <dc:attribute name="id" value="flood-protections-${river_id}"/> | |
482 <dc:context> | |
483 <dc:statement> | |
484 SELECT id AS prot_id, | |
485 description AS prot_description | |
486 FROM wsts WHERE kind = 5 AND river_id = ${river_id} | |
487 </dc:statement> | |
488 <dc:elements> | |
489 <flood_protection> | |
490 <dc:attribute name="name" value="${prot_description}"/> | |
491 <dc:attribute name="db-id" value="${prot_id}"/> | |
492 <dc:attribute name="factory" value="staticwkms"/> | |
493 <columns> | |
494 <dc:context> | |
495 <dc:statement> | |
496 SELECT id AS prot_column_id, | |
497 name AS prot_column_name, | |
498 position AS prot_rel_pos | |
499 FROM wst_columns WHERE wst_id = ${prot_id} | |
500 ORDER by position | |
501 </dc:statement> | |
502 <dc:elements> | |
503 <column> | |
504 <dc:attribute name="name" value="${prot_column_name}"/> | |
505 <dc:attribute name="ids" value="flood_protection-wstv-${prot_rel_pos}-${prot_id}"/> | |
506 <dc:attribute name="factory" value="staticwkms"/> | |
507 </column> | |
508 </dc:elements> | |
509 </dc:context> | |
510 </columns> | |
511 </flood_protection> | |
512 </dc:elements> | |
513 </dc:context> | |
514 </flood_protections> | |
515 </dc:macro> | |
516 | |
517 <dc:macro name="mainvalues"> | |
518 <mainvalue> | |
519 <dc:attribute name="factory" value="mainvalue"/> | |
520 <dc:attribute name="ids" value="${river_id}"/> | |
521 </mainvalue> | |
522 </dc:macro> | |
523 | |
524 <dc:macro name="qsectors"> | |
525 <qsector> | |
526 <dc:attribute name="factory" value="qsectors"/> | |
527 <dc:attribute name="ids" value="${river_id}"/> | |
528 </qsector> | |
529 </dc:macro> | |
530 | |
531 <dc:macro name="annotations"> | |
532 <annotation> | |
533 <dc:attribute name="factory" value="annotations"/> | |
534 <dc:attribute name="ids" value="${river_id}"/> | |
535 </annotation> | |
536 </dc:macro> | |
537 | |
538 <dc:macro name="cross_sections"> | |
539 <cross_sections> | |
540 <dc:attribute name="id" value="flood-protections-${river_id}"/> | |
541 <dc:context> | |
542 <dc:statement> | |
543 SELECT id AS prot_id, | |
544 description AS prot_description | |
545 FROM cross_sections WHERE river_id = ${river_id} | |
546 </dc:statement> | |
547 <dc:elements> | |
548 <cross_section> | |
549 <dc:attribute name="name" value="${prot_description}"/> | |
550 <dc:attribute name="ids" value="${prot_id}"/> | |
551 <dc:attribute name="factory" value="crosssections"/> | |
552 </cross_section> | |
553 </dc:elements> | |
554 </dc:context> | |
555 </cross_sections> | |
556 </dc:macro> | |
557 | |
558 <dc:macro name="hyks"> | |
559 <hyks> | |
560 <dc:attribute name="id" value="hyk-${river_id}"/> | |
561 <dc:context> | |
562 <dc:statement> | |
563 SELECT id AS hyk_id, | |
564 description AS hyk_description | |
565 FROM hyks WHERE river_id = ${river_id} | |
566 </dc:statement> | |
567 <dc:elements> | |
568 <hyk> | |
569 <dc:attribute name="name" value="${hyk_description}"/> | |
570 <dc:attribute name="ids" value="${hyk_id}"/> | |
571 <dc:attribute name="factory" value="hyk"/> | |
572 </hyk> | |
573 </dc:elements> | |
574 </dc:context> | |
575 </hyks> | |
576 </dc:macro> | |
577 | |
578 <dc:comment> | |
579 | |
580 + River-Node | |
581 | |
582 </dc:comment> | |
583 | |
584 <river> | |
585 <dc:attribute name="name" value="${river_name}"/> | |
586 | |
587 <dc:choose> | |
588 <dc:when test="dc:contains($parameters, 'recommended')"> | |
589 <dc:comment> | |
590 Recommendations (client shall load immediately). | |
591 </dc:comment> | |
592 <dc:if test="dc:contains($artifact-outs, 'w_differences') or (dc:contains($artifact-outs, 'discharge_longitudinal_section'))"> | |
593 <dc:call-macro name="annotations"/> | |
594 </dc:if> | |
595 <dc:if test="dc:contains($artifact-outs, 'cross_section')"> | |
596 <dc:call-macro name="cross_sections"/> | |
597 <dc:call-macro name="hyks"/> | |
598 </dc:if> | |
599 <dc:if test="dc:contains($artifact-outs, 'reference_curve')"> | |
600 <dc:call-macro name="annotations"/> | |
601 <dc:call-macro name="mainvalues"/> | |
602 </dc:if> | |
603 <dc:if test="dc:contains($artifact-outs, 'fix_wq_curve')"> | |
604 <dc:call-macro name="qsectors"/> | |
605 </dc:if> | |
606 <dc:if test="dc:contains($artifact-outs, 'fix_longitudinal_section_curve')"> | |
607 <dc:call-macro name="annotations"/> | |
608 </dc:if> | |
609 </dc:when> | |
610 <dc:otherwise> | |
611 <dc:comment> | |
612 Non - Recommendations. | |
613 </dc:comment> | |
614 <dc:if test="dc:contains($artifact-outs, 'cross_section')"> | |
615 <dc:call-macro name="basedata_0"/> | |
616 <dc:call-macro name="basedata_1_additionals"/> | |
617 <dc:call-macro name="basedata_2_fixations"/> | |
618 <dc:call-macro name="basedata_3_officials"/> | |
619 <dc:call-macro name="basedata_4_heightmarks-points"/> | |
620 <dc:call-macro name="cross_sections"/> | |
621 <dc:call-macro name="hyks"/> | |
622 </dc:if> | |
623 <dc:if test="dc:contains($artifact-outs, 'discharge_longitudinal_section')"> | |
624 <dc:call-macro name="basedata_0"/> | |
625 <dc:call-macro name="basedata_1_additionals"/> | |
626 <dc:call-macro name="basedata_2_fixations"/> | |
627 <dc:call-macro name="basedata_3_officials"/> | |
628 <dc:call-macro name="basedata_4_heightmarks-points"/> | |
629 <dc:call-macro name="basedata_5_flood-protections"/> | |
630 </dc:if> | |
631 <!--dc:if test="dc:contains($artifact-outs, 'computed_discharge_curve')"> | |
632 <dc:call-macro name="basedata_0_wq"/> | |
633 <dc:call-macro name="basedata_4_heightmarks-wq"/> | |
634 </dc:if--> | |
635 <dc:if test="dc:contains($artifact-outs, 'longitudinal_section') or (dc:contains($artifact-outs, 'w_differences'))"> | |
636 <dc:call-macro name="basedata_0"/> | |
637 <dc:call-macro name="basedata_1_additionals"/> | |
638 <dc:comment comment=" FIXATIONS ---------------------------"/> | |
639 <dc:call-macro name="basedata_2_fixations"/> | |
640 <dc:comment comment=" HOEHENMARKEN ---------------------------"/> | |
641 <dc:call-macro name="basedata_4_heightmarks-points"/> | |
642 <dc:comment comment=" AMTL LINIEN ---------------------------"/> | |
643 <dc:call-macro name="basedata_3_officials"/> | |
644 <dc:call-macro name="annotations"/> | |
645 </dc:if> | |
646 <dc:if test="dc:contains($artifact-outs, 'reference_curve')"> | |
647 <dc:call-macro name="annotations"/> | |
648 <!--dc:call-macro name="basedata_0"/--> | |
649 <dc:call-macro name="basedata_1_additionals-relative_point"/> | |
650 <dc:comment comment=" FIXATIONS ---------------------------"/> | |
651 <dc:call-macro name="basedata_2_fixations_relative_point"/> | |
652 <dc:comment comment=" HOEHENMARKEN ---------------------------"/> | |
653 <dc:call-macro name="basedata_4_heightmarks-points-relative_points"/> | |
654 <dc:call-macro name="basedata_5_flood-protections_relative_points"/> | |
655 </dc:if> | |
656 <dc:if test="dc:contains($artifact-outs, 'fix_wq_curve')"> | |
657 <dc:call-macro name="basedata_0_wq"/> | |
658 <dc:call-macro name="basedata_1_additionals"/> | |
659 <dc:call-macro name="basedata_2_fixations"/> | |
660 <dc:call-macro name="basedata_3_officials"/> | |
661 <dc:call-macro name="basedata_4_heightmarks-points"/> | |
662 <dc:call-macro name="basedata_5_flood-protections_relative_points"/> | |
663 </dc:if> | |
664 <dc:if test="dc:contains($artifact-outs, 'fix_deltawt_curve')"> | |
665 </dc:if> | |
666 <dc:if test="dc:contains($artifact-outs, 'fix_longitudinal_section_curve')"> | |
667 <dc:call-macro name="annotations"/> | |
668 </dc:if> | |
669 <dc:comment comment="--- non-recommendations---"/> | |
670 </dc:otherwise> | |
671 </dc:choose> | |
672 | |
673 | |
674 <dc:if test="dc:contains($artifact-outs, 'waterlevels')"> | |
675 | |
676 <!-- base data --> | |
677 <dc:call-macro name="basedata_0"/> | |
678 | |
679 <!-- extra-longitudinal-sections --> | |
680 <dc:call-macro name="basedata_1_additionals"/> | |
681 | |
682 <!-- fixations --> | |
683 <dc:call-macro name="basedata_2_fixations"/> | |
684 | |
685 <!-- flood water marks--> | |
686 <dc:call-macro name="basedata_4_heightmarks-points"/> | |
687 | |
688 <!-- flood protection --> | |
689 <dc:call-macro name="basedata_5_flood-protections"/> | |
690 | |
691 </dc:if> | |
692 <dc:if test="dc:contains($artifact-outs, 'computed_discharge_curve') and (dc:contains($parameters, 'recommended'))"> | |
693 <!--dc:call-macro name="basedata_2_fixations_wst"/--> | |
694 </dc:if> | |
695 | |
696 <dc:if test="dc:contains($artifact-outs, 'computed_discharge_curve') and not (dc:contains($parameters, 'recommended'))"> | |
697 <discharge_table_nn> | |
698 <discharge_table_gauge> | |
699 <dc:context> | |
700 <dc:statement> | |
701 SELECT id AS gauge_id, | |
702 name AS gauge_name | |
703 FROM gauges WHERE river_id = ${river_id} | |
704 </dc:statement> | |
705 <dc:elements> | |
706 <gauge> | |
707 <dc:attribute name="name" value="${gauge_name}"/> | |
708 <dc:attribute name="db-id" value="${gauge_id}"/> | |
709 <dc:attribute name="factory" value="gaugedischarge"/> | |
710 <dc:attribute name="from" value="${g_start}"/> | |
711 <dc:attribute name="to" value="${g_stop}"/> | |
712 <dc:attribute name="ids" value="${gauge_name}"/> | |
713 </gauge> | |
714 <!-- | |
715 <gauge> | |
716 <dc:attribute name="name" value="${gauge_name}"/> | |
717 <dc:attribute name="db-id" value="${gauge_id}"/> | |
718 <dc:context> | |
719 <dc:statement> | |
720 SELECT description AS gauge_desc, | |
721 d.id AS discharge_id, | |
722 ti.start_time AS g_start, | |
723 ti.stop_time AS g_stop | |
724 FROM discharge_tables d JOIN time_intervals ti | |
725 ON d.time_interval_id = ti.id | |
726 WHERE d.gauge_id = ${gauge_id} AND d.kind = 1 | |
727 </dc:statement> | |
728 <dc:elements> | |
729 <historical> | |
730 <dc:attribute name="name" value="${gauge_desc}"/> | |
731 <dc:attribute name="factory" value="gaugedischarge"/> | |
732 <dc:attribute name="from" value="${g_start}"/> | |
733 <dc:attribute name="to" value="${g_stop}"/> | |
734 <dc:attribute name="ids" value="${discharge_id}-${g_start}-${g_stop}"/> | |
735 </historical> | |
736 </dc:elements> | |
737 </dc:context> | |
738 </gauge> | |
739 --> | |
740 </dc:elements> | |
741 </dc:context> | |
742 </discharge_table_gauge> | |
743 | |
744 </discharge_table_nn> | |
745 | |
746 <dc:call-macro name="basedata_2_fixations_wst"/> | |
747 | |
748 <dc:call-macro name="basedata_5_flood-protections"/> | |
749 | |
750 <!-- former waterlevels --> | |
751 <dc:call-macro name="basedata_0"/> | |
752 | |
753 <dc:call-macro name="basedata_1_additionals"/> | |
754 | |
755 <!-- former flood-water-marks --> | |
756 <dc:call-macro name="basedata_4_heightmarks-points"/> | |
757 <computed_discharge_curve> | |
758 <dc:call-macro name="mainvalues"/> | |
759 </computed_discharge_curve> | |
760 </dc:if> | |
761 | |
762 <dc:if test="dc:contains($artifact-outs, 'duration_curve')"> | |
763 <dc:choose> | |
764 <dc:when test="dc:contains($parameters, 'recommended')"> | |
765 <dc:call-macro name="mainvalues"/> | |
766 </dc:when> | |
767 <dc:otherwise> | |
768 <dc:call-macro name="mainvalues"/> | |
769 <dc:call-macro name="basedata_2_fixations_relative_point"/> | |
770 <dc:call-macro name="basedata_4_heightmarks-points-relative_points"/> | |
771 <dc:call-macro name="basedata_5_flood-protections_relative_points"/> | |
772 </dc:otherwise> | |
773 </dc:choose> | |
774 </dc:if> | |
775 | |
776 <dc:if test="dc:contains($artifact-outs, 'fix_wq_curve') and not (dc:contains($parameters, 'recommended'))"> | |
777 <discharge_table_nn> | |
778 <discharge_table_gauge> | |
779 <dc:context> | |
780 <dc:statement> | |
781 SELECT id AS gauge_id, | |
782 name AS gauge_name | |
783 FROM gauges WHERE river_id = ${river_id} | |
784 </dc:statement> | |
785 <dc:elements> | |
786 <gauge> | |
787 <dc:attribute name="name" value="${gauge_name}"/> | |
788 <dc:attribute name="db-id" value="${gauge_id}"/> | |
789 <dc:attribute name="factory" value="gaugedischarge"/> | |
790 <dc:attribute name="from" value="${g_start}"/> | |
791 <dc:attribute name="to" value="${g_stop}"/> | |
792 <dc:attribute name="ids" value="${gauge_name}"/> | |
793 </gauge> | |
794 </dc:elements> | |
795 </dc:context> | |
796 </discharge_table_gauge> | |
797 </discharge_table_nn> | |
798 </dc:if> | |
799 | |
800 <dc:if test="dc:contains($artifact-outs, 'longitudinal_section')"> | |
801 | |
802 <longitudinal_section> | |
803 <dc:call-macro name="annotations"/> | |
804 </longitudinal_section> | |
805 </dc:if> | |
806 <dc:if test="dc:contains($artifact-outs, 'map')"> | |
807 <map> | |
808 <dc:choose> | |
809 <dc:when test="dc:contains($parameters, 'recommended')"> | |
810 </dc:when> | |
811 <dc:otherwise> | |
812 <dc:call-macro name="flood-map-complete"/> | |
813 </dc:otherwise> | |
814 </dc:choose> | |
815 </map> | |
816 </dc:if> | |
817 <dc:if test="dc:contains($artifact-outs, 'floodmap')"> | |
818 <floodmap> | |
819 <dc:choose> | |
820 <dc:when test="dc:contains($parameters, 'recommended')"> | |
821 <dc:call-macro name="flood-map-recommended"/> | |
822 </dc:when> | |
823 <dc:when test="dc:contains($parameters, 'dem')"> | |
824 <dc:call-macro name="flood-map-dem"/> | |
825 </dc:when> | |
826 <dc:otherwise> | |
827 <dc:call-macro name="flood-map-complete"/> | |
828 </dc:otherwise> | |
829 </dc:choose> | |
830 </floodmap> | |
831 <dc:macro name="flood-map-recommended"> | |
832 <dc:comment> | |
833 FIXME: Following two macros look identical to me. | |
834 </dc:comment> | |
835 <kilometrage> | |
836 <riveraxis> | |
837 <dc:attribute name="factory" value="riveraxis"/> | |
838 <dc:attribute name="ids" value="${river_id}"/> | |
839 </riveraxis> | |
840 </kilometrage> | |
841 <rastermap> | |
842 <background> | |
843 <dc:attribute name="factory" value="wmsbackground"/> | |
844 <dc:attribute name="ids" value="${river_id}"/> | |
845 </background> | |
846 </rastermap> | |
847 </dc:macro> | |
848 <dc:macro name="flood-map-dem"> | |
849 <dems> | |
850 <dc:context> | |
851 <dc:statement> | |
852 SELECT id AS dem_id, | |
853 lower AS dem_lower, | |
854 upper AS dem_upper | |
855 FROM dem WHERE river_id = ${river_id} | |
856 </dc:statement> | |
857 <dc:elements> | |
858 <dem> | |
859 <dc:attribute name="factory" value="demfactory"/> | |
860 <dc:attribute name="ids" value="${dem_id}"/> | |
861 <dc:attribute name="description" value="${dem_lower}-${dem_upper}"/> | |
862 </dem> | |
863 </dc:elements> | |
864 </dc:context> | |
865 </dems> | |
866 </dc:macro> | |
867 <dc:macro name="flood-map-km"> | |
868 <dc:context> | |
869 <dc:statement> | |
870 SELECT count(*) as km_exists | |
871 FROM river_axes_km WHERE river_id = ${river_id} | |
872 </dc:statement> | |
873 <dc:elements> | |
874 <dc:if test="$km_exists>0"> | |
875 <km> | |
876 <dc:attribute name="factory" value="wmskmfactory"/> | |
877 <dc:attribute name="ids" value="${river_id}"/> | |
878 </km> | |
879 </dc:if> | |
880 </dc:elements> | |
881 </dc:context> | |
882 </dc:macro> | |
883 <dc:macro name="flood-map-qps"> | |
884 <dc:context> | |
885 <dc:statement> | |
886 SELECT count(*) as km_exists | |
887 FROM cross_section_tracks WHERE river_id = ${river_id} | |
888 </dc:statement> | |
889 <dc:elements> | |
890 <dc:if test="$km_exists>0"> | |
891 <qps> | |
892 <dc:attribute name="factory" value="wmsqpsfactory"/> | |
893 <dc:attribute name="ids" value="${river_id}"/> | |
894 </qps> | |
895 </dc:if> | |
896 </dc:elements> | |
897 </dc:context> | |
898 </dc:macro> | |
899 <dc:macro name="flood-map-hws"> | |
900 <dc:context> | |
901 <dc:statement> | |
902 SELECT count(*) as km_exists, name as name | |
903 FROM hws WHERE river_id = ${river_id} GROUP BY name | |
904 </dc:statement> | |
905 <dc:elements> | |
906 <dc:if test="$km_exists>0"> | |
907 <hws> | |
908 <dc:attribute name="factory" value="wmshwsfactory"/> | |
909 <dc:attribute name="ids" value="${river_id};${name}"/> | |
910 <dc:attribute name="name" value="${name}"/> | |
911 </hws> | |
912 </dc:if> | |
913 </dc:elements> | |
914 </dc:context> | |
915 </dc:macro> | |
916 <dc:macro name="flood-map-hydr-boundaries"> | |
917 <hydr_boundaries_lines> | |
918 <dc:call-macro name="flood-map-hydr-boundaries-lines"/> | |
919 </hydr_boundaries_lines> | |
920 <hydr_boundaries_polygons> | |
921 <dc:call-macro name="flood-map-hydr-boundaries-poly"/> | |
922 </hydr_boundaries_polygons> | |
923 </dc:macro> | |
924 <dc:macro name="flood-map-hydr-boundaries-lines"> | |
925 <bfg> | |
926 <dc:context> | |
927 <dc:statement> | |
928 SELECT count(*) as km_exists, name as name | |
929 FROM hydr_boundaries WHERE river_id = ${river_id} AND kind = 1 GROUP BY name | |
930 </dc:statement> | |
931 <dc:elements> | |
932 <dc:if test="$km_exists>0"> | |
933 <hydrboundary> | |
934 <dc:attribute name="factory" value="wmshydrboundariesfactory"/> | |
935 <dc:attribute name="ids" value="${river_id};${name}"/> | |
936 <dc:attribute name="name" value="${name}"/> | |
937 </hydrboundary> | |
938 </dc:if> | |
939 </dc:elements> | |
940 </dc:context> | |
941 </bfg> | |
942 <land> | |
943 <dc:context> | |
944 <dc:statement> | |
945 SELECT count(*) as km_exists, name as name | |
946 FROM hydr_boundaries WHERE river_id = ${river_id} AND kind = 2 GROUP BY name | |
947 </dc:statement> | |
948 <dc:elements> | |
949 <dc:if test="$km_exists>0"> | |
950 <hydrboundary> | |
951 <dc:attribute name="factory" value="wmshydrboundariesfactory"/> | |
952 <dc:attribute name="ids" value="${river_id};${name}"/> | |
953 <dc:attribute name="name" value="${name}"/> | |
954 </hydrboundary> | |
955 </dc:if> | |
956 </dc:elements> | |
957 </dc:context> | |
958 </land> | |
959 </dc:macro> | |
960 <dc:macro name="flood-map-hydr-boundaries-poly"> | |
961 <bfg> | |
962 <dc:context> | |
963 <dc:statement> | |
964 SELECT count(*) as km_exists, name as name | |
965 FROM hydr_boundaries_poly WHERE river_id = ${river_id} AND kind = 1 GROUP BY name | |
966 </dc:statement> | |
967 <dc:elements> | |
968 <dc:if test="$km_exists>0"> | |
969 <hws> | |
970 <dc:attribute name="factory" value="wmshydrboundariespolyfactory"/> | |
971 <dc:attribute name="ids" value="${river_id};${name}"/> | |
972 <dc:attribute name="name" value="${name}"/> | |
973 </hws> | |
974 </dc:if> | |
975 </dc:elements> | |
976 </dc:context> | |
977 </bfg> | |
978 <land> | |
979 <dc:context> | |
980 <dc:statement> | |
981 SELECT count(*) as km_exists, name as name | |
982 FROM hydr_boundaries_poly WHERE river_id = ${river_id} AND kind = 2 GROUP BY name | |
983 </dc:statement> | |
984 <dc:elements> | |
985 <dc:if test="$km_exists>0"> | |
986 <hws> | |
987 <dc:attribute name="factory" value="wmshydrboundariespolyfactory"/> | |
988 <dc:attribute name="ids" value="${river_id};${name}"/> | |
989 <dc:attribute name="name" value="${name}"/> | |
990 </hws> | |
991 </dc:if> | |
992 </dc:elements> | |
993 </dc:context> | |
994 </land> | |
995 </dc:macro> | |
996 <dc:macro name="flood-map-catchments"> | |
997 <dc:context> | |
998 <dc:statement> | |
999 SELECT count(*) as km_exists, name as name | |
1000 FROM catchment WHERE river_id = ${river_id} GROUP BY name | |
1001 </dc:statement> | |
1002 <dc:elements> | |
1003 <dc:if test="$km_exists>0"> | |
1004 <catchment> | |
1005 <dc:attribute name="factory" value="wmscatchmentfactory"/> | |
1006 <dc:attribute name="ids" value="${river_id};${name}"/> | |
1007 <dc:attribute name="name" value="${name}"/> | |
1008 </catchment> | |
1009 </dc:if> | |
1010 </dc:elements> | |
1011 </dc:context> | |
1012 </dc:macro> | |
1013 <dc:macro name="flood-map-floodplain"> | |
1014 <dc:context> | |
1015 <dc:statement> | |
1016 SELECT count(*) as km_exists | |
1017 FROM floodplain WHERE river_id = ${river_id} | |
1018 </dc:statement> | |
1019 <dc:elements> | |
1020 <dc:if test="$km_exists>0"> | |
1021 <floodplain> | |
1022 <dc:attribute name="factory" value="wmsfloodplainfactory"/> | |
1023 <dc:attribute name="ids" value="${river_id}"/> | |
1024 </floodplain> | |
1025 </dc:if> | |
1026 </dc:elements> | |
1027 </dc:context> | |
1028 </dc:macro> | |
1029 <dc:macro name="flood-map-lines"> | |
1030 <dc:context> | |
1031 <dc:statement> | |
1032 SELECT count(*) as km_exists, name as name | |
1033 FROM lines WHERE river_id = ${river_id} GROUP BY name | |
1034 </dc:statement> | |
1035 <dc:elements> | |
1036 <dc:if test="$km_exists>0"> | |
1037 <line> | |
1038 <dc:attribute name="factory" value="wmslinefactory"/> | |
1039 <dc:attribute name="ids" value="${river_id};${name}"/> | |
1040 <dc:attribute name="name" value="${name}"/> | |
1041 </line> | |
1042 </dc:if> | |
1043 </dc:elements> | |
1044 </dc:context> | |
1045 </dc:macro> | |
1046 <dc:macro name="flood-map-buildings"> | |
1047 <dc:context> | |
1048 <dc:statement> | |
1049 SELECT count(*) as km_exists, name as name | |
1050 FROM buildings WHERE river_id = ${river_id} GROUP BY name | |
1051 </dc:statement> | |
1052 <dc:elements> | |
1053 <dc:if test="$km_exists>0"> | |
1054 <building> | |
1055 <dc:attribute name="factory" value="wmsbuildingsfactory"/> | |
1056 <dc:attribute name="ids" value="${river_id};${name}"/> | |
1057 <dc:attribute name="name" value="${name}"/> | |
1058 </building> | |
1059 </dc:if> | |
1060 </dc:elements> | |
1061 </dc:context> | |
1062 </dc:macro> | |
1063 <dc:macro name="flood-map-fixpoints"> | |
1064 <dc:context> | |
1065 <dc:statement> | |
1066 SELECT count(*) as km_exists, name as name | |
1067 FROM fixpoints WHERE river_id = ${river_id} GROUP BY name | |
1068 </dc:statement> | |
1069 <dc:elements> | |
1070 <dc:if test="$km_exists>0"> | |
1071 <fixpoint> | |
1072 <dc:attribute name="factory" value="wmsfixpointsfactory"/> | |
1073 <dc:attribute name="ids" value="${river_id};${name}"/> | |
1074 <dc:attribute name="name" value="${name}"/> | |
1075 </fixpoint> | |
1076 </dc:if> | |
1077 </dc:elements> | |
1078 </dc:context> | |
1079 </dc:macro> | |
1080 <dc:macro name="flood-map-gaugelocations"> | |
1081 <dc:context> | |
1082 <dc:statement> | |
1083 SELECT count(*) as km_exists, name as name | |
1084 FROM gauge_location WHERE river_id = ${river_id} GROUP BY name | |
1085 </dc:statement> | |
1086 <dc:elements> | |
1087 <dc:if test="$km_exists>0"> | |
1088 <gaugelocation> | |
1089 <dc:attribute name="factory" value="wmsgaugelocationfactory"/> | |
1090 <dc:attribute name="ids" value="${river_id};${name}"/> | |
1091 <dc:attribute name="name" value="${name}"/> | |
1092 </gaugelocation> | |
1093 </dc:if> | |
1094 </dc:elements> | |
1095 </dc:context> | |
1096 </dc:macro> | |
1097 <dc:macro name="flood-map-uesk"> | |
1098 <uesk> | |
1099 <calculations> | |
1100 <current> | |
1101 <bfg> | |
1102 <dc:context> | |
1103 <dc:statement> | |
1104 SELECT count(*) as uesg_exist, name as name | |
1105 FROM floodmaps | |
1106 WHERE river_id = ${river_id} AND kind = 111 | |
1107 GROUP BY name, kind | |
1108 </dc:statement> | |
1109 <dc:elements> | |
1110 <dc:if test="$uesg_exist>0"> | |
1111 <floodmaps> | |
1112 <dc:attribute name="factory" value="wmsfloodmapsfactory"/> | |
1113 <dc:attribute name="ids" value="${river_id};${name}"/> | |
1114 <dc:attribute name="name" value="${name}"/> | |
1115 </floodmaps> | |
1116 </dc:if> | |
1117 </dc:elements> | |
1118 </dc:context> | |
1119 </bfg> | |
1120 <land> | |
1121 <dc:context> | |
1122 <dc:statement> | |
1123 SELECT count(*) as uesg_exist, name as name | |
1124 FROM floodmaps | |
1125 WHERE river_id = ${river_id} AND kind = 112 | |
1126 GROUP BY name, kind | |
1127 </dc:statement> | |
1128 <dc:elements> | |
1129 <dc:if test="$uesg_exist>0"> | |
1130 <floodmaps> | |
1131 <dc:attribute name="factory" value="wmsfloodmapsfactory"/> | |
1132 <dc:attribute name="ids" value="${river_id};${name}"/> | |
1133 <dc:attribute name="name" value="${name}"/> | |
1134 </floodmaps> | |
1135 </dc:if> | |
1136 </dc:elements> | |
1137 </dc:context> | |
1138 </land> | |
1139 </current> | |
1140 <potentiel> | |
1141 <bfg> | |
1142 <dc:context> | |
1143 <dc:statement> | |
1144 SELECT count(*) as uesg_exist, name as name | |
1145 FROM floodmaps | |
1146 WHERE river_id = ${river_id} AND kind = 121 | |
1147 GROUP BY name, kind | |
1148 </dc:statement> | |
1149 <dc:elements> | |
1150 <dc:if test="$uesg_exist>0"> | |
1151 <floodmaps> | |
1152 <dc:attribute name="factory" value="wmsfloodmapsfactory"/> | |
1153 <dc:attribute name="ids" value="${river_id};${name}"/> | |
1154 <dc:attribute name="name" value="${name}"/> | |
1155 </floodmaps> | |
1156 </dc:if> | |
1157 </dc:elements> | |
1158 </dc:context> | |
1159 </bfg> | |
1160 <land> | |
1161 <dc:context> | |
1162 <dc:statement> | |
1163 SELECT count(*) as uesg_exist, name as name | |
1164 FROM floodmaps | |
1165 WHERE river_id = ${river_id} AND kind = 122 | |
1166 GROUP BY name, kind | |
1167 </dc:statement> | |
1168 <dc:elements> | |
1169 <dc:if test="$uesg_exist>0"> | |
1170 <floodmaps> | |
1171 <dc:attribute name="factory" value="wmsfloodmapsfactory"/> | |
1172 <dc:attribute name="ids" value="${river_id};${name}"/> | |
1173 <dc:attribute name="name" value="${name}"/> | |
1174 </floodmaps> | |
1175 </dc:if> | |
1176 </dc:elements> | |
1177 </dc:context> | |
1178 </land> | |
1179 </potentiel> | |
1180 </calculations> | |
1181 </uesk> | |
1182 </dc:macro> | |
1183 <dc:macro name="flood-map-complete"> | |
1184 <buildings> | |
1185 <dc:call-macro name="flood-map-buildings"/> | |
1186 </buildings> | |
1187 <catchments> | |
1188 <dc:call-macro name="flood-map-catchments"/> | |
1189 </catchments> | |
1190 <fixpoints> | |
1191 <dc:call-macro name="flood-map-fixpoints"/> | |
1192 </fixpoints> | |
1193 <hws> | |
1194 <dc:call-macro name="flood-map-hws"/> | |
1195 </hws> | |
1196 <hydrboundaries> | |
1197 <dc:call-macro name="flood-map-hydr-boundaries"/> | |
1198 <dc:call-macro name="flood-map-floodplain"/> | |
1199 </hydrboundaries> | |
1200 <kilometrage> | |
1201 <riveraxis> | |
1202 <dc:attribute name="factory" value="riveraxis"/> | |
1203 <dc:attribute name="ids" value="${river_id}"/> | |
1204 </riveraxis> | |
1205 <dc:call-macro name="flood-map-km"/> | |
1206 <dc:call-macro name="flood-map-qps"/> | |
1207 </kilometrage> | |
1208 <lines> | |
1209 <dc:call-macro name="flood-map-lines"/> | |
1210 </lines> | |
1211 <dc:call-macro name="flood-map-uesk"/> | |
1212 <gaugelocations> | |
1213 <dc:call-macro name="flood-map-gaugelocations"/> | |
1214 </gaugelocations> | |
1215 <rastermap> | |
1216 <background> | |
1217 <dc:attribute name="factory" value="wmsbackground"/> | |
1218 <dc:attribute name="ids" value="${river_id}"/> | |
1219 </background> | |
1220 </rastermap> | |
1221 </dc:macro> | |
1222 </dc:if> | |
1223 <dc:if test="dc:contains($artifact-outs, 'minfo-heights')"> | |
1224 <dc:call-macro name="minfo-heights"/> | |
1225 <dc:macro name="minfo-heights"> | |
1226 <bedheights> | |
1227 <dc:call-macro name="bed-heights-single"/> | |
1228 <dc:call-macro name="bed-heights-epoch"/> | |
1229 </bedheights> | |
1230 </dc:macro> | |
1231 </dc:if> | |
1232 <dc:if test="dc:contains($artifact-outs, 'minfo-heights-epoch')"> | |
1233 <bedheights> | |
1234 <dc:call-macro name="bed-heights-epoch"/> | |
1235 </bedheights> | |
1236 </dc:if> | |
1237 <dc:macro name="bed-heights-single"> | |
1238 <single> | |
1239 <dc:context> | |
1240 <dc:statement> | |
1241 SELECT id AS bedh_id, | |
1242 year AS bedh_year, | |
1243 description AS bedh_descr | |
1244 FROM bed_height_single WHERE river_id = ${river_id} | |
1245 </dc:statement> | |
1246 <dc:elements> | |
1247 <height> | |
1248 <dc:attribute name="factory" value="bedheight"/> | |
1249 <dc:attribute name="ids" value="bedheight-single-${bedh_id}-${bedh_year}"/> | |
1250 <dc:attribute name="description" value="${bedh_descr}"/> | |
1251 </height> | |
1252 </dc:elements> | |
1253 </dc:context> | |
1254 </single> | |
1255 </dc:macro> | |
1256 <dc:macro name="bed-heights-epoch"> | |
1257 <epoch> | |
1258 <dc:context> | |
1259 <dc:statement> | |
1260 SELECT id AS bedh_id, | |
1261 time_interval_id AS bedh_interval_id, | |
1262 description AS bedh_descr | |
1263 FROM bed_height_epoch WHERE river_id = ${river_id} | |
1264 </dc:statement> | |
1265 <dc:elements> | |
1266 <height> | |
1267 <dc:attribute name="factory" value="bedheight"/> | |
1268 <dc:attribute name="ids" value="bedheight-epoch-${bedh_id}-${bedh_interval_id}"/> | |
1269 <dc:attribute name="description" value="${bedh_descr}"/> | |
1270 </height> | |
1271 </dc:elements> | |
1272 </dc:context> | |
1273 </epoch> | |
1274 </dc:macro> | |
1275 </river> | |
1276 </dc:elements> | |
1277 </dc:context> | |
1278 </dc:macro> | |
1279 | |
1280 <dc:choose> | |
1281 <dc:comment> | |
1282 User specific part | |
1283 ------------------ | |
1284 </dc:comment> | |
1285 <dc:when test="dc:contains($parameters, 'user-id')"> | |
1286 | |
1287 | |
1288 <old_calculations> | |
1289 <dc:context connection="user"> | |
1290 <dc:comment> | |
1291 Get the user and collection-id. | |
1292 </dc:comment> | |
1293 <dc:statement> | |
1294 SELECT u.id AS user_id, c.id AS collection_id, c.name as collection_name | |
1295 FROM collections c JOIN users u ON c.user_id = u.id | |
1296 WHERE u.gid = CAST(${user-id} AS uuid) | |
1297 ORDER BY c.creation DESC | |
1298 </dc:statement> | |
1299 | |
1300 <!-- OFFICIAL LINES --> | |
1301 <dc:if test="dc:contains($artifact-outs, 'longitudinal_section')"> | |
1302 <dc:comment comment=".wst -------------------------------"/> | |
1303 <officiallines> | |
1304 <dc:elements> | |
1305 <dc:context> | |
1306 <dc:statement> | |
1307 SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation, ardg.v as gaugy, arv.v as wqsingle | |
1308 FROM master_artifacts m, artifact_data ardg, artifact_data arv | |
1309 WHERE m.collection_id = ${collection_id} AND m.gid = CAST(${artifact-id} AS uuid) AND ardg.artifact_id = m.id AND ardg.k = 'ld_gaugename' AND arv.artifact_id = m.id AND arv.k = 'wq_single' | |
1310 AND EXISTS ( | |
1311 SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river}) | |
1312 </dc:statement> | |
1313 <dc:elements> | |
1314 <dc:context connection="system"> | |
1315 <dc:statement> | |
1316 SELECT ol.wst_id AS wstid, ol.wst_column_pos AS wstcolpos, ol.name AS olname, ol.value AS oval | |
1317 FROM official_q_values ol | |
1318 WHERE ol.value = CAST(${wqsingle} AS NUMERIC(10,2)) AND ol.gauge_name = ${gaugy} | |
1319 </dc:statement> | |
1320 <dc:elements> | |
1321 <dc:element name="${olname}"> | |
1322 <dc:attribute name="name" value="${olname}"/> | |
1323 <dc:attribute name="ids" value="additionals-wstv-${wstcolpos}-${wstid}"/> | |
1324 <dc:attribute name="factory" value="staticwkms"/> | |
1325 </dc:element> | |
1326 </dc:elements> | |
1327 </dc:context> | |
1328 </dc:elements> | |
1329 </dc:context> | |
1330 </dc:elements> | |
1331 </officiallines> | |
1332 </dc:if> | |
1333 <!-- END OFFICIAL LINES --> | |
1334 | |
1335 <dc:comment> | |
1336 SHOW W-DIFFERENCES | |
1337 </dc:comment> | |
1338 | |
1339 <dc:if test="dc:contains($artifact-outs, 'longitudinal_section') or (dc:contains($artifact-outs, 'w_differences') or (dc:contains($artifact-outs, 'discharge_longitudinal_section')))"> | |
1340 <differences> | |
1341 <dc:elements> | |
1342 <dc:context> | |
1343 <dc:statement> | |
1344 SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation | |
1345 FROM master_artifacts m | |
1346 WHERE m.collection_id = ${collection_id} AND m.gid <> CAST(${artifact-id} AS uuid) | |
1347 AND EXISTS ( | |
1348 SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river}) | |
1349 </dc:statement> | |
1350 <dc:elements> | |
1351 <dc:context> | |
1352 <dc:statement> | |
1353 SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description | |
1354 FROM outs as o, facets as f, artifacts as a | |
1355 WHERE f.name = 'w_differences' and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id} | |
1356 </dc:statement> | |
1357 <dc:elements> | |
1358 <dc:element name="${facet_name}"> | |
1359 <dc:attribute name="description" value="${facet_description}"/> | |
1360 <dc:attribute name="factory" value="winfo"/> | |
1361 <dc:attribute name="artifact-id" value="${aid}"/> | |
1362 <dc:attribute name="ids" value="${aid}"/> | |
1363 <dc:attribute name="out" value="w_differences"/> | |
1364 </dc:element> | |
1365 </dc:elements> | |
1366 </dc:context> | |
1367 </dc:elements> | |
1368 </dc:context> | |
1369 </dc:elements> | |
1370 </differences> | |
1371 </dc:if> | |
1372 | |
1373 <dc:comment> | |
1374 SHOW REFERENCE CURVE | |
1375 </dc:comment> | |
1376 | |
1377 <dc:if test="dc:contains($artifact-outs, 'reference_curve')"> | |
1378 <reference_curves> | |
1379 <dc:elements> | |
1380 <dc:context> | |
1381 <dc:statement> | |
1382 SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation | |
1383 FROM master_artifacts m | |
1384 WHERE m.collection_id = ${collection_id} AND m.gid <> CAST(${artifact-id} AS uuid) | |
1385 AND EXISTS ( | |
1386 SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river}) | |
1387 </dc:statement> | |
1388 <dc:elements> | |
1389 <dc:context> | |
1390 <dc:statement> | |
1391 SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description | |
1392 FROM outs as o, facets as f, artifacts as a | |
1393 WHERE f.name = 'reference_curve' and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id} | |
1394 </dc:statement> | |
1395 <dc:elements> | |
1396 <dc:element name="${facet_name}"> | |
1397 <dc:attribute name="description" value="${facet_description}"/> | |
1398 <dc:attribute name="factory" value="winfo"/> | |
1399 <dc:attribute name="artifact-id" value="${aid}"/> | |
1400 <dc:attribute name="ids" value="${aid}"/> | |
1401 <dc:attribute name="out" value="reference_curve"/> | |
1402 </dc:element> | |
1403 </dc:elements> | |
1404 </dc:context> | |
1405 </dc:elements> | |
1406 </dc:context> | |
1407 </dc:elements> | |
1408 </reference_curves> | |
1409 </dc:if> | |
1410 | |
1411 <dc:comment> | |
1412 SHOW COMPUTED DISCHARGE CURVES | |
1413 </dc:comment> | |
1414 | |
1415 <dc:if test="dc:contains($artifact-outs, 'computed_discharge_curve')"> | |
1416 <computed_discharge_curves> | |
1417 <dc:elements> | |
1418 <dc:context> | |
1419 <dc:statement> | |
1420 SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation | |
1421 FROM master_artifacts m | |
1422 WHERE m.collection_id = ${collection_id} AND m.gid <> CAST(${artifact-id} AS uuid) | |
1423 AND EXISTS ( | |
1424 SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river}) | |
1425 </dc:statement> | |
1426 <dc:elements> | |
1427 <dc:context> | |
1428 <dc:statement> | |
1429 SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description | |
1430 FROM outs as o, facets as f, artifacts as a | |
1431 WHERE f.name = 'computed_discharge_curve.q' and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id} | |
1432 </dc:statement> | |
1433 <dc:elements> | |
1434 <dc:element name="${facet_name}"> | |
1435 <dc:attribute name="description" value="${facet_description}"/> | |
1436 <dc:attribute name="factory" value="winfo"/> | |
1437 <dc:attribute name="artifact-id" value="${aid}"/> | |
1438 <dc:attribute name="ids" value="${aid}"/> | |
1439 <dc:attribute name="out" value="computed_discharge_curve"/> | |
1440 </dc:element> | |
1441 </dc:elements> | |
1442 </dc:context> | |
1443 </dc:elements> | |
1444 </dc:context> | |
1445 </dc:elements> | |
1446 </computed_discharge_curves> | |
1447 </dc:if> | |
1448 | |
1449 <dc:comment> | |
1450 CROSS SECTION | |
1451 </dc:comment> | |
1452 | |
1453 <dc:if test="dc:contains($artifact-outs, 'cross_section')"> | |
1454 <waterlevels> | |
1455 <dc:elements> | |
1456 <dc:context> | |
1457 <dc:statement> | |
1458 SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation | |
1459 FROM master_artifacts m | |
1460 WHERE m.collection_id = ${collection_id} AND m.gid <> CAST(${artifact-id} AS uuid) | |
1461 AND EXISTS ( | |
1462 SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river}) | |
1463 </dc:statement> | |
1464 <dc:elements> | |
1465 <dc:context> | |
1466 <dc:statement> | |
1467 SELECT id AS out_id | |
1468 FROM outs | |
1469 WHERE artifact_id = ${a_id} AND name = 'cross_section' | |
1470 </dc:statement> | |
1471 <dc:elements> | |
1472 <dc:context> | |
1473 <dc:statement> | |
1474 SELECT name AS facet_name, num as facet_num, description AS facet_description | |
1475 FROM facets | |
1476 WHERE out_id = ${out_id} | |
1477 ORDER BY num ASC, name DESC | |
1478 </dc:statement> | |
1479 <longitudinal_section_columns> | |
1480 <dc:attribute name="description" value="${river} ${a_creation}"/> | |
1481 <dc:elements> | |
1482 <dc:element name="${facet_name}"> | |
1483 <dc:attribute name="description" value="${facet_description}"/> | |
1484 <dc:attribute name="ids" value="${facet_num}"/> | |
1485 <dc:attribute name="factory" value="winfo"/> | |
1486 <dc:attribute name="artifact-id" value="${a_gid}"/> | |
1487 <dc:attribute name="out" value="cross_section"/> | |
1488 </dc:element> | |
1489 </dc:elements> | |
1490 </longitudinal_section_columns> | |
1491 </dc:context> | |
1492 </dc:elements> | |
1493 </dc:context> | |
1494 </dc:elements> | |
1495 </dc:context> | |
1496 </dc:elements> | |
1497 </waterlevels> | |
1498 </dc:if> | |
1499 | |
1500 | |
1501 <dc:if test="dc:contains($artifact-outs, 'longitudinal_section') or (dc:contains($artifact-outs, 'discharge_longitudinal_section') or (dc:contains($artifact-outs, 'w_differences')))"> | |
1502 <waterlevels> | |
1503 <dc:elements> | |
1504 <dc:context> | |
1505 <dc:statement> | |
1506 SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation | |
1507 FROM master_artifacts m | |
1508 WHERE m.collection_id = ${collection_id} AND m.gid <> CAST(${artifact-id} AS uuid) | |
1509 AND EXISTS ( | |
1510 SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river}) | |
1511 </dc:statement> | |
1512 <dc:elements> | |
1513 <dc:context> | |
1514 <dc:statement> | |
1515 SELECT id AS out_id | |
1516 FROM outs | |
1517 WHERE artifact_id = ${a_id} AND name = 'longitudinal_section' | |
1518 </dc:statement> | |
1519 <dc:elements> | |
1520 <dc:context> | |
1521 <dc:statement> | |
1522 SELECT name AS facet_name, num as facet_num, description AS facet_description | |
1523 FROM facets | |
1524 WHERE out_id = ${out_id} | |
1525 ORDER BY num ASC, name DESC | |
1526 </dc:statement> | |
1527 <longitudinal_section_columns> | |
1528 <dc:attribute name="description" value="${river} ${a_creation}"/> | |
1529 <dc:elements> | |
1530 <dc:element name="${facet_name}"> | |
1531 <dc:attribute name="description" value="${facet_description}"/> | |
1532 <dc:attribute name="ids" value="${facet_num}"/> | |
1533 <dc:attribute name="factory" value="winfo"/> | |
1534 <dc:attribute name="artifact-id" value="${a_gid}"/> | |
1535 <dc:attribute name="out" value="longitudinal_section"/> | |
1536 </dc:element> | |
1537 </dc:elements> | |
1538 </longitudinal_section_columns> | |
1539 </dc:context> | |
1540 </dc:elements> | |
1541 </dc:context> | |
1542 </dc:elements> | |
1543 </dc:context> | |
1544 </dc:elements> | |
1545 </waterlevels> | |
1546 </dc:if> | |
1547 | |
1548 <dc:if test="dc:contains($artifact-outs, 'fix_longitudinal_section_curve')"> | |
1549 <waterlevels> | |
1550 <dc:elements> | |
1551 <dc:context> | |
1552 <dc:statement> | |
1553 SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation | |
1554 FROM master_artifacts m | |
1555 WHERE m.collection_id = ${collection_id} AND m.gid <> CAST(${artifact-id} AS uuid) | |
1556 AND EXISTS ( | |
1557 SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river}) | |
1558 </dc:statement> | |
1559 <dc:elements> | |
1560 | |
1561 <dc:context> | |
1562 <dc:statement> | |
1563 SELECT id AS out_id | |
1564 FROM outs | |
1565 WHERE artifact_id = ${a_id} AND name = 'fix_longitudinal_section_curve' | |
1566 </dc:statement> | |
1567 <dc:elements> | |
1568 <dc:context> | |
1569 <!-- average und deviation ls_0 . ls_1 ...--> | |
1570 <dc:statement> | |
1571 SELECT name AS facet_name, num as facet_num, description AS facet_description | |
1572 FROM facets | |
1573 WHERE out_id = ${out_id} AND ( name LIKE 'fix_deviation_ls%' OR name LIKE 'fix_sector_average_ls%' OR name LIKE 'fix_analysis_events_ls%' OR name LIKE 'fix_reference_events_ls%' ) | |
1574 ORDER BY num ASC, name DESC | |
1575 </dc:statement> | |
1576 <waterlevels> | |
1577 <dc:attribute name="description" value="${river} ${a_creation} ${collection_name}"/> | |
1578 <dc:elements> | |
1579 <dc:element name="${facet_name}"> | |
1580 <dc:attribute name="description" value="${facet_description}"/> | |
1581 <dc:attribute name="ids" value="${facet_num}"/> | |
1582 <dc:attribute name="factory" value="fixanalysis"/> | |
1583 <dc:attribute name="artifact-id" value="${a_gid}"/> | |
1584 <dc:attribute name="out" value="fix_longitudinal_section_curve"/> | |
1585 </dc:element> | |
1586 </dc:elements> | |
1587 </waterlevels> | |
1588 </dc:context> | |
1589 </dc:elements> | |
1590 </dc:context> | |
1591 </dc:elements> | |
1592 </dc:context> | |
1593 </dc:elements> | |
1594 </waterlevels> | |
1595 </dc:if> | |
1596 | |
1597 <dc:if test="dc:contains($artifact-outs, 'fix_deltawt_curve')"> | |
1598 <waterlevels> | |
1599 <dc:elements> | |
1600 <dc:context> | |
1601 <dc:statement> | |
1602 SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation | |
1603 FROM master_artifacts m | |
1604 WHERE m.collection_id = ${collection_id} AND m.gid <> CAST(${artifact-id} AS uuid) | |
1605 AND EXISTS ( | |
1606 SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river}) | |
1607 </dc:statement> | |
1608 <dc:elements> | |
1609 | |
1610 <dc:context> | |
1611 <dc:statement> | |
1612 SELECT id AS out_id | |
1613 FROM outs | |
1614 WHERE artifact_id = ${a_id} AND name = 'fix_deltawt_curve' | |
1615 </dc:statement> | |
1616 <dc:elements> | |
1617 <dc:context> | |
1618 <dc:statement> | |
1619 SELECT name AS facet_name, num as facet_num, description AS facet_description | |
1620 FROM facets | |
1621 WHERE out_id = ${out_id} and ( name LIKE 'fix_sector_average_dwt%' OR name LIKE 'fix_deviation_dwt%' OR name = 'fix_analysis_events_dwt' OR name = 'fix_reference_events_dwt' OR name = 'fix_analysis_periods_dwt' ) | |
1622 ORDER BY num ASC, name DESC | |
1623 </dc:statement> | |
1624 <waterlevels> | |
1625 <dc:attribute name="description" value="${river} ${a_creation} ${collection_name}"/> | |
1626 <dc:elements> | |
1627 <dc:element name="${facet_name}"> | |
1628 <dc:attribute name="description" value="${facet_description}"/> | |
1629 <dc:attribute name="ids" value="${facet_num}"/> | |
1630 <dc:attribute name="factory" value="fixanalysis"/> | |
1631 <dc:attribute name="artifact-id" value="${a_gid}"/> | |
1632 <dc:attribute name="out" value="fix_deltawt_curve"/> | |
1633 </dc:element> | |
1634 </dc:elements> | |
1635 </waterlevels> | |
1636 </dc:context> | |
1637 </dc:elements> | |
1638 </dc:context> | |
1639 </dc:elements> | |
1640 </dc:context> | |
1641 </dc:elements> | |
1642 </waterlevels> | |
1643 </dc:if> | |
1644 | |
1645 <dc:if test="dc:contains($artifact-outs, 'fix_derivate_curve')"> | |
1646 <waterlevels> | |
1647 <dc:elements> | |
1648 <dc:context> | |
1649 <dc:statement> | |
1650 SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation | |
1651 FROM master_artifacts m | |
1652 WHERE m.collection_id = ${collection_id} AND m.gid <> CAST(${artifact-id} AS uuid) | |
1653 AND EXISTS ( | |
1654 SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river}) | |
1655 </dc:statement> | |
1656 <dc:elements> | |
1657 | |
1658 <dc:context> | |
1659 <dc:statement> | |
1660 SELECT id AS out_id | |
1661 FROM outs | |
1662 WHERE artifact_id = ${a_id} AND name = 'fix_derivate_curve' | |
1663 </dc:statement> | |
1664 <dc:elements> | |
1665 <dc:context> | |
1666 <dc:statement> | |
1667 SELECT name AS facet_name, num as facet_num, description AS facet_description | |
1668 FROM facets | |
1669 WHERE out_id = ${out_id} and name = 'fix_derivate' | |
1670 ORDER BY num ASC, name DESC | |
1671 </dc:statement> | |
1672 <waterlevels> | |
1673 <dc:attribute name="description" value="${river} ${a_creation} ${collection_name}"/> | |
1674 <dc:elements> | |
1675 <dc:element name="${facet_name}"> | |
1676 <dc:attribute name="description" value="${facet_description}"/> | |
1677 <dc:attribute name="ids" value="${facet_num}"/> | |
1678 <dc:attribute name="factory" value="fixanalysis"/> | |
1679 <dc:attribute name="artifact-id" value="${a_gid}"/> | |
1680 <dc:attribute name="out" value="fix_derivate_curve"/> | |
1681 </dc:element> | |
1682 </dc:elements> | |
1683 </waterlevels> | |
1684 </dc:context> | |
1685 </dc:elements> | |
1686 </dc:context> | |
1687 </dc:elements> | |
1688 </dc:context> | |
1689 </dc:elements> | |
1690 </waterlevels> | |
1691 </dc:if> | |
1692 | |
1693 <dc:if test="dc:contains($artifact-outs, 'fix_wq_curve')"> | |
1694 <waterlevels> | |
1695 <dc:elements> | |
1696 <dc:context> | |
1697 <dc:statement> | |
1698 SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation | |
1699 FROM master_artifacts m | |
1700 WHERE m.collection_id = ${collection_id} AND m.gid <> CAST(${artifact-id} AS uuid) | |
1701 AND EXISTS ( | |
1702 SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river}) | |
1703 </dc:statement> | |
1704 <dc:elements> | |
1705 | |
1706 <dc:context> | |
1707 <dc:statement> | |
1708 SELECT id AS out_id | |
1709 FROM outs | |
1710 WHERE artifact_id = ${a_id} AND name = 'fix_wq_curve' | |
1711 </dc:statement> | |
1712 <dc:elements> | |
1713 <dc:context> | |
1714 <dc:statement> | |
1715 SELECT name AS facet_name, num as facet_num, description AS facet_description | |
1716 FROM facets | |
1717 WHERE out_id = ${out_id} and ( name LIKE 'fix_sector_average_wq%' OR name = 'fix_wq_curve' OR name LIKE 'fix_analysis_events_wq%' OR name LIKE 'fix_reference_events_wq%' ) | |
1718 ORDER BY num ASC, name DESC | |
1719 </dc:statement> | |
1720 <waterlevels> | |
1721 <dc:attribute name="description" value="${river} ${a_creation} ${collection_name}"/> | |
1722 <dc:elements> | |
1723 <dc:element name="${facet_name}"> | |
1724 <dc:attribute name="description" value="${facet_description}"/> | |
1725 <dc:attribute name="ids" value="${facet_num}"/> | |
1726 <dc:attribute name="factory" value="fixanalysis"/> | |
1727 <dc:attribute name="artifact-id" value="${a_gid}"/> | |
1728 <dc:attribute name="out" value="fix_wq_curve"/> | |
1729 </dc:element> | |
1730 </dc:elements> | |
1731 </waterlevels> | |
1732 </dc:context> | |
1733 </dc:elements> | |
1734 </dc:context> | |
1735 </dc:elements> | |
1736 </dc:context> | |
1737 </dc:elements> | |
1738 </waterlevels> | |
1739 </dc:if> | |
1740 | |
1741 <dc:if test="dc:contains($artifact-outs, 'duration_curve')"> | |
1742 <computed_discharge_curves> | |
1743 <dc:elements> | |
1744 <dc:context> | |
1745 <dc:statement> | |
1746 SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation | |
1747 FROM master_artifacts m | |
1748 WHERE m.collection_id = ${collection_id} AND m.gid <> CAST(${artifact-id} AS uuid) | |
1749 AND EXISTS ( | |
1750 SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river}) | |
1751 </dc:statement> | |
1752 <dc:elements> | |
1753 <dc:context> | |
1754 <dc:statement> | |
1755 SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description | |
1756 FROM outs as o, facets as f, artifacts as a | |
1757 WHERE (f.name = 'duration_curve.q' or f.name = 'duration_curve.w') and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id} | |
1758 </dc:statement> | |
1759 <dc:elements> | |
1760 <dc:element name="${facet_name}"> | |
1761 <dc:attribute name="description" value="${facet_description}"/> | |
1762 <dc:attribute name="factory" value="winfo"/> | |
1763 <dc:attribute name="artifact-id" value="${aid}"/> | |
1764 <dc:attribute name="ids" value="${aid}"/> | |
1765 <dc:attribute name="out" value="duration_curve"/> | |
1766 </dc:element> | |
1767 </dc:elements> | |
1768 </dc:context> | |
1769 </dc:elements> | |
1770 </dc:context> | |
1771 </dc:elements> | |
1772 </computed_discharge_curves> | |
1773 </dc:if> | |
1774 <dc:comment> | |
1775 WATERLEVELS - ONLY SHOW Ws | |
1776 </dc:comment> | |
1777 | |
1778 <!-- TODO doesnt work nicely for fix/wq-diags. --> | |
1779 <dc:if test="dc:contains($artifact-outs, 'waterlevels') or (dc:contains($artifact-outs, 'fix_wq_curve'))"> | |
1780 <waterlevels> | |
1781 <dc:elements> | |
1782 <dc:context> | |
1783 <dc:statement> | |
1784 SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation | |
1785 FROM master_artifacts m | |
1786 WHERE m.collection_id = ${collection_id} AND m.gid <> CAST(${artifact-id} AS uuid) | |
1787 AND EXISTS ( | |
1788 SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river}) | |
1789 </dc:statement> | |
1790 <dc:elements> | |
1791 | |
1792 <dc:context> | |
1793 <dc:statement> | |
1794 SELECT id AS out_id | |
1795 FROM outs | |
1796 WHERE artifact_id = ${a_id} AND name = 'longitudinal_section' | |
1797 </dc:statement> | |
1798 <dc:elements> | |
1799 <dc:context> | |
1800 <dc:statement> | |
1801 SELECT name AS facet_name, num as facet_num, description AS facet_description | |
1802 FROM facets | |
1803 WHERE out_id = ${out_id} and name = 'longitudinal_section.w' | |
1804 ORDER BY num ASC, name DESC | |
1805 </dc:statement> | |
1806 <waterlevels> | |
1807 <dc:attribute name="description" value="${river} ${a_creation} ${collection_name}"/> | |
1808 <dc:elements> | |
1809 <dc:element name="${facet_name}"> | |
1810 <dc:attribute name="description" value="${facet_description}"/> | |
1811 <dc:attribute name="ids" value="${facet_num}"/> | |
1812 <dc:attribute name="factory" value="winfo"/> | |
1813 <dc:attribute name="artifact-id" value="${a_gid}"/> | |
1814 <dc:attribute name="out" value="longitudinal_section"/> | |
1815 </dc:element> | |
1816 </dc:elements> | |
1817 </waterlevels> | |
1818 </dc:context> | |
1819 </dc:elements> | |
1820 </dc:context> | |
1821 </dc:elements> | |
1822 </dc:context> | |
1823 </dc:elements> | |
1824 </waterlevels> | |
1825 </dc:if> | |
1826 | |
1827 <dc:comment> | |
1828 SHOW FLOODMAPS | |
1829 </dc:comment> | |
1830 | |
1831 <dc:if test="dc:contains($artifact-outs, 'floodmap') or dc:contains($artifact-outs, 'map')"> | |
1832 <floodmap> | |
1833 <dc:elements> | |
1834 <dc:context> | |
1835 <dc:statement> | |
1836 SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation | |
1837 FROM master_artifacts m | |
1838 WHERE m.collection_id = ${collection_id} AND m.gid <> CAST(${artifact-id} AS uuid) | |
1839 AND EXISTS ( | |
1840 SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river}) | |
1841 </dc:statement> | |
1842 <dc:elements> | |
1843 <dc:context> | |
1844 <dc:statement> | |
1845 SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description | |
1846 FROM outs as o, facets as f, artifacts as a | |
1847 WHERE f.name = 'floodmap.wsplgen' and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id} | |
1848 </dc:statement> | |
1849 <dc:elements> | |
1850 <dc:element name="${facet_name}"> | |
1851 <dc:attribute name="description" value="${facet_description}"/> | |
1852 <dc:attribute name="factory" value="winfo"/> | |
1853 <dc:attribute name="artifact-id" value="${aid}"/> | |
1854 <dc:attribute name="ids" value="${aid}"/> | |
1855 <dc:attribute name="out" value="floodmap"/> | |
1856 </dc:element> | |
1857 </dc:elements> | |
1858 </dc:context> | |
1859 </dc:elements> | |
1860 </dc:context> | |
1861 </dc:elements> | |
1862 </floodmap> | |
1863 </dc:if> | |
1864 | |
1865 </dc:context> | |
1866 </old_calculations> | |
1867 | |
1868 | |
1869 <dc:comment> | |
1870 Include System specific part when 'load-system' is in parameters. | |
1871 ----------------------------------------------------------------- | |
1872 </dc:comment> | |
1873 <dc:choose> | |
1874 <dc:when test="dc:contains($parameters,'load-system')"> | |
1875 <dc:call-macro name="load-system"/> | |
1876 </dc:when> | |
1877 </dc:choose> | |
1878 </dc:when> | |
1879 | |
1880 | |
1881 <dc:comment> | |
1882 Include System specific part only if no user ID is given. | |
1883 --------------------------------------------------------- | |
1884 </dc:comment> | |
1885 <dc:otherwise> | |
1886 <dc:call-macro name="load-system"/> | |
1887 </dc:otherwise> | |
1888 </dc:choose> | |
1889 </datacage> | |
1890 </dc:template> |