comparison flys-artifacts/doc/conf/meta-data.xml @ 5379:61bf64b102bc mapgenfix

Merge with default branch
author Christian Lins <christian.lins@intevation.de>
date Fri, 22 Mar 2013 11:25:54 +0100
parents d43ef9f709cd
children 51db7fbc2e77
comparison
equal deleted inserted replaced
5175:cfc5540a4eec 5379:61bf64b102bc
1 <?xml version="1.0" encoding="UTF-8" standalone="yes"?> 1 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2 <dc:template xmlns:dc="http://www.intevation.org/2011/Datacage"> 2 <dc:template xmlns:dc="http://www.intevation.org/2011/Datacage">
3 <datacage> 3 <datacage>
4 <dc:macro name="SQL-wst_columns_statement"> 4 <dc:comment>
5 Statement to load data from wsts.
6 </dc:comment>
7 <dc:macro name="SQL-wst_columns_statement">
5 <dc:statement> 8 <dc:statement>
6 SELECT wst_columns.id AS prot_column_id, 9 SELECT wst_columns.id AS prot_column_id,
7 wst_columns.name AS prot_column_name, 10 wst_columns.name AS prot_column_name,
8 wst_columns.position AS prot_rel_pos, 11 wst_columns.position AS prot_rel_pos,
9 wst_columns.description AS info, 12 wst_columns.description AS info,
10 wst_ranges.a AS deffrom, 13 wst_ranges.a AS deffrom,
11 wst_ranges.b AS defto 14 wst_ranges.b AS defto
12 FROM wst_columns, wst_ranges 15 FROM wst_columns, wst_ranges
13 WHERE wst_columns.wst_id = ${prot_id} AND wst_ranges.wst_column_id = wst_columns.id 16 WHERE wst_columns.wst_id = ${prot_id}
17 AND wst_ranges.wst_column_id = wst_columns.id
18 AND (${fromkm} BETWEEN wst_ranges.a AND wst_ranges.b
19 OR ${tokm} BETWEEN wst_ranges.a AND wst_ranges.b
20 OR wst_ranges.a BETWEEN ${fromkm} AND ${tokm}
21 OR wst_ranges.b BETWEEN ${fromkm} AND ${tokm})
14 ORDER by wst_columns.position 22 ORDER by wst_columns.position
15 </dc:statement> 23 </dc:statement>
16 </dc:macro> 24 </dc:macro>
25
26 <dc:comment>
27 Load user specific distance information from artifact.
28 </dc:comment>
29 <dc:macro name="user-range">
30 <dc:choose>
31 <dc:when test="dc:contains($parameters, 'user-id')">
32 <dc:context connection="user">
33 <dc:statement>
34 SELECT COALESCE(ld_mode, '') AS ldm,
35 COALESCE(ld_locations, '') AS ldl,
36 COALESCE(ld_from, '') AS ldf,
37 COALESCE(ld_to, '') AS ldt
38 FROM master_artifacts_range
39 WHERE gid = CAST(${artifact-id} as uuid)
40 </dc:statement>
41 <dc:elements>
42 <dc:variable name="fromkm" type="number" expr="dc:fromValue($ldm, $ldl, $ldf)"/>
43 <dc:variable name="tokm" type="number" expr="dc:toValue($ldm, $ldl, $ldt)"/>
44 <dc:macro-body/>
45 </dc:elements>
46 </dc:context>
47 </dc:when>
48 <dc:otherwise>
49 <dc:variable name="fromkm" type="number" expr="dc:fromValue('', '', '')"/>
50 <dc:variable name="tokm" type="number" expr="dc:toValue('', '', '')"/>
51 <dc:macro-body/>
52 </dc:otherwise>
53 </dc:choose>
54 </dc:macro>
55
56 <dc:comment>
57 System part. Load data for the given river.
58 </dc:comment>
17 <dc:macro name="load-system"> 59 <dc:macro name="load-system">
18 <dc:context connection="system"> 60 <dc:context connection="system">
19 <dc:statement> 61 <dc:statement>
20 SELECT id AS river_id, name as river_name FROM rivers 62 SELECT id AS river_id, name as river_name FROM rivers
21 WHERE lower(name) LIKE lower(${river}) 63 WHERE lower(name) LIKE lower(${river})
22 </dc:statement> 64 </dc:statement>
23 <dc:elements> 65 <dc:elements>
66
24 <dc:comment> 67 <dc:comment>
25 Base-data macros (mostly data imported from wst-files) 68 Base-data macros (mostly data imported from wst-files).
26 </dc:comment> 69 </dc:comment>
27 <dc:macro name="basedata_0"> 70 <dc:macro name="basedata_0">
71 <dc:call-macro name="user-range">
28 <dc:comment comment=" BASEDATA ---------------------------"/> 72 <dc:comment comment=" BASEDATA ---------------------------"/>
29 <basedata> 73 <basedata>
30 <dc:context> 74 <dc:context connection="system">
31 <dc:statement> 75 <dc:statement>
32 SELECT id AS prot_id, 76 SELECT id AS prot_id,
33 description AS prot_description 77 description AS prot_description
34 FROM wsts WHERE kind = 0 AND river_id = ${river_id} 78 FROM wsts WHERE kind = 0 AND river_id = ${river_id}
35 </dc:statement> 79 </dc:statement>
49 </dc:context> 93 </dc:context>
50 </basedata> 94 </basedata>
51 </dc:elements> 95 </dc:elements>
52 </dc:context> 96 </dc:context>
53 </basedata> 97 </basedata>
54 </dc:macro> 98 </dc:call-macro>
99 </dc:macro>
100
55 <dc:macro name="basedata_0_wq"> 101 <dc:macro name="basedata_0_wq">
102 <dc:call-macro name="user-range">
56 <dc:comment comment=" BASEDATA ---------------------------"/> 103 <dc:comment comment=" BASEDATA ---------------------------"/>
57 <basedata> 104 <basedata>
58 <dc:context> 105 <dc:context connection="system">
59 <dc:statement> 106 <dc:statement>
60 SELECT id AS prot_id, 107 SELECT id AS prot_id,
61 description AS prot_description 108 description AS prot_description
62 FROM wsts WHERE kind = 0 AND river_id = ${river_id} 109 FROM wsts WHERE kind = 0 AND river_id = ${river_id}
63 </dc:statement> 110 </dc:statement>
77 </dc:context> 124 </dc:context>
78 </basedata> 125 </basedata>
79 </dc:elements> 126 </dc:elements>
80 </dc:context> 127 </dc:context>
81 </basedata> 128 </basedata>
129 </dc:call-macro>
82 </dc:macro> 130 </dc:macro>
83 131
84 <dc:macro name="basedata_1_additionals_marks"> 132 <dc:macro name="basedata_1_additionals_marks">
133 <dc:call-macro name="user-range">
85 <dc:comment comment=".ZUS -------------------------------"/> 134 <dc:comment comment=".ZUS -------------------------------"/>
86 <additionals> 135 <additionals>
87 <dc:context> 136 <dc:context connection="system">
88 <dc:statement> 137 <dc:statement>
89 SELECT id AS prot_id, 138 SELECT id AS prot_id,
90 description AS prot_description 139 description AS prot_description
91 FROM wsts WHERE kind = 1 AND river_id = ${river_id} 140 FROM wsts WHERE kind = 1 AND river_id = ${river_id}
92 </dc:statement> 141 </dc:statement>
106 </dc:context> 155 </dc:context>
107 </additional> 156 </additional>
108 </dc:elements> 157 </dc:elements>
109 </dc:context> 158 </dc:context>
110 </additionals> 159 </additionals>
160 </dc:call-macro>
111 </dc:macro> 161 </dc:macro>
112 162
113 <dc:macro name="basedata_1_additionals"> 163 <dc:macro name="basedata_1_additionals">
164 <dc:call-macro name="user-range">
114 <dc:comment comment=".ZUS -------------------------------"/> 165 <dc:comment comment=".ZUS -------------------------------"/>
115 <additionals> 166 <additionals>
116 <dc:context> 167 <dc:context connection="system">
117 <dc:statement> 168 <dc:statement>
118 SELECT id AS prot_id, 169 SELECT id AS prot_id,
119 description AS prot_description 170 description AS prot_description
120 FROM wsts WHERE kind = 1 AND river_id = ${river_id} 171 FROM wsts WHERE kind = 1 AND river_id = ${river_id}
121 </dc:statement> 172 </dc:statement>
135 </dc:context> 186 </dc:context>
136 </additional> 187 </additional>
137 </dc:elements> 188 </dc:elements>
138 </dc:context> 189 </dc:context>
139 </additionals> 190 </additionals>
191 </dc:call-macro>
140 </dc:macro> 192 </dc:macro>
141 193
142 <dc:macro name="basedata_1_additionals-relative_point"> 194 <dc:macro name="basedata_1_additionals-relative_point">
195 <dc:call-macro name="user-range">
143 <dc:comment comment=".ZUS -------------------------------"/> 196 <dc:comment comment=".ZUS -------------------------------"/>
144 <additionals> 197 <additionals>
145 <dc:context> 198 <dc:context connection="system">
146 <dc:statement> 199 <dc:statement>
147 SELECT id AS prot_id, 200 SELECT id AS prot_id,
148 description AS prot_description 201 description AS prot_description
149 FROM wsts WHERE kind = 1 AND river_id = ${river_id} 202 FROM wsts WHERE kind = 1 AND river_id = ${river_id}
150 </dc:statement> 203 </dc:statement>
164 </dc:context> 217 </dc:context>
165 </relativepoint> 218 </relativepoint>
166 </dc:elements> 219 </dc:elements>
167 </dc:context> 220 </dc:context>
168 </additionals> 221 </additionals>
222 </dc:call-macro>
169 </dc:macro> 223 </dc:macro>
170 224
171 <dc:macro name="basedata_2_fixations_wst"> 225 <dc:macro name="basedata_2_fixations_wst">
172 <fixations> 226 <dc:call-macro name="user-range">
173 <dc:context> 227 <fixations>
174 <dc:statement> 228 <dc:context connection="system">
175 SELECT id AS prot_id, 229 <dc:statement>
176 description AS prot_description 230 SELECT id AS prot_id,
177 FROM wsts WHERE kind = 2 AND river_id = ${river_id} 231 description AS prot_description
178 </dc:statement> 232 FROM wsts WHERE kind = 2 AND river_id = ${river_id}
179 <dc:elements> 233 </dc:statement>
180 <fixation> 234 <dc:elements>
181 <dc:attribute name="name" value="${prot_description}"/> 235 <fixation>
182 <!--dc:attribute name="ids" value="fixations-wstv-A-${prot_id}"/--> 236 <dc:attribute name="name" value="${prot_description}"/>
183 <dc:context> 237 <!--dc:attribute name="ids" value="fixations-wstv-A-${prot_id}"/-->
184 <dc:call-macro name="SQL-wst_columns_statement"/> 238 <dc:context>
185 <dc:elements> 239 <dc:call-macro name="SQL-wst_columns_statement"/>
186 <column> 240 <dc:elements>
187 <dc:attribute name="name" value="${prot_column_name}"/> 241 <column>
188 <dc:attribute name="ids" value="fixations-wstv-${prot_rel_pos}-${prot_id}"/> 242 <dc:attribute name="name" value="${prot_column_name}"/>
189 <dc:attribute name="factory" value="wqinterpol"/> 243 <dc:attribute name="ids" value="fixations-wstv-${prot_rel_pos}-${prot_id}"/>
190 <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/> 244 <dc:attribute name="factory" value="wqinterpol"/>
191 </column> 245 <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/>
192 </dc:elements> 246 </column>
193 </dc:context> 247 </dc:elements>
194 </fixation> 248 </dc:context>
195 </dc:elements> 249 </fixation>
196 </dc:context> 250 </dc:elements>
197 </fixations> 251 </dc:context>
252 </fixations>
253 </dc:call-macro>
198 </dc:macro> 254 </dc:macro>
199 255
200 <dc:macro name="basedata_2_fixations_wqkms"> 256 <dc:macro name="basedata_2_fixations_wqkms">
201 <fixations> 257 <dc:call-macro name="user-range">
202 <dc:context> 258 <fixations>
203 <dc:statement> 259 <dc:context connection="system">
204 SELECT id AS prot_id, 260 <dc:statement>
205 description AS prot_description 261 SELECT id AS prot_id,
206 FROM wsts WHERE kind = 2 AND river_id = ${river_id} 262 description AS prot_description
207 </dc:statement> 263 FROM wsts WHERE kind = 2 AND river_id = ${river_id}
208 <dc:elements> 264 </dc:statement>
209 <fixation> 265 <dc:elements>
210 <dc:attribute name="name" value="${prot_description}"/> 266 <fixation>
211 <dc:context> 267 <dc:attribute name="name" value="${prot_description}"/>
212 <dc:call-macro name="SQL-wst_columns_statement"/> 268 <dc:context>
213 <dc:elements> 269 <dc:call-macro name="SQL-wst_columns_statement"/>
214 <column> 270 <dc:elements>
215 <dc:attribute name="name" value="${prot_column_name}"/> 271 <column>
216 <dc:attribute name="ids" value="fixations-wstv-${prot_rel_pos}-${prot_id}"/> 272 <dc:attribute name="name" value="${prot_column_name}"/>
217 <dc:attribute name="factory" value="wqinterpol"/> 273 <dc:attribute name="ids" value="fixations-wstv-${prot_rel_pos}-${prot_id}"/>
218 <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/> 274 <dc:attribute name="factory" value="wqinterpol"/>
219 </column> 275 <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/>
220 </dc:elements> 276 </column>
221 </dc:context> 277 </dc:elements>
222 </fixation> 278 </dc:context>
223 </dc:elements> 279 </fixation>
224 </dc:context> 280 </dc:elements>
225 </fixations> 281 </dc:context>
282 </fixations>
283 </dc:call-macro>
226 </dc:macro> 284 </dc:macro>
227 285
228 <dc:macro name="basedata_2_fixations"> 286 <dc:macro name="basedata_2_fixations">
229 <fixations> 287 <dc:call-macro name="user-range">
230 <dc:context> 288 <fixations>
231 <dc:statement> 289 <dc:context connection="system">
232 SELECT id AS prot_id, 290 <dc:statement>
233 description AS prot_description 291 SELECT id AS prot_id,
234 FROM wsts WHERE kind = 2 AND river_id = ${river_id} 292 description AS prot_description
235 </dc:statement> 293 FROM wsts WHERE kind = 2 AND river_id = ${river_id}
236 <dc:elements> 294 </dc:statement>
237 <fixation> 295 <dc:elements>
238 <dc:attribute name="name" value="${prot_description}"/> 296 <fixation>
239 <dc:context> 297 <dc:attribute name="name" value="${prot_description}"/>
240 <dc:call-macro name="SQL-wst_columns_statement"/> 298 <dc:context>
241 <dc:elements> 299 <dc:call-macro name="SQL-wst_columns_statement"/>
242 <column> 300 <dc:elements>
243 <dc:attribute name="name" value="${prot_column_name}"/> 301 <column>
244 <dc:attribute name="ids" value="fixations-wstv-${prot_rel_pos}-${prot_id}"/> 302 <dc:attribute name="name" value="${prot_column_name}"/>
245 <dc:attribute name="factory" value="staticwkms"/> 303 <dc:attribute name="ids" value="fixations-wstv-${prot_rel_pos}-${prot_id}"/>
246 <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/> 304 <dc:attribute name="factory" value="staticwkms"/>
247 </column> 305 <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/>
248 </dc:elements> 306 </column>
249 </dc:context> 307 </dc:elements>
250 </fixation> 308 </dc:context>
251 </dc:elements> 309 </fixation>
252 </dc:context> 310 </dc:elements>
253 </fixations> 311 </dc:context>
312 </fixations>
313 </dc:call-macro>
254 </dc:macro> 314 </dc:macro>
255 315
256 <dc:macro name="basedata_2_fixations_relative_point"> 316 <dc:macro name="basedata_2_fixations_relative_point">
257 <fixations> 317 <dc:call-macro name="user-range">
258 <dc:context> 318 <fixations>
259 <dc:statement> 319 <dc:context connection="system">
260 SELECT id AS prot_id, 320 <dc:statement>
261 description AS prot_description 321 SELECT id AS prot_id,
262 FROM wsts WHERE kind = 2 AND river_id = ${river_id} 322 description AS prot_description
263 </dc:statement> 323 FROM wsts WHERE kind = 2 AND river_id = ${river_id}
264 <dc:elements> 324 </dc:statement>
265 <relativepoint> 325 <dc:elements>
266 <dc:attribute name="name" value="${prot_description}"/> 326 <relativepoint>
267 <dc:context> 327 <dc:attribute name="name" value="${prot_description}"/>
268 <dc:call-macro name="SQL-wst_columns_statement"/> 328 <dc:context>
269 <dc:elements> 329 <dc:call-macro name="SQL-wst_columns_statement"/>
270 <column> 330 <dc:elements>
271 <dc:attribute name="name" value="${prot_column_name}"/> 331 <column>
272 <dc:attribute name="ids" value="fixations-wstv-${prot_rel_pos}-${prot_id}"/> 332 <dc:attribute name="name" value="${prot_column_name}"/>
273 <dc:attribute name="factory" value="staticwkms"/> 333 <dc:attribute name="ids" value="fixations-wstv-${prot_rel_pos}-${prot_id}"/>
274 <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/> 334 <dc:attribute name="factory" value="staticwkms"/>
275 </column> 335 <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/>
276 </dc:elements> 336 </column>
277 </dc:context> 337 </dc:elements>
278 </relativepoint> 338 </dc:context>
279 </dc:elements> 339 </relativepoint>
280 </dc:context> 340 </dc:elements>
281 </fixations> 341 </dc:context>
342 </fixations>
343 </dc:call-macro>
282 </dc:macro> 344 </dc:macro>
283 345
284 <dc:macro name="basedata_3_officials"> 346 <dc:macro name="basedata_3_officials">
347 <dc:call-macro name="user-range">
285 <dc:comment comment=".wst -------------------------------"/> 348 <dc:comment comment=".wst -------------------------------"/>
286 <officiallines> 349 <officiallines>
287 <dc:context> 350 <dc:context connection="system">
288 <dc:statement> 351 <dc:statement>
289 SELECT id AS prot_id, 352 SELECT id AS prot_id,
290 description AS prot_description 353 description AS prot_description
291 FROM wsts WHERE kind = 3 AND river_id = ${river_id} 354 FROM wsts WHERE kind = 3 AND river_id = ${river_id}
292 </dc:statement> 355 </dc:statement>
306 </dc:context> 369 </dc:context>
307 </official> 370 </official>
308 </dc:elements> 371 </dc:elements>
309 </dc:context> 372 </dc:context>
310 </officiallines> 373 </officiallines>
374 </dc:call-macro>
311 </dc:macro> 375 </dc:macro>
312 376
313 <dc:macro name="basedata_4_heightmarks-points-relative_points"> 377 <dc:macro name="basedata_4_heightmarks-points-relative_points">
314 <heightmarks> 378 <dc:call-macro name="user-range">
315 <dc:context> 379 <heightmarks>
316 <dc:statement> 380 <dc:context connection="system">
317 SELECT id AS prot_id, 381 <dc:statement>
318 description AS prot_description 382 SELECT id AS prot_id,
319 FROM wsts WHERE kind = 4 AND river_id = ${river_id} 383 description AS prot_description
320 </dc:statement> 384 FROM wsts WHERE kind = 4 AND river_id = ${river_id}
321 <dc:elements> 385 </dc:statement>
322 <relativepoint> 386 <dc:elements>
323 <dc:attribute name="name" value="${prot_description}"/> 387 <relativepoint>
324 <dc:context> 388 <dc:attribute name="name" value="${prot_description}"/>
325 <dc:call-macro name="SQL-wst_columns_statement"/> 389 <dc:context>
326 <dc:elements> 390 <dc:call-macro name="SQL-wst_columns_statement"/>
327 <column> 391 <dc:elements>
328 <dc:attribute name="name" value="${prot_column_name}"/> 392 <column>
329 <dc:attribute name="ids" value="heightmarks_points-wstv-${prot_rel_pos}-${prot_id}"/> 393 <dc:attribute name="name" value="${prot_column_name}"/>
330 <dc:attribute name="factory" value="staticwkms"/> 394 <dc:attribute name="ids" value="heightmarks_points-wstv-${prot_rel_pos}-${prot_id}"/>
331 <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/> 395 <dc:attribute name="factory" value="staticwkms"/>
332 </column> 396 <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/>
333 </dc:elements> 397 </column>
334 </dc:context> 398 </dc:elements>
335 </relativepoint> 399 </dc:context>
336 </dc:elements> 400 </relativepoint>
337 </dc:context> 401 </dc:elements>
338 </heightmarks> 402 </dc:context>
403 </heightmarks>
404 </dc:call-macro>
339 </dc:macro> 405 </dc:macro>
340 406
341 <dc:macro name="basedata_4_heightmarks-points"> 407 <dc:macro name="basedata_4_heightmarks-points">
342 <heightmarks> 408 <dc:call-macro name="user-range">
343 <dc:context> 409 <heightmarks>
344 <dc:statement> 410 <dc:context connection="system">
345 SELECT id AS prot_id, 411 <dc:statement>
346 description AS prot_description 412 SELECT id AS prot_id,
347 FROM wsts WHERE kind = 4 AND river_id = ${river_id} 413 description AS prot_description
348 </dc:statement> 414 FROM wsts WHERE kind = 4 AND river_id = ${river_id}
349 <dc:elements> 415 </dc:statement>
350 <heightmark> 416 <dc:elements>
351 <dc:attribute name="name" value="${prot_description}"/> 417 <heightmark>
352 <dc:context> 418 <dc:attribute name="name" value="${prot_description}"/>
353 <dc:call-macro name="SQL-wst_columns_statement"/> 419 <dc:context>
354 <dc:elements> 420 <dc:call-macro name="SQL-wst_columns_statement"/>
355 <column> 421 <dc:elements>
356 <dc:attribute name="name" value="${prot_column_name}"/> 422 <column>
357 <dc:attribute name="ids" value="heightmarks_points-wstv-${prot_rel_pos}-${prot_id}"/> 423 <dc:attribute name="name" value="${prot_column_name}"/>
358 <dc:attribute name="factory" value="staticwkms"/> 424 <dc:attribute name="ids" value="heightmarks_points-wstv-${prot_rel_pos}-${prot_id}"/>
359 <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/> 425 <dc:attribute name="factory" value="staticwkms"/>
360 </column> 426 <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/>
361 </dc:elements> 427 </column>
362 </dc:context> 428 </dc:elements>
363 </heightmark> 429 </dc:context>
364 </dc:elements> 430 </heightmark>
365 </dc:context> 431 </dc:elements>
366 </heightmarks> 432 </dc:context>
433 </heightmarks>
434 </dc:call-macro>
367 </dc:macro> 435 </dc:macro>
368 436
369 <dc:macro name="basedata_4_heightmarks-wq"> 437 <dc:macro name="basedata_4_heightmarks-wq">
370 <heightmarks> 438 <dc:call-macro name="user-range">
371 <dc:context> 439 <heightmarks>
372 <dc:statement> 440 <dc:context connection="system">
373 SELECT id AS prot_id, 441 <dc:statement>
374 description AS prot_description 442 SELECT id AS prot_id,
375 FROM wsts WHERE kind = 4 AND river_id = ${river_id} 443 description AS prot_description
376 </dc:statement> 444 FROM wsts WHERE kind = 4 AND river_id = ${river_id}
377 <dc:elements> 445 </dc:statement>
378 <heightmark> 446 <dc:elements>
379 <dc:attribute name="name" value="${prot_description}"/> 447 <heightmark>
380 <dc:context> 448 <dc:attribute name="name" value="${prot_description}"/>
381 <dc:call-macro name="SQL-wst_columns_statement"/> 449 <dc:context>
382 <dc:elements> 450 <dc:call-macro name="SQL-wst_columns_statement"/>
383 <column> 451 <dc:elements>
384 <dc:attribute name="name" value="${prot_column_name}"/> 452 <column>
385 <dc:attribute name="ids" value="heightmarks_annotations-wstv-${prot_rel_pos}-${prot_id}"/> 453 <dc:attribute name="name" value="${prot_column_name}"/>
386 <dc:attribute name="factory" value="wqinterpol"/> 454 <dc:attribute name="ids" value="heightmarks_annotations-wstv-${prot_rel_pos}-${prot_id}"/>
387 <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/> 455 <dc:attribute name="factory" value="wqinterpol"/>
388 </column> 456 <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/>
389 </dc:elements> 457 </column>
390 </dc:context> 458 </dc:elements>
391 </heightmark> 459 </dc:context>
392 </dc:elements> 460 </heightmark>
393 </dc:context> 461 </dc:elements>
394 </heightmarks> 462 </dc:context>
463 </heightmarks>
464 </dc:call-macro>
395 </dc:macro> 465 </dc:macro>
396 466
397 <dc:macro name="basedata_5_flood-protections_relative_points"> 467 <dc:macro name="basedata_5_flood-protections_relative_points">
398 <flood_protections> 468 <dc:call-macro name="user-range">
399 <dc:attribute name="id" value="flood-protections-${river_id}"/> 469 <flood_protections>
400 <dc:context> 470 <dc:attribute name="id" value="flood-protections-${river_id}"/>
401 <dc:statement> 471 <dc:context connection="system">
402 SELECT id AS prot_id, 472 <dc:statement>
403 description AS prot_description 473 SELECT id AS prot_id,
404 FROM wsts WHERE kind = 5 AND river_id = ${river_id} 474 description AS prot_description
405 </dc:statement> 475 FROM wsts WHERE kind = 5 AND river_id = ${river_id}
406 <dc:elements> 476 </dc:statement>
407 <relativepoint> 477 <dc:elements>
408 <dc:attribute name="name" value="${prot_description}"/> 478 <relativepoint>
409 <dc:attribute name="db-id" value="${prot_id}"/> 479 <dc:attribute name="name" value="${prot_description}"/>
410 <dc:attribute name="factory" value="staticwkms"/> 480 <dc:attribute name="db-id" value="${prot_id}"/>
411 <columns> 481 <dc:attribute name="factory" value="staticwkms"/>
482 <columns>
483 <dc:context>
484 <dc:call-macro name="SQL-wst_columns_statement"/>
485 <dc:elements>
486 <column>
487 <dc:attribute name="name" value="${prot_column_name}"/>
488 <dc:attribute name="ids" value="flood_protection-wstv-${prot_rel_pos}-${prot_id}"/>
489 <dc:attribute name="factory" value="staticwkms"/>
490 <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/>
491 </column>
492 </dc:elements>
493 </dc:context>
494 </columns>
495 </relativepoint>
496 </dc:elements>
497 </dc:context>
498 </flood_protections>
499 </dc:call-macro>
500 </dc:macro>
501
502 <dc:macro name="basedata_5_flood-protections">
503 <dc:call-macro name="user-range">
504 <flood_protections>
505 <dc:attribute name="id" value="flood-protections-${river_id}"/>
506 <dc:context connection="system">
507 <dc:statement>
508 SELECT id AS prot_id,
509 description AS prot_description
510 FROM wsts WHERE kind = 5 AND river_id = ${river_id}
511 </dc:statement>
512 <dc:elements>
513 <flood_protection>
514 <dc:attribute name="name" value="${prot_description}"/>
515 <dc:attribute name="db-id" value="${prot_id}"/>
516 <dc:attribute name="factory" value="staticwkms"/>
412 <dc:context> 517 <dc:context>
413 <dc:call-macro name="SQL-wst_columns_statement"/> 518 <dc:call-macro name="SQL-wst_columns_statement"/>
414 <dc:elements> 519 <dc:elements>
415 <column> 520 <column>
416 <dc:attribute name="name" value="${prot_column_name}"/> 521 <dc:attribute name="name" value="${prot_column_name}"/>
418 <dc:attribute name="factory" value="staticwkms"/> 523 <dc:attribute name="factory" value="staticwkms"/>
419 <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/> 524 <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/>
420 </column> 525 </column>
421 </dc:elements> 526 </dc:elements>
422 </dc:context> 527 </dc:context>
423 </columns> 528 </flood_protection>
424 </relativepoint> 529 </dc:elements>
425 </dc:elements> 530 </dc:context>
426 </dc:context> 531 </flood_protections>
427 </flood_protections> 532 </dc:call-macro>
428 </dc:macro>
429
430 <dc:macro name="basedata_5_flood-protections">
431 <flood_protections>
432 <dc:attribute name="id" value="flood-protections-${river_id}"/>
433 <dc:context>
434 <dc:statement>
435 SELECT id AS prot_id,
436 description AS prot_description
437 FROM wsts WHERE kind = 5 AND river_id = ${river_id}
438 </dc:statement>
439 <dc:elements>
440 <flood_protection>
441 <dc:attribute name="name" value="${prot_description}"/>
442 <dc:attribute name="db-id" value="${prot_id}"/>
443 <dc:attribute name="factory" value="staticwkms"/>
444 <dc:context>
445 <dc:call-macro name="SQL-wst_columns_statement"/>
446 <dc:elements>
447 <column>
448 <dc:attribute name="name" value="${prot_column_name}"/>
449 <dc:attribute name="ids" value="flood_protection-wstv-${prot_rel_pos}-${prot_id}"/>
450 <dc:attribute name="factory" value="staticwkms"/>
451 <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/>
452 </column>
453 </dc:elements>
454 </dc:context>
455 </flood_protection>
456 </dc:elements>
457 </dc:context>
458 </flood_protections>
459 </dc:macro> 533 </dc:macro>
460 534
461 <dc:macro name="mainvalues"> 535 <dc:macro name="mainvalues">
462 <mainvalue> 536 <mainvalue>
463 <dc:attribute name="factory" value="mainvalue"/> 537 <dc:attribute name="factory" value="mainvalue"/>
510 </dc:context> 584 </dc:context>
511 </annotations> 585 </annotations>
512 </dc:macro> 586 </dc:macro>
513 587
514 <dc:macro name="cross_sections"> 588 <dc:macro name="cross_sections">
515 <cross_sections> 589 <dc:call-macro name="user-range">
516 <dc:attribute name="id" value="flood-protections-${river_id}"/> 590 <cross_sections>
517 <dc:context> 591 <dc:attribute name="id" value="flood-protections-${river_id}"/>
518 <dc:statement> 592 <dc:context connection="system">
519 SELECT id AS prot_id, 593 <dc:statement>
520 description AS prot_description 594 SELECT DISTINCT
521 FROM cross_sections WHERE river_id = ${river_id} 595 cs.id AS prot_id,
522 </dc:statement> 596 cs.description AS prot_description
523 <dc:elements> 597 FROM cross_sections cs
524 <cross_section> 598 JOIN cross_section_lines csl ON csl.cross_section_id = cs.id
525 <dc:attribute name="name" value="${prot_description}"/> 599 WHERE cs.river_id = ${river_id}
526 <dc:attribute name="ids" value="${prot_id}"/> 600 AND csl.km BETWEEN ${fromkm} AND ${tokm}
527 <dc:attribute name="factory" value="crosssections"/> 601 </dc:statement>
528 </cross_section> 602 <dc:elements>
529 </dc:elements> 603 <cross_section>
530 </dc:context> 604 <dc:attribute name="name" value="${prot_description}"/>
531 </cross_sections> 605 <dc:attribute name="ids" value="${prot_id}"/>
606 <dc:attribute name="factory" value="crosssections"/>
607 </cross_section>
608 </dc:elements>
609 </dc:context>
610 </cross_sections>
611 </dc:call-macro>
532 </dc:macro> 612 </dc:macro>
533 613
534 <dc:macro name="hyks"> 614 <dc:macro name="hyks">
535 <hyks> 615 <dc:call-macro name="user-range">
536 <dc:attribute name="id" value="hyk-${river_id}"/> 616 <hyks>
537 <dc:context> 617 <dc:attribute name="id" value="hyk-${river_id}"/>
538 <dc:statement> 618 <dc:context connection="system">
539 SELECT id AS hyk_id, 619 <dc:statement>
540 description AS hyk_description 620 SELECT DISTINCT
541 FROM hyks WHERE river_id = ${river_id} 621 h.id AS hyk_id,
542 </dc:statement> 622 h.description AS hyk_description
543 <dc:elements> 623 FROM hyks h
544 <hyk> 624 JOIN hyk_entries he ON he.hyk_id = h.id
545 <dc:attribute name="name" value="${hyk_description}"/> 625 WHERE river_id = ${river_id}
546 <dc:attribute name="ids" value="${hyk_id}"/> 626 AND he.km BETWEEN ${fromkm} AND ${tokm}
547 <dc:attribute name="factory" value="hyk"/> 627 </dc:statement>
548 </hyk> 628 <dc:elements>
549 </dc:elements> 629 <hyk>
550 </dc:context> 630 <dc:attribute name="name" value="${hyk_description}"/>
551 </hyks> 631 <dc:attribute name="ids" value="${hyk_id}"/>
632 <dc:attribute name="factory" value="hyk"/>
633 </hyk>
634 </dc:elements>
635 </dc:context>
636 </hyks>
637 </dc:call-macro>
552 </dc:macro> 638 </dc:macro>
553 639
554 <dc:macro name="flow_velocity_measurements"> 640 <dc:macro name="flow_velocity_measurements">
555 <flowvelocitymeasurement> 641 <dc:call-macro name="user-range">
556 <dc:context> 642 <flowvelocitymeasurement>
557 <dc:statement> 643 <dc:context connection="system">
558 SELECT id AS fvmid, 644 <dc:statement>
559 description AS fvmd 645 SELECT id AS fvmid,
560 FROM flow_velocity_measurements WHERE river_id = ${river_id} 646 description AS fvmd
561 </dc:statement> 647 FROM flow_velocity_measurements WHERE river_id = ${river_id}
562 <dc:elements> 648 </dc:statement>
563 <flow_velocity_measurement> 649 <dc:elements>
564 <dc:attribute name="name" value="${fvmd}"/> 650 <flow_velocity_measurement>
565 <dc:attribute name="ids" value="${fvmid}"/> 651 <dc:attribute name="name" value="${fvmd}"/>
566 <dc:attribute name="factory" value="flowvelocity"/> 652 <dc:attribute name="ids" value="${fvmid}"/>
567 <dc:context> 653 <dc:attribute name="factory" value="flowvelocity"/>
568 <dc:statement> 654 <dc:context>
569 SELECT id, description, station, datetime, v, w, q 655 <dc:statement>
570 FROM flow_velocity_measure_values 656 SELECT id, description, station, datetime, v, w, q
571 WHERE measurements_id = ${fvmid} 657 FROM flow_velocity_measure_values
572 </dc:statement> 658 WHERE measurements_id = ${fvmid}
573 <dc:elements> 659 AND station BETWEEN ${fromkm} AND ${tokm}
574 <measurement_value> 660 </dc:statement>
575 <dc:attribute name="name" value="${id}-${description}-${station}-${datetime}"/> 661 <dc:elements>
576 <dc:attribute name="ids" value="${id}"/> 662 <measurement_value>
577 <dc:attribute name="factory" value="flowvelocity"/> 663 <dc:attribute name="name" value="${id}-${description}-${station}-${datetime}"/>
578 </measurement_value> 664 <dc:attribute name="ids" value="${id}"/>
579 </dc:elements> 665 <dc:attribute name="factory" value="flowvelocity"/>
580 </dc:context> 666 </measurement_value>
581 </flow_velocity_measurement> 667 </dc:elements>
668 </dc:context>
669 </flow_velocity_measurement>
582 </dc:elements> 670 </dc:elements>
583 </dc:context> 671 </dc:context>
584 </flowvelocitymeasurement> 672 </flowvelocitymeasurement>
673 </dc:call-macro>
674 </dc:macro>
675
676 <dc:macro name="sounding-width">
677 <soundings_width>
678 <dc:context>
679 <dc:statement>
680 SELECT id AS bedh_id,
681 year AS bedh_year,
682 description AS bedh_descr
683 FROM bed_height_single WHERE river_id = ${river_id}
684 </dc:statement>
685 <dc:elements>
686 <height>
687 <dc:attribute name="factory" value="bedheight"/>
688 <dc:attribute name="ids" value="bedheight-singlevalues-${bedh_id}-${bedh_year}"/>
689 <dc:attribute name="description" value="${bedh_descr}"/>
690 </height>
691 </dc:elements>
692 </dc:context>
693 </soundings_width>
585 </dc:macro> 694 </dc:macro>
586 695
587 <dc:macro name="longitudinal-section-prototype"> 696 <dc:macro name="longitudinal-section-prototype">
588 <dc:call-macro name="basedata_0"/> 697 <dc:call-macro name="basedata_0"/>
589 <dc:call-macro name="basedata_1_additionals"/> 698 <dc:call-macro name="basedata_1_additionals"/>
590 <dc:comment comment=" FIXATIONS ---------------------------"/> 699 <dc:comment comment=" FIXATIONS ---------------------------"/>
591 <dc:call-macro name="basedata_2_fixations"/> 700 <dc:call-macro name="basedata_2_fixations"/>
592 <dc:comment comment=" HOEHENMARKEN ---------------------------"/> 701 <dc:comment comment=" HOEHENMARKEN ---------------------------"/>
593 <dc:call-macro name="basedata_4_heightmarks-points"/> 702 <dc:call-macro name="basedata_4_heightmarks-points"/>
594 <dc:comment comment=" AMTL LINIEN ---------------------------"/> 703 <dc:comment comment=" AMTL LINIEN ---------------------------"/>
595 <dc:call-macro name="basedata_3_officials"/> 704 <dc:call-macro name="basedata_3_officials"/>
596 <dc:call-macro name="basedata_5_flood-protections"/> 705 <dc:call-macro name="basedata_5_flood-protections"/>
597 <dc:call-macro name="annotations_per_type"/> 706 <dc:call-macro name="annotations_per_type"/>
598 </dc:macro> 707 </dc:macro>
599 708
600 <dc:comment> 709 <dc:comment>
601
602 + River-Node 710 + River-Node
603
604 </dc:comment> 711 </dc:comment>
605
606 <river> 712 <river>
607 <dc:attribute name="name" value="${river_name}"/> 713 <dc:attribute name="name" value="${river_name}"/>
608 714
609 <dc:choose> 715 <dc:choose>
610 <dc:when test="dc:contains($parameters, 'recommended')"> 716 <dc:when test="dc:contains($parameters, 'recommended')">
628 <dc:call-macro name="annotations"/> 734 <dc:call-macro name="annotations"/>
629 <dc:call-macro name="mainvalues"/> 735 <dc:call-macro name="mainvalues"/>
630 </dc:if> 736 </dc:if>
631 <dc:if test="dc:contains($artifact-outs, 'fix_wq_curve')"> 737 <dc:if test="dc:contains($artifact-outs, 'fix_wq_curve')">
632 <dc:call-macro name="qsectors"/> 738 <dc:call-macro name="qsectors"/>
739 </dc:if>
740 <dc:if test="dc:contains($artifact-outs, 'longitudinal_section')">
741 <dc:call-macro name="annotations"/>
633 </dc:if> 742 </dc:if>
634 <dc:if test="dc:contains($artifact-outs, 'fix_longitudinal_section_curve')"> 743 <dc:if test="dc:contains($artifact-outs, 'fix_longitudinal_section_curve')">
635 <dc:call-macro name="annotations"/> 744 <dc:call-macro name="annotations"/>
636 </dc:if> 745 </dc:if>
637 <dc:if test="dc:contains($artifact-outs, 'bed_difference_epoch')"> 746 <dc:if test="dc:contains($artifact-outs, 'bed_difference_epoch')">
707 </dc:if> 816 </dc:if>
708 <dc:comment> 817 <dc:comment>
709 MINFO bedheight middle 818 MINFO bedheight middle
710 </dc:comment> 819 </dc:comment>
711 <dc:if test="dc:contains($artifact-outs, 'bedheight_middle')"> 820 <dc:if test="dc:contains($artifact-outs, 'bedheight_middle')">
712 <soundings_width> 821 <dc:call-macro name="sounding-width"/>
713 <dc:context>
714 <dc:statement>
715 SELECT id AS bedh_id,
716 year AS bedh_year,
717 description AS bedh_descr
718 FROM bed_height_single WHERE river_id = ${river_id}
719 </dc:statement>
720 <dc:elements>
721 <height>
722 <dc:attribute name="factory" value="bedheight"/>
723 <dc:attribute name="ids" value="bedheight-singlevalues-${bedh_id}-${bedh_year}"/>
724 <dc:attribute name="description" value="${bedh_descr}"/>
725 </height>
726 </dc:elements>
727 </dc:context>
728 </soundings_width>
729 </dc:if> 822 </dc:if>
730 <dc:comment comment="--- non-recommendations---"/> 823 <dc:comment comment="--- non-recommendations---"/>
731 </dc:otherwise> 824 </dc:otherwise>
732 </dc:choose> 825 </dc:choose>
733 826
842 </dc:context> 935 </dc:context>
843 </discharge_table_gauge> 936 </discharge_table_gauge>
844 </discharge_table_nn> 937 </discharge_table_nn>
845 </dc:if> 938 </dc:if>
846 939
847 <dc:if test="dc:contains($artifact-outs, 'floodmap')"> 940 <dc:if test="dc:contains($artifact-outs, 'floodmap') or dc:contains($artifact-outs, 'floodmap-hws')">
848 <floodmap> 941 <floodmap>
849 <dc:choose> 942 <dc:choose>
850 <dc:when test="dc:contains($parameters, 'recommended')"> 943 <dc:when test="dc:contains($parameters, 'recommended')">
851 <dc:call-macro name="flood-map-recommended"/> 944 <dc:call-macro name="flood-map-recommended"/>
852 </dc:when> 945 </dc:when>
856 <dc:otherwise> 949 <dc:otherwise>
857 <dc:call-macro name="flood-map-complete"/> 950 <dc:call-macro name="flood-map-complete"/>
858 </dc:otherwise> 951 </dc:otherwise>
859 </dc:choose> 952 </dc:choose>
860 </floodmap> 953 </floodmap>
954 <dc:if test="dc:contains($parameters, 'hws')">
955 <hws>
956 <dc:call-macro name="flood-map-hws-lines" />
957 <dc:call-macro name="flood-map-hws-points" />
958 </hws>
959 </dc:if>
960
861 <dc:macro name="flood-map-recommended"> 961 <dc:macro name="flood-map-recommended">
862 <dc:comment> 962 <dc:comment>
863 FIXME: Following two macros look identical to me. 963 FIXME: Following two macros look identical to me.
864 </dc:comment> 964 </dc:comment>
865 <kilometrage> 965 <kilometrage>
877 </dc:macro> 977 </dc:macro>
878 <dc:macro name="flood-map-dem"> 978 <dc:macro name="flood-map-dem">
879 <dems> 979 <dems>
880 <dc:context> 980 <dc:context>
881 <dc:statement> 981 <dc:statement>
882 SELECT id AS dem_id, 982 SELECT d.id AS dem_id,
883 lower AS dem_lower, 983 r.a AS dem_lower,
884 upper AS dem_upper, 984 r.b AS dem_upper,
885 name AS name, 985 d.name AS name,
886 projection || ' | ' || year_from || ' - ' || year_to AS info 986 d.projection || ' | ' || t.start_time || ' - ' || t.stop_time AS info
887 FROM dem WHERE river_id = ${river_id} 987 FROM dem d
988 JOIN ranges r ON d.range_id = r.id
989 JOIN time_intervals t ON d.time_interval_id = t.id
990 WHERE d.river_id = ${river_id}
888 </dc:statement> 991 </dc:statement>
889 <dc:elements> 992 <dc:elements>
890 <dem> 993 <dem>
891 <dc:attribute name="factory" value="demfactory"/> 994 <dc:attribute name="factory" value="demfactory"/>
892 <dc:attribute name="ids" value="${dem_id}"/> 995 <dc:attribute name="ids" value="${dem_id}"/>
894 <dc:attribute name="info" value="${info}"/> 997 <dc:attribute name="info" value="${info}"/>
895 </dem> 998 </dem>
896 </dc:elements> 999 </dc:elements>
897 </dc:context> 1000 </dc:context>
898 </dems> 1001 </dems>
1002 </dc:macro>
1003 <dc:macro name="flood-map-hws-lines">
1004 <dc:context>
1005 <dc:statement>
1006 SELECT DISTINCT
1007 name AS hws_name,
1008 official AS hws_official,
1009 kind_id AS hws_kind
1010 FROM hws_lines
1011 WHERE river_id = ${river_id}
1012 </dc:statement>
1013 <lines>
1014 <official>
1015 <Durchlass>
1016 <dc:elements filter="$hws_kind=1 and $hws_official=1">
1017 <hws>
1018 <dc:attribute name="factory" value="hwsfactory"/>
1019 <dc:attribute name="name" value="${hws_name}"/>
1020 </hws>
1021 </dc:elements>
1022 </Durchlass>
1023 <Damm>
1024 <dc:elements filter="$hws_kind=2 and $hws_official=1">
1025 <hws>
1026 <dc:attribute name="factory" value="hwsfactory"/>
1027 <dc:attribute name="name" value="${hws_name}"/>
1028 </hws>
1029 </dc:elements>
1030 </Damm>
1031 <Graben>
1032 <dc:elements filter="$hws_kind=3 and $hws_official=1">
1033 <hws>
1034 <dc:attribute name="factory" value="hwsfactory"/>
1035 <dc:attribute name="name" value="${hws_name}"/>
1036 </hws>
1037 </dc:elements>
1038 </Graben>
1039 </official>
1040 <inofficial>
1041 <Durchlass>
1042 <dc:elements filter="$hws_kind=1 and $hws_official=0">
1043 <hws>
1044 <dc:attribute name="factory" value="hwsfactory"/>
1045 <dc:attribute name="name" value="${hws_name}"/>
1046 </hws>
1047 </dc:elements>
1048 </Durchlass>
1049 <Damm>
1050 <dc:elements filter="$hws_kind=2 and $hws_official=0">
1051 <hws>
1052 <dc:attribute name="factory" value="hwsfactory"/>
1053 <dc:attribute name="name" value="${hws_name}"/>
1054 </hws>
1055 </dc:elements>
1056 </Damm>
1057 <Graben>
1058 <dc:elements filter="$hws_kind=3 and $hws_official=0">
1059 <hws>
1060 <dc:attribute name="factory" value="hwsfactory"/>
1061 <dc:attribute name="name" value="${hws_name}"/>
1062 </hws>
1063 </dc:elements>
1064 </Graben>
1065 </inofficial>
1066 </lines>
1067 </dc:context>
1068 </dc:macro>
1069 <dc:macro name="flood-map-hws-points">
1070 <dc:context>
1071 <dc:statement>
1072 SELECT DISTINCT
1073 name AS hws_points_name,
1074 official AS hws_points_official,
1075 kind_id AS hws_points_kind
1076 FROM hws_points
1077 WHERE river_id = ${river_id}
1078 </dc:statement>
1079 <points>
1080 <official>
1081 <Durchlass>
1082 <dc:elements filter="$hws_points_kind=1 and $hws_points_official=1">
1083 <hws>
1084 <dc:attribute name="factory" value="hwsfactory"/>
1085 <dc:attribute name="name" value="${hws_points_name}"/>
1086 </hws>
1087 </dc:elements>
1088 </Durchlass>
1089 <Damm>
1090 <dc:elements filter="$hws_points_kind=2 and $hws_points_official=1">
1091 <hws>
1092 <dc:attribute name="factory" value="hwsfactory"/>
1093 <dc:attribute name="name" value="${hws_points_name}"/>
1094 </hws>
1095 </dc:elements>
1096 </Damm>
1097 <Graben>
1098 <dc:elements filter="$hws_kind=3 and $hws_official=1">
1099 <hws>
1100 <dc:attribute name="factory" value="hwsfactory"/>
1101 <dc:attribute name="name" value="${hws_points_name}"/>
1102 </hws>
1103 </dc:elements>
1104 </Graben>
1105 </official>
1106 <inofficial>
1107 <Durchlass>
1108 <dc:elements filter="$hws_points_kind=1 and $hws_points_official=0">
1109 <hws>
1110 <dc:attribute name="factory" value="hwsfactory"/>
1111 <dc:attribute name="name" value="${hws_points_name}"/>
1112 </hws>
1113 </dc:elements>
1114 </Durchlass>
1115 <Damm>
1116 <dc:elements filter="$hws_points_kind=2 and $hws_points_official=0">
1117 <hws>
1118 <dc:attribute name="factory" value="hwsfactory"/>
1119 <dc:attribute name="name" value="${hws_points_name}"/>
1120 </hws>
1121 </dc:elements>
1122 </Damm>
1123 <Graben>
1124 <dc:elements filter="$hws_points_kind=3 and $hws_points_official=0">
1125 <hws>
1126 <dc:attribute name="factory" value="hwsfactory"/>
1127 <dc:attribute name="name" value="${hws_points_name}"/>
1128 </hws>
1129 </dc:elements>
1130 </Graben>
1131 </inofficial>
1132 </points>
1133 </dc:context>
899 </dc:macro> 1134 </dc:macro>
900 <dc:macro name="flood-map-km"> 1135 <dc:macro name="flood-map-km">
901 <dc:context> 1136 <dc:context>
902 <dc:statement> 1137 <dc:statement>
903 SELECT count(*) as km_exists 1138 SELECT count(*) as km_exists
923 <dc:if test="$km_exists>0"> 1158 <dc:if test="$km_exists>0">
924 <qps> 1159 <qps>
925 <dc:attribute name="factory" value="wmsqpsfactory"/> 1160 <dc:attribute name="factory" value="wmsqpsfactory"/>
926 <dc:attribute name="ids" value="${river_id}"/> 1161 <dc:attribute name="ids" value="${river_id}"/>
927 </qps> 1162 </qps>
928 </dc:if>
929 </dc:elements>
930 </dc:context>
931 </dc:macro>
932 <dc:macro name="flood-map-hws">
933 <dc:context>
934 <dc:statement>
935 SELECT count(*) as km_exists, name as name
936 FROM hws WHERE river_id = ${river_id} GROUP BY name
937 </dc:statement>
938 <dc:elements>
939 <dc:if test="$km_exists>0">
940 <hws>
941 <dc:attribute name="factory" value="wmshwsfactory"/>
942 <dc:attribute name="ids" value="${river_id};${name}"/>
943 <dc:attribute name="name" value="${name}"/>
944 </hws>
945 </dc:if> 1163 </dc:if>
946 </dc:elements> 1164 </dc:elements>
947 </dc:context> 1165 </dc:context>
948 </dc:macro> 1166 </dc:macro>
949 <dc:macro name="flood-map-hydr-boundaries"> 1167 <dc:macro name="flood-map-hydr-boundaries">
1024 </dc:if> 1242 </dc:if>
1025 </dc:elements> 1243 </dc:elements>
1026 </dc:context> 1244 </dc:context>
1027 </land> 1245 </land>
1028 </dc:macro> 1246 </dc:macro>
1029 <dc:macro name="flood-map-catchments">
1030 <dc:context>
1031 <dc:statement>
1032 SELECT count(*) as km_exists, name as name
1033 FROM catchment WHERE river_id = ${river_id} GROUP BY name
1034 </dc:statement>
1035 <dc:elements>
1036 <dc:if test="$km_exists>0">
1037 <catchment>
1038 <dc:attribute name="factory" value="wmscatchmentfactory"/>
1039 <dc:attribute name="ids" value="${river_id};${name}"/>
1040 <dc:attribute name="name" value="${name}"/>
1041 </catchment>
1042 </dc:if>
1043 </dc:elements>
1044 </dc:context>
1045 </dc:macro>
1046 <dc:macro name="flood-map-floodplain"> 1247 <dc:macro name="flood-map-floodplain">
1047 <dc:context> 1248 <dc:context>
1048 <dc:statement> 1249 <dc:statement>
1049 SELECT count(*) as km_exists 1250 SELECT count(*) as km_exists
1050 FROM floodplain WHERE river_id = ${river_id} 1251 FROM floodplain WHERE river_id = ${river_id}
1057 </floodplain> 1258 </floodplain>
1058 </dc:if> 1259 </dc:if>
1059 </dc:elements> 1260 </dc:elements>
1060 </dc:context> 1261 </dc:context>
1061 </dc:macro> 1262 </dc:macro>
1062 <dc:macro name="flood-map-lines"> 1263 <dc:macro name="hwslines">
1063 <dc:context> 1264 <dc:context>
1064 <dc:statement> 1265 <dc:statement>
1065 SELECT count(*) as km_exists, name as name 1266 SELECT count(*) as km_exists, name as name
1066 FROM lines WHERE river_id = ${river_id} GROUP BY name 1267 FROM hws_lines WHERE river_id = ${river_id} GROUP BY name
1067 </dc:statement> 1268 </dc:statement>
1068 <dc:elements> 1269 <dc:elements>
1069 <dc:if test="$km_exists>0"> 1270 <dc:if test="$km_exists>0">
1070 <line> 1271 <line>
1071 <dc:attribute name="factory" value="wmslinefactory"/> 1272 <dc:attribute name="factory" value="wmshwslinesfactory"/>
1273 <dc:attribute name="ids" value="${river_id};${name}"/>
1274 <dc:attribute name="name" value="${name}"/>
1275 </line>
1276 </dc:if>
1277 </dc:elements>
1278 </dc:context>
1279 </dc:macro>
1280 <dc:macro name="hwspoints">
1281 <dc:context>
1282 <dc:statement>
1283 SELECT count(*) as km_exists, name as name
1284 FROM hws_points WHERE river_id = ${river_id} GROUP BY name
1285 </dc:statement>
1286 <dc:elements>
1287 <dc:if test="$km_exists>0">
1288 <line>
1289 <dc:attribute name="factory" value="wmshwspointsfactory"/>
1072 <dc:attribute name="ids" value="${river_id};${name}"/> 1290 <dc:attribute name="ids" value="${river_id};${name}"/>
1073 <dc:attribute name="name" value="${name}"/> 1291 <dc:attribute name="name" value="${name}"/>
1074 </line> 1292 </line>
1075 </dc:if> 1293 </dc:if>
1076 </dc:elements> 1294 </dc:elements>
1221 <dc:call-macro name="flood-map-catchments"/> 1439 <dc:call-macro name="flood-map-catchments"/>
1222 </catchments> 1440 </catchments>
1223 <fixpoints> 1441 <fixpoints>
1224 <dc:call-macro name="flood-map-fixpoints"/> 1442 <dc:call-macro name="flood-map-fixpoints"/>
1225 </fixpoints> 1443 </fixpoints>
1226 <hws>
1227 <dc:call-macro name="flood-map-hws"/>
1228 </hws>
1229 <hydrboundaries> 1444 <hydrboundaries>
1230 <dc:call-macro name="flood-map-hydr-boundaries"/> 1445 <dc:call-macro name="flood-map-hydr-boundaries"/>
1231 <dc:call-macro name="flood-map-floodplain"/> 1446 <dc:call-macro name="flood-map-floodplain"/>
1232 </hydrboundaries> 1447 </hydrboundaries>
1233 <kilometrage> 1448 <kilometrage>
1236 <dc:attribute name="ids" value="${river_id}"/> 1451 <dc:attribute name="ids" value="${river_id}"/>
1237 </riveraxis> 1452 </riveraxis>
1238 <dc:call-macro name="flood-map-km"/> 1453 <dc:call-macro name="flood-map-km"/>
1239 <dc:call-macro name="flood-map-qps"/> 1454 <dc:call-macro name="flood-map-qps"/>
1240 </kilometrage> 1455 </kilometrage>
1241 <lines> 1456 <hws>
1242 <dc:call-macro name="flood-map-lines"/> 1457 <hws_lines>
1243 </lines> 1458 <dc:call-macro name="hwslines"/>
1459 </hws_lines>
1460 <hws_points>
1461 <dc:call-macro name="hwspoints"/>
1462 </hws_points>
1463 </hws>
1244 <dc:call-macro name="flood-map-uesk"/> 1464 <dc:call-macro name="flood-map-uesk"/>
1245 <gaugelocations> 1465 <gaugelocations>
1246 <dc:call-macro name="flood-map-gaugelocations"/> 1466 <dc:call-macro name="flood-map-gaugelocations"/>
1247 </gaugelocations> 1467 </gaugelocations>
1248 <rastermap> 1468 <rastermap>
1316 ------------------ 1536 ------------------
1317 </dc:comment> 1537 </dc:comment>
1318 <dc:when test="dc:contains($parameters, 'user-id')"> 1538 <dc:when test="dc:contains($parameters, 'user-id')">
1319 1539
1320 1540
1321 <old_calculations> 1541 <old_calculations>
1322 <dc:context connection="user"> 1542 <!-- <dc:macro name="load-user">-->
1323 <dc:comment> 1543 <dc:call-macro name="user-range">
1324 Get the user and collection-id. 1544 <dc:context connection="user">
1325 </dc:comment> 1545 <dc:comment>
1326 <dc:statement> 1546 Get the user and collection-id.
1547 </dc:comment>
1548 <dc:statement>
1327 SELECT u.id AS user_id, c.id AS collection_id, c.name as collection_name 1549 SELECT u.id AS user_id, c.id AS collection_id, c.name as collection_name
1328 FROM collections c JOIN users u ON c.user_id = u.id 1550 FROM collections c JOIN users u ON c.user_id = u.id
1329 WHERE u.gid = CAST(${user-id} AS uuid) 1551 WHERE u.gid = CAST(${user-id} AS uuid)
1330 ORDER BY c.creation DESC 1552 ORDER BY c.creation DESC
1331 </dc:statement> 1553 </dc:statement>
1332 1554
1555
1556 <dc:macro name="range-filter">
1557 <dc:statement>
1558 SELECT m.id AS a_id,
1559 m.state AS a_state,
1560 m.gid AS a_gid,
1561 m.creation AS a_creation,
1562 COALESCE(ld_mode, '') AS ld_m,
1563 COALESCE(ld_locations, '') AS ld_l,
1564 COALESCE(ld_from, '') AS ld_f,
1565 COALESCE(ld_to, '') AS ld_t
1566 FROM master_artifacts_range m
1567 WHERE m.collection_id = ${collection_id} AND m.gid &lt;&gt; CAST(${artifact-id} AS uuid)
1568 AND EXISTS (
1569 SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river})
1570 </dc:statement>
1571 <dc:elements>
1572 <dc:variable name="from" type="number" expr="dc:fromValue($ld_m, $ld_l, $ld_f)"/>
1573 <dc:variable name="to" type="number" expr="dc:toValue($ld_m, $ld_l, $ld_t)"/>
1574 <dc:if test="($from &gt;= $fromkm and $from &lt;= $tokm) or ($to &lt;= $tokm and $to &gt;= $fromkm) or ($from &lt;= $fromkm and $to &gt;= $tokm)">
1575 <dc:macro-body/>
1576 </dc:if>
1577 </dc:elements>
1578 </dc:macro>
1579
1333 <!-- OFFICIAL LINES --> 1580 <!-- OFFICIAL LINES -->
1334 <dc:if test="dc:contains($artifact-outs, 'longitudinal_section')"> 1581 <dc:if test="dc:contains($artifact-outs, 'longitudinal_section')">
1335 <dc:comment comment=".wst -------------------------------"/> 1582 <dc:comment comment=".wst -------------------------------"/>
1336 <officiallines> 1583 <officiallines>
1337 <dc:elements> 1584 <dc:elements>
1338 <dc:context> 1585 <dc:context>
1339 <dc:statement> 1586 <dc:statement>
1340 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 1587 SELECT m.id AS a_id,
1341 FROM master_artifacts m, artifact_data ardg, artifact_data arv 1588 m.state AS a_state,
1342 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' 1589 m.gid AS a_gid,
1343 AND EXISTS ( 1590 m.creation AS a_creation,
1344 SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river}) 1591 ardg.v AS gaugy,
1592 arv.v AS wqsingle
1593 FROM master_artifacts m,
1594 artifact_data ardg,
1595 artifact_data arv
1596 WHERE m.collection_id = ${collection_id}
1597 AND m.gid = CAST(${artifact-id} AS uuid)
1598 AND ardg.artifact_id = m.id
1599 AND ardg.k = 'ld_gaugename'
1600 AND arv.artifact_id = m.id
1601 AND arv.k = 'wq_single'
1602 AND EXISTS (
1603 SELECT id
1604 FROM artifact_data ad
1605 WHERE ad.artifact_id = m.id
1606 AND k = 'river'
1607 AND v = ${river})
1345 </dc:statement> 1608 </dc:statement>
1346 <dc:elements> 1609 <dc:elements>
1347 <dc:context connection="system"> 1610 <dc:context connection="system">
1348 <dc:statement> 1611 <dc:statement>
1349 SELECT ol.wst_id AS wstid, ol.wst_column_pos AS wstcolpos, ol.name AS olname, ol.value AS oval 1612 SELECT ol.wst_id AS wstid, ol.wst_column_pos AS wstcolpos, ol.name AS olname, ol.value AS oval
1367 1630
1368 <dc:comment> 1631 <dc:comment>
1369 SHOW W-DIFFERENCES 1632 SHOW W-DIFFERENCES
1370 </dc:comment> 1633 </dc:comment>
1371 1634
1372 <dc:if test="dc:contains($artifact-outs, 'longitudinal_section') or (dc:contains($artifact-outs, 'w_differences') or (dc:contains($artifact-outs, 'discharge_longitudinal_section')))"> 1635 <dc:macro name="differences">
1373 <differences> 1636 <differences>
1374 <dc:elements> 1637 <dc:elements>
1375 <dc:context> 1638 <dc:context>
1376 <dc:statement> 1639 <dc:call-macro name="range-filter">
1377 SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation
1378 FROM master_artifacts m
1379 WHERE m.collection_id = ${collection_id} AND m.gid &lt;&gt; CAST(${artifact-id} AS uuid)
1380 AND EXISTS (
1381 SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river})
1382 </dc:statement>
1383 <dc:elements>
1384 <dc:context> 1640 <dc:context>
1385 <dc:statement> 1641 <dc:statement>
1386 SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description 1642 SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description
1387 FROM outs as o, facets as f, artifacts as a 1643 FROM outs as o, facets as f, artifacts as a
1388 WHERE f.name = 'w_differences' and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id} 1644 WHERE f.name = 'w_differences' and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id}
1395 <dc:attribute name="ids" value="${aid}"/> 1651 <dc:attribute name="ids" value="${aid}"/>
1396 <dc:attribute name="out" value="w_differences"/> 1652 <dc:attribute name="out" value="w_differences"/>
1397 </dc:element> 1653 </dc:element>
1398 </dc:elements> 1654 </dc:elements>
1399 </dc:context> 1655 </dc:context>
1400 </dc:elements> 1656 </dc:call-macro>
1401 </dc:context> 1657 </dc:context>
1402 </dc:elements> 1658 </dc:elements>
1403 </differences> 1659 </differences>
1404 </dc:if> 1660 </dc:macro>
1405 1661
1406 <dc:comment> 1662 <dc:comment>
1407 SHOW REFERENCE CURVE 1663 SHOW REFERENCE CURVE
1408 </dc:comment> 1664 </dc:comment>
1409 1665
1410 <dc:if test="dc:contains($artifact-outs, 'reference_curve')"> 1666
1667 <dc:macro name="reference-curves">
1411 <reference_curves> 1668 <reference_curves>
1412 <dc:elements> 1669 <dc:elements>
1413 <dc:context> 1670 <dc:context>
1414 <dc:statement> 1671 <dc:call-macro name="user-range">
1415 SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation
1416 FROM master_artifacts m
1417 WHERE m.collection_id = ${collection_id} AND m.gid &lt;&gt; CAST(${artifact-id} AS uuid)
1418 AND EXISTS (
1419 SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river})
1420 </dc:statement>
1421 <dc:elements>
1422 <dc:context> 1672 <dc:context>
1423 <dc:statement> 1673 <dc:statement>
1424 SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description 1674 SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description
1425 FROM outs as o, facets as f, artifacts as a 1675 FROM outs as o, facets as f, artifacts as a
1426 WHERE f.name = 'reference_curve' and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id} 1676 WHERE f.name = 'reference_curve' and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id}
1433 <dc:attribute name="ids" value="${aid}"/> 1683 <dc:attribute name="ids" value="${aid}"/>
1434 <dc:attribute name="out" value="reference_curve"/> 1684 <dc:attribute name="out" value="reference_curve"/>
1435 </dc:element> 1685 </dc:element>
1436 </dc:elements> 1686 </dc:elements>
1437 </dc:context> 1687 </dc:context>
1438 </dc:elements> 1688 </dc:call-macro>
1439 </dc:context> 1689 </dc:context>
1440 </dc:elements> 1690 </dc:elements>
1441 </reference_curves> 1691 </reference_curves>
1442 </dc:if> 1692 </dc:macro>
1443 1693
1444 <dc:comment> 1694 <dc:comment>
1445 SHOW COMPUTED DISCHARGE CURVES 1695 SHOW COMPUTED DISCHARGE CURVES
1446 </dc:comment> 1696 </dc:comment>
1447 1697
1448 <dc:if test="dc:contains($artifact-outs, 'computed_discharge_curve')"> 1698 <dc:macro name="computed-discharge-curve">
1449 <computed_discharge_curves> 1699 <computed_discharge_curves>
1450 <dc:elements> 1700 <dc:elements>
1451 <dc:context> 1701 <dc:context>
1452 <dc:statement> 1702 <dc:call-macro name="range-filter">
1453 SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation
1454 FROM master_artifacts m
1455 WHERE m.collection_id = ${collection_id} AND m.gid &lt;&gt; CAST(${artifact-id} AS uuid)
1456 AND EXISTS (
1457 SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river})
1458 </dc:statement>
1459 <dc:elements>
1460 <dc:context> 1703 <dc:context>
1461 <dc:statement> 1704 <dc:statement>
1462 SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description 1705 SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description
1463 FROM outs as o, facets as f, artifacts as a 1706 FROM outs as o, facets as f, artifacts as a
1464 WHERE f.name = 'computed_discharge_curve.q' and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id} 1707 WHERE f.name = 'computed_discharge_curve.q' and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id}
1471 <dc:attribute name="ids" value="${aid}"/> 1714 <dc:attribute name="ids" value="${aid}"/>
1472 <dc:attribute name="out" value="computed_discharge_curve"/> 1715 <dc:attribute name="out" value="computed_discharge_curve"/>
1473 </dc:element> 1716 </dc:element>
1474 </dc:elements> 1717 </dc:elements>
1475 </dc:context> 1718 </dc:context>
1476 </dc:elements> 1719 </dc:call-macro>
1477 </dc:context> 1720 </dc:context>
1478 </dc:elements> 1721 </dc:elements>
1479 </computed_discharge_curves> 1722 </computed_discharge_curves>
1480 </dc:if> 1723 </dc:macro>
1481 1724
1482 <dc:comment> 1725 <dc:comment>
1483 CROSS SECTION 1726 CROSS SECTION
1484 </dc:comment> 1727 </dc:comment>
1485 1728
1486 <dc:if test="dc:contains($artifact-outs, 'cross_section')"> 1729
1730 <dc:macro name="waterlevels">
1487 <waterlevels> 1731 <waterlevels>
1488 <dc:elements> 1732 <dc:elements>
1489 <dc:context> 1733 <dc:context>
1490 <dc:statement> 1734 <dc:call-macro name="range-filter">
1491 SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation 1735 <dc:context>
1492 FROM master_artifacts m 1736 <dc:statement>
1493 WHERE m.collection_id = ${collection_id} AND m.gid &lt;&gt; CAST(${artifact-id} AS uuid) 1737 SELECT id AS out_id
1494 AND EXISTS ( 1738 FROM outs
1495 SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river}) 1739 WHERE artifact_id = ${a_id} AND name = 'cross_section'
1496 </dc:statement> 1740 </dc:statement>
1497 <dc:elements> 1741 <dc:elements>
1498 <dc:context> 1742 <dc:context>
1499 <dc:statement> 1743 <dc:statement>
1500 SELECT id AS out_id 1744 SELECT name AS facet_name, num as facet_num, description AS facet_description
1501 FROM outs 1745 FROM facets
1502 WHERE artifact_id = ${a_id} AND name = 'cross_section' 1746 WHERE out_id = ${out_id}
1503 </dc:statement> 1747 ORDER BY num ASC, name DESC
1504 <dc:elements> 1748 </dc:statement>
1505 <dc:context> 1749 <longitudinal_section_columns>
1506 <dc:statement>
1507 SELECT name AS facet_name, num as facet_num, description AS facet_description
1508 FROM facets
1509 WHERE out_id = ${out_id}
1510 ORDER BY num ASC, name DESC
1511 </dc:statement>
1512 <longitudinal_section_columns>
1513 <dc:attribute name="description" value="${river} ${a_creation}"/> 1750 <dc:attribute name="description" value="${river} ${a_creation}"/>
1514 <dc:elements> 1751 <dc:elements>
1515 <dc:element name="${facet_name}"> 1752 <dc:element name="${facet_name}">
1516 <dc:attribute name="description" value="${facet_description}"/> 1753 <dc:attribute name="description" value="${facet_description}"/>
1517 <dc:attribute name="ids" value="${facet_num}"/> 1754 <dc:attribute name="ids" value="${facet_num}"/>
1518 <dc:attribute name="factory" value="winfo"/> 1755 <dc:attribute name="factory" value="winfo"/>
1519 <dc:attribute name="artifact-id" value="${a_gid}"/> 1756 <dc:attribute name="artifact-id" value="${a_gid}"/>
1520 <dc:attribute name="out" value="cross_section"/> 1757 <dc:attribute name="out" value="cross_section"/>
1521 </dc:element> 1758 </dc:element>
1522 </dc:elements> 1759 </dc:elements>
1523 </longitudinal_section_columns> 1760 </longitudinal_section_columns>
1524 </dc:context> 1761 </dc:context>
1525 </dc:elements> 1762 </dc:elements>
1526 </dc:context> 1763 </dc:context>
1527 </dc:elements> 1764 </dc:call-macro>
1528 </dc:context> 1765 </dc:context>
1529 </dc:elements> 1766 </dc:elements>
1530 </waterlevels> 1767 </waterlevels>
1531 </dc:if> 1768 </dc:macro>
1532 1769
1533 1770
1534 <dc:if test="dc:contains($artifact-outs, 'longitudinal_section') or (dc:contains($artifact-outs, 'discharge_longitudinal_section') or (dc:contains($artifact-outs, 'w_differences')))"> 1771 <dc:macro name="longitudinal">
1535 <waterlevels> 1772 <waterlevels>
1536 <dc:elements> 1773 <dc:elements>
1537 <dc:context> 1774 <dc:context>
1538 <dc:statement> 1775 <dc:call-macro name="range-filter">
1539 SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation 1776 <dc:context>
1540 FROM master_artifacts m
1541 WHERE m.collection_id = ${collection_id} AND m.gid &lt;&gt; CAST(${artifact-id} AS uuid)
1542 AND EXISTS (
1543 SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river})
1544 </dc:statement>
1545 <dc:elements>
1546 <dc:context>
1547 <dc:statement> 1777 <dc:statement>
1548 SELECT id AS out_id 1778 SELECT id AS out_id
1549 FROM outs 1779 FROM outs
1550 WHERE artifact_id = ${a_id} AND name = 'longitudinal_section' 1780 WHERE artifact_id = ${a_id} AND name = 'longitudinal_section'
1551 </dc:statement> 1781 </dc:statement>
1570 </dc:elements> 1800 </dc:elements>
1571 </longitudinal_section_columns> 1801 </longitudinal_section_columns>
1572 </dc:context> 1802 </dc:context>
1573 </dc:elements> 1803 </dc:elements>
1574 </dc:context> 1804 </dc:context>
1575 </dc:elements> 1805 </dc:call-macro>
1576 </dc:context> 1806 </dc:context>
1577 </dc:elements> 1807 </dc:elements>
1578 </waterlevels> 1808 </waterlevels>
1579 </dc:if> 1809 </dc:macro>
1580 1810
1581 <dc:if test="dc:contains($artifact-outs, 'fix_longitudinal_section_curve')"> 1811
1812 <dc:macro name="longitudinal-section">
1582 <waterlevels> 1813 <waterlevels>
1583 <dc:elements> 1814 <dc:elements>
1584 <dc:context> 1815 <dc:context>
1585 <dc:statement> 1816 <dc:call-macro name="range-filter">
1586 SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation
1587 FROM master_artifacts m
1588 WHERE m.collection_id = ${collection_id} AND m.gid &lt;&gt; CAST(${artifact-id} AS uuid)
1589 AND EXISTS (
1590 SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river})
1591 </dc:statement>
1592 <dc:elements>
1593
1594 <dc:context> 1817 <dc:context>
1595 <dc:statement> 1818 <dc:statement>
1596 SELECT id AS out_id 1819 SELECT id AS out_id
1597 FROM outs 1820 FROM outs
1598 WHERE artifact_id = ${a_id} AND name = 'fix_longitudinal_section_curve' 1821 WHERE artifact_id = ${a_id} AND name = 'fix_longitudinal_section_curve'
1619 </dc:elements> 1842 </dc:elements>
1620 </waterlevels> 1843 </waterlevels>
1621 </dc:context> 1844 </dc:context>
1622 </dc:elements> 1845 </dc:elements>
1623 </dc:context> 1846 </dc:context>
1624 </dc:elements> 1847 </dc:call-macro>
1625 </dc:context> 1848 </dc:context>
1626 </dc:elements> 1849 </dc:elements>
1627 </waterlevels> 1850 </waterlevels>
1628 </dc:if> 1851 </dc:macro>
1629 1852
1630 <dc:if test="dc:contains($artifact-outs, 'fix_deltawt_curve')"> 1853 <dc:macro name="delta-wt">
1631 <waterlevels> 1854 <waterlevels>
1632 <dc:elements> 1855 <dc:elements>
1633 <dc:context> 1856 <dc:context>
1634 <dc:statement> 1857 <dc:call-macro name="range-filter">
1635 SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation
1636 FROM master_artifacts m
1637 WHERE m.collection_id = ${collection_id} AND m.gid &lt;&gt; CAST(${artifact-id} AS uuid)
1638 AND EXISTS (
1639 SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river})
1640 </dc:statement>
1641 <dc:elements>
1642
1643 <dc:context> 1858 <dc:context>
1644 <dc:statement> 1859 <dc:statement>
1645 SELECT id AS out_id 1860 SELECT id AS out_id
1646 FROM outs 1861 FROM outs
1647 WHERE artifact_id = ${a_id} AND name = 'fix_deltawt_curve' 1862 WHERE artifact_id = ${a_id} AND name = 'fix_deltawt_curve'
1667 </dc:elements> 1882 </dc:elements>
1668 </waterlevels> 1883 </waterlevels>
1669 </dc:context> 1884 </dc:context>
1670 </dc:elements> 1885 </dc:elements>
1671 </dc:context> 1886 </dc:context>
1672 </dc:elements> 1887 </dc:call-macro>
1673 </dc:context> 1888 </dc:context>
1674 </dc:elements> 1889 </dc:elements>
1675 </waterlevels> 1890 </waterlevels>
1676 </dc:if> 1891 </dc:macro>
1677 1892
1678 <dc:if test="dc:contains($artifact-outs, 'fix_derivate_curve')"> 1893
1894 <dc:macro name="fix-derivate-curve">
1679 <waterlevels> 1895 <waterlevels>
1680 <dc:elements> 1896 <dc:elements>
1681 <dc:context> 1897 <dc:context>
1682 <dc:statement> 1898 <dc:call-macro name="range-filter">
1683 SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation
1684 FROM master_artifacts m
1685 WHERE m.collection_id = ${collection_id} AND m.gid &lt;&gt; CAST(${artifact-id} AS uuid)
1686 AND EXISTS (
1687 SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river})
1688 </dc:statement>
1689 <dc:elements>
1690
1691 <dc:context> 1899 <dc:context>
1692 <dc:statement> 1900 <dc:statement>
1693 SELECT id AS out_id 1901 SELECT id AS out_id
1694 FROM outs 1902 FROM outs
1695 WHERE artifact_id = ${a_id} AND name = 'fix_derivate_curve' 1903 WHERE artifact_id = ${a_id} AND name = 'fix_derivate_curve'
1715 </dc:elements> 1923 </dc:elements>
1716 </waterlevels> 1924 </waterlevels>
1717 </dc:context> 1925 </dc:context>
1718 </dc:elements> 1926 </dc:elements>
1719 </dc:context> 1927 </dc:context>
1720 </dc:elements> 1928 </dc:call-macro>
1721 </dc:context> 1929 </dc:context>
1722 </dc:elements> 1930 </dc:elements>
1723 </waterlevels> 1931 </waterlevels>
1724 </dc:if> 1932 </dc:macro>
1725 1933
1726 <dc:if test="dc:contains($artifact-outs, 'fix_wq_curve')"> 1934
1935 <dc:macro name="fix-wq-curve">
1727 <waterlevels> 1936 <waterlevels>
1728 <dc:elements> 1937 <dc:elements>
1729 <dc:context> 1938 <dc:context>
1730 <dc:statement> 1939 <dc:call-macro name="range-filter">
1731 SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation
1732 FROM master_artifacts m
1733 WHERE m.collection_id = ${collection_id} AND m.gid &lt;&gt; CAST(${artifact-id} AS uuid)
1734 AND EXISTS (
1735 SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river})
1736 </dc:statement>
1737 <dc:elements>
1738
1739 <dc:context> 1940 <dc:context>
1740 <dc:statement> 1941 <dc:statement>
1741 SELECT id AS out_id 1942 SELECT id AS out_id
1742 FROM outs 1943 FROM outs
1743 WHERE artifact_id = ${a_id} AND name = 'fix_wq_curve' 1944 WHERE artifact_id = ${a_id} AND name = 'fix_wq_curve'
1763 </dc:elements> 1964 </dc:elements>
1764 </waterlevels> 1965 </waterlevels>
1765 </dc:context> 1966 </dc:context>
1766 </dc:elements> 1967 </dc:elements>
1767 </dc:context> 1968 </dc:context>
1768 </dc:elements> 1969 </dc:call-macro>
1769 </dc:context> 1970 </dc:context>
1770 </dc:elements> 1971 </dc:elements>
1771 </waterlevels> 1972 </waterlevels>
1772 </dc:if> 1973 </dc:macro>
1773 1974
1774 <dc:if test="dc:contains($artifact-outs, 'duration_curve')"> 1975
1976 <dc:macro name="duration-curve">
1775 <computed_discharge_curves> 1977 <computed_discharge_curves>
1776 <dc:elements> 1978 <dc:elements>
1777 <dc:context> 1979 <dc:context>
1778 <dc:statement> 1980 <dc:call-macro name="range-filter">
1779 SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation
1780 FROM master_artifacts m
1781 WHERE m.collection_id = ${collection_id} AND m.gid &lt;&gt; CAST(${artifact-id} AS uuid)
1782 AND EXISTS (
1783 SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river})
1784 </dc:statement>
1785 <dc:elements>
1786 <dc:context> 1981 <dc:context>
1787 <dc:statement> 1982 <dc:statement>
1788 SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description 1983 SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description
1789 FROM outs as o, facets as f, artifacts as a 1984 FROM outs as o, facets as f, artifacts as a
1790 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} 1985 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}
1797 <dc:attribute name="ids" value="${aid}"/> 1992 <dc:attribute name="ids" value="${aid}"/>
1798 <dc:attribute name="out" value="duration_curve"/> 1993 <dc:attribute name="out" value="duration_curve"/>
1799 </dc:element> 1994 </dc:element>
1800 </dc:elements> 1995 </dc:elements>
1801 </dc:context> 1996 </dc:context>
1802 </dc:elements> 1997 </dc:call-macro>
1803 </dc:context> 1998 </dc:context>
1804 </dc:elements> 1999 </dc:elements>
1805 </computed_discharge_curves> 2000 </computed_discharge_curves>
1806 </dc:if> 2001 </dc:macro>
2002
1807 <dc:comment> 2003 <dc:comment>
1808 WATERLEVELS - ONLY SHOW Ws 2004 WATERLEVELS - ONLY SHOW Ws
1809 </dc:comment> 2005 </dc:comment>
1810 2006
1811 <!-- TODO doesnt work nicely for fix/wq-diags. --> 2007 <!-- TODO doesnt work nicely for fix/wq-diags. -->
1812 <dc:if test="dc:contains($artifact-outs, 'waterlevels') or (dc:contains($artifact-outs, 'fix_wq_curve'))"> 2008
2009 <dc:macro name="waterlevels-fix">
1813 <waterlevels> 2010 <waterlevels>
1814 <dc:elements> 2011 <dc:elements>
1815 <dc:context> 2012 <dc:context>
1816 <dc:statement> 2013 <dc:call-macro name="range-filter">
1817 SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation
1818 FROM master_artifacts m
1819 WHERE m.collection_id = ${collection_id} AND m.gid &lt;&gt; CAST(${artifact-id} AS uuid)
1820 AND EXISTS (
1821 SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river})
1822 </dc:statement>
1823 <dc:elements>
1824
1825 <dc:context> 2014 <dc:context>
1826 <dc:statement> 2015 <dc:statement>
1827 SELECT id AS out_id 2016 SELECT id AS out_id
1828 FROM outs 2017 FROM outs
1829 WHERE artifact_id = ${a_id} AND name = 'longitudinal_section' 2018 WHERE artifact_id = ${a_id} AND name = 'longitudinal_section'
1849 </dc:elements> 2038 </dc:elements>
1850 </waterlevels> 2039 </waterlevels>
1851 </dc:context> 2040 </dc:context>
1852 </dc:elements> 2041 </dc:elements>
1853 </dc:context> 2042 </dc:context>
1854 </dc:elements> 2043 </dc:call-macro>
1855 </dc:context> 2044 </dc:context>
1856 </dc:elements> 2045 </dc:elements>
1857 </waterlevels> 2046 </waterlevels>
1858 </dc:if> 2047 </dc:macro>
1859 2048
1860 <dc:comment> 2049 <dc:comment>
1861 SHOW FLOODMAPS 2050 SHOW FLOODMAPS
1862 </dc:comment> 2051 </dc:comment>
1863 2052
1864 <dc:if test="dc:contains($artifact-outs, 'floodmap') or dc:contains($artifact-outs, 'map')"> 2053
2054 <dc:macro name="flood-map">
1865 <floodmap> 2055 <floodmap>
1866 <dc:elements> 2056 <dc:elements>
1867 <dc:context> 2057 <dc:context>
1868 <dc:statement> 2058 <dc:call-macro name="range-filter">
1869 SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation
1870 FROM master_artifacts m
1871 WHERE m.collection_id = ${collection_id} AND m.gid &lt;&gt; CAST(${artifact-id} AS uuid)
1872 AND EXISTS (
1873 SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river})
1874 </dc:statement>
1875 <dc:elements>
1876 <dc:context> 2059 <dc:context>
1877 <dc:statement> 2060 <dc:statement>
1878 SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description 2061 SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description
1879 FROM outs as o, facets as f, artifacts as a 2062 FROM outs as o, facets as f, artifacts as a
1880 WHERE f.name = 'floodmap.wsplgen' and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id} 2063 WHERE f.name = 'floodmap.wsplgen' and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id}
1887 <dc:attribute name="ids" value="${aid}"/> 2070 <dc:attribute name="ids" value="${aid}"/>
1888 <dc:attribute name="out" value="floodmap"/> 2071 <dc:attribute name="out" value="floodmap"/>
1889 </dc:element> 2072 </dc:element>
1890 </dc:elements> 2073 </dc:elements>
1891 </dc:context> 2074 </dc:context>
1892 </dc:elements> 2075 </dc:call-macro>
1893 </dc:context> 2076 </dc:context>
1894 </dc:elements> 2077 </dc:elements>
1895 </floodmap> 2078 </floodmap>
1896 </dc:if> 2079 </dc:macro>
1897 2080
1898 <dc:comment> 2081 <dc:comment>
1899 MINFO bedheight difference 2082 MINFO bedheight difference
1900 </dc:comment> 2083 </dc:comment>
1901 2084
1902 <dc:if test="dc:contains($artifact-outs, 'bed_difference_year') or dc:contains($artifact-outs, 'bed_difference_height_year')"> 2085 <dc:macro name="bed-difference">
1903 <fix_longitudinal_section_curve> 2086 <fix_longitudinal_section_curve>
1904 <dc:elements> 2087 <dc:elements>
1905 <dc:context> 2088 <dc:context>
1906 <dc:statement> 2089 <dc:call-macro name="range-filter">
1907 SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation
1908 FROM master_artifacts m
1909 WHERE m.collection_id = ${collection_id} AND m.gid &lt;&gt; CAST(${artifact-id} AS uuid)
1910 AND EXISTS (
1911 SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river})
1912 </dc:statement>
1913 <dc:elements>
1914 <dc:context> 2090 <dc:context>
1915 <dc:statement> 2091 <dc:statement>
1916 SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description 2092 SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description
1917 FROM outs as o, facets as f, artifacts as a 2093 FROM outs as o, facets as f, artifacts as a
1918 WHERE (f.name = 'fix_sector_average_ls_0' or f.name = 'fix_sector_average_ls_1' or f.name = 'fix_sector_average_ls_2' 2094 WHERE (f.name = 'fix_sector_average_ls_0' or f.name = 'fix_sector_average_ls_1' or f.name = 'fix_sector_average_ls_2'
1930 <dc:attribute name="out" value="fix_longitudinal_section_curve"/> 2106 <dc:attribute name="out" value="fix_longitudinal_section_curve"/>
1931 </dc:element> 2107 </dc:element>
1932 </dc:elements> 2108 </dc:elements>
1933 </fix_longitudinal_section_curve> 2109 </fix_longitudinal_section_curve>
1934 </dc:context> 2110 </dc:context>
1935 </dc:elements> 2111 </dc:call-macro>
1936 </dc:context> 2112 </dc:context>
1937 </dc:elements> 2113 </dc:elements>
1938 </fix_longitudinal_section_curve> 2114 </fix_longitudinal_section_curve>
1939 </dc:if> 2115 </dc:macro>
1940 2116
1941 <dc:comment> 2117 <dc:comment>
1942 MINFO bedheight middle 2118 MINFO bedheight middle
1943 </dc:comment> 2119 </dc:comment>
1944 2120
1945 <dc:if test="dc:contains($artifact-outs, 'bedheight_middle')"> 2121 <dc:macro name="bed-height">
1946 <fix_vollmer_wq_curve> 2122 <fix_vollmer_wq_curve>
1947 <dc:elements> 2123 <dc:elements>
1948 <dc:context> 2124 <dc:context>
1949 <dc:statement> 2125 <dc:call-macro name="range-filter">
1950 SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation
1951 FROM master_artifacts m
1952 WHERE m.collection_id = ${collection_id} AND m.gid &lt;&gt; CAST(${artifact-id} AS uuid)
1953 AND EXISTS (
1954 SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river})
1955 </dc:statement>
1956 <dc:elements>
1957 <dc:context> 2126 <dc:context>
1958 <dc:statement> 2127 <dc:statement>
1959 SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description 2128 SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description
1960 FROM outs as o, facets as f, artifacts as a 2129 FROM outs as o, facets as f, artifacts as a
1961 WHERE (f.name = 'longitudinal_section.w' or f.name = 'heightmarks_points') 2130 WHERE (f.name = 'longitudinal_section.w' or f.name = 'heightmarks_points')
1972 <dc:attribute name="out" value="longitudinal_section"/> 2141 <dc:attribute name="out" value="longitudinal_section"/>
1973 </dc:element> 2142 </dc:element>
1974 </dc:elements> 2143 </dc:elements>
1975 </fix_vollmer_wq_curve> 2144 </fix_vollmer_wq_curve>
1976 </dc:context> 2145 </dc:context>
1977 </dc:elements> 2146 </dc:call-macro>
1978 </dc:context> 2147 </dc:context>
1979 </dc:elements> 2148 </dc:elements>
1980 </fix_vollmer_wq_curve> 2149 </fix_vollmer_wq_curve>
2150 </dc:macro>
2151
2152 <dc:macro name="floodmap-hws-user">
2153 <dc:context>
2154 <dc:statement>
2155 SELECT id AS out_id
2156 FROM outs
2157 WHERE artifact_id = ${a_id} AND name = 'floodmap'
2158 </dc:statement>
2159 <dc:elements>
2160 <dc:context>
2161 <dc:statement>
2162 SELECT name AS facet_name, num as facet_num, description AS facet_description
2163 FROM facets
2164 WHERE out_id = ${out_id} and name = 'floodmap.usershape'
2165 ORDER BY num ASC, name DESC
2166 </dc:statement>
2167 <own-hws>
2168 <dc:elements>
2169 <dc:element name="${facet_name}">
2170 <dc:attribute name="description" value="${facet_description}"/>
2171 <dc:attribute name="ids" value="${facet_num}"/>
2172 <dc:attribute name="factory" value="winfo"/>
2173 <dc:attribute name="artifact-id" value="${a_gid}"/>
2174 <dc:attribute name="out" value="floodmap"/>
2175 </dc:element>
2176 </dc:elements>
2177 </own-hws>
2178 </dc:context>
2179 </dc:elements>
2180 </dc:context>
2181 </dc:macro>
2182 <dc:if test="dc:contains($artifact-outs, 'longitudinal_section') or (dc:contains($artifact-outs, 'discharge_longitudinal_section') or (dc:contains($artifact-outs, 'w_differences')))">
2183 <dc:call-macro name="longitudinal"/>
1981 </dc:if> 2184 </dc:if>
1982 2185 <dc:if test="dc:contains($artifact-outs, 'fix_deltawt_curve')">
2186 <dc:call-macro name="delta-wt"/>
2187 </dc:if>
2188 <dc:if test="dc:contains($artifact-outs, 'longitudinal_section') or (dc:contains($artifact-outs, 'w_differences') or (dc:contains($artifact-outs, 'discharge_longitudinal_section')))">
2189 <dc:call-macro name="differences"/>
2190 </dc:if>
2191 <dc:if test="dc:contains($artifact-outs, 'reference_curve')">
2192 <dc:call-macro name="reference-curves"/>
2193 </dc:if>
2194 <dc:if test="dc:contains($artifact-outs, 'computed_discharge_curve')">
2195 <dc:call-macro name="computed-discharge-curve"/>
2196 </dc:if>
2197 <dc:if test="dc:contains($artifact-outs, 'cross_section')">
2198 <dc:call-macro name="waterlevels"/>
2199 </dc:if>
2200 <dc:if test="dc:contains($artifact-outs, 'fix_longitudinal_section_curve')">
2201 <dc:call-macro name="longitudinal-section"/>
2202 </dc:if>
2203 <dc:if test="dc:contains($artifact-outs, 'fix_derivate_curve')">
2204 <dc:call-macro name="fix-derivate-curve"/>
2205 </dc:if>
2206 <dc:if test="dc:contains($artifact-outs, 'fix_wq_curve')">
2207 <dc:call-macro name="fix-wq-curve"/>
2208 </dc:if>
2209 <dc:if test="dc:contains($artifact-outs, 'duration_curve')">
2210 <dc:call-macro name="duration-curve"/>
2211 </dc:if>
2212 <dc:if test="dc:contains($artifact-outs, 'waterlevels') or (dc:contains($artifact-outs, 'fix_wq_curve'))">
2213 <dc:call-macro name="waterlevels-fix"/>
2214 </dc:if>
2215 <dc:if test="dc:contains($artifact-outs, 'floodmap') or dc:contains($artifact-outs, 'map')">
2216 <dc:call-macro name="flood-map"/>
2217 </dc:if>
2218 <dc:if test="dc:contains($artifact-outs, 'bed_difference_year') or dc:contains($artifact-outs, 'bed_difference_height_year')">
2219 <dc:call-macro name="bed-difference"/>
2220 </dc:if>
2221 <dc:if test="dc:contains($artifact-outs, 'bedheight_middle')">
2222 <dc:call-macro name="bed-height"/>
2223 </dc:if>
2224 <dc:if test="dc:contains($artifact-outs, 'floodmap-hws')">
2225 <dc:call-macro name="floodmap-hws-user"/>
2226 </dc:if>
1983 </dc:context> 2227 </dc:context>
2228 </dc:call-macro>
2229
1984 </old_calculations> 2230 </old_calculations>
1985 2231
1986 2232
1987 <dc:comment> 2233 <dc:comment>
1988 Include System specific part when 'load-system' is in parameters. 2234 Include System specific part when 'load-system' is in parameters.

http://dive4elements.wald.intevation.org