comparison artifacts/doc/conf/meta-data.xml @ 9127:dbb26bc81843

Testing
author gernotbelger
date Wed, 06 Jun 2018 13:05:57 +0200
parents 623b51bf03d7
children 7879c2ca8bd3
comparison
equal deleted inserted replaced
9126:7235a610558a 9127:dbb26bc81843
1 <?xml version="1.0" encoding="UTF-8"?> 1 <?xml version="1.0" encoding="UTF-8"?>
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 4
5 <dc:call-macro name="load-user"/> 5 <dc:call-macro name="load-user" />
6 6
7 <dc:call-macro name="load-system"/> 7 <dc:call-macro name="load-system" />
8 8
9 <dc:macro name="load-system"> 9 <dc:macro name="load-system">
10 <dc:context connection="system"> 10 <dc:context connection="system">
11 <dc:statement> 11 <dc:statement>
12 SELECT id AS river_id, name AS river_name 12 SELECT id AS river_id, name AS river_name
13 FROM rivers 13 FROM rivers
14 WHERE lower(name) LIKE lower(${river}) 14 WHERE lower(name) LIKE lower(${river})
15 </dc:statement> 15 </dc:statement>
16 <dc:for-each> 16 <dc:for-each>
17 <dc:call-macro name="generate-system-content"/> 17 <dc:call-macro name="generate-system-content" />
18 </dc:for-each> 18 </dc:for-each>
19 </dc:context> 19 </dc:context>
20 </dc:macro> 20 </dc:macro>
21 21
22 <dc:macro name="load-user"> 22 <dc:macro name="load-user">
23 <old_calculations> 23 <old_calculations>
24 <dc:call-macro name="generate-user-content"/> 24 <dc:call-macro name="generate-user-content" />
25 </old_calculations> 25 </old_calculations>
26 </dc:macro> 26 </dc:macro>
27 27
28 <dc:macro name="generate-system-content"> 28 <dc:macro name="generate-system-content">
29 <dc:message>Generate system content with variables: {dc:dump-variables()}</dc:message> 29 <dc:message>Generate system content with variables: {dc:dump-variables()}</dc:message>
37 <dc:iterate var="out" container="artifact-outs"> 37 <dc:iterate var="out" container="artifact-outs">
38 <dc:message>Rec out iteration for: {$out}</dc:message> 38 <dc:message>Rec out iteration for: {$out}</dc:message>
39 <dc:choose> 39 <dc:choose>
40 <dc:comment> Longitudinal sections </dc:comment> 40 <dc:comment> Longitudinal sections </dc:comment>
41 <dc:when test="$out = 'w_differences'"> 41 <dc:when test="$out = 'w_differences'">
42 <dc:call-macro name="annotations"/> 42 <dc:call-macro name="annotations" />
43 </dc:when> 43 </dc:when>
44 <dc:when test="$out = 'discharge_longitudinal_section'"> 44 <dc:when test="$out = 'discharge_longitudinal_section'">
45 <dc:call-macro name="annotations"/> 45 <dc:call-macro name="annotations" />
46 <dc:call-macro name="officiallines_user"/> 46 <dc:call-macro name="officiallines_user" />
47 </dc:when> 47 </dc:when>
48 <dc:when test="$out = 'longitudinal_section'"> 48 <dc:when test="$out = 'longitudinal_section'">
49 <dc:call-macro name="annotations"/> 49 <dc:call-macro name="annotations" />
50 <dc:call-macro name="officiallines_user"/> 50 <dc:call-macro name="officiallines_user" />
51 </dc:when> 51 </dc:when>
52 <dc:when test="$out = 'fix_longitudinal_section_curve'"> 52 <dc:when test="$out = 'fix_longitudinal_section_curve'">
53 <dc:call-macro name="annotations"/> 53 <dc:call-macro name="annotations" />
54 </dc:when> 54 </dc:when>
55 <dc:when test="$out = 'bedheight_middle'"> 55 <dc:when test="$out = 'bedheight_middle'">
56 <dc:call-macro name="annotations"/> 56 <dc:call-macro name="annotations" />
57 </dc:when> 57 </dc:when>
58 <dc:when test="$out = 'bed_difference_year'"> 58 <dc:when test="$out = 'bed_difference_year'">
59 <dc:call-macro name="annotations"/> 59 <dc:call-macro name="annotations" />
60 <dc:call-macro name="basedata_6_delta_w"/> 60 <dc:call-macro name="basedata_6_delta_w" />
61 <dc:call-macro name="sounding-width-recommendations"/> 61 <dc:call-macro name="sounding-width-recommendations" />
62 </dc:when> 62 </dc:when>
63 <dc:when test="$out = 'bed_difference_height_year'"> 63 <dc:when test="$out = 'bed_difference_height_year'">
64 <dc:call-macro name="annotations"/> 64 <dc:call-macro name="annotations" />
65 <dc:call-macro name="basedata_6_delta_w"/> 65 <dc:call-macro name="basedata_6_delta_w" />
66 </dc:when> 66 </dc:when>
67 <dc:when test="$out = 'sedimentload_ls'"> 67 <dc:when test="$out = 'sedimentload_ls'">
68 <dc:call-macro name="annotations"/> 68 <dc:call-macro name="annotations" />
69 <dc:call-macro name="sedimentload_off_epochs"/> 69 <dc:call-macro name="sedimentload_off_epochs" />
70 </dc:when> 70 </dc:when>
71 <dc:when test="$out = 'bed_longitudinal_section'"> 71 <dc:when test="$out = 'bed_longitudinal_section'">
72 <dc:call-macro name="annotations"/> 72 <dc:call-macro name="annotations" />
73 </dc:when> 73 </dc:when>
74 <dc:when test="$out = 'flow_velocity'"> 74 <dc:when test="$out = 'flow_velocity'">
75 <dc:call-macro name="annotations"/> 75 <dc:call-macro name="annotations" />
76 </dc:when> 76 </dc:when>
77 <dc:comment> Discharge curves </dc:comment> 77 <dc:comment> Discharge curves </dc:comment>
78 <dc:when test="$out = 'historical_discharge_wq'"> 78 <dc:when test="$out = 'historical_discharge_wq'">
79 <dc:call-macro name="hist_discharge_rec"/> 79 <dc:call-macro name="hist_discharge_rec" />
80 <dc:call-macro name="mainvalues"/> 80 <dc:call-macro name="mainvalues" />
81 </dc:when> 81 </dc:when>
82 <dc:when test="$out = 'discharge_curve'"> 82 <dc:when test="$out = 'discharge_curve'">
83 <dc:call-macro name="mainvalues"/> 83 <dc:call-macro name="mainvalues" />
84 <dc:call-macro name="basedata_3_officials_wq"/> 84 <dc:call-macro name="basedata_3_officials_wq" />
85 </dc:when> 85 </dc:when>
86 <dc:when test="$out = 'computed_discharge_curve'"> 86 <dc:when test="$out = 'computed_discharge_curve'">
87 <dc:call-macro name="mainvalues"/> 87 <dc:call-macro name="mainvalues" />
88 <dc:call-macro name="basedata_3_officials_wq"/> 88 <dc:call-macro name="basedata_3_officials_wq" />
89 <dc:call-macro name="basedata_2_fixations_wq"/> 89 <dc:call-macro name="basedata_2_fixations_wq" />
90 </dc:when> 90 </dc:when>
91 <dc:when test="$out = 'fix_wq_curve'"> 91 <dc:when test="$out = 'fix_wq_curve'">
92 <dc:call-macro name="mainvalues"/> 92 <dc:call-macro name="mainvalues" />
93 <dc:call-macro name="qsectors"/> 93 <dc:call-macro name="qsectors" />
94 </dc:when> 94 </dc:when>
95 <dc:when test="$out = 'fix_derivate_curve'"> 95 <dc:when test="$out = 'fix_derivate_curve'">
96 <dc:call-macro name="qmainvalues"/> 96 <dc:call-macro name="qmainvalues" />
97 </dc:when> 97 </dc:when>
98 <dc:when test="starts-with($out, 'sq_') and 98 <dc:when test="starts-with($out, 'sq_') and
99 not($out = 'sq_relation_export')"> 99 not($out = 'sq_relation_export')">
100 <dc:call-macro name="qmainvalues"/> 100 <dc:call-macro name="qmainvalues" />
101 </dc:when> 101 </dc:when>
102 <dc:comment> Cross sections </dc:comment> 102 <dc:comment> Cross sections </dc:comment>
103 <dc:when test="$out = 'cross_section'"> 103 <dc:when test="$out = 'cross_section'">
104 <dc:call-macro name="cross_sections"/> 104 <dc:call-macro name="cross_sections" />
105 <dc:call-macro name="hyks"/> 105 <dc:call-macro name="hyks" />
106 <dc:call-macro name="officiallines_user"/> 106 <dc:call-macro name="officiallines_user" />
107 </dc:when> 107 </dc:when>
108 <dc:comment> Duration curve </dc:comment> 108 <dc:comment> Duration curve </dc:comment>
109 <dc:when test="$out = 'duration_curve'"> 109 <dc:when test="$out = 'duration_curve'">
110 <dc:call-macro name="mainvalues"/> 110 <dc:call-macro name="mainvalues" />
111 </dc:when> 111 </dc:when>
112 <dc:comment> Reference curve </dc:comment> 112 <dc:comment> Reference curve </dc:comment>
113 <dc:when test="$out = 'reference_curve'"> 113 <dc:when test="$out = 'reference_curve'">
114 <dc:call-macro name="mainvalues"/> 114 <dc:call-macro name="mainvalues" />
115 </dc:when> 115 </dc:when>
116 <dc:comment> Maps </dc:comment> 116 <dc:comment> Maps </dc:comment>
117 <dc:when test="$out = 'floodmap'"> 117 <dc:when test="$out = 'floodmap'">
118 <dc:call-macro name="flood-map-recommended"/> 118 <dc:call-macro name="flood-map-recommended" />
119 </dc:when> 119 </dc:when>
120 120
121 <dc:when test="$out = 'sinfo_flow_depth'"> 121 <dc:when test="$out = 'sinfo_flow_depth'">
122 <dc:call-macro name="annotations"/> 122 <dc:call-macro name="annotations" />
123 </dc:when> 123 </dc:when>
124 <dc:when test="$out = 'sinfo_flow_depth_minmax'"> 124 <dc:when test="$out = 'sinfo_flow_depth_minmax'">
125 <dc:call-macro name="annotations"/> 125 <dc:call-macro name="annotations" />
126 </dc:when> 126 </dc:when>
127 <dc:when test="$out = 'sinfo_flow_depth_development'"> 127 <dc:when test="$out = 'sinfo_flow_depth_development'">
128 <dc:call-macro name="annotations"/> 128 <dc:call-macro name="annotations" />
129 </dc:when> 129 </dc:when>
130 <dc:when test="$out = 'sinfo_flow_depth_development_peryear'"> 130 <dc:when test="$out = 'sinfo_flow_depth_development_peryear'">
131 <dc:call-macro name="annotations"/> 131 <dc:call-macro name="annotations" />
132 </dc:when> 132 </dc:when>
133 <dc:when test="$out = 'sinfo_tkk'"> 133 <dc:when test="$out = 'sinfo_tkk'">
134 <dc:call-macro name="annotations"/> 134 <dc:call-macro name="annotations" />
135 </dc:when> 135 </dc:when>
136 </dc:choose> 136 </dc:choose>
137 </dc:iterate> 137 </dc:iterate>
138 </dc:when> 138 </dc:when>
139 <dc:otherwise> 139 <dc:otherwise>
143 <dc:iterate var="out" container="artifact-outs"> 143 <dc:iterate var="out" container="artifact-outs">
144 <dc:message>Non Rec out iteration for: {$out}</dc:message> 144 <dc:message>Non Rec out iteration for: {$out}</dc:message>
145 <dc:choose> 145 <dc:choose>
146 <dc:comment> Inline datacage panels </dc:comment> 146 <dc:comment> Inline datacage panels </dc:comment>
147 <dc:when test="$out = 'minfo_diff_panel'"> 147 <dc:when test="$out = 'minfo_diff_panel'">
148 <dc:call-macro name="minfo-heights-diff"/> 148 <dc:call-macro name="minfo-heights-diff" />
149 </dc:when> 149 </dc:when>
150 <dc:when test="$out = 'floodmap_dem_panel'"> 150 <dc:when test="$out = 'floodmap_dem_panel'">
151 <dc:call-macro name="flood-map-dem"/> 151 <dc:call-macro name="flood-map-dem" />
152 </dc:when> 152 </dc:when>
153 <dc:when test="$out = 'floodmap_hws_panel'"> 153 <dc:when test="$out = 'floodmap_hws_panel'">
154 <hws> 154 <hws>
155 <dc:call-macro name="flood-map-hws-lines"/> 155 <dc:call-macro name="flood-map-hws-lines" />
156 <dc:call-macro name="flood-map-hws-points"/> 156 <dc:call-macro name="flood-map-hws-points" />
157 </hws> 157 </hws>
158 </dc:when> 158 </dc:when>
159 <dc:when test="$out = 'winfo_diff_twin_panel'"> 159 <dc:when test="$out = 'winfo_diff_twin_panel'">
160 <dc:if test="$current-state-id != 'state.winfo.uesk.wsp'"> 160 <dc:if test="$current-state-id != 'state.winfo.uesk.wsp'">
161 <dc:call-macro name="basedata_0"/> 161 <dc:call-macro name="basedata_0" />
162 <dc:call-macro name="basedata_1_additionals"/> 162 <dc:call-macro name="basedata_1_additionals" />
163 <dc:call-macro name="basedata_2_fixations"/> 163 <dc:call-macro name="basedata_2_fixations" />
164 <dc:call-macro name="basedata_4_heightmarks-points"/> 164 <dc:call-macro name="basedata_4_heightmarks-points" />
165 <dc:call-macro name="basedata_5_flood-protections"/> 165 <dc:call-macro name="basedata_5_flood-protections" />
166 </dc:if> 166 </dc:if>
167 </dc:when> 167 </dc:when>
168 <dc:when test="$out = 'waterlevels_panel'"> 168 <dc:when test="$out = 'waterlevels_panel'">
169 <dc:call-macro name="basedata_0"/> 169 <dc:call-macro name="basedata_0" />
170 <dc:call-macro name="basedata_1_additionals"/> 170 <dc:call-macro name="basedata_1_additionals" />
171 <dc:call-macro name="basedata_2_fixations"/> 171 <dc:call-macro name="basedata_2_fixations" />
172 <dc:call-macro name="basedata_3_officials"/> 172 <dc:call-macro name="basedata_3_officials" />
173 <dc:call-macro name="basedata_4_heightmarks-points"/> 173 <dc:call-macro name="basedata_4_heightmarks-points" />
174 <dc:call-macro name="basedata_5_flood-protections"/> 174 <dc:call-macro name="basedata_5_flood-protections" />
175 </dc:when> 175 </dc:when>
176 <dc:comment> Longitudinal sections </dc:comment> 176 <dc:comment> Longitudinal sections </dc:comment>
177 <dc:when test="$out = 'longitudinal_section'"> 177 <dc:when test="$out = 'longitudinal_section'">
178 <dc:call-macro name="longitudinal-section-prototype"/> 178 <dc:call-macro name="longitudinal-section-prototype" />
179 </dc:when> 179 </dc:when>
180 <dc:when test="$out = 'w_differences'"> 180 <dc:when test="$out = 'w_differences'">
181 <dc:call-macro name="longitudinal-section-prototype"/> 181 <dc:call-macro name="longitudinal-section-prototype" />
182 </dc:when> 182 </dc:when>
183 <dc:when test="$out = 'discharge_longitudinal_section'"> 183 <dc:when test="$out = 'discharge_longitudinal_section'">
184 <dc:call-macro name="longitudinal-section-prototype"/> 184 <dc:call-macro name="longitudinal-section-prototype" />
185 </dc:when> 185 </dc:when>
186 <dc:when test="$out = 'fix_longitudinal_section_curve'"> 186 <dc:when test="$out = 'fix_longitudinal_section_curve'">
187 <dc:call-macro name="longitudinal-section-prototype"/> 187 <dc:call-macro name="longitudinal-section-prototype" />
188 </dc:when> 188 </dc:when>
189 <dc:when test="$out = 'flow_velocity'"> 189 <dc:when test="$out = 'flow_velocity'">
190 <dc:call-macro name="longitudinal-section-prototype"/> 190 <dc:call-macro name="longitudinal-section-prototype" />
191 </dc:when> 191 </dc:when>
192 <dc:when test="$out = 'bed_longitudinal_section'"> 192 <dc:when test="$out = 'bed_longitudinal_section'">
193 <dc:call-macro name="longitudinal-section-prototype"/> 193 <dc:call-macro name="longitudinal-section-prototype" />
194 </dc:when> 194 </dc:when>
195 <dc:when test="$out = 'sedimentload_ls'"> 195 <dc:when test="$out = 'sedimentload_ls'">
196 <dc:call-macro name="longitudinal-section-prototype"/> 196 <dc:call-macro name="longitudinal-section-prototype" />
197 </dc:when> 197 </dc:when>
198 <dc:when test="$out = 'bedheight_middle'"> 198 <dc:when test="$out = 'bedheight_middle'">
199 <dc:call-macro name="longitudinal-section-prototype"/> 199 <dc:call-macro name="longitudinal-section-prototype" />
200 </dc:when> 200 </dc:when>
201 <dc:when test="$out = 'bed_difference_height_year'"> 201 <dc:when test="$out = 'bed_difference_height_year'">
202 <dc:call-macro name="longitudinal-section-prototype"/> 202 <dc:call-macro name="longitudinal-section-prototype" />
203 </dc:when> 203 </dc:when>
204 <dc:when test="$out = 'bed_difference_year'"> 204 <dc:when test="$out = 'bed_difference_year'">
205 <dc:call-macro name="longitudinal-section-prototype"/> 205 <dc:call-macro name="longitudinal-section-prototype" />
206 </dc:when> 206 </dc:when>
207 <dc:comment> Discharge curves </dc:comment> 207 <dc:comment> Discharge curves </dc:comment>
208 <dc:when test="$out = 'historical_discharge_wq'"> 208 <dc:when test="$out = 'historical_discharge_wq'">
209 <dc:call-macro name="discharge-curve-prototype"/> 209 <dc:call-macro name="discharge-curve-prototype" />
210 </dc:when> 210 </dc:when>
211 <dc:when test="$out = 'discharge_curve'"> 211 <dc:when test="$out = 'discharge_curve'">
212 <dc:call-macro name="discharge-curve-prototype"/> 212 <dc:call-macro name="discharge-curve-prototype" />
213 </dc:when> 213 </dc:when>
214 <dc:when test="$out = 'fix_wq_curve'"> 214 <dc:when test="$out = 'fix_wq_curve'">
215 <dc:call-macro name="discharge-curve-prototype"/> 215 <dc:call-macro name="discharge-curve-prototype" />
216 </dc:when> 216 </dc:when>
217 <dc:when test="$out = 'fix_derivate_curve'"> 217 <dc:when test="$out = 'fix_derivate_curve'">
218 <dc:call-macro name="discharge-curve-prototype"/> 218 <dc:call-macro name="discharge-curve-prototype" />
219 </dc:when> 219 </dc:when>
220 <dc:when test="$out = 'computed_discharge_curve'"> 220 <dc:when test="$out = 'computed_discharge_curve'">
221 <dc:call-macro name="discharge-curve-prototype"/> 221 <dc:call-macro name="discharge-curve-prototype" />
222 </dc:when> 222 </dc:when>
223 <dc:when test="starts-with($out, 'sq_relation') or 223 <dc:when test="starts-with($out, 'sq_relation') or
224 $out = 'sq_overview'"> 224 $out = 'sq_overview'">
225 <dc:call-macro name="discharge-curve-prototype"/> 225 <dc:call-macro name="discharge-curve-prototype" />
226 </dc:when> 226 </dc:when>
227 <dc:comment> Cross sections </dc:comment> 227 <dc:comment> Cross sections </dc:comment>
228 <dc:when test="$out = 'cross_section'"> 228 <dc:when test="$out = 'cross_section'">
229 <dc:call-macro name="basedata_0"/> 229 <dc:call-macro name="basedata_0" />
230 <dc:call-macro name="basedata_1_additionals"/> 230 <dc:call-macro name="basedata_1_additionals" />
231 <dc:call-macro name="basedata_2_fixations"/> 231 <dc:call-macro name="basedata_2_fixations" />
232 <dc:call-macro name="basedata_3_officials"/> 232 <dc:call-macro name="basedata_3_officials" />
233 <dc:call-macro name="basedata_4_heightmarks-points"/> 233 <dc:call-macro name="basedata_4_heightmarks-points" />
234 <dc:call-macro name="cross_sections"/> 234 <dc:call-macro name="cross_sections" />
235 <dc:call-macro name="basedata_5_flood-protections"/> 235 <dc:call-macro name="basedata_5_flood-protections" />
236 <dc:call-macro name="hyks"/> 236 <dc:call-macro name="hyks" />
237 </dc:when> 237 </dc:when>
238 <dc:comment> Duration curve </dc:comment> 238 <dc:comment> Duration curve </dc:comment>
239 <dc:when test="$out = 'duration_curve'"> 239 <dc:when test="$out = 'duration_curve'">
240 <dc:call-macro name="mainvalues"/> 240 <dc:call-macro name="mainvalues" />
241 <dc:call-macro name="basedata_2_fixations_relative_point"/> 241 <dc:call-macro name="basedata_2_fixations_relative_point" />
242 <dc:call-macro name="basedata_4_heightmarks-points-relative_points"/> 242 <dc:call-macro name="basedata_4_heightmarks-points-relative_points" />
243 <dc:call-macro name="basedata_5_flood-protections_relative_points"/> 243 <dc:call-macro name="basedata_5_flood-protections_relative_points" />
244 </dc:when> 244 </dc:when>
245 <dc:comment> Reference curve </dc:comment> 245 <dc:comment> Reference curve </dc:comment>
246 <dc:when test="$out = 'reference_curve'"> 246 <dc:when test="$out = 'reference_curve'">
247 <dc:call-macro name="mainvalues"/> 247 <dc:call-macro name="mainvalues" />
248 <dc:call-macro name="annotations"/> 248 <dc:call-macro name="annotations" />
249 <dc:call-macro name="basedata_1_additionals-relative_point"/> 249 <dc:call-macro name="basedata_1_additionals-relative_point" />
250 <dc:call-macro name="basedata_2_fixations_relative_point"/> 250 <dc:call-macro name="basedata_2_fixations_relative_point" />
251 <dc:call-macro name="basedata_4_heightmarks-points-relative_points"/> 251 <dc:call-macro name="basedata_4_heightmarks-points-relative_points" />
252 <dc:call-macro name="basedata_5_flood-protections_relative_points"/> 252 <dc:call-macro name="basedata_5_flood-protections_relative_points" />
253 </dc:when> 253 </dc:when>
254 <dc:comment> Maps </dc:comment> 254 <dc:comment> Maps </dc:comment>
255 <dc:when test="$out = 'map'"> 255 <dc:when test="$out = 'map'">
256 <dc:call-macro name="flood-map-complete"/> 256 <dc:call-macro name="flood-map-complete" />
257 </dc:when> 257 </dc:when>
258 <dc:when test="$out = 'floodmap'"> 258 <dc:when test="$out = 'floodmap'">
259 <dc:call-macro name="flood-map-complete"/> 259 <dc:call-macro name="flood-map-complete" />
260 </dc:when> 260 </dc:when>
261 261
262 <dc:comment> S-INFO </dc:comment> 262 <dc:comment> S-INFO </dc:comment>
263 <dc:when test="$out = 'sinfo_flowdepth_minfo_heights'"> 263 <dc:when test="$out = 'sinfo_flowdepth_minfo_heights'">
264 <dc:call-macro name="bed-heights-single-MW"/> 264 <dc:call-macro name="bed-heights-single-MW" />
265 </dc:when> 265 </dc:when>
266 <dc:when test="$out = 'sinfo_flowdepthminmax_heights'"> 266 <dc:when test="$out = 'sinfo_flowdepthminmax_heights'">
267 <dc:call-macro name="bed-heights-single-KL_TW"/> 267 <dc:call-macro name="bed-heights-single-KL_TW" />
268 </dc:when> 268 </dc:when>
269 <dc:when test="$out = 'sinfo_flowdepth_waterlevels'"> 269 <dc:when test="$out = 'sinfo_flowdepth_waterlevels'">
270 <minfo> 270 <minfo>
271 <fixanalysis> 271 <fixanalysis>
272 <dc:call-macro name="basedata_7_waterlevels"/> 272 <dc:call-macro name="basedata_7_waterlevels" />
273 </fixanalysis> 273 </fixanalysis>
274 </minfo> 274 </minfo>
275 <dc:call-macro name="basedata_3_officials"/> 275 <dc:call-macro name="basedata_3_officials" />
276 <dc:call-macro name="basedata_2_fixations"/> 276 <dc:call-macro name="basedata_2_fixations" />
277 <sinfo> 277 <sinfo>
278 <sinfo_additional_ls> 278 <sinfo_additional_ls>
279 <dc:call-macro name="basedata_1_additionals-sinfo-with-q"/> 279 <dc:call-macro name="basedata_1_additionals-sinfo-with-q" />
280 <dc:call-macro name="basedata_1_additionals-sinfo-without-q"/> 280 <dc:call-macro name="basedata_1_additionals-sinfo-without-q" />
281 </sinfo_additional_ls> 281 </sinfo_additional_ls>
282 </sinfo> 282 </sinfo>
283 </dc:when> 283 </dc:when>
284 284
285 <dc:when test="$out = 'sinfo_flow_depth'"> 285 <dc:when test="$out = 'sinfo_flow_depth'">
286 <dc:call-macro name="longitudinal-section-prototype"/> 286 <dc:call-macro name="longitudinal-section-prototype" />
287 </dc:when> 287 </dc:when>
288 <dc:when test="$out = 'sinfo_flow_depth_minmax'"> 288 <dc:when test="$out = 'sinfo_flow_depth_minmax'">
289 <dc:call-macro name="longitudinal-section-prototype"/> 289 <dc:call-macro name="longitudinal-section-prototype" />
290 </dc:when> 290 </dc:when>
291 <dc:when test="$out = 'sinfo_flow_depth_development'"> 291 <dc:when test="$out = 'sinfo_flow_depth_development'">
292 <dc:call-macro name="longitudinal-section-prototype"/> 292 <dc:call-macro name="longitudinal-section-prototype" />
293 </dc:when> 293 </dc:when>
294 <dc:when test="$out = 'sinfo_flow_depth_development_peryear'"> 294 <dc:when test="$out = 'sinfo_flow_depth_development_peryear'">
295 <dc:call-macro name="longitudinal-section-prototype"/> 295 <dc:call-macro name="longitudinal-section-prototype" />
296 </dc:when> 296 </dc:when>
297 <dc:when test="$out = 'sinfo_tkk'"> 297 <dc:when test="$out = 'sinfo_tkk'">
298 <dc:call-macro name="longitudinal-section-prototype"/> 298 <dc:call-macro name="longitudinal-section-prototype" />
299 </dc:when> 299 </dc:when>
300 </dc:choose> 300 </dc:choose>
301 </dc:iterate> 301 </dc:iterate>
302 </dc:otherwise> 302 </dc:otherwise>
303 </dc:choose> 303 </dc:choose>
316 Recommendations (user) 316 Recommendations (user)
317 </dc:comment> 317 </dc:comment>
318 <dc:iterate var="out" container="artifact-outs"> 318 <dc:iterate var="out" container="artifact-outs">
319 <dc:choose> 319 <dc:choose>
320 <dc:when test="$out = 'longitudinal_section'"> 320 <dc:when test="$out = 'longitudinal_section'">
321 <dc:call-macro name="officiallines_user"/> 321 <dc:call-macro name="officiallines_user" />
322 </dc:when> 322 </dc:when>
323 </dc:choose> 323 </dc:choose>
324 </dc:iterate> 324 </dc:iterate>
325 </dc:when> 325 </dc:when>
326 <dc:otherwise> 326 <dc:otherwise>
329 </dc:comment> 329 </dc:comment>
330 <dc:iterate var="out" container="artifact-outs"> 330 <dc:iterate var="out" container="artifact-outs">
331 <dc:choose> 331 <dc:choose>
332 <dc:comment> Inline datacage panels </dc:comment> 332 <dc:comment> Inline datacage panels </dc:comment>
333 <dc:when test="$out = 'winfo_diff_twin_panel'"> 333 <dc:when test="$out = 'winfo_diff_twin_panel'">
334 <dc:call-macro name="differences-fix"/> 334 <dc:call-macro name="differences-fix" />
335 <dc:call-macro name="differences"/> 335 <dc:call-macro name="differences" />
336 <dc:comment comment="Candidate for:"> 336 <dc:comment comment="Candidate for:">
337 <dc:call-macro name="longitudinal-section-user-prototype"/> 337 <dc:call-macro name="longitudinal-section-user-prototype" />
338 </dc:comment> 338 </dc:comment>
339 </dc:when> 339 </dc:when>
340 <dc:when test="$out = 'waterlevels_panel'"> 340 <dc:when test="$out = 'waterlevels_panel'">
341 <dc:call-macro name="waterlevels-user"/> 341 <dc:call-macro name="waterlevels-user" />
342 <dc:comment comment="Candidate for:"> 342 <dc:comment comment="Candidate for:">
343 <dc:call-macro name="longitudinal-section-user-prototype"/> 343 <dc:call-macro name="longitudinal-section-user-prototype" />
344 </dc:comment> 344 </dc:comment>
345 </dc:when> 345 </dc:when>
346 <dc:when test="$out = 'floodmap_hws_panel'"> 346 <dc:when test="$out = 'floodmap_hws_panel'">
347 <dc:call-macro name="floodmap-hws-user"/> 347 <dc:call-macro name="floodmap-hws-user" />
348 </dc:when> 348 </dc:when>
349 <dc:comment> Longitudinal sections </dc:comment> 349 <dc:comment> Longitudinal sections </dc:comment>
350 <dc:when test="$out = 'longitudinal_section'"> 350 <dc:when test="$out = 'longitudinal_section'">
351 <dc:call-macro name="longitudinal-section-user-prototype"/> 351 <dc:call-macro name="longitudinal-section-user-prototype" />
352 </dc:when> 352 </dc:when>
353 <dc:when test="$out = 'discharge_longitudinal_section'"> 353 <dc:when test="$out = 'discharge_longitudinal_section'">
354 <dc:call-macro name="longitudinal-section-user-prototype"/> 354 <dc:call-macro name="longitudinal-section-user-prototype" />
355 </dc:when> 355 </dc:when>
356 <dc:when test="$out = 'w_differences'"> 356 <dc:when test="$out = 'w_differences'">
357 <dc:call-macro name="longitudinal-section-user-prototype"/> 357 <dc:call-macro name="longitudinal-section-user-prototype" />
358 </dc:when> 358 </dc:when>
359 <dc:when test="$out = 'fix_longitudinal_section_curve'"> 359 <dc:when test="$out = 'fix_longitudinal_section_curve'">
360 <dc:call-macro name="longitudinal-section-user-prototype"/> 360 <dc:call-macro name="longitudinal-section-user-prototype" />
361 </dc:when> 361 </dc:when>
362 <dc:when test="$out = 'bedheight_middle'"> 362 <dc:when test="$out = 'bedheight_middle'">
363 <dc:call-macro name="longitudinal-section-user-prototype"/> 363 <dc:call-macro name="longitudinal-section-user-prototype" />
364 </dc:when> 364 </dc:when>
365 <dc:when test="$out = 'flow_velocity'"> 365 <dc:when test="$out = 'flow_velocity'">
366 <dc:call-macro name="longitudinal-section-user-prototype"/> 366 <dc:call-macro name="longitudinal-section-user-prototype" />
367 </dc:when> 367 </dc:when>
368 <dc:when test="$out = 'bed_longitudinal_section'"> 368 <dc:when test="$out = 'bed_longitudinal_section'">
369 <dc:call-macro name="longitudinal-section-user-prototype"/> 369 <dc:call-macro name="longitudinal-section-user-prototype" />
370 </dc:when> 370 </dc:when>
371 <dc:when test="$out = 'sedimentload_ls'"> 371 <dc:when test="$out = 'sedimentload_ls'">
372 <dc:call-macro name="longitudinal-section-user-prototype"/> 372 <dc:call-macro name="longitudinal-section-user-prototype" />
373 </dc:when> 373 </dc:when>
374 <dc:when test="$out = 'bed_difference_year'"> 374 <dc:when test="$out = 'bed_difference_year'">
375 <dc:call-macro name="longitudinal-section-user-prototype"/> 375 <dc:call-macro name="longitudinal-section-user-prototype" />
376 </dc:when> 376 </dc:when>
377 <dc:when test="$out = 'bed_difference_height_year'"> 377 <dc:when test="$out = 'bed_difference_height_year'">
378 <dc:call-macro name="longitudinal-section-user-prototype"/> 378 <dc:call-macro name="longitudinal-section-user-prototype" />
379 </dc:when> 379 </dc:when>
380 <dc:when test="$out = 'sinfo_flow_depth'"> 380 <dc:when test="$out = 'sinfo_flow_depth'">
381 <dc:call-macro name="longitudinal-section-user-prototype"/> 381 <dc:call-macro name="longitudinal-section-user-prototype" />
382 </dc:when> 382 </dc:when>
383 <dc:when test="$out = 'sinfo_flow_depth_minmax'"> 383 <dc:when test="$out = 'sinfo_flow_depth_minmax'">
384 <dc:call-macro name="longitudinal-section-user-prototype"/> 384 <dc:call-macro name="longitudinal-section-user-prototype" />
385 </dc:when> 385 </dc:when>
386 <dc:when test="$out = 'sinfo_flow_depth_development'"> 386 <dc:when test="$out = 'sinfo_flow_depth_development'">
387 <dc:call-macro name="longitudinal-section-user-prototype"/> 387 <dc:call-macro name="longitudinal-section-user-prototype" />
388 </dc:when> 388 </dc:when>
389 <dc:when test="$out = 'sinfo_flow_depth_development_peryear'"> 389 <dc:when test="$out = 'sinfo_flow_depth_development_peryear'">
390 <dc:call-macro name="longitudinal-section-user-prototype"/> 390 <dc:call-macro name="longitudinal-section-user-prototype" />
391 </dc:when> 391 </dc:when>
392 <dc:when test="$out = 'sinfo_tkk'"> 392 <dc:when test="$out = 'sinfo_tkk'">
393 <dc:call-macro name="longitudinal-section-user-prototype"/> 393 <dc:call-macro name="longitudinal-section-user-prototype" />
394 </dc:when> 394 </dc:when>
395 <dc:comment> Discharge curves </dc:comment> 395 <dc:comment> Discharge curves </dc:comment>
396 <dc:when test="$out = 'computed_discharge_curve'"> 396 <dc:when test="$out = 'computed_discharge_curve'">
397 <dc:call-macro name="discharge-curve-user-prototype"/> 397 <dc:call-macro name="discharge-curve-user-prototype" />
398 </dc:when> 398 </dc:when>
399 <dc:when test="$out = 'fix_derivate_curve'"> 399 <dc:when test="$out = 'fix_derivate_curve'">
400 <dc:call-macro name="discharge-curve-user-prototype"/> 400 <dc:call-macro name="discharge-curve-user-prototype" />
401 </dc:when> 401 </dc:when>
402 <dc:when test="$out = 'fix_wq_curve'"> 402 <dc:when test="$out = 'fix_wq_curve'">
403 <dc:call-macro name="discharge-curve-user-prototype"/> 403 <dc:call-macro name="discharge-curve-user-prototype" />
404 </dc:when> 404 </dc:when>
405 <dc:when test="$out = 'historical_discharge_wq'"> 405 <dc:when test="$out = 'historical_discharge_wq'">
406 <dc:call-macro name="discharge-curve-user-prototype"/> 406 <dc:call-macro name="discharge-curve-user-prototype" />
407 </dc:when> 407 </dc:when>
408 <dc:when test="starts-with($out, 'sq_relation') or $out = 'sq_overview'"> 408 <dc:when test="starts-with($out, 'sq_relation') or $out = 'sq_overview'">
409 <dc:call-macro name="discharge-curve-user-prototype"/> 409 <dc:call-macro name="discharge-curve-user-prototype" />
410 </dc:when> 410 </dc:when>
411 <dc:comment> Time series </dc:comment> 411 <dc:comment> Time series </dc:comment>
412 <dc:when test="$out = 'fix_deltawt_curve'"> 412 <dc:when test="$out = 'fix_deltawt_curve'">
413 <dc:call-macro name="delta-wt"/> 413 <dc:call-macro name="delta-wt" />
414 </dc:when> 414 </dc:when>
415 <dc:when test="$out = 'historical_discharge'"> 415 <dc:when test="$out = 'historical_discharge'">
416 <dc:call-macro name="historical-discharge-user"/> 416 <dc:call-macro name="historical-discharge-user" />
417 </dc:when> 417 </dc:when>
418 <dc:comment> Cross sections </dc:comment> 418 <dc:comment> Cross sections </dc:comment>
419 <dc:when test="$out = 'cross_section'"> 419 <dc:when test="$out = 'cross_section'">
420 <dc:call-macro name="waterlevels"/> 420 <dc:call-macro name="waterlevels" />
421 </dc:when> 421 </dc:when>
422 <dc:comment> Duration curve </dc:comment> 422 <dc:comment> Duration curve </dc:comment>
423 <dc:when test="$out = 'duration_curve'"> 423 <dc:when test="$out = 'duration_curve'">
424 <dc:call-macro name="duration-curve"/> 424 <dc:call-macro name="duration-curve" />
425 </dc:when> 425 </dc:when>
426 <dc:comment> Reference curve </dc:comment> 426 <dc:comment> Reference curve </dc:comment>
427 <dc:when test="$out = 'reference_curve'"> 427 <dc:when test="$out = 'reference_curve'">
428 <dc:call-macro name="reference-curves"/> 428 <dc:call-macro name="reference-curves" />
429 </dc:when> 429 </dc:when>
430 <dc:comment> Maps </dc:comment> 430 <dc:comment> Maps </dc:comment>
431 <dc:when test="$out = 'floodmap'"> 431 <dc:when test="$out = 'floodmap'">
432 <dc:call-macro name="flood-map"/> 432 <dc:call-macro name="flood-map" />
433 </dc:when> 433 </dc:when>
434 <dc:when test="$out = 'map'"> 434 <dc:when test="$out = 'map'">
435 <dc:call-macro name="flood-map"/> 435 <dc:call-macro name="flood-map" />
436 </dc:when> 436 </dc:when>
437 437
438 <dc:when test="$out = 'sinfo_flowdepth_waterlevels'"> 438 <dc:when test="$out = 'sinfo_flowdepth_waterlevels'">
439 <dc:call-macro name="longitudinal-section-fix-vollmer_q"/> 439 <dc:call-macro name="longitudinal-section-fix-vollmer_q" />
440 <!-- TODO: 'Frühere Berechnungen//Bezugswasserstände' --> 440 <!-- TODO: 'Frühere Berechnungen//Bezugswasserstände' -->
441 </dc:when> 441 </dc:when>
442 </dc:choose> 442 </dc:choose>
443 </dc:iterate> 443 </dc:iterate>
444 </dc:otherwise> 444 </dc:otherwise>
456 <historical_discharges> 456 <historical_discharges>
457 <dc:call-macro name="collection-group"> 457 <dc:call-macro name="collection-group">
458 <discharges description="{dc:group-key()}"> 458 <discharges description="{dc:group-key()}">
459 <dc:for-each> 459 <dc:for-each>
460 <dc:element name="${facet_name}"> 460 <dc:element name="${facet_name}">
461 <dc:attribute name="description" value="${facet_description}"/> 461 <dc:attribute name="description" value="${facet_description}" />
462 <dc:attribute name="factory" value="winfo"/> 462 <dc:attribute name="factory" value="winfo" />
463 <dc:attribute name="target_out" value="${out}"/> 463 <dc:attribute name="target_out" value="${out}" />
464 <dc:attribute name="artifact-id" value="${a_gid}"/> 464 <dc:attribute name="artifact-id" value="${a_gid}" />
465 <dc:attribute name="ids" value="${facet_num}"/> 465 <dc:attribute name="ids" value="${facet_num}" />
466 <dc:attribute name="out" value="historical_discharge"/> 466 <dc:attribute name="out" value="historical_discharge" />
467 </dc:element> 467 </dc:element>
468 </dc:for-each> 468 </dc:for-each>
469 </discharges> 469 </discharges>
470 </dc:call-macro> 470 </dc:call-macro>
471 </historical_discharges> 471 </historical_discharges>
479 <differences> 479 <differences>
480 <dc:call-macro name="collection-group"> 480 <dc:call-macro name="collection-group">
481 <differences description="{dc:group-key()}"> 481 <differences description="{dc:group-key()}">
482 <dc:for-each> 482 <dc:for-each>
483 <dc:element name="${facet_name}"> 483 <dc:element name="${facet_name}">
484 <dc:attribute name="description" value="${facet_description}"/> 484 <dc:attribute name="description" value="${facet_description}" />
485 <dc:attribute name="factory" value="winfo"/> 485 <dc:attribute name="factory" value="winfo" />
486 <dc:attribute name="artifact-id" value="${a_gid}"/> 486 <dc:attribute name="artifact-id" value="${a_gid}" />
487 <dc:attribute name="ids" value="${facet_num}"/> 487 <dc:attribute name="ids" value="${facet_num}" />
488 <dc:attribute name="target_out" value="${out}"/> 488 <dc:attribute name="target_out" value="${out}" />
489 <dc:attribute name="out" value="${out_name}"/> 489 <dc:attribute name="out" value="${out_name}" />
490 </dc:element> 490 </dc:element>
491 </dc:for-each> 491 </dc:for-each>
492 </differences> 492 </differences>
493 </dc:call-macro> 493 </dc:call-macro>
494 </differences> 494 </differences>
502 <reference_curves> 502 <reference_curves>
503 <dc:call-macro name="collection-group"> 503 <dc:call-macro name="collection-group">
504 <ref_curve description="{dc:group-key()}"> 504 <ref_curve description="{dc:group-key()}">
505 <dc:for-each> 505 <dc:for-each>
506 <dc:element name="${facet_name}"> 506 <dc:element name="${facet_name}">
507 <dc:attribute name="description" value="${facet_description}"/> 507 <dc:attribute name="description" value="${facet_description}" />
508 <dc:attribute name="factory" value="winfo"/> 508 <dc:attribute name="factory" value="winfo" />
509 <dc:attribute name="target_out" value="${out}"/> 509 <dc:attribute name="target_out" value="${out}" />
510 <dc:attribute name="artifact-id" value="${a_gid}"/> 510 <dc:attribute name="artifact-id" value="${a_gid}" />
511 <dc:attribute name="ids" value="${facet_num}"/> 511 <dc:attribute name="ids" value="${facet_num}" />
512 <dc:attribute name="out" value="reference_curve"/> 512 <dc:attribute name="out" value="reference_curve" />
513 </dc:element> 513 </dc:element>
514 </dc:for-each> 514 </dc:for-each>
515 </ref_curve> 515 </ref_curve>
516 </dc:call-macro> 516 </dc:call-macro>
517 </reference_curves> 517 </reference_curves>
523 <dc:macro name="flood-map"> 523 <dc:macro name="flood-map">
524 <dc:filter expr="$facet_name = 'floodmap.wsplgen'"> 524 <dc:filter expr="$facet_name = 'floodmap.wsplgen'">
525 <dc:if test="dc:has-result()"> 525 <dc:if test="dc:has-result()">
526 <floodmap> 526 <floodmap>
527 <dc:for-each> 527 <dc:for-each>
528 <dc:variable name="combined_desc" expr="concat($facet_description, ' ', dc:date-format('dd.MM.yyyy - H:mm:ss', $a_creation), ' ', $collection_name)"/> 528 <dc:variable name="combined_desc" expr="concat($facet_description, ' ', dc:date-format('dd.MM.yyyy - H:mm:ss', $a_creation), ' ', $collection_name)" />
529 <dc:element name="${facet_name}"> 529 <dc:element name="${facet_name}">
530 <dc:attribute name="description" value="${combined_desc}"/> 530 <dc:attribute name="description" value="${combined_desc}" />
531 <dc:attribute name="factory" value="winfo"/> 531 <dc:attribute name="factory" value="winfo" />
532 <dc:attribute name="target_out" value="${out}"/> 532 <dc:attribute name="target_out" value="${out}" />
533 <dc:attribute name="artifact-id" value="${a_id}"/> 533 <dc:attribute name="artifact-id" value="${a_id}" />
534 <dc:attribute name="ids" value="${a_id}"/> 534 <dc:attribute name="ids" value="${a_id}" />
535 <dc:attribute name="out" value="floodmap"/> 535 <dc:attribute name="out" value="floodmap" />
536 </dc:element> 536 </dc:element>
537 </dc:for-each> 537 </dc:for-each>
538 </floodmap> 538 </floodmap>
539 </dc:if> 539 </dc:if>
540 </dc:filter> 540 </dc:filter>
547 <dc:group expr="concat($river, ' ', dc:date-format('dd.MM.yyyy - H:mm:ss', $a_creation))"> 547 <dc:group expr="concat($river, ' ', dc:date-format('dd.MM.yyyy - H:mm:ss', $a_creation))">
548 <dc:comment>Aheinecke: Why is this grouping different from the rest?</dc:comment> 548 <dc:comment>Aheinecke: Why is this grouping different from the rest?</dc:comment>
549 <longitudinal_section_columns description="{dc:group-key()}"> 549 <longitudinal_section_columns description="{dc:group-key()}">
550 <dc:for-each> 550 <dc:for-each>
551 <dc:element name="${facet_name}"> 551 <dc:element name="${facet_name}">
552 <dc:attribute name="description" value="${facet_description}"/> 552 <dc:attribute name="description" value="${facet_description}" />
553 <dc:attribute name="ids" value="${facet_num}"/> 553 <dc:attribute name="ids" value="${facet_num}" />
554 <dc:attribute name="factory" value="winfo"/> 554 <dc:attribute name="factory" value="winfo" />
555 <dc:attribute name="target_out" value="${out}"/> 555 <dc:attribute name="target_out" value="${out}" />
556 <dc:attribute name="artifact-id" value="${a_gid}"/> 556 <dc:attribute name="artifact-id" value="${a_gid}" />
557 <dc:attribute name="out" value="cross_section"/> 557 <dc:attribute name="out" value="cross_section" />
558 </dc:element> 558 </dc:element>
559 </dc:for-each> 559 </dc:for-each>
560 </longitudinal_section_columns> 560 </longitudinal_section_columns>
561 </dc:group> 561 </dc:group>
562 </waterlevels> 562 </waterlevels>
564 </dc:filter> 564 </dc:filter>
565 </dc:macro> 565 </dc:macro>
566 566
567 <dc:macro name="collection-group"> 567 <dc:macro name="collection-group">
568 <dc:group expr="concat($river, ' ', dc:date-format('dd.MM.yyyy - H:mm:ss', $a_creation), ' ', $collection_name)"> 568 <dc:group expr="concat($river, ' ', dc:date-format('dd.MM.yyyy - H:mm:ss', $a_creation), ' ', $collection_name)">
569 <dc:macro-body/> 569 <dc:macro-body />
570 </dc:group> 570 </dc:group>
571 </dc:macro> 571 </dc:macro>
572 572
573 <dc:macro name="longitudinal"> 573 <dc:macro name="longitudinal">
574 <dc:filter expr="$out_name = 'longitudinal_section' and $a_state != 'state.fix.vollmer.compute'"> 574 <dc:filter expr="$out_name = 'longitudinal_section' and $a_state != 'state.fix.vollmer.compute'">
577 <dc:call-macro name="collection-group"> 577 <dc:call-macro name="collection-group">
578 <dc:comment>Aheinecke: Why is this grouping different from the rest?</dc:comment> 578 <dc:comment>Aheinecke: Why is this grouping different from the rest?</dc:comment>
579 <longitudinal_section_columns description="{dc:group-key()}"> 579 <longitudinal_section_columns description="{dc:group-key()}">
580 <dc:for-each> 580 <dc:for-each>
581 <dc:element name="${facet_name}"> 581 <dc:element name="${facet_name}">
582 <dc:attribute name="description" value="${facet_description}"/> 582 <dc:attribute name="description" value="${facet_description}" />
583 <dc:attribute name="ids" value="${facet_num}"/> 583 <dc:attribute name="ids" value="${facet_num}" />
584 <dc:attribute name="factory" value="winfo"/> 584 <dc:attribute name="factory" value="winfo" />
585 <dc:attribute name="target_out" value="${out}"/> 585 <dc:attribute name="target_out" value="${out}" />
586 <dc:attribute name="artifact-id" value="${a_gid}"/> 586 <dc:attribute name="artifact-id" value="${a_gid}" />
587 <dc:attribute name="out" value="longitudinal_section"/> 587 <dc:attribute name="out" value="longitudinal_section" />
588 </dc:element> 588 </dc:element>
589 </dc:for-each> 589 </dc:for-each>
590 </longitudinal_section_columns> 590 </longitudinal_section_columns>
591 </dc:call-macro> 591 </dc:call-macro>
592 </waterlevels_ls> 592 </waterlevels_ls>
597 <dc:macro name="longitudinal-section-fix-vollmer"> 597 <dc:macro name="longitudinal-section-fix-vollmer">
598 <dc:filter expr="$a_state = 'state.fix.vollmer.compute' and 598 <dc:filter expr="$a_state = 'state.fix.vollmer.compute' and
599 ($facet_name = 'longitudinal_section.w' or 599 ($facet_name = 'longitudinal_section.w' or
600 $facet_name = 'longitudinal_section.q') 600 $facet_name = 'longitudinal_section.q')
601 "> 601 ">
602 <dc:call-macro name="longitudinal-section-fix-vollmer_macro"/> 602 <dc:call-macro name="longitudinal-section-fix-vollmer_macro" />
603 </dc:filter> 603 </dc:filter>
604 </dc:macro> 604 </dc:macro>
605 605
606 <dc:macro name="longitudinal-section-fix-vollmer_q"> 606 <dc:macro name="longitudinal-section-fix-vollmer_q">
607 <dc:filter expr="$a_state = 'state.fix.vollmer.compute' and $facet_name = 'longitudinal_section.q'"> 607 <dc:filter expr="$a_state = 'state.fix.vollmer.compute' and $facet_name = 'longitudinal_section.q'">
608 <dc:call-macro name="longitudinal-section-fix-vollmer_macro"/> 608 <dc:call-macro name="longitudinal-section-fix-vollmer_macro" />
609 </dc:filter> 609 </dc:filter>
610 </dc:macro> 610 </dc:macro>
611 611
612 <dc:macro name="longitudinal-section-fix-vollmer_macro"> 612 <dc:macro name="longitudinal-section-fix-vollmer_macro">
613 <dc:if test="dc:has-result()"> 613 <dc:if test="dc:has-result()">
614 <waterlevels_fix_vollmer> 614 <waterlevels_fix_vollmer>
615 <dc:call-macro name="collection-group"> 615 <dc:call-macro name="collection-group">
616 <waterlevels description="{dc:group-key()}"> 616 <waterlevels description="{dc:group-key()}">
617 <dc:for-each> 617 <dc:for-each>
618 <dc:element name="${facet_name}"> 618 <dc:element name="${facet_name}">
619 <dc:attribute name="description" value="${facet_description}"/> 619 <dc:attribute name="description" value="${facet_description}" />
620 <dc:attribute name="ids" value="${facet_num}"/> 620 <dc:attribute name="ids" value="${facet_num}" />
621 <dc:attribute name="factory" value="fixanalysis"/> 621 <dc:attribute name="factory" value="fixanalysis" />
622 <dc:attribute name="target_out" value="${out}"/> 622 <dc:attribute name="target_out" value="${out}" />
623 <dc:attribute name="artifact-id" value="${a_gid}"/> 623 <dc:attribute name="artifact-id" value="${a_gid}" />
624 <dc:attribute name="out" value="longitudinal_section"/> 624 <dc:attribute name="out" value="longitudinal_section" />
625 </dc:element> 625 </dc:element>
626 </dc:for-each> 626 </dc:for-each>
627 </waterlevels> 627 </waterlevels>
628 </dc:call-macro> 628 </dc:call-macro>
629 </waterlevels_fix_vollmer> 629 </waterlevels_fix_vollmer>
641 <waterlevels_fix> 641 <waterlevels_fix>
642 <dc:call-macro name="collection-group"> 642 <dc:call-macro name="collection-group">
643 <waterlevels description="{dc:group-key()}"> 643 <waterlevels description="{dc:group-key()}">
644 <dc:for-each> 644 <dc:for-each>
645 <dc:element name="${facet_name}"> 645 <dc:element name="${facet_name}">
646 <dc:attribute name="description" value="${facet_description}"/> 646 <dc:attribute name="description" value="${facet_description}" />
647 <dc:attribute name="ids" value="${facet_num}"/> 647 <dc:attribute name="ids" value="${facet_num}" />
648 <dc:attribute name="factory" value="fixanalysis"/> 648 <dc:attribute name="factory" value="fixanalysis" />
649 <dc:attribute name="target_out" value="${out}"/> 649 <dc:attribute name="target_out" value="${out}" />
650 <dc:attribute name="artifact-id" value="${a_gid}"/> 650 <dc:attribute name="artifact-id" value="${a_gid}" />
651 <dc:attribute name="out" value="fix_longitudinal_section_curve"/> 651 <dc:attribute name="out" value="fix_longitudinal_section_curve" />
652 </dc:element> 652 </dc:element>
653 </dc:for-each> 653 </dc:for-each>
654 </waterlevels> 654 </waterlevels>
655 </dc:call-macro> 655 </dc:call-macro>
656 </waterlevels_fix> 656 </waterlevels_fix>
669 <waterlevels> 669 <waterlevels>
670 <dc:call-macro name="collection-group"> 670 <dc:call-macro name="collection-group">
671 <waterlevels description="{dc:group-key()}"> 671 <waterlevels description="{dc:group-key()}">
672 <dc:for-each> 672 <dc:for-each>
673 <dc:element name="${facet_name}"> 673 <dc:element name="${facet_name}">
674 <dc:attribute name="description" value="${facet_description}"/> 674 <dc:attribute name="description" value="${facet_description}" />
675 <dc:attribute name="ids" value="${facet_num}"/> 675 <dc:attribute name="ids" value="${facet_num}" />
676 <dc:attribute name="factory" value="fixanalysis"/> 676 <dc:attribute name="factory" value="fixanalysis" />
677 <dc:attribute name="target_out" value="${out}"/> 677 <dc:attribute name="target_out" value="${out}" />
678 <dc:attribute name="artifact-id" value="${a_gid}"/> 678 <dc:attribute name="artifact-id" value="${a_gid}" />
679 <dc:attribute name="out" value="fix_deltawt_curve"/> 679 <dc:attribute name="out" value="fix_deltawt_curve" />
680 </dc:element> 680 </dc:element>
681 </dc:for-each> 681 </dc:for-each>
682 </waterlevels> 682 </waterlevels>
683 </dc:call-macro> 683 </dc:call-macro>
684 </waterlevels> 684 </waterlevels>
685 </dc:if> 685 </dc:if>
686 </dc:filter> 686 </dc:filter>
687 </dc:macro> 687 </dc:macro>
688 688
689 <dc:macro name="fix-wq-curve"> 689 <dc:macro name="fix-wq-curve">
690 <dc:filter expr="($out_name = 'fix_wq_curve' and 690 <dc:filter
691 expr="($out_name = 'fix_wq_curve' and
691 (starts-with($facet_name, 'fix_analysis_events_wq') or 692 (starts-with($facet_name, 'fix_analysis_events_wq') or
692 starts-with($facet_name, 'fix_reference_events_wq') or 693 starts-with($facet_name, 'fix_reference_events_wq') or
693 starts-with($facet_name, 'fix_sector_average_wq') or 694 starts-with($facet_name, 'fix_sector_average_wq') or
694 $facet_name = 'fix_wq_curve')) or 695 $facet_name = 'fix_wq_curve')) or
695 ($out_name = 'fix_derivate_curve' and 696 ($out_name = 'fix_derivate_curve' and
700 <projects description="{dc:group-key()}"> 701 <projects description="{dc:group-key()}">
701 <dc:for-each> 702 <dc:for-each>
702 <dc:choose> 703 <dc:choose>
703 <dc:when test="$out_name = 'fix_wq_curve'"> 704 <dc:when test="$out_name = 'fix_wq_curve'">
704 <dc:element name="${facet_name}"> 705 <dc:element name="${facet_name}">
705 <dc:attribute name="description" value="${facet_description}"/> 706 <dc:attribute name="description" value="${facet_description}" />
706 <dc:attribute name="ids" value="${facet_num}"/> 707 <dc:attribute name="ids" value="${facet_num}" />
707 <dc:attribute name="factory" value="fixanalysis"/> 708 <dc:attribute name="factory" value="fixanalysis" />
708 <dc:attribute name="target_out" value="${out}"/> 709 <dc:attribute name="target_out" value="${out}" />
709 <dc:attribute name="artifact-id" value="${a_gid}"/> 710 <dc:attribute name="artifact-id" value="${a_gid}" />
710 <dc:attribute name="out" value="fix_wq_curve"/> 711 <dc:attribute name="out" value="fix_wq_curve" />
711 </dc:element> 712 </dc:element>
712 </dc:when> 713 </dc:when>
713 <dc:when test="$out_name = 'fix_derivate_curve'"> 714 <dc:when test="$out_name = 'fix_derivate_curve'">
714 <dc:element name="${facet_name}"> 715 <dc:element name="${facet_name}">
715 <dc:attribute name="description" value="${facet_description}"/> 716 <dc:attribute name="description" value="${facet_description}" />
716 <dc:attribute name="ids" value="${facet_num}"/> 717 <dc:attribute name="ids" value="${facet_num}" />
717 <dc:attribute name="factory" value="fixanalysis"/> 718 <dc:attribute name="factory" value="fixanalysis" />
718 <dc:attribute name="target_out" value="${out}"/> 719 <dc:attribute name="target_out" value="${out}" />
719 <dc:attribute name="artifact-id" value="${a_gid}"/> 720 <dc:attribute name="artifact-id" value="${a_gid}" />
720 <dc:attribute name="out" value="fix_derivate_curve"/> 721 <dc:attribute name="out" value="fix_derivate_curve" />
721 </dc:element> 722 </dc:element>
722 </dc:when> 723 </dc:when>
723 </dc:choose> 724 </dc:choose>
724 </dc:for-each> 725 </dc:for-each>
725 </projects> 726 </projects>
733 <dc:filter expr="$facet_name = 'extreme_wq_curve' or $facet_name = 'extreme_wq_curve_base'"> 734 <dc:filter expr="$facet_name = 'extreme_wq_curve' or $facet_name = 'extreme_wq_curve_base'">
734 <dc:if test="dc:has-result()"> 735 <dc:if test="dc:has-result()">
735 <computed_discharge_curves> 736 <computed_discharge_curves>
736 <dc:for-each> 737 <dc:for-each>
737 <dc:element name="${facet_name}"> 738 <dc:element name="${facet_name}">
738 <dc:attribute name="description" value="${facet_description}"/> 739 <dc:attribute name="description" value="${facet_description}" />
739 <dc:attribute name="factory" value="fixanalysis"/> 740 <dc:attribute name="factory" value="fixanalysis" />
740 <dc:attribute name="target_out" value="${out}"/> 741 <dc:attribute name="target_out" value="${out}" />
741 <dc:attribute name="artifact-id" value="${a_gid}"/> 742 <dc:attribute name="artifact-id" value="${a_gid}" />
742 <dc:attribute name="ids" value="${a_gid}"/> 743 <dc:attribute name="ids" value="${a_gid}" />
743 <dc:attribute name="out" value="computed_discharge_curve"/> 744 <dc:attribute name="out" value="computed_discharge_curve" />
744 </dc:element> 745 </dc:element>
745 </dc:for-each> 746 </dc:for-each>
746 </computed_discharge_curves> 747 </computed_discharge_curves>
747 </dc:if> 748 </dc:if>
748 </dc:filter> 749 </dc:filter>
754 <computed_discharge_curves> 755 <computed_discharge_curves>
755 <dc:call-macro name="collection-group"> 756 <dc:call-macro name="collection-group">
756 <projects description="{dc:group-key()}"> 757 <projects description="{dc:group-key()}">
757 <dc:for-each> 758 <dc:for-each>
758 <dc:element name="${facet_name}"> 759 <dc:element name="${facet_name}">
759 <dc:attribute name="description" value="${facet_description}"/> 760 <dc:attribute name="description" value="${facet_description}" />
760 <dc:attribute name="factory" value="winfo"/> 761 <dc:attribute name="factory" value="winfo" />
761 <dc:attribute name="target_out" value="${out}"/> 762 <dc:attribute name="target_out" value="${out}" />
762 <dc:attribute name="artifact-id" value="${a_gid}"/> 763 <dc:attribute name="artifact-id" value="${a_gid}" />
763 <dc:attribute name="ids" value="${a_gid}"/> 764 <dc:attribute name="ids" value="${a_gid}" />
764 <dc:attribute name="out" value="computed_discharge_curve"/> 765 <dc:attribute name="out" value="computed_discharge_curve" />
765 </dc:element> 766 </dc:element>
766 </dc:for-each> 767 </dc:for-each>
767 </projects> 768 </projects>
768 </dc:call-macro> 769 </dc:call-macro>
769 </computed_discharge_curves> 770 </computed_discharge_curves>
775 <dc:filter expr="$facet_name = 'duration_curve.q' or $facet_name = 'duration_curve.w'"> 776 <dc:filter expr="$facet_name = 'duration_curve.q' or $facet_name = 'duration_curve.w'">
776 <dc:if test="dc:has-result()"> 777 <dc:if test="dc:has-result()">
777 <computed_discharge_curves> 778 <computed_discharge_curves>
778 <dc:for-each> 779 <dc:for-each>
779 <dc:element name="${facet_name}"> 780 <dc:element name="${facet_name}">
780 <dc:attribute name="description" value="${facet_description}"/> 781 <dc:attribute name="description" value="${facet_description}" />
781 <dc:attribute name="factory" value="winfo"/> 782 <dc:attribute name="factory" value="winfo" />
782 <dc:attribute name="target_out" value="${out}"/> 783 <dc:attribute name="target_out" value="${out}" />
783 <dc:attribute name="artifact-id" value="${a_id}"/> 784 <dc:attribute name="artifact-id" value="${a_id}" />
784 <dc:attribute name="ids" value="${a_id}"/> 785 <dc:attribute name="ids" value="${a_id}" />
785 <dc:attribute name="out" value="duration_curve"/> 786 <dc:attribute name="out" value="duration_curve" />
786 </dc:element> 787 </dc:element>
787 </dc:for-each> 788 </dc:for-each>
788 </computed_discharge_curves> 789 </computed_discharge_curves>
789 </dc:if> 790 </dc:if>
790 </dc:filter> 791 </dc:filter>
802 <waterlevels description="{dc:group-key()}"> 803 <waterlevels description="{dc:group-key()}">
803 <dc:for-each> 804 <dc:for-each>
804 <dc:choose> 805 <dc:choose>
805 <dc:when test="$ld_m = 'location'"> 806 <dc:when test="$ld_m = 'location'">
806 <dc:variable name="combined_desc" expr="concat($facet_description, 807 <dc:variable name="combined_desc" expr="concat($facet_description,
807 ' an KM ', $deffrom)"/> 808 ' an KM ', $deffrom)" />
808 </dc:when> 809 </dc:when>
809 <dc:otherwise> 810 <dc:otherwise>
810 <dc:variable name="combined_desc" expr="concat($facet_description, ' von KM ', 811 <dc:variable name="combined_desc" expr="concat($facet_description, ' von KM ',
811 $deffrom, ' bis KM ', $defto)"/> 812 $deffrom, ' bis KM ', $defto)" />
812 </dc:otherwise> 813 </dc:otherwise>
813 </dc:choose> 814 </dc:choose>
814 <dc:element name="${facet_name}"> 815 <dc:element name="${facet_name}">
815 <dc:attribute name="description" value="${combined_desc}"/> 816 <dc:attribute name="description" value="${combined_desc}" />
816 <dc:attribute name="ids" value="${facet_num}"/> 817 <dc:attribute name="ids" value="${facet_num}" />
817 <dc:attribute name="factory" value="winfo"/> 818 <dc:attribute name="factory" value="winfo" />
818 <dc:attribute name="target_out" value="${out}"/> 819 <dc:attribute name="target_out" value="${out}" />
819 <dc:attribute name="artifact-id" value="${a_gid}"/> 820 <dc:attribute name="artifact-id" value="${a_gid}" />
820 <dc:attribute name="out" value="longitudinal_section"/> 821 <dc:attribute name="out" value="longitudinal_section" />
821 </dc:element> 822 </dc:element>
822 </dc:for-each> 823 </dc:for-each>
823 </waterlevels> 824 </waterlevels>
824 </dc:call-macro> 825 </dc:call-macro>
825 </waterlevels> 826 </waterlevels>
826 </dc:if> 827 </dc:if>
827 </dc:filter> 828 </dc:filter>
828 </dc:macro> 829 </dc:macro>
829 830
830 <dc:comment comment="For building differences."/> 831 <dc:comment comment="For building differences." />
831 <dc:macro name="differences-fix"> 832 <dc:macro name="differences-fix">
832 <dc:comment comment="Vollmer curves need own factory"/> 833 <dc:comment comment="Vollmer curves need own factory" />
833 <dc:filter expr="$a_state = 'state.fix.vollmer.compute' and $facet_name = 'longitudinal_section.w'"> 834 <dc:filter expr="$a_state = 'state.fix.vollmer.compute' and $facet_name = 'longitudinal_section.w'">
834 <dc:if test="dc:has-result()"> 835 <dc:if test="dc:has-result()">
835 <vollmer_waterlevels> 836 <vollmer_waterlevels>
836 <dc:call-macro name="collection-group"> 837 <dc:call-macro name="collection-group">
837 <waterlevels description="{dc:group-key()}"> 838 <waterlevels description="{dc:group-key()}">
838 <dc:for-each> 839 <dc:for-each>
839 <dc:choose> 840 <dc:choose>
840 <dc:when test="$ld_m = 'location'"> 841 <dc:when test="$ld_m = 'location'">
841 <dc:variable name="combined_desc" expr="concat($facet_description, ' an KM ', $deffrom)"/> 842 <dc:variable name="combined_desc" expr="concat($facet_description, ' an KM ', $deffrom)" />
842 </dc:when> 843 </dc:when>
843 <dc:otherwise> 844 <dc:otherwise>
844 <dc:variable name="combined_desc" expr="concat($facet_description, ' von KM ', 845 <dc:variable name="combined_desc" expr="concat($facet_description, ' von KM ',
845 $deffrom, ' bis KM ', $defto)"/> 846 $deffrom, ' bis KM ', $defto)" />
846 </dc:otherwise> 847 </dc:otherwise>
847 </dc:choose> 848 </dc:choose>
848 <dc:element name="${facet_name}"> 849 <dc:element name="${facet_name}">
849 <dc:attribute name="description" value="${combined_desc}"/> 850 <dc:attribute name="description" value="${combined_desc}" />
850 <dc:attribute name="ids" value="${facet_num}"/> 851 <dc:attribute name="ids" value="${facet_num}" />
851 <dc:attribute name="factory" value="fixanalysis"/> 852 <dc:attribute name="factory" value="fixanalysis" />
852 <dc:attribute name="target_out" value="${out}"/> 853 <dc:attribute name="target_out" value="${out}" />
853 <dc:attribute name="artifact-id" value="${a_gid}"/> 854 <dc:attribute name="artifact-id" value="${a_gid}" />
854 <dc:attribute name="out" value="longitudinal_section"/> 855 <dc:attribute name="out" value="longitudinal_section" />
855 </dc:element> 856 </dc:element>
856 </dc:for-each> 857 </dc:for-each>
857 </waterlevels> 858 </waterlevels>
858 </dc:call-macro> 859 </dc:call-macro>
859 </vollmer_waterlevels> 860 </vollmer_waterlevels>
866 <dc:call-macro name="collection-group"> 867 <dc:call-macro name="collection-group">
867 <waterlevels description="{dc:group-key()}"> 868 <waterlevels description="{dc:group-key()}">
868 <dc:for-each> 869 <dc:for-each>
869 <dc:choose> 870 <dc:choose>
870 <dc:when test="$ld_m = 'location'"> 871 <dc:when test="$ld_m = 'location'">
871 <dc:variable name="combined_desc" expr="concat($facet_description, ' an KM ', $deffrom)"/> 872 <dc:variable name="combined_desc" expr="concat($facet_description, ' an KM ', $deffrom)" />
872 </dc:when> 873 </dc:when>
873 <dc:otherwise> 874 <dc:otherwise>
874 <dc:variable name="combined_desc" expr="concat($facet_description, ' von KM ', 875 <dc:variable name="combined_desc" expr="concat($facet_description, ' von KM ',
875 $deffrom, ' bis KM ', $defto)"/> 876 $deffrom, ' bis KM ', $defto)" />
876 </dc:otherwise> 877 </dc:otherwise>
877 </dc:choose> 878 </dc:choose>
878 <dc:element name="${facet_name}"> 879 <dc:element name="${facet_name}">
879 <dc:attribute name="description" value="${combined_desc}"/> 880 <dc:attribute name="description" value="${combined_desc}" />
880 <dc:attribute name="ids" value="${facet_num}"/> 881 <dc:attribute name="ids" value="${facet_num}" />
881 <dc:attribute name="factory" value="winfo"/> 882 <dc:attribute name="factory" value="winfo" />
882 <dc:attribute name="target_out" value="${out}"/> 883 <dc:attribute name="target_out" value="${out}" />
883 <dc:attribute name="artifact-id" value="${a_gid}"/> 884 <dc:attribute name="artifact-id" value="${a_gid}" />
884 <dc:attribute name="out" value="longitudinal_section"/> 885 <dc:attribute name="out" value="longitudinal_section" />
885 </dc:element> 886 </dc:element>
886 </dc:for-each> 887 </dc:for-each>
887 </waterlevels> 888 </waterlevels>
888 </dc:call-macro> 889 </dc:call-macro>
889 </waterlevels> 890 </waterlevels>
896 <dc:comment>No grouping in this?</dc:comment> 897 <dc:comment>No grouping in this?</dc:comment>
897 <dc:filter expr="$out_name = 'floodmap' and $facet_name = 'floodmap.usershape'"> 898 <dc:filter expr="$out_name = 'floodmap' and $facet_name = 'floodmap.usershape'">
898 <own-hws> 899 <own-hws>
899 <dc:for-each> 900 <dc:for-each>
900 <dc:element name="${facet_name}"> 901 <dc:element name="${facet_name}">
901 <dc:attribute name="description" value="${facet_description}"/> 902 <dc:attribute name="description" value="${facet_description}" />
902 <dc:attribute name="ids" value="${facet_num}"/> 903 <dc:attribute name="ids" value="${facet_num}" />
903 <dc:attribute name="factory" value="winfo"/> 904 <dc:attribute name="factory" value="winfo" />
904 <dc:attribute name="target_out" value="${out}"/> 905 <dc:attribute name="target_out" value="${out}" />
905 <dc:attribute name="artifact-id" value="${a_gid}"/> 906 <dc:attribute name="artifact-id" value="${a_gid}" />
906 <dc:attribute name="out" value="floodmap"/> 907 <dc:attribute name="out" value="floodmap" />
907 </dc:element> 908 </dc:element>
908 </dc:for-each> 909 </dc:for-each>
909 </own-hws> 910 </own-hws>
910 </dc:filter> 911 </dc:filter>
911 </dc:macro> 912 </dc:macro>
917 <bed_quality> 918 <bed_quality>
918 <dc:call-macro name="collection-group"> 919 <dc:call-macro name="collection-group">
919 <quality-bed description="{dc:group-key()}"> 920 <quality-bed description="{dc:group-key()}">
920 <dc:for-each> 921 <dc:for-each>
921 <dc:element name="${facet_name}"> 922 <dc:element name="${facet_name}">
922 <dc:attribute name="factory" value="minfo"/> 923 <dc:attribute name="factory" value="minfo" />
923 <dc:attribute name="target_out" value="${out}"/> 924 <dc:attribute name="target_out" value="${out}" />
924 <dc:attribute name="description" value="${facet_description}"/> 925 <dc:attribute name="description" value="${facet_description}" />
925 <dc:attribute name="ids" value="${facet_num}"/> 926 <dc:attribute name="ids" value="${facet_num}" />
926 <dc:attribute name="artifact-id" value="${a_gid}"/> 927 <dc:attribute name="artifact-id" value="${a_gid}" />
927 <dc:attribute name="out" value="bed_longitudinal_section"/> 928 <dc:attribute name="out" value="bed_longitudinal_section" />
928 </dc:element> 929 </dc:element>
929 </dc:for-each> 930 </dc:for-each>
930 </quality-bed> 931 </quality-bed>
931 </dc:call-macro> 932 </dc:call-macro>
932 </bed_quality> 933 </bed_quality>
941 <flow_velocity> 942 <flow_velocity>
942 <dc:call-macro name="collection-group"> 943 <dc:call-macro name="collection-group">
943 <flow description="{dc:group-key()}"> 944 <flow description="{dc:group-key()}">
944 <dc:for-each> 945 <dc:for-each>
945 <dc:element name="${facet_name}"> 946 <dc:element name="${facet_name}">
946 <dc:attribute name="factory" value="minfo"/> 947 <dc:attribute name="factory" value="minfo" />
947 <dc:attribute name="target_out" value="${out}"/> 948 <dc:attribute name="target_out" value="${out}" />
948 <dc:attribute name="description" value="${facet_description}"/> 949 <dc:attribute name="description" value="${facet_description}" />
949 <dc:attribute name="ids" value="${facet_num}"/> 950 <dc:attribute name="ids" value="${facet_num}" />
950 <dc:attribute name="artifact-id" value="${a_gid}"/> 951 <dc:attribute name="artifact-id" value="${a_gid}" />
951 <dc:attribute name="out" value="flow_velocity"/> 952 <dc:attribute name="out" value="flow_velocity" />
952 </dc:element> 953 </dc:element>
953 </dc:for-each> 954 </dc:for-each>
954 </flow> 955 </flow>
955 </dc:call-macro> 956 </dc:call-macro>
956 </flow_velocity> 957 </flow_velocity>
964 <sediment_load> 965 <sediment_load>
965 <dc:call-macro name="collection-group"> 966 <dc:call-macro name="collection-group">
966 <load description="{dc:group-key()}"> 967 <load description="{dc:group-key()}">
967 <dc:for-each> 968 <dc:for-each>
968 <dc:element name="${facet_name}"> 969 <dc:element name="${facet_name}">
969 <dc:attribute name="factory" value="minfo"/> 970 <dc:attribute name="factory" value="minfo" />
970 <dc:attribute name="target_out" value="${out}"/> 971 <dc:attribute name="target_out" value="${out}" />
971 <dc:attribute name="description" value="${facet_description}"/> 972 <dc:attribute name="description" value="${facet_description}" />
972 <dc:attribute name="ids" value="${facet_num}"/> 973 <dc:attribute name="ids" value="${facet_num}" />
973 <dc:attribute name="artifact-id" value="${a_gid}"/> 974 <dc:attribute name="artifact-id" value="${a_gid}" />
974 <dc:attribute name="out" value="${out_name}"/> 975 <dc:attribute name="out" value="${out_name}" />
975 </dc:element> 976 </dc:element>
976 </dc:for-each> 977 </dc:for-each>
977 </load> 978 </load>
978 </dc:call-macro> 979 </dc:call-macro>
979 </sediment_load> 980 </sediment_load>
988 <middle_bedheights> 989 <middle_bedheights>
989 <dc:call-macro name="collection-group"> 990 <dc:call-macro name="collection-group">
990 <middle_bedheight description="{dc:group-key()}"> 991 <middle_bedheight description="{dc:group-key()}">
991 <dc:for-each> 992 <dc:for-each>
992 <dc:element name="${facet_name}"> 993 <dc:element name="${facet_name}">
993 <dc:attribute name="factory" value="minfo"/> 994 <dc:attribute name="factory" value="minfo" />
994 <dc:attribute name="target_out" value="${out}"/> 995 <dc:attribute name="target_out" value="${out}" />
995 <dc:attribute name="description" value="${facet_description}"/> 996 <dc:attribute name="description" value="${facet_description}" />
996 <dc:attribute name="ids" value="${facet_num}"/> 997 <dc:attribute name="ids" value="${facet_num}" />
997 <dc:attribute name="artifact-id" value="${a_gid}"/> 998 <dc:attribute name="artifact-id" value="${a_gid}" />
998 <dc:attribute name="out" value="${out_name}"/> 999 <dc:attribute name="out" value="${out_name}" />
999 </dc:element> 1000 </dc:element>
1000 </dc:for-each> 1001 </dc:for-each>
1001 </middle_bedheight> 1002 </middle_bedheight>
1002 </dc:call-macro> 1003 </dc:call-macro>
1003 </middle_bedheights> 1004 </middle_bedheights>
1012 <bedheight_differences> 1013 <bedheight_differences>
1013 <dc:call-macro name="collection-group"> 1014 <dc:call-macro name="collection-group">
1014 <difference description="{dc:group-key()}"> 1015 <difference description="{dc:group-key()}">
1015 <dc:for-each> 1016 <dc:for-each>
1016 <dc:element name="${facet_name}"> 1017 <dc:element name="${facet_name}">
1017 <dc:attribute name="factory" value="minfo"/> 1018 <dc:attribute name="factory" value="minfo" />
1018 <dc:attribute name="target_out" value="${out}"/> 1019 <dc:attribute name="target_out" value="${out}" />
1019 <dc:attribute name="description" value="${facet_description}"/> 1020 <dc:attribute name="description" value="${facet_description}" />
1020 <dc:attribute name="ids" value="${facet_num}"/> 1021 <dc:attribute name="ids" value="${facet_num}" />
1021 <dc:attribute name="artifact-id" value="${a_gid}"/> 1022 <dc:attribute name="artifact-id" value="${a_gid}" />
1022 <dc:attribute name="out" value="${out_name}"/> 1023 <dc:attribute name="out" value="${out_name}" />
1023 </dc:element> 1024 </dc:element>
1024 </dc:for-each> 1025 </dc:for-each>
1025 </difference> 1026 </difference>
1026 </dc:call-macro> 1027 </dc:call-macro>
1027 </bedheight_differences> 1028 </bedheight_differences>
1044 <sq_relations> 1045 <sq_relations>
1045 <dc:call-macro name="collection-group"> 1046 <dc:call-macro name="collection-group">
1046 <sqrel description="{dc:group-key()}"> 1047 <sqrel description="{dc:group-key()}">
1047 <dc:for-each> 1048 <dc:for-each>
1048 <dc:element name="${facet_name}"> 1049 <dc:element name="${facet_name}">
1049 <dc:attribute name="factory" value="minfo"/> 1050 <dc:attribute name="factory" value="minfo" />
1050 <dc:attribute name="target_out" value="${out}"/> 1051 <dc:attribute name="target_out" value="${out}" />
1051 <dc:attribute name="description" value="${facet_description}"/> 1052 <dc:attribute name="description" value="${facet_description}" />
1052 <dc:attribute name="ids" value="${facet_num}"/> 1053 <dc:attribute name="ids" value="${facet_num}" />
1053 <dc:attribute name="artifact-id" value="${a_gid}"/> 1054 <dc:attribute name="artifact-id" value="${a_gid}" />
1054 <dc:attribute name="out" value="${out_name}"/> 1055 <dc:attribute name="out" value="${out_name}" />
1055 </dc:element> 1056 </dc:element>
1056 </dc:for-each> 1057 </dc:for-each>
1057 </sqrel> 1058 </sqrel>
1058 </dc:call-macro> 1059 </dc:call-macro>
1059 </sq_relations> 1060 </sq_relations>
1067 <waterlevels_discharge> 1068 <waterlevels_discharge>
1068 <dc:call-macro name="collection-group"> 1069 <dc:call-macro name="collection-group">
1069 <discharge description="{dc:group-key()}"> 1070 <discharge description="{dc:group-key()}">
1070 <dc:for-each> 1071 <dc:for-each>
1071 <dc:element name="${facet_name}"> 1072 <dc:element name="${facet_name}">
1072 <dc:attribute name="factory" value="winfo"/> 1073 <dc:attribute name="factory" value="winfo" />
1073 <dc:attribute name="target_out" value="${out}"/> 1074 <dc:attribute name="target_out" value="${out}" />
1074 <dc:attribute name="description" value="${facet_description}"/> 1075 <dc:attribute name="description" value="${facet_description}" />
1075 <dc:attribute name="ids" value="${facet_num}-${facet_name}"/> 1076 <dc:attribute name="ids" value="${facet_num}-${facet_name}" />
1076 <dc:attribute name="artifact-id" value="${a_gid}"/> 1077 <dc:attribute name="artifact-id" value="${a_gid}" />
1077 <dc:attribute name="out" value="discharge_longitudinal_section"/> 1078 <dc:attribute name="out" value="discharge_longitudinal_section" />
1078 </dc:element> 1079 </dc:element>
1079 </dc:for-each> 1080 </dc:for-each>
1080 </discharge> 1081 </discharge>
1081 </dc:call-macro> 1082 </dc:call-macro>
1082 </waterlevels_discharge> 1083 </waterlevels_discharge>
1086 1087
1087 1088
1088 <!-- Macros to load system data --> 1089 <!-- Macros to load system data -->
1089 1090
1090 <dc:macro name="qmainvalues"> 1091 <dc:macro name="qmainvalues">
1091 <qmainvalue factory="mainvalue" ids="{$river_id}:q" target_out="{$out}"/> 1092 <qmainvalue factory="mainvalue" ids="{$river_id}:q" target_out="{$out}" />
1092 </dc:macro> 1093 </dc:macro>
1093 1094
1094 <dc:macro name="mainvalues"> 1095 <dc:macro name="mainvalues">
1095 <wmainvalue factory="mainvalue" ids="{$river_id}:w" target_out="{$out}"/> 1096 <wmainvalue factory="mainvalue" ids="{$river_id}:w" target_out="{$out}" />
1096 <dc:call-macro name="qmainvalues"/> 1097 <dc:call-macro name="qmainvalues" />
1097 </dc:macro> 1098 </dc:macro>
1098 1099
1099 <!-- discharge curves --> 1100 <!-- discharge curves -->
1100 <dc:macro name="hist_discharge_factory"> 1101 <dc:macro name="hist_discharge_factory">
1101 <dc:for-each> 1102 <dc:for-each>
1102 <dc:variable name="validity" expr="concat( 1103 <dc:variable name="validity" expr="concat(
1103 dc:date-format('dd.MM.yyyy', $start_time), 1104 dc:date-format('dd.MM.yyyy', $start_time),
1104 ' - ', 1105 ' - ',
1105 dc:date-format('dd.MM.yyyy', $stop_time))"/> 1106 dc:date-format('dd.MM.yyyy', $stop_time))" />
1106 <histdis name="{concat($bfg_id, ' ', $validity)}" description="{concat($bfg_id, ' ', $validity)}" factory="gaugedischarge" target_out="{$out}" ids="{$gauge_name};{$dt_id};{concat($bfg_id, ' ', 1107 <histdis name="{concat($bfg_id, ' ', $validity)}" description="{concat($bfg_id, ' ', $validity)}" factory="gaugedischarge" target_out="{$out}" ids="{$gauge_name};{$dt_id};{concat($bfg_id, ' ',
1107 $gauge_name, ' ', $validity)}"/> 1108 $gauge_name, ' ', $validity)}" />
1108 </dc:for-each> 1109 </dc:for-each>
1109 </dc:macro> 1110 </dc:macro>
1110 1111
1111 <dc:macro name="hist_discharge_rec"> 1112 <dc:macro name="hist_discharge_rec">
1112 <dc:variable name="start" type="number" expr="dc:date-format('yyyyMMdd', 1113 <dc:variable name="start" type="number" expr="dc:date-format('yyyyMMdd',
1113 number(substring-before($year_range, ';')))"/> 1114 number(substring-before($year_range, ';')))" />
1114 <dc:variable name="stop" type="number" expr="dc:date-format('yyyyMMdd', 1115 <dc:variable name="stop" type="number" expr="dc:date-format('yyyyMMdd',
1115 number(substring-after($year_range, ';')))"/> 1116 number(substring-after($year_range, ';')))" />
1116 <dc:call-macro name="discharge_curve_choose_context"> 1117 <dc:call-macro name="discharge_curve_choose_context">
1117 <dc:filter expr="$kind = 1 and 1118 <dc:filter expr="$kind = 1 and
1118 number(dc:date-format('yyyyMMdd', $start_time)) 1119 number(dc:date-format('yyyyMMdd', $start_time))
1119 &lt; $stop and 1120 &lt; $stop and
1120 number(dc:coalesce( 1121 number(dc:coalesce(
1121 dc:date-format('yyyyMMdd', $stop_time), 1122 dc:date-format('yyyyMMdd', $stop_time),
1122 '99999999')) 1123 '99999999'))
1123 &gt; $start"> 1124 &gt; $start">
1124 <dc:call-macro name="hist_discharge_factory"/> 1125 <dc:call-macro name="hist_discharge_factory" />
1125 </dc:filter> 1126 </dc:filter>
1126 </dc:call-macro> 1127 </dc:call-macro>
1127 </dc:macro> 1128 </dc:macro>
1128 1129
1129 <dc:macro name="discharge_table_gauge"> 1130 <dc:macro name="discharge_table_gauge">
1130 <dc:call-macro name="discharge_curve_choose_context"> 1131 <dc:call-macro name="discharge_curve_choose_context">
1131 <dc:filter expr="$kind = 0"> 1132 <dc:filter expr="$kind = 0">
1132 <dc:group expr="$gauge_name"> 1133 <dc:group expr="$gauge_name">
1133 <gauge name="{dc:group-key()}"> 1134 <gauge name="{dc:group-key()}">
1134 <dc:for-each> 1135 <dc:for-each>
1135 <current_gauge factory="gaugedischarge" target_out="{$out}" ids="{$gauge_name}"/> 1136 <current_gauge factory="gaugedischarge" target_out="{$out}" ids="{$gauge_name}" />
1136 </dc:for-each> 1137 </dc:for-each>
1137 </gauge> 1138 </gauge>
1138 </dc:group> 1139 </dc:group>
1139 </dc:filter> 1140 </dc:filter>
1140 </dc:call-macro> 1141 </dc:call-macro>
1144 <dc:call-macro name="discharge_curve_choose_context"> 1145 <dc:call-macro name="discharge_curve_choose_context">
1145 <dc:filter expr="$kind = 1"> 1146 <dc:filter expr="$kind = 1">
1146 <historical_discharge_curves> 1147 <historical_discharge_curves>
1147 <dc:group expr="$gauge_name"> 1148 <dc:group expr="$gauge_name">
1148 <gauge name="{dc:group-key()}"> 1149 <gauge name="{dc:group-key()}">
1149 <dc:call-macro name="hist_discharge_factory"/> 1150 <dc:call-macro name="hist_discharge_factory" />
1150 </gauge> 1151 </gauge>
1151 </dc:group> 1152 </dc:group>
1152 </historical_discharge_curves> 1153 </historical_discharge_curves>
1153 </dc:filter> 1154 </dc:filter>
1154 </dc:call-macro> 1155 </dc:call-macro>
1156 1157
1157 <dc:macro name="discharge_curve_choose_context"> 1158 <dc:macro name="discharge_curve_choose_context">
1158 <dc:choose> 1159 <dc:choose>
1159 <dc:when test="$fromkm &gt; -99999 and $tokm &lt; 99999"> 1160 <dc:when test="$fromkm &gt; -99999 and $tokm &lt; 99999">
1160 <dc:context> 1161 <dc:context>
1161 <dc:call-macro name="discharge_curves_km"/> 1162 <dc:call-macro name="discharge_curves_km" />
1162 <dc:macro-body/> 1163 <dc:macro-body />
1163 </dc:context> 1164 </dc:context>
1164 </dc:when> 1165 </dc:when>
1165 <dc:otherwise> 1166 <dc:otherwise>
1166 <dc:variable name="refgauge" type="number" expr="dc:get('reference_gauge')"/> 1167 <dc:variable name="refgauge" type="number" expr="dc:get('reference_gauge')" />
1167 <dc:context> 1168 <dc:context>
1168 <dc:call-macro name="discharge_curves_refgauge"/> 1169 <dc:call-macro name="discharge_curves_refgauge" />
1169 <dc:macro-body/> 1170 <dc:macro-body />
1170 </dc:context> 1171 </dc:context>
1171 </dc:otherwise> 1172 </dc:otherwise>
1172 </dc:choose> 1173 </dc:choose>
1173 </dc:macro> 1174 </dc:macro>
1174 1175
1218 JOIN cross_section_lines csl ON csl.cross_section_id = cs.id 1219 JOIN cross_section_lines csl ON csl.cross_section_id = cs.id
1219 WHERE cs.river_id = ${river_id} 1220 WHERE cs.river_id = ${river_id}
1220 AND csl.km BETWEEN ${fromkm} AND ${tokm} 1221 AND csl.km BETWEEN ${fromkm} AND ${tokm}
1221 </dc:statement> 1222 </dc:statement>
1222 <dc:for-each> 1223 <dc:for-each>
1223 <cross_section name="{$prot_description}" ids="{$prot_id}" factory="crosssections" target_out="{$out}"/> 1224 <cross_section name="{$prot_description}" ids="{$prot_id}" factory="crosssections" target_out="{$out}" />
1224 </dc:for-each> 1225 </dc:for-each>
1225 </dc:context> 1226 </dc:context>
1226 </cross_sections> 1227 </cross_sections>
1227 </dc:macro> 1228 </dc:macro>
1228 1229
1237 JOIN hyk_entries he ON he.hyk_id = h.id 1238 JOIN hyk_entries he ON he.hyk_id = h.id
1238 WHERE river_id = ${river_id} 1239 WHERE river_id = ${river_id}
1239 AND he.km BETWEEN ${fromkm} AND ${tokm} 1240 AND he.km BETWEEN ${fromkm} AND ${tokm}
1240 </dc:statement> 1241 </dc:statement>
1241 <dc:for-each> 1242 <dc:for-each>
1242 <hyk name="{$hyk_description}" ids="{$hyk_id}" factory="hyk" target_out="{$out}"/> 1243 <hyk name="{$hyk_description}" ids="{$hyk_id}" factory="hyk" target_out="{$out}" />
1243 </dc:for-each> 1244 </dc:for-each>
1244 </dc:context> 1245 </dc:context>
1245 </hyks> 1246 </hyks>
1246 </dc:macro> 1247 </dc:macro>
1247 1248
1254 <dc:if test="dc:has-result()"> 1255 <dc:if test="dc:has-result()">
1255 <basedata> 1256 <basedata>
1256 <dc:group expr="$wst_description"> 1257 <dc:group expr="$wst_description">
1257 <basedata name="{dc:group-key()}"> 1258 <basedata name="{dc:group-key()}">
1258 <dc:for-each> 1259 <dc:for-each>
1259 <dc:macro-body/> 1260 <dc:macro-body />
1260 </dc:for-each> 1261 </dc:for-each>
1261 </basedata> 1262 </basedata>
1262 </dc:group> 1263 </dc:group>
1263 </basedata> 1264 </basedata>
1264 </dc:if> 1265 </dc:if>
1265 </dc:filter> 1266 </dc:filter>
1266 </dc:macro> 1267 </dc:macro>
1267 1268
1268 <dc:macro name="basedata_0"> 1269 <dc:macro name="basedata_0">
1269 <dc:call-macro name="basedata_0_macro"> 1270 <dc:call-macro name="basedata_0_macro">
1270 <column name="{$wst_column_name}" ids="base_data-wstv-{$wst_column_position}-{$wst_id}" factory="staticwqkms" target_out="{$out}" info="{$info} [km {$deffrom} - {$defto}]"/> 1271 <column name="{$wst_column_name}" ids="base_data-wstv-{$wst_column_position}-{$wst_id}" factory="staticwqkms" target_out="{$out}" info="{$info} [km {$deffrom} - {$defto}]" />
1271 </dc:call-macro> 1272 </dc:call-macro>
1272 </dc:macro> 1273 </dc:macro>
1273 1274
1274 <dc:macro name="basedata_0_wq"> 1275 <dc:macro name="basedata_0_wq">
1275 <dc:call-macro name="basedata_0_macro"> 1276 <dc:call-macro name="basedata_0_macro">
1276 <column name="{$wst_column_name}" ids="base_data-wstv-{$wst_column_position}-{$wst_id}" factory="wqinterpol" target_out="{$out}" info="{$info} [km {$deffrom} - {$defto}]"/> 1277 <column name="{$wst_column_name}" ids="base_data-wstv-{$wst_column_position}-{$wst_id}" factory="wqinterpol" target_out="{$out}" info="{$info} [km {$deffrom} - {$defto}]" />
1277 </dc:call-macro> 1278 </dc:call-macro>
1278 </dc:macro> 1279 </dc:macro>
1279 1280
1280 <!-- additional longitudinal sections --> 1281 <!-- additional longitudinal sections -->
1281 <dc:macro name="basedata_1_additionals_macro"> 1282 <dc:macro name="basedata_1_additionals_macro">
1283 <dc:if test="dc:has-result()"> 1284 <dc:if test="dc:has-result()">
1284 <additionals> 1285 <additionals>
1285 <dc:group expr="dc:replace($wst_description, 'Zus.Längsschnitte/', '')"> 1286 <dc:group expr="dc:replace($wst_description, 'Zus.Längsschnitte/', '')">
1286 <additional name="{dc:group-key()}"> 1287 <additional name="{dc:group-key()}">
1287 <dc:for-each> 1288 <dc:for-each>
1288 <dc:macro-body/> 1289 <dc:macro-body />
1289 </dc:for-each> 1290 </dc:for-each>
1290 </additional> 1291 </additional>
1291 </dc:group> 1292 </dc:group>
1292 </additionals> 1293 </additionals>
1293 </dc:if> 1294 </dc:if>
1294 </dc:filter> 1295 </dc:filter>
1295 </dc:macro> 1296 </dc:macro>
1296 1297
1297 <dc:macro name="basedata_1_additionals"> 1298 <dc:macro name="basedata_1_additionals">
1298 <dc:call-macro name="basedata_1_additionals_macro"> 1299 <dc:call-macro name="basedata_1_additionals_macro">
1299 <column name="{$wst_column_name}" ids="additionals-wstv-{$wst_column_position}-{$wst_id}" factory="staticwqkms" target_out="{$out}" info="{$info} [km {$deffrom} - {$defto}]"/> 1300 <column name="{$wst_column_name}" ids="additionals-wstv-{$wst_column_position}-{$wst_id}" factory="staticwqkms" target_out="{$out}" info="{$info} [km {$deffrom} - {$defto}]" />
1300 </dc:call-macro> 1301 </dc:call-macro>
1301 </dc:macro> 1302 </dc:macro>
1302 1303
1303 <dc:macro name="basedata_1_additionals-sinfo-with-q_macro"> 1304 <dc:macro name="basedata_1_additionals-sinfo-with-q_macro">
1304 <dc:filter expr="$kind=1 and $sinfo_selection='Q'"> 1305 <dc:filter expr="$kind=1 and $sinfo_selection='Q'">
1305 <dc:if test="dc:has-result()"> 1306 <dc:if test="dc:has-result()">
1306 <sinfo_additional_ls_withQ> 1307 <sinfo_additional_ls_withQ>
1307 <dc:group expr="dc:replace($wst_description, 'Zus.Längsschnitte/', '')"> 1308 <dc:group expr="dc:replace($wst_description, 'Zus.Längsschnitte/', '')">
1308 <additional name="{dc:group-key()}"> 1309 <additional name="{dc:group-key()}">
1309 <dc:for-each> 1310 <dc:for-each>
1310 <dc:macro-body/> 1311 <dc:macro-body />
1311 </dc:for-each> 1312 </dc:for-each>
1312 </additional> 1313 </additional>
1313 </dc:group> 1314 </dc:group>
1314 </sinfo_additional_ls_withQ> 1315 </sinfo_additional_ls_withQ>
1315 </dc:if> 1316 </dc:if>
1316 </dc:filter> 1317 </dc:filter>
1317 </dc:macro> 1318 </dc:macro>
1318 1319
1319 <dc:macro name="basedata_1_additionals-sinfo-with-q"> 1320 <dc:macro name="basedata_1_additionals-sinfo-with-q">
1320 <dc:call-macro name="basedata_1_additionals-sinfo-with-q_macro"> 1321 <dc:call-macro name="basedata_1_additionals-sinfo-with-q_macro">
1321 <column name="{$wst_column_name}" ids="additionals-wstv-{$wst_column_position}-{$wst_id}" factory="staticwqkms" target_out="{$out}" info="{$info} [km {$deffrom} - {$defto}]"/> 1322 <column name="{$wst_column_name}" ids="additionals-wstv-{$wst_column_position}-{$wst_id}" factory="staticwqkms" target_out="{$out}" info="{$info} [km {$deffrom} - {$defto}]" />
1322 </dc:call-macro> 1323 </dc:call-macro>
1323 </dc:macro> 1324 </dc:macro>
1324 1325
1325 <dc:macro name="basedata_1_additionals-sinfo-without-q_macro"> 1326 <dc:macro name="basedata_1_additionals-sinfo-without-q_macro">
1326 <dc:filter expr="$kind=1 and $sinfo_selection='W'"> 1327 <dc:filter expr="$kind=1 and $sinfo_selection='W'">
1327 <dc:if test="dc:has-result()"> 1328 <dc:if test="dc:has-result()">
1328 <sinfo_additional_ls_withoutQ> 1329 <sinfo_additional_ls_withoutQ>
1329 <dc:group expr="dc:replace($wst_description, 'Zus.Längsschnitte/', '')"> 1330 <dc:group expr="dc:replace($wst_description, 'Zus.Längsschnitte/', '')">
1330 <additional name="{dc:group-key()}"> 1331 <additional name="{dc:group-key()}">
1331 <dc:for-each> 1332 <dc:for-each>
1332 <dc:macro-body/> 1333 <dc:macro-body />
1333 </dc:for-each> 1334 </dc:for-each>
1334 </additional> 1335 </additional>
1335 </dc:group> 1336 </dc:group>
1336 </sinfo_additional_ls_withoutQ> 1337 </sinfo_additional_ls_withoutQ>
1337 </dc:if> 1338 </dc:if>
1338 </dc:filter> 1339 </dc:filter>
1339 </dc:macro> 1340 </dc:macro>
1340 1341
1341 <dc:macro name="basedata_1_additionals-sinfo-without-q"> 1342 <dc:macro name="basedata_1_additionals-sinfo-without-q">
1342 <dc:call-macro name="basedata_1_additionals-sinfo-without-q_macro"> 1343 <dc:call-macro name="basedata_1_additionals-sinfo-without-q_macro">
1343 <column name="{$wst_column_name}" ids="additionals-wstv-{$wst_column_position}-{$wst_id}" factory="staticwkms" target_out="{$out}" info="{$info} [km {$deffrom} - {$defto}]"/> 1344 <column name="{$wst_column_name}" ids="additionals-wstv-{$wst_column_position}-{$wst_id}" factory="staticwkms" target_out="{$out}" info="{$info} [km {$deffrom} - {$defto}]" />
1344 </dc:call-macro> 1345 </dc:call-macro>
1345 </dc:macro> 1346 </dc:macro>
1346 1347
1347 <dc:macro name="basedata_1_additionals_wq"> 1348 <dc:macro name="basedata_1_additionals_wq">
1348 <dc:call-macro name="basedata_1_additionals_macro"> 1349 <dc:call-macro name="basedata_1_additionals_macro">
1349 <column name="{$wst_column_name}" ids="base_data-wstv-{$wst_column_position}-{$wst_id}" factory="wqinterpol" target_out="{$out}" info="{$info} [km {$deffrom} - {$defto}]"/> 1350 <column name="{$wst_column_name}" ids="base_data-wstv-{$wst_column_position}-{$wst_id}" factory="wqinterpol" target_out="{$out}" info="{$info} [km {$deffrom} - {$defto}]" />
1350 </dc:call-macro> 1351 </dc:call-macro>
1351 </dc:macro> 1352 </dc:macro>
1352 1353
1353 <dc:macro name="basedata_1_additionals-relative_point"> 1354 <dc:macro name="basedata_1_additionals-relative_point">
1354 <dc:call-macro name="basedata_1_additionals_macro"> 1355 <dc:call-macro name="basedata_1_additionals_macro">
1355 <column name="{$wst_column_name}" ids="additionals-wstv-{$wst_column_position}-{$wst_id}" factory="staticwkms" target_out="{$out}" info="{$info} [km {$deffrom} - {$defto}]"/> 1356 <column name="{$wst_column_name}" ids="additionals-wstv-{$wst_column_position}-{$wst_id}" factory="staticwkms" target_out="{$out}" info="{$info} [km {$deffrom} - {$defto}]" />
1356 </dc:call-macro> 1357 </dc:call-macro>
1357 </dc:macro> 1358 </dc:macro>
1358 1359
1359 <!-- fixations --> 1360 <!-- fixations -->
1360 <dc:macro name="fixings-macro"> 1361 <dc:macro name="fixings-macro">
1362 <dc:if test="dc:has-result()"> 1363 <dc:if test="dc:has-result()">
1363 <fixations> 1364 <fixations>
1364 <dc:group expr="dc:replace($wst_description, 'Fixierungen/', '')"> 1365 <dc:group expr="dc:replace($wst_description, 'Fixierungen/', '')">
1365 <fixation name="{dc:group-key()}"> 1366 <fixation name="{dc:group-key()}">
1366 <dc:for-each> 1367 <dc:for-each>
1367 <dc:macro-body/> 1368 <dc:macro-body />
1368 </dc:for-each> 1369 </dc:for-each>
1369 </fixation> 1370 </fixation>
1370 </dc:group> 1371 </dc:group>
1371 </fixations> 1372 </fixations>
1372 </dc:if> 1373 </dc:if>
1373 </dc:filter> 1374 </dc:filter>
1374 </dc:macro> 1375 </dc:macro>
1375 1376
1376 <dc:macro name="basedata_2_fixations"> 1377 <dc:macro name="basedata_2_fixations">
1377 <dc:call-macro name="fixings-macro"> 1378 <dc:call-macro name="fixings-macro">
1378 <column name="{$wst_column_name}" ids="fixations-wstv-{$wst_column_position}-{$wst_id}" factory="staticwqkms" target_out="{$out}" info="{$info} [km {$deffrom} - {$defto}]"/> 1379 <column name="{$wst_column_name}" ids="fixations-wstv-{$wst_column_position}-{$wst_id}" factory="staticwqkms" target_out="{$out}" info="{$info} [km {$deffrom} - {$defto}]" />
1379 </dc:call-macro> 1380 </dc:call-macro>
1380 </dc:macro> 1381 </dc:macro>
1381 1382
1382 <dc:macro name="basedata_2_fixations_wq"> 1383 <dc:macro name="basedata_2_fixations_wq">
1383 <dc:call-macro name="fixings-macro"> 1384 <dc:call-macro name="fixings-macro">
1384 <column name="{$wst_column_name}" ids="fixations-wstv-{$wst_column_position}-{$wst_id}" factory="wqinterpol" target_out="{$out}" info="{$info} [km {$deffrom} - {$defto}]"/> 1385 <column name="{$wst_column_name}" ids="fixations-wstv-{$wst_column_position}-{$wst_id}" factory="wqinterpol" target_out="{$out}" info="{$info} [km {$deffrom} - {$defto}]" />
1385 </dc:call-macro> 1386 </dc:call-macro>
1386 </dc:macro> 1387 </dc:macro>
1387 1388
1388 <dc:macro name="basedata_2_fixations_relative_point"> 1389 <dc:macro name="basedata_2_fixations_relative_point">
1389 <dc:call-macro name="fixings-macro"> 1390 <dc:call-macro name="fixings-macro">
1390 <column name="{$wst_column_name}" ids="fixations-wstv-{$wst_column_position}-{$wst_id}" factory="staticwkms" target_out="{$out}" info="{$info} [km {$deffrom} - {$defto}]"/> 1391 <column name="{$wst_column_name}" ids="fixations-wstv-{$wst_column_position}-{$wst_id}" factory="staticwkms" target_out="{$out}" info="{$info} [km {$deffrom} - {$defto}]" />
1391 </dc:call-macro> 1392 </dc:call-macro>
1392 </dc:macro> 1393 </dc:macro>
1393 1394
1394 <!-- official lines --> 1395 <!-- official lines -->
1395 <dc:macro name="basedata_3_macro"> 1396 <dc:macro name="basedata_3_macro">
1397 <dc:if test="dc:has-result()"> 1398 <dc:if test="dc:has-result()">
1398 <officiallines> 1399 <officiallines>
1399 <dc:group expr="$wst_description"> 1400 <dc:group expr="$wst_description">
1400 <official name="{dc:group-key()}"> 1401 <official name="{dc:group-key()}">
1401 <dc:for-each> 1402 <dc:for-each>
1402 <dc:macro-body/> 1403 <dc:macro-body />
1403 </dc:for-each> 1404 </dc:for-each>
1404 </official> 1405 </official>
1405 </dc:group> 1406 </dc:group>
1406 </officiallines> 1407 </officiallines>
1407 </dc:if> 1408 </dc:if>
1408 </dc:filter> 1409 </dc:filter>
1409 </dc:macro> 1410 </dc:macro>
1410 1411
1411 <dc:macro name="basedata_3_officials"> 1412 <dc:macro name="basedata_3_officials">
1412 <dc:call-macro name="basedata_3_macro"> 1413 <dc:call-macro name="basedata_3_macro">
1413 <column name="{$wst_column_name}" ids="additionals-wstv-{$wst_column_position}-{$wst_id}" factory="staticwqkms" target_out="{$out}" info="{$info} [km {$deffrom} - {$defto}]"/> 1414 <column name="{$wst_column_name}" ids="additionals-wstv-{$wst_column_position}-{$wst_id}" factory="staticwqkms" target_out="{$out}" info="{$info} [km {$deffrom} - {$defto}]" />
1414 </dc:call-macro> 1415 </dc:call-macro>
1415 </dc:macro> 1416 </dc:macro>
1416 1417
1417 <dc:macro name="basedata_3_officials_wq"> 1418 <dc:macro name="basedata_3_officials_wq">
1418 <dc:call-macro name="basedata_3_macro"> 1419 <dc:call-macro name="basedata_3_macro">
1419 <column name="{$wst_column_name}" ids="officials_wq-wstv-{$wst_column_position}-{$wst_id}" factory="wqinterpol" target_out="{$out}" info="{$info} [km {$deffrom} - {$defto}]"/> 1420 <column name="{$wst_column_name}" ids="officials_wq-wstv-{$wst_column_position}-{$wst_id}" factory="wqinterpol" target_out="{$out}" info="{$info} [km {$deffrom} - {$defto}]" />
1420 </dc:call-macro> 1421 </dc:call-macro>
1421 </dc:macro> 1422 </dc:macro>
1422 1423
1423 <!-- flood marks --> 1424 <!-- flood marks -->
1424 <dc:macro name="basedata_4_macro"> 1425 <dc:macro name="basedata_4_macro">
1426 <dc:if test="dc:has-result()"> 1427 <dc:if test="dc:has-result()">
1427 <heightmarks> 1428 <heightmarks>
1428 <dc:group expr="dc:replace($wst_description, 'HW-Marken/', '')"> 1429 <dc:group expr="dc:replace($wst_description, 'HW-Marken/', '')">
1429 <heightmark name="{dc:group-key()}"> 1430 <heightmark name="{dc:group-key()}">
1430 <dc:for-each> 1431 <dc:for-each>
1431 <dc:macro-body/> 1432 <dc:macro-body />
1432 </dc:for-each> 1433 </dc:for-each>
1433 </heightmark> 1434 </heightmark>
1434 </dc:group> 1435 </dc:group>
1435 </heightmarks> 1436 </heightmarks>
1436 </dc:if> 1437 </dc:if>
1437 </dc:filter> 1438 </dc:filter>
1438 </dc:macro> 1439 </dc:macro>
1439 1440
1440 <dc:macro name="basedata_4_heightmarks-points"> 1441 <dc:macro name="basedata_4_heightmarks-points">
1441 <dc:call-macro name="basedata_4_macro"> 1442 <dc:call-macro name="basedata_4_macro">
1442 <column name="{$wst_column_name}" ids="heightmarks_points-wstv-{$wst_column_position}-{$wst_id}" factory="staticwkms" target_out="{$out}" info="{$info} [km {$deffrom} - {$defto}]"/> 1443 <column name="{$wst_column_name}" ids="heightmarks_points-wstv-{$wst_column_position}-{$wst_id}" factory="staticwkms" target_out="{$out}" info="{$info} [km {$deffrom} - {$defto}]" />
1443 </dc:call-macro> 1444 </dc:call-macro>
1444 </dc:macro> 1445 </dc:macro>
1445 1446
1446 <dc:macro name="basedata_4_heightmarks-points_wq"> 1447 <dc:macro name="basedata_4_heightmarks-points_wq">
1447 <dc:call-macro name="basedata_4_macro"> 1448 <dc:call-macro name="basedata_4_macro">
1448 <column name="{$wst_column_name}" ids="heightmarks_points-wstv-{$wst_column_position}-{$wst_id}" factory="wqinterpol" target_out="{$out}" info="{$info} [km {$deffrom} - {$defto}]"/> 1449 <column name="{$wst_column_name}" ids="heightmarks_points-wstv-{$wst_column_position}-{$wst_id}" factory="wqinterpol" target_out="{$out}" info="{$info} [km {$deffrom} - {$defto}]" />
1449 </dc:call-macro> 1450 </dc:call-macro>
1450 </dc:macro> 1451 </dc:macro>
1451 1452
1452 <dc:macro name="basedata_4_heightmarks-points-relative_points"> 1453 <dc:macro name="basedata_4_heightmarks-points-relative_points">
1453 <dc:call-macro name="basedata_4_macro"> 1454 <dc:call-macro name="basedata_4_macro">
1454 <column name="{$wst_column_name}" ids="heightmarks_points-wstv-{$wst_column_position}-{$wst_id}" factory="staticwkms" target_out="{$out}" info="{$info} [km {$deffrom} - {$defto}]"/> 1455 <column name="{$wst_column_name}" ids="heightmarks_points-wstv-{$wst_column_position}-{$wst_id}" factory="staticwkms" target_out="{$out}" info="{$info} [km {$deffrom} - {$defto}]" />
1455 </dc:call-macro> 1456 </dc:call-macro>
1456 </dc:macro> 1457 </dc:macro>
1457 1458
1458 <!-- flood protection structures --> 1459 <!-- flood protection structures -->
1459 <dc:macro name="basedata_5_macro"> 1460 <dc:macro name="basedata_5_macro">
1461 <dc:if test="dc:has-result()"> 1462 <dc:if test="dc:has-result()">
1462 <flood_protections> 1463 <flood_protections>
1463 <dc:group expr="dc:replace($wst_description, 'HW-Schutzanlagen/', '')"> 1464 <dc:group expr="dc:replace($wst_description, 'HW-Schutzanlagen/', '')">
1464 <flood_protection name="{dc:group-key()}"> 1465 <flood_protection name="{dc:group-key()}">
1465 <dc:for-each> 1466 <dc:for-each>
1466 <dc:macro-body/> 1467 <dc:macro-body />
1467 </dc:for-each> 1468 </dc:for-each>
1468 </flood_protection> 1469 </flood_protection>
1469 </dc:group> 1470 </dc:group>
1470 </flood_protections> 1471 </flood_protections>
1471 </dc:if> 1472 </dc:if>
1472 </dc:filter> 1473 </dc:filter>
1473 </dc:macro> 1474 </dc:macro>
1474 1475
1475 <dc:macro name="basedata_5_flood-protections"> 1476 <dc:macro name="basedata_5_flood-protections">
1476 <dc:call-macro name="basedata_5_macro"> 1477 <dc:call-macro name="basedata_5_macro">
1477 <column name="{$wst_column_name}" ids="flood_protection-wstv-{$wst_column_position}-{$wst_id}" factory="staticwkms" target_out="{$out}" info="{$info} [km {$deffrom} - {$defto}]"/> 1478 <column name="{$wst_column_name}" ids="flood_protection-wstv-{$wst_column_position}-{$wst_id}" factory="staticwkms" target_out="{$out}" info="{$info} [km {$deffrom} - {$defto}]" />
1478 </dc:call-macro> 1479 </dc:call-macro>
1479 </dc:macro> 1480 </dc:macro>
1480 1481
1481 <dc:macro name="basedata_5_flood-protections_wq"> 1482 <dc:macro name="basedata_5_flood-protections_wq">
1482 <dc:call-macro name="basedata_5_macro"> 1483 <dc:call-macro name="basedata_5_macro">
1483 <column name="{$wst_column_name}" ids="flood_protection-wstv-{$wst_column_position}-{$wst_id}" factory="wqinterpol" target_out="{$out}" info="{$info} [km {$deffrom} - {$defto}]"/> 1484 <column name="{$wst_column_name}" ids="flood_protection-wstv-{$wst_column_position}-{$wst_id}" factory="wqinterpol" target_out="{$out}" info="{$info} [km {$deffrom} - {$defto}]" />
1484 </dc:call-macro> 1485 </dc:call-macro>
1485 </dc:macro> 1486 </dc:macro>
1486 1487
1487 <dc:macro name="basedata_5_flood-protections_relative_points"> 1488 <dc:macro name="basedata_5_flood-protections_relative_points">
1488 <dc:call-macro name="basedata_5_macro"> 1489 <dc:call-macro name="basedata_5_macro">
1489 <column name="{$wst_column_name}" ids="flood_protection-wstv-{$wst_column_position}-{$wst_id}" factory="staticwkms" target_out="{$out}" info="{$info} [km {$deffrom} - {$defto}]"/> 1490 <column name="{$wst_column_name}" ids="flood_protection-wstv-{$wst_column_position}-{$wst_id}" factory="staticwkms" target_out="{$out}" info="{$info} [km {$deffrom} - {$defto}]" />
1490 </dc:call-macro> 1491 </dc:call-macro>
1491 </dc:macro> 1492 </dc:macro>
1492 1493
1493 <!-- waterlevel differences imported from CSV-files for M-INFO --> 1494 <!-- waterlevel differences imported from CSV-files for M-INFO -->
1494 <dc:macro name="basedata_6_delta_w"> 1495 <dc:macro name="basedata_6_delta_w">
1498 <delta_w_cm> 1499 <delta_w_cm>
1499 <dc:filter expr="contains($wst_description, 'cm.csv')"> 1500 <dc:filter expr="contains($wst_description, 'cm.csv')">
1500 <dc:group expr="dc:replace($wst_description, 'CSV/', '')"> 1501 <dc:group expr="dc:replace($wst_description, 'CSV/', '')">
1501 <relativepoint name="{dc:group-key()}"> 1502 <relativepoint name="{dc:group-key()}">
1502 <dc:for-each> 1503 <dc:for-each>
1503 <column name="{$wst_column_name}" ids="delta_w-wstv-{$wst_column_position}-{$wst_id}" factory="staticwkms" target_out="{$out}" info="{$info} [km {$deffrom} - {$defto}]"/> 1504 <column name="{$wst_column_name}" ids="delta_w-wstv-{$wst_column_position}-{$wst_id}" factory="staticwkms" target_out="{$out}" info="{$info} [km {$deffrom} - {$defto}]" />
1504 </dc:for-each> 1505 </dc:for-each>
1505 </relativepoint> 1506 </relativepoint>
1506 </dc:group> 1507 </dc:group>
1507 </dc:filter> 1508 </dc:filter>
1508 </delta_w_cm> 1509 </delta_w_cm>
1509 <delta_w_cma> 1510 <delta_w_cma>
1510 <dc:filter expr="contains($wst_description, 'cm-a.csv')"> 1511 <dc:filter expr="contains($wst_description, 'cm-a.csv')">
1511 <dc:group expr="dc:replace($wst_description, 'CSV/', '')"> 1512 <dc:group expr="dc:replace($wst_description, 'CSV/', '')">
1512 <relativepoint name="{dc:group-key()}"> 1513 <relativepoint name="{dc:group-key()}">
1513 <dc:for-each> 1514 <dc:for-each>
1514 <column name="{$wst_column_name}" ids="delta_w_cma-wstv-{$wst_column_position}-{$wst_id}" factory="staticwkms" target_out="{$out}" info="{$info} [km {$deffrom} - {$defto}]"/> 1515 <column name="{$wst_column_name}" ids="delta_w_cma-wstv-{$wst_column_position}-{$wst_id}" factory="staticwkms" target_out="{$out}" info="{$info} [km {$deffrom} - {$defto}]" />
1515 </dc:for-each> 1516 </dc:for-each>
1516 </relativepoint> 1517 </relativepoint>
1517 </dc:group> 1518 </dc:group>
1518 </dc:filter> 1519 </dc:filter>
1519 </delta_w_cma> 1520 </delta_w_cma>
1528 <dc:if test="dc:has-result()"> 1529 <dc:if test="dc:has-result()">
1529 <wlevel> 1530 <wlevel>
1530 <dc:group expr="dc:replace($wst_description, 'CSV/', '')"> 1531 <dc:group expr="dc:replace($wst_description, 'CSV/', '')">
1531 <relativepoint name="{dc:group-key()}"> 1532 <relativepoint name="{dc:group-key()}">
1532 <dc:for-each> 1533 <dc:for-each>
1533 <dc:macro-body/> 1534 <dc:macro-body />
1534 </dc:for-each> 1535 </dc:for-each>
1535 </relativepoint> 1536 </relativepoint>
1536 </dc:group> 1537 </dc:group>
1537 </wlevel> 1538 </wlevel>
1538 </dc:if> 1539 </dc:if>
1539 </dc:filter> 1540 </dc:filter>
1540 </dc:macro> 1541 </dc:macro>
1541 1542
1542 <dc:macro name="basedata_7_waterlevels"> 1543 <dc:macro name="basedata_7_waterlevels">
1543 <dc:call-macro name="basedata_7_macro"> 1544 <dc:call-macro name="basedata_7_macro">
1544 <column name="{$wst_column_name}" ids="additionals-wstv-{$wst_column_position}-{$wst_id}" factory="staticwqkms" target_out="{$out}" info="{$info} [km {$deffrom} - {$defto}]"/> 1545 <column name="{$wst_column_name}" ids="additionals-wstv-{$wst_column_position}-{$wst_id}" factory="staticwqkms" target_out="{$out}" info="{$info} [km {$deffrom} - {$defto}]" />
1545 </dc:call-macro> 1546 </dc:call-macro>
1546 </dc:macro> 1547 </dc:macro>
1547 1548
1548 <dc:macro name="basedata_7_waterlevels_wq"> 1549 <dc:macro name="basedata_7_waterlevels_wq">
1549 <dc:call-macro name="basedata_7_macro"> 1550 <dc:call-macro name="basedata_7_macro">
1550 <column name="{$wst_column_name}" ids="additionals-wstv-{$wst_column_position}-{$wst_id}" factory="wqinterpol" target_out="{$out}" info="{$info} [km {$deffrom} - {$defto}]"/> 1551 <column name="{$wst_column_name}" ids="additionals-wstv-{$wst_column_position}-{$wst_id}" factory="wqinterpol" target_out="{$out}" info="{$info} [km {$deffrom} - {$defto}]" />
1551 </dc:call-macro> 1552 </dc:call-macro>
1552 </dc:macro> 1553 </dc:macro>
1553 1554
1554 1555
1555 <!-- prototypes --> 1556 <!-- prototypes -->
1556 1557
1557 <dc:macro name="discharge-curve-prototype"> 1558 <dc:macro name="discharge-curve-prototype">
1558 <computed_discharge_curve> 1559 <computed_discharge_curve>
1559 <dc:call-macro name="discharge_table_gauge"/> 1560 <dc:call-macro name="discharge_table_gauge" />
1560 <dc:call-macro name="mainvalues"/> 1561 <dc:call-macro name="mainvalues" />
1561 </computed_discharge_curve> 1562 </computed_discharge_curve>
1562 <dc:call-macro name="historical_discharge_curve"/> 1563 <dc:call-macro name="historical_discharge_curve" />
1563 <dc:call-macro name="basedata_0_wq"/> 1564 <dc:call-macro name="basedata_0_wq" />
1564 <dc:call-macro name="basedata_1_additionals_wq"/> 1565 <dc:call-macro name="basedata_1_additionals_wq" />
1565 <dc:call-macro name="basedata_2_fixations_wq"/> 1566 <dc:call-macro name="basedata_2_fixations_wq" />
1566 <dc:call-macro name="basedata_3_officials_wq"/> 1567 <dc:call-macro name="basedata_3_officials_wq" />
1567 <dc:call-macro name="basedata_4_heightmarks-points_wq"/> 1568 <dc:call-macro name="basedata_4_heightmarks-points_wq" />
1568 <dc:call-macro name="basedata_5_flood-protections_wq"/> 1569 <dc:call-macro name="basedata_5_flood-protections_wq" />
1569 <minfo> 1570 <minfo>
1570 <dc:call-macro name="sqrelations"/> 1571 <dc:call-macro name="sqrelations" />
1571 <dc:call-macro name="basedata_7_waterlevels_wq"/> 1572 <dc:call-macro name="basedata_7_waterlevels_wq" />
1572 </minfo> 1573 </minfo>
1573 </dc:macro> 1574 </dc:macro>
1574 1575
1575 <dc:macro name="discharge-curve-user-prototype"> 1576 <dc:macro name="discharge-curve-user-prototype">
1576 <dc:call-macro name="waterlevels-user"/> 1577 <dc:call-macro name="waterlevels-user" />
1577 <dc:call-macro name="computed-discharge-curve"/> 1578 <dc:call-macro name="computed-discharge-curve" />
1578 <!-- TODO: macro for discharge longitudinal section --> 1579 <!-- TODO: macro for discharge longitudinal section -->
1579 <dc:call-macro name="fix-wq-curve"/> 1580 <dc:call-macro name="fix-wq-curve" />
1580 <!-- TODO: own macro for Vollmer-curve (extract from fix-wq-curve and waterlevels-user) --> 1581 <!-- TODO: own macro for Vollmer-curve (extract from fix-wq-curve and waterlevels-user) -->
1581 <dc:call-macro name="extreme-wq-curve"/> 1582 <dc:call-macro name="extreme-wq-curve" />
1582 <minfo> 1583 <minfo>
1583 <dc:call-macro name="sqrelations_user"/> 1584 <dc:call-macro name="sqrelations_user" />
1584 </minfo> 1585 </minfo>
1585 </dc:macro> 1586 </dc:macro>
1586 1587
1587 <dc:macro name="longitudinal-section-prototype"> 1588 <dc:macro name="longitudinal-section-prototype">
1588 <dc:call-macro name="basedata_0"/> 1589 <dc:call-macro name="basedata_0" />
1589 <dc:call-macro name="basedata_1_additionals"/> 1590 <dc:call-macro name="basedata_1_additionals" />
1590 <dc:call-macro name="basedata_2_fixations"/> 1591 <dc:call-macro name="basedata_2_fixations" />
1591 <dc:call-macro name="basedata_3_officials"/> 1592 <dc:call-macro name="basedata_3_officials" />
1592 <dc:call-macro name="basedata_4_heightmarks-points"/> 1593 <dc:call-macro name="basedata_4_heightmarks-points" />
1593 <dc:call-macro name="basedata_5_flood-protections"/> 1594 <dc:call-macro name="basedata_5_flood-protections" />
1594 <dc:call-macro name="annotations_per_type"/> 1595 <dc:call-macro name="annotations_per_type" />
1595 <minfo> 1596 <minfo>
1596 <fixanalysis> 1597 <fixanalysis>
1597 <dc:call-macro name="basedata_6_delta_w"/> 1598 <dc:call-macro name="basedata_6_delta_w" />
1598 <dc:call-macro name="basedata_7_waterlevels"/> 1599 <dc:call-macro name="basedata_7_waterlevels" />
1599 </fixanalysis> 1600 </fixanalysis>
1600 <dc:call-macro name="sedimentloads"/> 1601 <dc:call-macro name="sedimentloads" />
1601 <dc:call-macro name="densities"/> 1602 <dc:call-macro name="densities" />
1602 <dc:call-macro name="minfo-heights"/> 1603 <dc:call-macro name="minfo-heights" />
1603 <dc:call-macro name="sounding-width"/> 1604 <dc:call-macro name="sounding-width" />
1604 <dc:call-macro name="morph_width"/> 1605 <dc:call-macro name="morph_width" />
1605 <dc:call-macro name="porosities"/> 1606 <dc:call-macro name="porosities" />
1606 <flow_velocities> 1607 <flow_velocities>
1607 <dc:call-macro name="flow_velocity_measurements"/> 1608 <dc:call-macro name="flow_velocity_measurements" />
1608 <dc:call-macro name="flow_velocity_models"/> 1609 <dc:call-macro name="flow_velocity_models" />
1609 </flow_velocities> 1610 </flow_velocities>
1610 </minfo> 1611 </minfo>
1611 1612
1612 <sinfo> 1613 <sinfo>
1613 <sinfo_predefined_flowdepths> 1614 <sinfo_predefined_flowdepths>
1614 <dc:call-macro name="sinfo_predefined_flowdepth-m"/> 1615 <dc:call-macro name="sinfo_predefined_flowdepth-m" />
1615 </sinfo_predefined_flowdepths> 1616 </sinfo_predefined_flowdepths>
1616 1617
1617 <sinfo_collisions> 1618 <sinfo_collisions>
1618 <dc:call-macro name="sinfo_collisions"/> 1619 <dc:call-macro name="sinfo_collisions" />
1619 </sinfo_collisions> 1620 </sinfo_collisions>
1620 1621
1621 <sinfo_predefined_channel> 1622 <sinfo_predefined_channel>
1622 <dc:call-macro name="sinfo_predefined_channel"/> 1623 <dc:call-macro name="sinfo_predefined_channel" />
1623 </sinfo_predefined_channel> 1624 </sinfo_predefined_channel>
1624 1625
1625 <sinfo_infrastructure> 1626 <sinfo_infrastructure>
1626 <dc:call-macro name="sinfo_infrastructure"/> 1627 <dc:call-macro name="sinfo_infrastructure" />
1627 </sinfo_infrastructure> 1628 </sinfo_infrastructure>
1628 1629
1629 <sinfo_predefined_tkh> 1630 <sinfo_predefined_tkh>
1630 <dc:call-macro name="sinfo_predefined_tkh-berechnung"/> 1631 <dc:call-macro name="sinfo_predefined_tkh-berechnung" />
1631 <dc:call-macro name="sinfo_predefined_tkh-messung"/> 1632 <dc:call-macro name="sinfo_predefined_tkh-messung" />
1632 </sinfo_predefined_tkh> 1633 </sinfo_predefined_tkh>
1633 1634
1634 <sinfo_predefined_depthevol> 1635 <sinfo_predefined_depthevol>
1635 <dc:call-macro name="sinfo_predefined_depthevol-aktuell"/> 1636 <dc:call-macro name="sinfo_predefined_depthevol-aktuell" />
1636 <dc:call-macro name="sinfo_predefined_depthevol-etappe"/> 1637 <dc:call-macro name="sinfo_predefined_depthevol-etappe" />
1637 </sinfo_predefined_depthevol> 1638 </sinfo_predefined_depthevol>
1638 1639
1639 </sinfo> 1640 </sinfo>
1640 </dc:macro> 1641 </dc:macro>
1641 1642
1642 <dc:macro name="longitudinal-section-user-prototype"> 1643 <dc:macro name="longitudinal-section-user-prototype">
1643 <dc:comment> SINFO </dc:comment> 1644 <dc:comment> SINFO </dc:comment>
1644 <dc:call-macro name="sinfo_flowdepths"/> 1645 <dc:call-macro name="sinfo_flowdepths" />
1645 <dc:call-macro name="sinfo_flowdepths_minmax"/> 1646 <dc:call-macro name="sinfo_flowdepths_minmax" />
1646 <dc:call-macro name="sinfo_flow_depth_development"/> 1647 <dc:call-macro name="sinfo_flow_depth_development" />
1647 <dc:call-macro name="sinfo_tkh"/> 1648 <dc:call-macro name="sinfo_tkh" />
1648 1649
1649 <dc:comment> WINFO/DIFF/FIX </dc:comment> 1650 <dc:comment> WINFO/DIFF/FIX </dc:comment>
1650 <dc:call-macro name="longitudinal"/> 1651 <dc:call-macro name="longitudinal" />
1651 <dc:call-macro name="differences"/> 1652 <dc:call-macro name="differences" />
1652 <dc:call-macro name="waterlevels-discharge"/> 1653 <dc:call-macro name="waterlevels-discharge" />
1653 <dc:call-macro name="longitudinal-section-fix"/> 1654 <dc:call-macro name="longitudinal-section-fix" />
1654 <dc:call-macro name="longitudinal-section-fix-vollmer"/> 1655 <dc:call-macro name="longitudinal-section-fix-vollmer" />
1655 1656
1656 <dc:comment> MINFO </dc:comment> 1657 <dc:comment> MINFO </dc:comment>
1657 <dc:call-macro name="middle_bedheights"/> 1658 <dc:call-macro name="middle_bedheights" />
1658 <dc:call-macro name="bedheight_differences"/> 1659 <dc:call-macro name="bedheight_differences" />
1659 <dc:call-macro name="bedquality"/> 1660 <dc:call-macro name="bedquality" />
1660 <dc:call-macro name="flow-velocity"/> 1661 <dc:call-macro name="flow-velocity" />
1661 <dc:call-macro name="sediment-load"/> 1662 <dc:call-macro name="sediment-load" />
1662 </dc:macro> 1663 </dc:macro>
1663 1664
1664 <!-- porosities --> 1665 <!-- porosities -->
1665 <dc:macro name="porosities"> 1666 <dc:macro name="porosities">
1666 <porosities> 1667 <porosities>
1678 t.start_time AS syear, 1679 t.start_time AS syear,
1679 t.stop_time AS eyear 1680 t.stop_time AS eyear
1680 FROM porosity p 1681 FROM porosity p
1681 JOIN depths d ON p.depth_id = d.id 1682 JOIN depths d ON p.depth_id = d.id
1682 JOIN time_intervals t ON p.time_interval_id=t.id 1683 JOIN time_intervals t ON p.time_interval_id=t.id
1683 WHERE p.river_id = ${river_id} 1684 WHERE p.river_id =
1685 ${river_id}
1684 ORDER BY depth_lower, depth_upper 1686 ORDER BY depth_lower, depth_upper
1685 </dc:statement> 1687 </dc:statement>
1686 <dc:if test="dc:has-result()"> 1688 <dc:if test="dc:has-result()">
1687 <dc:for-each> 1689 <dc:for-each>
1688 <porosity description="{$depth_lower}-{$depth_upper} cm" factory="porosity" target_out="{$out}" info="{concat($info, dc:date-format('yyyy', $syear), 1690 <porosity description="{$depth_lower}-{$depth_upper} cm" factory="porosity" target_out="{$out}" info="{concat($info, dc:date-format('yyyy', $syear),
1689 ' - ', dc:date-format('yyyy', $eyear))}" ids="{$pid};{$description}"/> 1691 ' - ', dc:date-format('yyyy', $eyear))}" ids="{$pid};{$description}" />
1690 </dc:for-each> 1692 </dc:for-each>
1691 </dc:if> 1693 </dc:if>
1692 </dc:context> 1694 </dc:context>
1693 </porosities> 1695 </porosities>
1694 </dc:macro> 1696 </dc:macro>
1706 FROM sediment_density sd 1708 FROM sediment_density sd
1707 JOIN depths d ON sd.depth_id = d.id 1709 JOIN depths d ON sd.depth_id = d.id
1708 JOIN sediment_density_values sdv on sdv.sediment_density_id = sd.id 1710 JOIN sediment_density_values sdv on sdv.sediment_density_id = sd.id
1709 WHERE sd.river_id = ${river_id} 1711 WHERE sd.river_id = ${river_id}
1710 GROUP BY sd.id, sd.description, d.upper, d.lower 1712 GROUP BY sd.id, sd.description, d.upper, d.lower
1711 ORDER BY year, depth_lower, depth_upper 1713 ORDER BY
1714 year, depth_lower, depth_upper
1712 </dc:statement> 1715 </dc:statement>
1713 <dc:if test="dc:has-result()"> 1716 <dc:if test="dc:has-result()">
1714 <dc:for-each> 1717 <dc:for-each>
1715 <density description="{$depth_lower}-{$depth_upper} cm" factory="sedimentdensity" target_out="{$out}" info="{$info}" ids="{$sdid}"/> 1718 <density description="{$depth_lower}-{$depth_upper} cm" factory="sedimentdensity" target_out="{$out}" info="{$info}" ids="{$sdid}" />
1716 </dc:for-each> 1719 </dc:for-each>
1717 </dc:if> 1720 </dc:if>
1718 </dc:context> 1721 </dc:context>
1719 </densities> 1722 </densities>
1720 </dc:macro> 1723 </dc:macro>
1721 1724
1722 <!-- sediment load --> 1725 <!-- sediment load -->
1723 <dc:macro name="load"> 1726 <dc:macro name="load">
1724 <year description="{$timespan}" factory="sedimentload" target_out="{$out}" info="{$info}" ids="{$slid};{$fraction};{$timespan};{$kind}"/> 1727 <year description="{$timespan}" factory="sedimentload" target_out="{$out}" info="{$info}" ids="{$slid};{$fraction};{$timespan};{$kind}" />
1725 </dc:macro> 1728 </dc:macro>
1726 1729
1727 <dc:macro name="load_ls"> 1730 <dc:macro name="load_ls">
1728 <year description="{$timespan}" factory="sedimentload_ls" target_out="{$out}" info="{$info}" ids="{$slid};{$timespan};{$kind}"/> 1731 <year description="{$timespan}" factory="sedimentload_ls" target_out="{$out}" info="{$info}" ids="{$slid};{$timespan};{$kind}" />
1729 </dc:macro> 1732 </dc:macro>
1730 1733
1731 <dc:macro name="loads"> 1734 <dc:macro name="loads">
1732 <dc:if test="dc:has-result()"> 1735 <dc:if test="dc:has-result()">
1733 <dc:group expr="concat('SQ ', dc:date-format('yyyy', $sqstart), '-', 1736 <dc:group expr="concat('SQ ', dc:date-format('yyyy', $sqstart), '-',
1734 dc:date-format('yyyy', $sqstop))"> 1737 dc:date-format('yyyy', $sqstop))">
1735 <sq_time description="{dc:group-key()}"> 1738 <sq_time description="{dc:group-key()}">
1736 <dc:group expr="$fraction"> 1739 <dc:group expr="$fraction">
1737 <dc:variable name="fraction_name" expr="concat('${', dc:group-key(), '}')"/> 1740 <dc:variable name="fraction_name" expr="concat('${', dc:group-key(), '}')" />
1738 <fraction description="{$fraction_name}"> 1741 <fraction description="{$fraction_name}">
1739 <dc:for-each> 1742 <dc:for-each>
1740 <dc:choose> 1743 <dc:choose>
1741 <dc:when test="string-length(dc:get('endyear')) = 0"> 1744 <dc:when test="string-length(dc:get('endyear')) = 0">
1742 <dc:variable name="timespan" type="string" expr="dc:date-format('yyyy', $startyear)"/> 1745 <dc:variable name="timespan" type="string" expr="dc:date-format('yyyy', $startyear)" />
1743 </dc:when> 1746 </dc:when>
1744 <dc:otherwise> 1747 <dc:otherwise>
1745 <dc:variable name="timespan" type="string" expr="concat(dc:date-format('yyyy', 1748 <dc:variable name="timespan" type="string" expr="concat(dc:date-format('yyyy',
1746 $startyear), '-', 1749 $startyear), '-',
1747 dc:date-format('yyyy', $endyear))"/> 1750 dc:date-format('yyyy', $endyear))" />
1748 </dc:otherwise> 1751 </dc:otherwise>
1749 </dc:choose> 1752 </dc:choose>
1750 <dc:if test="$kind = 'official'"> 1753 <dc:if test="$kind = 'official'">
1751 <dc:variable name="info" type="string" expr="concat('Amtliche Epoche&lt;BR&gt;', 1754 <dc:variable name="info" type="string" expr="concat('Amtliche Epoche&lt;BR&gt;',
1752 dc:get('info'))"/> 1755 dc:get('info'))" />
1753 </dc:if> 1756 </dc:if>
1754 <dc:macro-body/> 1757 <dc:macro-body />
1755 </dc:for-each> 1758 </dc:for-each>
1756 </fraction> 1759 </fraction>
1757 </dc:group> 1760 </dc:group>
1758 </sq_time> 1761 </sq_time>
1759 </dc:group> 1762 </dc:group>
1762 1765
1763 <dc:macro name="sedimentloads-filter"> 1766 <dc:macro name="sedimentloads-filter">
1764 <years> 1767 <years>
1765 <dc:filter expr="string-length(dc:get('endyear')) = 0 and 1768 <dc:filter expr="string-length(dc:get('endyear')) = 0 and
1766 $kind != 'official'"> 1769 $kind != 'official'">
1767 <dc:macro-body/> 1770 <dc:macro-body />
1768 </dc:filter> 1771 </dc:filter>
1769 </years> 1772 </years>
1770 <epochs> 1773 <epochs>
1771 <dc:filter expr="string-length(dc:get('endyear')) &gt; 0 and 1774 <dc:filter expr="string-length(dc:get('endyear')) &gt; 0 and
1772 $kind != 'official'"> 1775 $kind != 'official'">
1773 <dc:macro-body/> 1776 <dc:macro-body />
1774 </dc:filter> 1777 </dc:filter>
1775 </epochs> 1778 </epochs>
1776 <off_epochs> 1779 <off_epochs>
1777 <dc:filter expr="$kind = 'official'"> 1780 <dc:filter expr="$kind = 'official'">
1778 <dc:macro-body/> 1781 <dc:macro-body />
1779 </dc:filter> 1782 </dc:filter>
1780 </off_epochs> 1783 </off_epochs>
1781 </dc:macro> 1784 </dc:macro>
1782 1785
1783 <dc:macro name="sedimentloads"> 1786 <dc:macro name="sedimentloads">
1784 <sedimentloads> 1787 <sedimentloads>
1785 <dc:call-macro name="annotations_sediment_load_ls"/> 1788 <dc:call-macro name="annotations_sediment_load_ls" />
1786 <measurement_stations> 1789 <measurement_stations>
1787 <dc:context> 1790 <dc:context>
1788 <dc:call-macro name="sedimentload_stations_statement"/> 1791 <dc:call-macro name="sedimentload_stations_statement" />
1789 <dc:call-macro name="sedimentloads-filter"> 1792 <dc:call-macro name="sedimentloads-filter">
1790 <dc:call-macro name="loads"> 1793 <dc:call-macro name="loads">
1791 <dc:call-macro name="load"/> 1794 <dc:call-macro name="load" />
1792 </dc:call-macro> 1795 </dc:call-macro>
1793 </dc:call-macro> 1796 </dc:call-macro>
1794 </dc:context> 1797 </dc:context>
1795 </measurement_stations> 1798 </measurement_stations>
1796 <sediment_load_ls> 1799 <sediment_load_ls>
1797 <dc:context> 1800 <dc:context>
1798 <dc:call-macro name="sedimentload_ls_statement"/> 1801 <dc:call-macro name="sedimentload_ls_statement" />
1799 <dc:call-macro name="sedimentloads-filter"> 1802 <dc:call-macro name="sedimentloads-filter">
1800 <dc:call-macro name="loads"> 1803 <dc:call-macro name="loads">
1801 <dc:call-macro name="load_ls"/> 1804 <dc:call-macro name="load_ls" />
1802 </dc:call-macro> 1805 </dc:call-macro>
1803 </dc:call-macro> 1806 </dc:call-macro>
1804 </dc:context> 1807 </dc:context>
1805 </sediment_load_ls> 1808 </sediment_load_ls>
1806 </sedimentloads> 1809 </sedimentloads>
1820 sl.description || '&lt;BR&gt;' || 1823 sl.description || '&lt;BR&gt;' ||
1821 'Fraktion: ' || gf.lower || ' bis ' || gf.upper || 1824 'Fraktion: ' || gf.lower || ' bis ' || gf.upper ||
1822 ' mm&lt;BR&gt;Einheit: t/a' AS info 1825 ' mm&lt;BR&gt;Einheit: t/a' AS info
1823 FROM sediment_load sl 1826 FROM sediment_load sl
1824 JOIN sediment_load_kinds slk ON slk.id = sl.kind 1827 JOIN sediment_load_kinds slk ON slk.id = sl.kind
1825 JOIN sediment_load_values slv 1828 JOIN
1829 sediment_load_values slv
1826 ON sl.id = slv.sediment_load_id 1830 ON sl.id = slv.sediment_load_id
1827 JOIN measurement_station ms 1831 JOIN measurement_station ms
1828 ON ms.id = 1832 ON ms.id =
1829 slv.measurement_station_id 1833 slv.measurement_station_id
1830 JOIN ranges ra ON ms.range_id = ra.id 1834 JOIN ranges ra ON ms.range_id = ra.id
1831 JOIN rivers r ON ra.river_id = r.id 1835 JOIN rivers r ON ra.river_id = r.id
1832 JOIN time_intervals ti ON sl.time_interval_id = ti.id 1836 JOIN time_intervals ti ON sl.time_interval_id = ti.id
1833 LEFT JOIN time_intervals sq ON sl.sq_time_interval_id = sq.id 1837 LEFT JOIN time_intervals sq ON sl.sq_time_interval_id = sq.id
1834 JOIN grain_fraction gf ON gf.id = sl.grain_fraction_id 1838 JOIN grain_fraction gf ON gf.id = sl.grain_fraction_id
1835 WHERE r.id = ${river_id} 1839 WHERE r.id = ${river_id}
1836 AND CASE WHEN r.km_up = 1 AND ra.b IS NOT NULL 1840 AND CASE
1841 WHEN r.km_up = 1 AND ra.b IS NOT NULL
1837 THEN ra.b ELSE ra.a END BETWEEN ${fromkm} AND ${tokm} 1842 THEN ra.b ELSE ra.a END BETWEEN ${fromkm} AND ${tokm}
1838 ORDER BY sqstart DESC, sqstop DESC, 1843 ORDER BY sqstart DESC, sqstop DESC,
1839 fraction, startyear DESC, endyear DESC 1844 fraction, startyear DESC, endyear DESC
1840 </dc:statement> 1845 </dc:statement>
1841 </dc:macro> 1846 </dc:macro>
1863 LEFT JOIN time_intervals sq ON sl.sq_time_interval_id = sq.id 1868 LEFT JOIN time_intervals sq ON sl.sq_time_interval_id = sq.id
1864 JOIN grain_fraction gf ON gf.id = sl.grain_fraction_id 1869 JOIN grain_fraction gf ON gf.id = sl.grain_fraction_id
1865 JOIN units u ON sl.unit_id = u.id 1870 JOIN units u ON sl.unit_id = u.id
1866 WHERE r.id = ${river_id} 1871 WHERE r.id = ${river_id}
1867 AND slv.station BETWEEN ${fromkm} AND ${tokm} 1872 AND slv.station BETWEEN ${fromkm} AND ${tokm}
1868 ORDER BY sqstart DESC, sqstop DESC, 1873 ORDER BY sqstart
1874 DESC, sqstop DESC,
1869 fraction, startyear DESC, endyear DESC 1875 fraction, startyear DESC, endyear DESC
1870 </dc:statement> 1876 </dc:statement>
1871 </dc:macro> 1877 </dc:macro>
1872 1878
1873 <!-- annotations --> 1879 <!-- annotations -->
1874 <dc:macro name="annotations"> 1880 <dc:macro name="annotations">
1875 <annotation factory="annotations" ids="{$river_id}" target_out="{$out}"/> 1881 <annotation factory="annotations" ids="{$river_id}" target_out="{$out}" />
1876 </dc:macro> 1882 </dc:macro>
1877 1883
1878 <dc:macro name="annotations_per_type"> 1884 <dc:macro name="annotations_per_type">
1879 <annotations> 1885 <annotations>
1880 <dc:context> 1886 <dc:context>
1881 <all_annotations factory="annotations" ids="{$river_id}" target_out="{$out}"/> 1887 <all_annotations factory="annotations" ids="{$river_id}" target_out="{$out}" />
1882 <dc:statement> 1888 <dc:statement>
1883 SELECT id AS anno_id, 1889 SELECT id AS anno_id,
1884 name AS anno_description 1890 name AS anno_description
1885 FROM annotation_types 1891 FROM annotation_types
1886 </dc:statement> 1892 </dc:statement>
1887 <dc:for-each> 1893 <dc:for-each>
1888 <annotation name="{$anno_description}" factory="annotations" target_out="{$out}" ids="{$river_id}:{$anno_description}"/> 1894 <annotation name="{$anno_description}" factory="annotations" target_out="{$out}" ids="{$river_id}:{$anno_description}" />
1889 </dc:for-each> 1895 </dc:for-each>
1890 </dc:context> 1896 </dc:context>
1891 </annotations> 1897 </annotations>
1892 </dc:macro> 1898 </dc:macro>
1893 1899
1899 name AS anno_description 1905 name AS anno_description
1900 FROM annotation_types 1906 FROM annotation_types
1901 WHERE name LIKE 'Quelle %' OR name LIKE 'Senke %' 1907 WHERE name LIKE 'Quelle %' OR name LIKE 'Senke %'
1902 </dc:statement> 1908 </dc:statement>
1903 <dc:for-each> 1909 <dc:for-each>
1904 <annotation name="{$anno_description}" factory="annotations" target_out="{$out}" ids="{$river_id}:{$anno_description}"/> 1910 <annotation name="{$anno_description}" factory="annotations" target_out="{$out}" ids="{$river_id}:{$anno_description}" />
1905 </dc:for-each> 1911 </dc:for-each>
1906 </dc:context> 1912 </dc:context>
1907 </sources_sinks> 1913 </sources_sinks>
1908 </dc:macro> 1914 </dc:macro>
1909 1915
1910 <dc:macro name="qsectors"> 1916 <dc:macro name="qsectors">
1911 <qsector factory="qsectors" ids="{$river_id}" target_out="{$out}"/> 1917 <qsector factory="qsectors" ids="{$river_id}" target_out="{$out}" />
1912 </dc:macro> 1918 </dc:macro>
1913 1919
1914 <dc:macro name="flood-map-recommended"> 1920 <dc:macro name="flood-map-recommended">
1915 <kilometrage> 1921 <kilometrage>
1916 <riveraxis factory="riveraxis" ids="{$river_id}" target_out="{$out}"/> 1922 <riveraxis factory="riveraxis" ids="{$river_id}" target_out="{$out}" />
1917 </kilometrage> 1923 </kilometrage>
1918 <rastermap> 1924 <rastermap>
1919 <background factory="wmsbackground" ids="{$river_id}" target_out="{$out}"/> 1925 <background factory="wmsbackground" ids="{$river_id}" target_out="{$out}" />
1920 </rastermap> 1926 </rastermap>
1921 </dc:macro> 1927 </dc:macro>
1922 1928
1923 <!-- bed heights --> 1929 <!-- bed heights -->
1924 <dc:macro name="minfo-heights-diff"> 1930 <dc:macro name="minfo-heights-diff">
1941 b2.id AS b2id, 1947 b2.id AS b2id,
1942 b2.description AS b2desc, 1948 b2.description AS b2desc,
1943 b2.year AS b2year 1949 b2.year AS b2year
1944 FROM sta b1 1950 FROM sta b1
1945 JOIN sta b2 1951 JOIN sta b2
1946 ON b1.station = b2.station 1952 ON
1953 b1.station = b2.station
1947 AND b1.id &lt;&gt; b2.id 1954 AND b1.id &lt;&gt; b2.id
1948 AND (b1.year &gt; b2.year OR b1.year IS NULL)) 1955 AND (b1.year &gt; b2.year OR b1.year IS NULL))
1949 SELECT 1956 SELECT
1950 DISTINCT b1id, b1desc, b1year, 1957 DISTINCT b1id, b1desc, b1year,
1951 b2id, b2desc, b2year 1958 b2id, b2desc, b2year
1952 FROM csta 1959 FROM csta
1953 ORDER BY b1desc, b2desc 1960 ORDER BY b1desc, b2desc
1954 </dc:statement> 1961 </dc:statement>
1955 <dc:if test="dc:has-result()"> 1962 <dc:if test="dc:has-result()">
1956 <bedheights> 1963 <bedheights>
1957 <dc:call-macro name="bed-heights-single-diff"/> 1964 <dc:call-macro name="bed-heights-single-diff" />
1958 <dc:call-macro name="bed-heights-epoch-diff"/> 1965 <dc:call-macro name="bed-heights-epoch-diff" />
1959 </bedheights> 1966 </bedheights>
1960 </dc:if> 1967 </dc:if>
1961 </dc:context> 1968 </dc:context>
1962 </dc:macro> 1969 </dc:macro>
1963 1970
1964 <dc:macro name="bed-heights-single-diff"> 1971 <dc:macro name="bed-heights-single-diff">
1965 <dc:filter expr="not(contains(dc:lowercase($b1desc), 'epoche'))"> 1972 <dc:filter expr="not(contains(dc:lowercase($b1desc), 'epoche'))">
1966 <years> 1973 <years>
1967 <dc:call-macro name="minfo-heights-diff-tree"/> 1974 <dc:call-macro name="minfo-heights-diff-tree" />
1968 </years> 1975 </years>
1969 </dc:filter> 1976 </dc:filter>
1970 </dc:macro> 1977 </dc:macro>
1971 1978
1972 <dc:macro name="bed-heights-epoch-diff"> 1979 <dc:macro name="bed-heights-epoch-diff">
1973 <dc:filter expr="contains(dc:lowercase($b1desc), 'epoche')"> 1980 <dc:filter expr="contains(dc:lowercase($b1desc), 'epoche')">
1974 <epochs> 1981 <epochs>
1975 <dc:call-macro name="minfo-heights-diff-tree"/> 1982 <dc:call-macro name="minfo-heights-diff-tree" />
1976 </epochs> 1983 </epochs>
1977 </dc:filter> 1984 </dc:filter>
1978 </dc:macro> 1985 </dc:macro>
1979 1986
1980 <dc:macro name="minfo-heights-diff-tree"> 1987 <dc:macro name="minfo-heights-diff-tree">
1981 <dc:group expr="dc:coalesce($b1year, 'sonstige')"> 1988 <dc:group expr="dc:coalesce($b1year, 'sonstige')">
1982 <minfo-diff name="{dc:group-key()}"> 1989 <minfo-diff name="{dc:group-key()}">
1983 <dc:for-each> 1990 <dc:for-each>
1984 <dc:choose> 1991 <dc:choose>
1985 <dc:when test="dc:group-key() = $b1year"> 1992 <dc:when test="dc:group-key() = $b1year">
1986 <height factory="bedheight" target_out="{$out}" ids="bedheight-single-{$b1id}-{$b1desc}#bedheight-single-{$b2id}-{$b2desc}" info="{$b1desc}#{$b2desc}" description="{$b1desc} - {$b2desc}"/> 1993 <height factory="bedheight" target_out="{$out}" ids="bedheight-single-{$b1id}-{$b1desc}#bedheight-single-{$b2id}-{$b2desc}" info="{$b1desc}#{$b2desc}" description="{$b1desc} - {$b2desc}" />
1987 </dc:when> 1994 </dc:when>
1988 <dc:when test="dc:group-key() = 'sonstige'"> 1995 <dc:when test="dc:group-key() = 'sonstige'">
1989 <height factory="bedheight" target_out="{$out}" ids="bedheight-single-{$b1id}-{$b1desc}#bedheight-single-{$b2id}-{$b2desc}" info="{$b1desc}#{$b2desc}" description="{$b1desc} - {$b2desc}"/> 1996 <height factory="bedheight" target_out="{$out}" ids="bedheight-single-{$b1id}-{$b1desc}#bedheight-single-{$b2id}-{$b2desc}" info="{$b1desc}#{$b2desc}" description="{$b1desc} - {$b2desc}" />
1990 <height factory="bedheight" target_out="{$out}" ids="bedheight-single-{$b2id}-{$b1desc}#bedheight-single-{$b1id}-{$b2desc}" info="{$b2desc}#{$b1desc}" description="{$b2desc} - {$b1desc}"/> 1997 <height factory="bedheight" target_out="{$out}" ids="bedheight-single-{$b2id}-{$b1desc}#bedheight-single-{$b1id}-{$b2desc}" info="{$b2desc}#{$b1desc}" description="{$b2desc} - {$b1desc}" />
1991 </dc:when> 1998 </dc:when>
1992 </dc:choose> 1999 </dc:choose>
1993 </dc:for-each> 2000 </dc:for-each>
1994 </minfo-diff> 2001 </minfo-diff>
1995 </dc:group> 2002 </dc:group>
1996 </dc:macro> 2003 </dc:macro>
1997 2004
1998 <dc:macro name="minfo-heights"> 2005 <dc:macro name="minfo-heights">
1999 <bedheights> 2006 <bedheights>
2000 <dc:call-macro name="bed-heights-single"/> 2007 <dc:call-macro name="bed-heights-single" />
2001 <dc:call-macro name="bed-heights-epoch"/> 2008 <dc:call-macro name="bed-heights-epoch" />
2002 </bedheights> 2009 </bedheights>
2003 </dc:macro> 2010 </dc:macro>
2004 2011
2005 <!-- Show all three MW, TL, and KL bedheights --> 2012 <!-- Show all three MW, TL, and KL bedheights -->
2006 <dc:macro name="bed-heights-factory_MW_TW_KL"> 2013 <dc:macro name="bed-heights-factory_MW_TW_KL">
2007 <dc:for-each> 2014 <dc:for-each>
2008 <dc:if test="$bedh_height_count > 0"> 2015 <dc:if test="$bedh_height_count > 0">
2009 <height factory="bedheight" target_out="{$out}" ids="bedheight-single-{$bedh_id}-{$bedh_year}-MW-{$bedh_descr}" info="{$info}" description="MW-{$bedh_descr}"/> 2016 <height factory="bedheight" target_out="{$out}" ids="bedheight-single-{$bedh_id}-{$bedh_year}-MW-{$bedh_descr}" info="{$info}" description="MW-{$bedh_descr}" />
2010 </dc:if> 2017 </dc:if>
2011 <dc:if test="$bedh_min_count > 0"> 2018 <dc:if test="$bedh_min_count > 0">
2012 <height factory="bedheight" target_out="{$out}" ids="bedheight-singleMin-{$bedh_id}-{$bedh_year}-TW-{$bedh_descr}" info="{$info}" description="TW-{$bedh_descr}"/> 2019 <height factory="bedheight" target_out="{$out}" ids="bedheight-singleMin-{$bedh_id}-{$bedh_year}-TW-{$bedh_descr}" info="{$info}" description="TW-{$bedh_descr}" />
2013 </dc:if> 2020 </dc:if>
2014 <dc:if test="$bedh_max_count > 0"> 2021 <dc:if test="$bedh_max_count > 0">
2015 <height factory="bedheight" target_out="{$out}" ids="bedheight-singleMax-{$bedh_id}-{$bedh_year}-KL-{$bedh_descr}" info="{$info}" description="KL-{$bedh_descr}"/> 2022 <height factory="bedheight" target_out="{$out}" ids="bedheight-singleMax-{$bedh_id}-{$bedh_year}-KL-{$bedh_descr}" info="{$info}" description="KL-{$bedh_descr}" />
2016 </dc:if> 2023 </dc:if>
2017 </dc:for-each> 2024 </dc:for-each>
2018 </dc:macro> 2025 </dc:macro>
2019 2026
2020 <!-- Show only MW bed height and name it in a neutral way --> 2027 <!-- Show only MW bed height and name it in a neutral way -->
2021 <dc:macro name="bed-heights-factory_MW"> 2028 <dc:macro name="bed-heights-factory_MW">
2022 <dc:for-each> 2029 <dc:for-each>
2023 <dc:if test="$bedh_height_count > 0"> 2030 <dc:if test="$bedh_height_count > 0">
2024 <height factory="bedheight" target_out="{$out}" ids="bedheight-single-{$bedh_id}-{$bedh_year}-{$bedh_descr}" info="{$info}" description="{$bedh_descr}"/> 2031 <height factory="bedheight" target_out="{$out}" ids="bedheight-single-{$bedh_id}-{$bedh_year}-{$bedh_descr}" info="{$info}" description="{$bedh_descr}" />
2025 </dc:if> 2032 </dc:if>
2026 </dc:for-each> 2033 </dc:for-each>
2027 </dc:macro> 2034 </dc:macro>
2028 2035
2029 <dc:macro name="bed-heights-single"> 2036 <dc:macro name="bed-heights-single">
2030 <single> 2037 <single>
2031 <dc:context> 2038 <dc:context>
2032 <dc:call-macro name="bed-heights-statement"/> 2039 <dc:call-macro name="bed-heights-statement" />
2033 <dc:if test="dc:has-result()"> 2040 <dc:if test="dc:has-result()">
2034 <dc:group expr="dc:coalesce($bedh_year, 'sonstige')"> 2041 <dc:group expr="dc:coalesce($bedh_year, 'sonstige')">
2035 <heights name="{dc:group-key()}"> 2042 <heights name="{dc:group-key()}">
2036 <dc:call-macro name="bed-heights-factory_MW_TW_KL"/> 2043 <dc:call-macro name="bed-heights-factory_MW_TW_KL" />
2037 </heights> 2044 </heights>
2038 </dc:group> 2045 </dc:group>
2039 </dc:if> 2046 </dc:if>
2040 </dc:context> 2047 </dc:context>
2041 </single> 2048 </single>
2042 </dc:macro> 2049 </dc:macro>
2043 2050
2044 <!-- Show bed heights that have MW values with a neutral name --> 2051 <!-- Show bed heights that have MW values with a neutral name -->
2045 <dc:macro name="bed-heights-single-MW"> 2052 <dc:macro name="bed-heights-single-MW">
2046 <single> 2053 <single>
2047 <dc:context> 2054 <dc:context>
2048 <dc:call-macro name="bed-heights-statement"/> 2055 <dc:call-macro name="bed-heights-statement" />
2049 <dc:filter expr="$bedh_height_count"> 2056 <dc:filter expr="$bedh_height_count">
2050 <dc:if test="dc:has-result()"> 2057 <dc:if test="dc:has-result()">
2051 <dc:group expr="dc:coalesce($bedh_year, 'sonstige')"> 2058 <dc:group expr="dc:coalesce($bedh_year, 'sonstige')">
2052 <heights name="{dc:group-key()}"> 2059 <heights name="{dc:group-key()}">
2053 <dc:call-macro name="bed-heights-factory_MW"/> 2060 <dc:call-macro name="bed-heights-factory_MW" />
2054 </heights> 2061 </heights>
2055 </dc:group> 2062 </dc:group>
2056 </dc:if> 2063 </dc:if>
2057 </dc:filter> 2064 </dc:filter>
2058 </dc:context> 2065 </dc:context>
2059 </single> 2066 </single>
2060 </dc:macro> 2067 </dc:macro>
2061 2068
2062 <!-- Show bed heights that have KL and TW values with a neutral name --> 2069 <!-- Show bed heights that have KL and TW values with a neutral name -->
2063 <dc:macro name="bed-heights-single-KL_TW"> 2070 <dc:macro name="bed-heights-single-KL_TW">
2064 <single> 2071 <single>
2065 <dc:context> 2072 <dc:context>
2066 <dc:call-macro name="bed-heights-statement"/> 2073 <dc:call-macro name="bed-heights-statement" />
2067 <dc:filter expr="$bedh_max_count > 0 and $bedh_min_count > 0"> 2074 <dc:filter expr="$bedh_max_count > 0 and $bedh_min_count > 0">
2068 <dc:if test="dc:has-result()"> 2075 <dc:if test="dc:has-result()">
2069 <dc:group expr="dc:coalesce($bedh_year, 'sonstige')"> 2076 <dc:group expr="dc:coalesce($bedh_year, 'sonstige')">
2070 <heights name="{dc:group-key()}"> 2077 <heights name="{dc:group-key()}">
2071 <dc:call-macro name="bed-heights-factory_MW"/> 2078 <dc:call-macro name="bed-heights-factory_MW" />
2072 </heights> 2079 </heights>
2073 </dc:group> 2080 </dc:group>
2074 </dc:if> 2081 </dc:if>
2075 </dc:filter> 2082 </dc:filter>
2076 </dc:context> 2083 </dc:context>
2077 </single> 2084 </single>
2078 </dc:macro> 2085 </dc:macro>
2079 2086
2080 <dc:macro name="bed-heights-epoch"> 2087 <dc:macro name="bed-heights-epoch">
2081 <epoch> 2088 <epoch>
2082 <dc:context> 2089 <dc:context>
2083 <dc:call-macro name="bed-heights-statement"/> 2090 <dc:call-macro name="bed-heights-statement" />
2084 <dc:filter expr="contains($bedh_descr, 'Epoche')"> 2091 <dc:filter expr="contains($bedh_descr, 'Epoche')">
2085 <dc:call-macro name="bed-heights-factory_MW_TW_KL"/> 2092 <dc:call-macro name="bed-heights-factory_MW_TW_KL" />
2086 </dc:filter> 2093 </dc:filter>
2087 </dc:context> 2094 </dc:context>
2088 </epoch> 2095 </epoch>
2089 </dc:macro> 2096 </dc:macro>
2090 2097
2091 <dc:macro name="sounding-width-factory"> 2098 <dc:macro name="sounding-width-factory">
2092 <dc:for-each> 2099 <dc:for-each>
2093 <height factory="bedheight" target_out="{$out}" ids="bedheight-soundings-{$bedh_id}-{$bedh_year}-{$bedh_descr}" info="{$info}" description="{$bedh_descr}"/> 2100 <height factory="bedheight" target_out="{$out}" ids="bedheight-soundings-{$bedh_id}-{$bedh_year}-{$bedh_descr}" info="{$info}" description="{$bedh_descr}" />
2094 </dc:for-each> 2101 </dc:for-each>
2095 </dc:macro> 2102 </dc:macro>
2096 2103
2097 <dc:macro name="sounding-width"> 2104 <dc:macro name="sounding-width">
2098 <dc:context> 2105 <dc:context>
2099 <dc:call-macro name="bed-heights-statement"/> 2106 <dc:call-macro name="bed-heights-statement" />
2100 <dc:if test="dc:has-result()"> 2107 <dc:if test="dc:has-result()">
2101 <soundings_width> 2108 <soundings_width>
2102 <dc:call-macro name="sounding-width-factory"/> 2109 <dc:call-macro name="sounding-width-factory" />
2103 </soundings_width> 2110 </soundings_width>
2104 </dc:if> 2111 </dc:if>
2105 </dc:context> 2112 </dc:context>
2106 </dc:macro> 2113 </dc:macro>
2107 2114
2108 <dc:macro name="sounding-width-recommendations"> 2115 <dc:macro name="sounding-width-recommendations">
2109 <dc:context> 2116 <dc:context>
2110 <dc:call-macro name="bed-heights-statement"/> 2117 <dc:call-macro name="bed-heights-statement" />
2111 <dc:filter expr="dc:contains($diffids, concat(';', $bedh_descr, ']'))"> 2118 <dc:filter expr="dc:contains($diffids, concat(';', $bedh_descr, ']'))">
2112 <dc:call-macro name="sounding-width-factory"/> 2119 <dc:call-macro name="sounding-width-factory" />
2113 </dc:filter> 2120 </dc:filter>
2114 </dc:context> 2121 </dc:context>
2115 </dc:macro> 2122 </dc:macro>
2116 2123
2117 <dc:macro name="bed-heights-statement"> 2124 <dc:macro name="bed-heights-statement">
2131 COALESCE(bhv.max_count,0) AS bedh_max_count 2138 COALESCE(bhv.max_count,0) AS bedh_max_count
2132 FROM bed_height bhs 2139 FROM bed_height bhs
2133 JOIN bed_height_type bht ON bht.id = bhs.type_id 2140 JOIN bed_height_type bht ON bht.id = bhs.type_id
2134 JOIN location_system ls ON ls.id = location_system_id 2141 JOIN location_system ls ON ls.id = location_system_id
2135 JOIN elevation_model cur_em ON cur_em.id = cur_elevation_model_id 2142 JOIN elevation_model cur_em ON cur_em.id = cur_elevation_model_id
2136 LEFT JOIN elevation_model old_em 2143 LEFT JOIN
2144 elevation_model old_em
2137 ON old_em.id = old_elevation_model_id 2145 ON old_em.id = old_elevation_model_id
2138 LEFT JOIN ranges r ON r.id = range_id 2146 LEFT JOIN ranges r ON r.id = range_id
2139 LEFT JOIN (SELECT bed_height_id, COUNT(height) AS height_count, COUNT(min_height) AS min_count, COUNT(max_height) AS max_count 2147 LEFT JOIN (SELECT bed_height_id, COUNT(height) AS height_count, COUNT(min_height) AS min_count, COUNT(max_height) AS max_count
2140 FROM bed_height_values 2148 FROM bed_height_values
2141 WHERE (station BETWEEN (${fromkm}-0.0001) AND (${tokm}+0.0001)) 2149 WHERE (station BETWEEN (${fromkm}-0.0001) AND (${tokm}+0.0001))
2142 GROUP BY bed_height_id 2150 GROUP BY bed_height_id
2143 ) bhv ON bhs.id = bhv.bed_height_id 2151 ) bhv ON bhs.id = bhv.bed_height_id
2144 WHERE bhs.river_id = ${river_id} 2152 WHERE bhs.river_id =
2153 ${river_id}
2145 </dc:statement> 2154 </dc:statement>
2146 </dc:macro> 2155 </dc:macro>
2147 2156
2148 <!-- flow velocity --> 2157 <!-- flow velocity -->
2149 <dc:macro name="flow_velocity_models"> 2158 <dc:macro name="flow_velocity_models">
2163 <dc:if test="dc:has-result()"> 2172 <dc:if test="dc:has-result()">
2164 <flowvelocitymodel> 2173 <flowvelocitymodel>
2165 <dc:for-each> 2174 <dc:for-each>
2166 <measurement_value name="{$fvmd}" ids="{$fvmid}" factory="flowvelocitymodel" info="{$lowerQ} - {$upperQ}&lt;BR&gt; 2175 <measurement_value name="{$fvmd}" ids="{$fvmid}" factory="flowvelocitymodel" info="{$lowerQ} - {$upperQ}&lt;BR&gt;
2167 Pegel {$gauge}&lt;BR&gt; 2176 Pegel {$gauge}&lt;BR&gt;
2168 Q = {$q} m3/s" target_out="{$out}"/> 2177 Q = {$q} m3/s" target_out="{$out}" />
2169 </dc:for-each> 2178 </dc:for-each>
2170 </flowvelocitymodel> 2179 </flowvelocitymodel>
2171 </dc:if> 2180 </dc:if>
2172 </dc:context> 2181 </dc:context>
2173 </dc:macro> 2182 </dc:macro>
2190 FROM flow_velocity_measure_values 2199 FROM flow_velocity_measure_values
2191 WHERE measurements_id = ${fvmid} 2200 WHERE measurements_id = ${fvmid}
2192 AND station BETWEEN ${fromkm} AND ${tokm} 2201 AND station BETWEEN ${fromkm} AND ${tokm}
2193 </dc:statement> 2202 </dc:statement>
2194 <dc:for-each> 2203 <dc:for-each>
2195 <measurement_value name="{$description} - {$station} - {$datetime}" ids="{$id}" factory="flowvelocity" target_out="{$out}"/> 2204 <measurement_value name="{$description} - {$station} - {$datetime}" ids="{$id}" factory="flowvelocity" target_out="{$out}" />
2196 </dc:for-each> 2205 </dc:for-each>
2197 </dc:context> 2206 </dc:context>
2198 </flow_velocity_measurement> 2207 </flow_velocity_measurement>
2199 </dc:for-each> 2208 </dc:for-each>
2200 </flowvelocitymeasurement> 2209 </flowvelocitymeasurement>
2218 max(station) AS to_station 2227 max(station) AS to_station
2219 FROM morphologic_width_values 2228 FROM morphologic_width_values
2220 WHERE morphologic_width_id = ${width_id} 2229 WHERE morphologic_width_id = ${width_id}
2221 </dc:statement> 2230 </dc:statement>
2222 <dc:for-each> 2231 <dc:for-each>
2223 <morphologic-width name="{$from_station} - {$to_station}" ids="{$width_id}" factory="morph-width" target_out="{$out}"/> 2232 <morphologic-width name="{$from_station} - {$to_station}" ids="{$width_id}" factory="morph-width" target_out="{$out}" />
2224 </dc:for-each> 2233 </dc:for-each>
2225 </dc:context> 2234 </dc:context>
2226 </dc:for-each> 2235 </dc:for-each>
2227 </morph_width> 2236 </morph_width>
2228 </dc:if> 2237 </dc:if>
2241 ra.a AS station_km 2250 ra.a AS station_km
2242 FROM sq_relation sq 2251 FROM sq_relation sq
2243 JOIN time_intervals ti ON ti.id = sq.time_interval_id 2252 JOIN time_intervals ti ON ti.id = sq.time_interval_id
2244 JOIN sq_relation_value sqv ON sqv.sq_relation_id = sq.id 2253 JOIN sq_relation_value sqv ON sqv.sq_relation_id = sq.id
2245 JOIN measurement_station ms ON sqv.measurement_station_id = ms.id 2254 JOIN measurement_station ms ON sqv.measurement_station_id = ms.id
2246 JOIN ranges ra ON ms.range_id = ra.id 2255 JOIN ranges ra ON ms.range_id =
2256 ra.id
2247 JOIN rivers r ON r.id = ra.river_id 2257 JOIN rivers r ON r.id = ra.river_id
2248 WHERE r.id = ${river_id} 2258 WHERE r.id = ${river_id}
2249 ORDER BY start_time, stop_time 2259 ORDER BY start_time, stop_time
2250 </dc:statement> 2260 </dc:statement>
2251 <dc:if test="dc:has-result()"> 2261 <dc:if test="dc:has-result()">
2258 <station description="{dc:group-key()}"> 2268 <station description="{dc:group-key()}">
2259 <dc:for-each> 2269 <dc:for-each>
2260 <dc:variable name="combined_desc" expr="concat(dc:date-format('yyyy', 2270 <dc:variable name="combined_desc" expr="concat(dc:date-format('yyyy',
2261 $start_time), ' bis ', 2271 $start_time), ' bis ',
2262 dc:date-format('yyyy', 2272 dc:date-format('yyyy',
2263 $stop_time))"/> 2273 $stop_time))" />
2264 <sqvalue factory="sqrelationdatacage" target_out="{$out}" ids="{$sqvid};{dc:uppercase($parameter)} - {$station_name}: {$combined_desc}" description="{$combined_desc}"/> 2274 <sqvalue factory="sqrelationdatacage" target_out="{$out}" ids="{$sqvid};{dc:uppercase($parameter)} - {$station_name}: {$combined_desc}" description="{$combined_desc}" />
2265 </dc:for-each> 2275 </dc:for-each>
2266 </station> 2276 </station>
2267 </dc:group> 2277 </dc:group>
2268 </dc:group> 2278 </dc:group>
2269 </parameter> 2279 </parameter>
2273 </dc:context> 2283 </dc:context>
2274 </dc:macro> 2284 </dc:macro>
2275 2285
2276 <!-- Floodmap part --> 2286 <!-- Floodmap part -->
2277 <dc:macro name="flood-map-complete"> 2287 <dc:macro name="flood-map-complete">
2278 <dc:call-macro name="flood-map-buildings"/> 2288 <dc:call-macro name="flood-map-buildings" />
2279 <dc:call-macro name="flood-map-gaugelocations"/> 2289 <dc:call-macro name="flood-map-gaugelocations" />
2280 <dc:call-macro name="floodmarks"/> 2290 <dc:call-macro name="floodmarks" />
2281 <hws> 2291 <hws>
2282 <dc:call-macro name="hwslines"/> 2292 <dc:call-macro name="hwslines" />
2283 <dc:call-macro name="hwspoints"/> 2293 <dc:call-macro name="hwspoints" />
2284 </hws> 2294 </hws>
2285 <dc:call-macro name="flood-map-routing"/> 2295 <dc:call-macro name="flood-map-routing" />
2286 <hydrboundaries> 2296 <hydrboundaries>
2287 <dc:call-macro name="flood-map-floodplain"/> 2297 <dc:call-macro name="flood-map-floodplain" />
2288 <dc:call-macro name="flood-map-hydr-boundaries"/> 2298 <dc:call-macro name="flood-map-hydr-boundaries" />
2289 </hydrboundaries> 2299 </hydrboundaries>
2290 <dc:call-macro name="flood-map-uesk"/> 2300 <dc:call-macro name="flood-map-uesk" />
2291 </dc:macro> 2301 </dc:macro>
2292 2302
2293 <dc:macro name="flood-map-routing"> 2303 <dc:macro name="flood-map-routing">
2294 <route_data> 2304 <route_data>
2295 <dc:call-macro name="flood-map-qps"/> 2305 <dc:call-macro name="flood-map-qps" />
2296 <dc:call-macro name="flood-map-fixpoints"/> 2306 <dc:call-macro name="flood-map-fixpoints" />
2297 <dc:call-macro name="flood-map-km"/> 2307 <dc:call-macro name="flood-map-km" />
2298 <dc:call-macro name="flood-map-riveraxis"/> 2308 <dc:call-macro name="flood-map-riveraxis" />
2299 </route_data> 2309 </route_data>
2300 </dc:macro> 2310 </dc:macro>
2301 2311
2302 <dc:macro name="flood-map-hydr-boundaries"> 2312 <dc:macro name="flood-map-hydr-boundaries">
2303 <bfg_model> 2313 <bfg_model>
2304 <dc:call-macro name="flood-map-hydr-boundaries-poly"/> 2314 <dc:call-macro name="flood-map-hydr-boundaries-poly" />
2305 <dc:call-macro name="flood-map-hydr-boundaries-lines"/> 2315 <dc:call-macro name="flood-map-hydr-boundaries-lines" />
2306 </bfg_model> 2316 </bfg_model>
2307 <dc:call-macro name="flood-map-hydr-boundaries-state"/> 2317 <dc:call-macro name="flood-map-hydr-boundaries-state" />
2308 </dc:macro> 2318 </dc:macro>
2309 2319
2310 <dc:macro name="flood-map-dem"> 2320 <dc:macro name="flood-map-dem">
2311 <dems> 2321 <dems>
2312 <dc:context> 2322 <dc:context>
2322 'Format: ' || d.format || '&lt;BR&gt;' || 2332 'Format: ' || d.format || '&lt;BR&gt;' ||
2323 'Zeitraum: ' 2333 'Zeitraum: '
2324 AS info 2334 AS info
2325 FROM dem d 2335 FROM dem d
2326 JOIN ranges r ON d.range_id = r.id 2336 JOIN ranges r ON d.range_id = r.id
2327 LEFT JOIN time_intervals t ON d.time_interval_id = t.id 2337 LEFT JOIN time_intervals t ON d.time_interval_id
2338 = t.id
2328 WHERE d.river_id = ${river_id} 2339 WHERE d.river_id = ${river_id}
2329 AND NOT((${tokm} &lt; r.a) or (${fromkm} &gt; r.b)) 2340 AND NOT((${tokm} &lt; r.a) or (${fromkm} &gt; r.b))
2330 </dc:statement> 2341 </dc:statement>
2331 <dc:for-each> 2342 <dc:for-each>
2332 <dem factory="demfactory" target_out="{$out}" ids="{$dem_id}" name="{$name}" info="{$info}{dc:date-format('yyyy', $start_time)} - {dc:date-format('yyyy', $stop_time)}"/> 2343 <dem factory="demfactory" target_out="{$out}" ids="{$dem_id}" name="{$name}" info="{$info}{dc:date-format('yyyy', $start_time)} - {dc:date-format('yyyy', $stop_time)}" />
2333 </dc:for-each> 2344 </dc:for-each>
2334 </dc:context> 2345 </dc:context>
2335 </dems> 2346 </dems>
2336 </dc:macro> 2347 </dc:macro>
2337 2348
2338 <dc:macro name="filter_hws_ddg"> 2349 <dc:macro name="filter_hws_ddg">
2339 <dc:macro name="durchlass_damm_graben"> 2350 <dc:macro name="durchlass_damm_graben">
2340 <dc:macro name="ddg_factory"> 2351 <dc:macro name="ddg_factory">
2341 <dc:for-each> 2352 <dc:for-each>
2342 <hws factory="hwsfactory" name="{$hws_name}" target_out="{$out}"/> 2353 <hws factory="hwsfactory" name="{$hws_name}" target_out="{$out}" />
2343 </dc:for-each> 2354 </dc:for-each>
2344 </dc:macro> 2355 </dc:macro>
2345 2356
2346 <dc:filter expr="$hws_kind=1"> 2357 <dc:filter expr="$hws_kind=1">
2347 <dc:if test="dc:has-result()"> 2358 <dc:if test="dc:has-result()">
2348 <Durchlass> 2359 <Durchlass>
2349 <dc:call-macro name="ddg_factory"/> 2360 <dc:call-macro name="ddg_factory" />
2350 </Durchlass> 2361 </Durchlass>
2351 </dc:if> 2362 </dc:if>
2352 </dc:filter> 2363 </dc:filter>
2353 2364
2354 <dc:filter expr="$hws_kind=2"> 2365 <dc:filter expr="$hws_kind=2">
2355 <dc:if test="dc:has-result()"> 2366 <dc:if test="dc:has-result()">
2356 <Damm> 2367 <Damm>
2357 <dc:call-macro name="ddg_factory"/> 2368 <dc:call-macro name="ddg_factory" />
2358 </Damm> 2369 </Damm>
2359 </dc:if> 2370 </dc:if>
2360 </dc:filter> 2371 </dc:filter>
2361 2372
2362 <dc:filter expr="$hws_kind=3"> 2373 <dc:filter expr="$hws_kind=3">
2363 <dc:if test="dc:has-result()"> 2374 <dc:if test="dc:has-result()">
2364 <Graben> 2375 <Graben>
2365 <dc:call-macro name="ddg_factory"/> 2376 <dc:call-macro name="ddg_factory" />
2366 </Graben> 2377 </Graben>
2367 </dc:if> 2378 </dc:if>
2368 </dc:filter> 2379 </dc:filter>
2369 </dc:macro> 2380 </dc:macro>
2370 2381
2371 <dc:filter expr="$hws_official=1"> 2382 <dc:filter expr="$hws_official=1">
2372 <dc:if test="dc:has-result()"> 2383 <dc:if test="dc:has-result()">
2373 <official> 2384 <official>
2374 <dc:call-macro name="durchlass_damm_graben"/> 2385 <dc:call-macro name="durchlass_damm_graben" />
2375 </official> 2386 </official>
2376 </dc:if> 2387 </dc:if>
2377 </dc:filter> 2388 </dc:filter>
2378 2389
2379 <dc:filter expr="$hws_official=0"> 2390 <dc:filter expr="$hws_official=0">
2380 <dc:if test="dc:has-result()"> 2391 <dc:if test="dc:has-result()">
2381 <inofficial> 2392 <inofficial>
2382 <dc:call-macro name="durchlass_damm_graben"/> 2393 <dc:call-macro name="durchlass_damm_graben" />
2383 </inofficial> 2394 </inofficial>
2384 </dc:if> 2395 </dc:if>
2385 </dc:filter> 2396 </dc:filter>
2386 </dc:macro> 2397 </dc:macro>
2387 2398
2395 FROM hws_lines 2406 FROM hws_lines
2396 WHERE river_id = ${river_id} 2407 WHERE river_id = ${river_id}
2397 </dc:statement> 2408 </dc:statement>
2398 <dc:if test="dc:has-result()"> 2409 <dc:if test="dc:has-result()">
2399 <lines> 2410 <lines>
2400 <dc:call-macro name="filter_hws_ddg"/> 2411 <dc:call-macro name="filter_hws_ddg" />
2401 </lines> 2412 </lines>
2402 </dc:if> 2413 </dc:if>
2403 </dc:context> 2414 </dc:context>
2404 </dc:macro> 2415 </dc:macro>
2405 2416
2413 FROM hws_points 2424 FROM hws_points
2414 WHERE river_id = ${river_id} 2425 WHERE river_id = ${river_id}
2415 </dc:statement> 2426 </dc:statement>
2416 <dc:if test="dc:has-result()"> 2427 <dc:if test="dc:has-result()">
2417 <points> 2428 <points>
2418 <dc:call-macro name="filter_hws_ddg"/> 2429 <dc:call-macro name="filter_hws_ddg" />
2419 </points> 2430 </points>
2420 </dc:if> 2431 </dc:if>
2421 </dc:context> 2432 </dc:context>
2422 </dc:macro> 2433 </dc:macro>
2423 2434
2430 FROM hydr_boundaries 2441 FROM hydr_boundaries
2431 WHERE river_id = ${river_id} 2442 WHERE river_id = ${river_id}
2432 AND kind = 2 2443 AND kind = 2
2433 </dc:statement> 2444 </dc:statement>
2434 <dc:for-each> 2445 <dc:for-each>
2435 <line factory="wmshydrboundariesfactory" target_out="{$out}" ids="{$river_id};{$name};2" name="{$name}"/> 2446 <line factory="wmshydrboundariesfactory" target_out="{$out}" ids="{$river_id};{$name};2" name="{$name}" />
2436 </dc:for-each> 2447 </dc:for-each>
2437 </dc:context> 2448 </dc:context>
2438 <dc:context> 2449 <dc:context>
2439 <dc:statement> 2450 <dc:statement>
2440 SELECT DISTINCT 2451 SELECT DISTINCT
2442 FROM hydr_boundaries_poly 2453 FROM hydr_boundaries_poly
2443 WHERE river_id = ${river_id} 2454 WHERE river_id = ${river_id}
2444 AND kind = 2 2455 AND kind = 2
2445 </dc:statement> 2456 </dc:statement>
2446 <dc:for-each> 2457 <dc:for-each>
2447 <line factory="wmshydrboundariespolyfactory" target_out="{$out}" ids="{$river_id};{$name};2" name="{$name}"/> 2458 <line factory="wmshydrboundariespolyfactory" target_out="{$out}" ids="{$river_id};{$name};2" name="{$name}" />
2448 </dc:for-each> 2459 </dc:for-each>
2449 </dc:context> 2460 </dc:context>
2450 </federal> 2461 </federal>
2451 </dc:macro> 2462 </dc:macro>
2452 2463
2461 </dc:statement> 2472 </dc:statement>
2462 <dc:comment> What about all other line kinds?</dc:comment> 2473 <dc:comment> What about all other line kinds?</dc:comment>
2463 <dc:if test="dc:has-result()"> 2474 <dc:if test="dc:has-result()">
2464 <lines> 2475 <lines>
2465 <dc:for-each> 2476 <dc:for-each>
2466 <line factory="wmshydrboundariesfactory" target_out="{$out}" ids="{$river_id};{$name};1" name="{$name}"/> 2477 <line factory="wmshydrboundariesfactory" target_out="{$out}" ids="{$river_id};{$name};1" name="{$name}" />
2467 </dc:for-each> 2478 </dc:for-each>
2468 </lines> 2479 </lines>
2469 </dc:if> 2480 </dc:if>
2470 </dc:context> 2481 </dc:context>
2471 </dc:macro> 2482 </dc:macro>
2483 AND b.kind = 1 2494 AND b.kind = 1
2484 </dc:statement> 2495 </dc:statement>
2485 <dc:if test="dc:has-result()"> 2496 <dc:if test="dc:has-result()">
2486 <sobek_areas> 2497 <sobek_areas>
2487 <dc:for-each> 2498 <dc:for-each>
2488 <boundary name="{$sectie}" factory="wmshydrboundariespolyfactory" target_out="{$out}" ids="{$river_id};{$sectie};1;{$sectie_id};-1"/> 2499 <boundary name="{$sectie}" factory="wmshydrboundariespolyfactory" target_out="{$out}" ids="{$river_id};{$sectie};1;{$sectie_id};-1" />
2489 </dc:for-each> 2500 </dc:for-each>
2490 </sobek_areas> 2501 </sobek_areas>
2491 </dc:if> 2502 </dc:if>
2492 </dc:context> 2503 </dc:context>
2493 <dc:context> 2504 <dc:context>
2501 AND b.kind = 1 2512 AND b.kind = 1
2502 </dc:statement> 2513 </dc:statement>
2503 <dc:if test="dc:has-result()"> 2514 <dc:if test="dc:has-result()">
2504 <sobek_flooded> 2515 <sobek_flooded>
2505 <dc:for-each> 2516 <dc:for-each>
2506 <boundary name="{$sobek}" factory="wmshydrboundariespolyfactory" target_out="{$out}" ids="{$river_id};{$sobek};1;-1;{$sobek_id}"/> 2517 <boundary name="{$sobek}" factory="wmshydrboundariespolyfactory" target_out="{$out}" ids="{$river_id};{$sobek};1;-1;{$sobek_id}" />
2507 </dc:for-each> 2518 </dc:for-each>
2508 </sobek_flooded> 2519 </sobek_flooded>
2509 </dc:if> 2520 </dc:if>
2510 </dc:context> 2521 </dc:context>
2511 <dc:context> 2522 <dc:context>
2517 AND b.kind = 1 2528 AND b.kind = 1
2518 AND b.sobek IS NULL 2529 AND b.sobek IS NULL
2519 AND b.sectie is NULL 2530 AND b.sectie is NULL
2520 </dc:statement> 2531 </dc:statement>
2521 <dc:for-each> 2532 <dc:for-each>
2522 <boundary name="{$name}" factory="wmshydrboundariespolyfactory" target_out="{$out}" ids="{$river_id};{$name}"/> 2533 <boundary name="{$name}" factory="wmshydrboundariespolyfactory" target_out="{$out}" ids="{$river_id};{$name}" />
2523 </dc:for-each> 2534 </dc:for-each>
2524 </dc:context> 2535 </dc:context>
2525 </areas> 2536 </areas>
2526 </dc:macro> 2537 </dc:macro>
2527 2538
2547 WHERE river_id = ${river_id} AND kind = 111 2558 WHERE river_id = ${river_id} AND kind = 111
2548 </dc:statement> 2559 </dc:statement>
2549 <dc:if test="dc:has-result()"> 2560 <dc:if test="dc:has-result()">
2550 <bfg> 2561 <bfg>
2551 <dc:for-each> 2562 <dc:for-each>
2552 <floodmaps factory="wmsfloodmapsfactory" target_out="{$out}" ids="{$river_id};{$name}" name="{$name}"/> 2563 <floodmaps factory="wmsfloodmapsfactory" target_out="{$out}" ids="{$river_id};{$name}" name="{$name}" />
2553 </dc:for-each> 2564 </dc:for-each>
2554 </bfg> 2565 </bfg>
2555 </dc:if> 2566 </dc:if>
2556 </dc:context> 2567 </dc:context>
2557 <dc:context> 2568 <dc:context>
2561 WHERE river_id = ${river_id} AND kind = 112 2572 WHERE river_id = ${river_id} AND kind = 112
2562 </dc:statement> 2573 </dc:statement>
2563 <dc:if test="dc:has-result()"> 2574 <dc:if test="dc:has-result()">
2564 <federal> 2575 <federal>
2565 <dc:for-each> 2576 <dc:for-each>
2566 <floodmaps factory="wmsfloodmapsfactory" target_out="{$out}" ids="{$river_id};{$name}" name="{$name}"/> 2577 <floodmaps factory="wmsfloodmapsfactory" target_out="{$out}" ids="{$river_id};{$name}" name="{$name}" />
2567 </dc:for-each> 2578 </dc:for-each>
2568 </federal> 2579 </federal>
2569 </dc:if> 2580 </dc:if>
2570 </dc:context> 2581 </dc:context>
2571 </current> 2582 </current>
2585 WHERE river_id = ${river_id} AND kind = 121 2596 WHERE river_id = ${river_id} AND kind = 121
2586 </dc:statement> 2597 </dc:statement>
2587 <dc:if test="dc:has-result()"> 2598 <dc:if test="dc:has-result()">
2588 <bfg> 2599 <bfg>
2589 <dc:for-each> 2600 <dc:for-each>
2590 <floodmaps factory="wmsfloodmapsfactory" target_out="{$out}" ids="{$river_id};{$name}" name="{$name}"/> 2601 <floodmaps factory="wmsfloodmapsfactory" target_out="{$out}" ids="{$river_id};{$name}" name="{$name}" />
2591 </dc:for-each> 2602 </dc:for-each>
2592 </bfg> 2603 </bfg>
2593 </dc:if> 2604 </dc:if>
2594 </dc:context> 2605 </dc:context>
2595 <dc:context> 2606 <dc:context>
2600 WHERE river_id = ${river_id} AND kind = 122 2611 WHERE river_id = ${river_id} AND kind = 122
2601 </dc:statement> 2612 </dc:statement>
2602 <dc:if test="dc:has-result()"> 2613 <dc:if test="dc:has-result()">
2603 <federal> 2614 <federal>
2604 <dc:for-each> 2615 <dc:for-each>
2605 <floodmaps factory="wmsfloodmapsfactory" target_out="{$out}" ids="{$river_id};{$name}" name="{$name}"/> 2616 <floodmaps factory="wmsfloodmapsfactory" target_out="{$out}" ids="{$river_id};{$name}" name="{$name}" />
2606 </dc:for-each> 2617 </dc:for-each>
2607 </federal> 2618 </federal>
2608 </dc:if> 2619 </dc:if>
2609 </dc:context> 2620 </dc:context>
2610 </potential> 2621 </potential>
2629 FROM floodmaps 2640 FROM floodmaps
2630 WHERE river_id = ${river_id} AND kind = 200 AND source = 2641 WHERE river_id = ${river_id} AND kind = 200 AND source =
2631 ${source} 2642 ${source}
2632 </dc:statement> 2643 </dc:statement>
2633 <dc:for-each> 2644 <dc:for-each>
2634 <floodmaps factory="wmsfloodmapsfactory" target_out="{$out}" ids="{$river_id};{$name}" name="{$name}"/> 2645 <floodmaps factory="wmsfloodmapsfactory" target_out="{$out}" ids="{$river_id};{$name}" name="{$name}" />
2635 </dc:for-each> 2646 </dc:for-each>
2636 </dc:context> 2647 </dc:context>
2637 </year> 2648 </year>
2638 </dc:for-each> 2649 </dc:for-each>
2639 </measurements> 2650 </measurements>
2656 </dc:statement> 2667 </dc:statement>
2657 <dc:if test="dc:has-result()"> 2668 <dc:if test="dc:has-result()">
2658 <floodplain> 2669 <floodplain>
2659 <dc:filter expr="$kind_id=1"> 2670 <dc:filter expr="$kind_id=1">
2660 <dc:for-each> 2671 <dc:for-each>
2661 <floody factory="wmsfloodplainfactory" target_out="{$out}" description="{$kind_name}" ids="{$river_id};{$kind_name};{$kind_id}"/> 2672 <floody factory="wmsfloodplainfactory" target_out="{$out}" description="{$kind_name}" ids="{$river_id};{$kind_name};{$kind_id}" />
2662 </dc:for-each> 2673 </dc:for-each>
2663 </dc:filter> 2674 </dc:filter>
2664 <dc:filter expr="$kind_id != 1"> 2675 <dc:filter expr="$kind_id != 1">
2665 <dc:if test="dc:has-result()"> 2676 <dc:if test="dc:has-result()">
2666 <other> 2677 <other>
2667 <dc:for-each> 2678 <dc:for-each>
2668 <floody factory="wmsfloodplainfactory" target_out="{$out}" description="{$layer_name}" ids="{$river_id};{$layer_name};{$kind_id}"/> 2679 <floody factory="wmsfloodplainfactory" target_out="{$out}" description="{$layer_name}" ids="{$river_id};{$layer_name};{$kind_id}" />
2669 </dc:for-each> 2680 </dc:for-each>
2670 </other> 2681 </other>
2671 </dc:if> 2682 </dc:if>
2672 </dc:filter> 2683 </dc:filter>
2673 </floodplain> 2684 </floodplain>
2681 availble 2692 availble
2682 </dc:comment> 2693 </dc:comment>
2683 2694
2684 <dc:macro name="hwspoints_by_kind_factory"> 2695 <dc:macro name="hwspoints_by_kind_factory">
2685 <dc:for-each> 2696 <dc:for-each>
2686 <hws factory="wmshwspointsfactory" target_out="{$out}" ids="{$river_id};{$hws_name}" name="{$hws_name}"/> 2697 <hws factory="wmshwspointsfactory" target_out="{$out}" ids="{$river_id};{$hws_name}" name="{$hws_name}" />
2687 </dc:for-each> 2698 </dc:for-each>
2688 </dc:macro> 2699 </dc:macro>
2689 2700
2690 <dc:filter expr="$hws_kind=1"> 2701 <dc:filter expr="$hws_kind=1">
2691 <dc:if test="dc:has-result()"> 2702 <dc:if test="dc:has-result()">
2692 <Durchlass> 2703 <Durchlass>
2693 <dc:call-macro name="hwspoints_by_kind_factory"/> 2704 <dc:call-macro name="hwspoints_by_kind_factory" />
2694 </Durchlass> 2705 </Durchlass>
2695 </dc:if> 2706 </dc:if>
2696 </dc:filter> 2707 </dc:filter>
2697 2708
2698 <dc:filter expr="$hws_kind=2"> 2709 <dc:filter expr="$hws_kind=2">
2699 <dc:if test="dc:has-result()"> 2710 <dc:if test="dc:has-result()">
2700 <Damm> 2711 <Damm>
2701 <dc:call-macro name="hwspoints_by_kind_factory"/> 2712 <dc:call-macro name="hwspoints_by_kind_factory" />
2702 </Damm> 2713 </Damm>
2703 </dc:if> 2714 </dc:if>
2704 </dc:filter> 2715 </dc:filter>
2705 2716
2706 <dc:filter expr="$hws_kind=3"> 2717 <dc:filter expr="$hws_kind=3">
2707 <dc:if test="dc:has-result()"> 2718 <dc:if test="dc:has-result()">
2708 <Graben> 2719 <Graben>
2709 <dc:call-macro name="hwspoints_by_kind_factory"/> 2720 <dc:call-macro name="hwspoints_by_kind_factory" />
2710 </Graben> 2721 </Graben>
2711 </dc:if> 2722 </dc:if>
2712 </dc:filter> 2723 </dc:filter>
2713 </dc:macro> 2724 </dc:macro>
2714 2725
2735 WHERE river_id = ${river_id} 2746 WHERE river_id = ${river_id}
2736 AND official=1 2747 AND official=1
2737 AND fed_state_id = ${fed_id} ORDER BY name 2748 AND fed_state_id = ${fed_id} ORDER BY name
2738 </dc:statement> 2749 </dc:statement>
2739 <fedstate description="{$fed_name}"> 2750 <fedstate description="{$fed_name}">
2740 <dc:call-macro name="hwspoints_by_kind"/> 2751 <dc:call-macro name="hwspoints_by_kind" />
2741 </fedstate> 2752 </fedstate>
2742 </dc:context> 2753 </dc:context>
2743 </dc:for-each> 2754 </dc:for-each>
2744 </dc:context> 2755 </dc:context>
2745 <dc:context> 2756 <dc:context>
2752 AND official=1 2763 AND official=1
2753 AND fed_state_id IS NULL 2764 AND fed_state_id IS NULL
2754 ORDER BY name 2765 ORDER BY name
2755 </dc:statement> 2766 </dc:statement>
2756 <hws_fed_unknown> 2767 <hws_fed_unknown>
2757 <dc:call-macro name="hwspoints_by_kind"/> 2768 <dc:call-macro name="hwspoints_by_kind" />
2758 </hws_fed_unknown> 2769 </hws_fed_unknown>
2759 </dc:context> 2770 </dc:context>
2760 </official> 2771 </official>
2761 <inofficial> 2772 <inofficial>
2762 <dc:context> 2773 <dc:context>
2779 WHERE river_id = ${river_id} 2790 WHERE river_id = ${river_id}
2780 AND official=0 2791 AND official=0
2781 AND fed_state_id = ${fed_id} ORDER BY name 2792 AND fed_state_id = ${fed_id} ORDER BY name
2782 </dc:statement> 2793 </dc:statement>
2783 <fedstate description="{$fed_name}"> 2794 <fedstate description="{$fed_name}">
2784 <dc:call-macro name="hwspoints_by_kind"/> 2795 <dc:call-macro name="hwspoints_by_kind" />
2785 </fedstate> 2796 </fedstate>
2786 </dc:context> 2797 </dc:context>
2787 </dc:for-each> 2798 </dc:for-each>
2788 </dc:context> 2799 </dc:context>
2789 <dc:context> 2800 <dc:context>
2795 WHERE river_id = ${river_id} 2806 WHERE river_id = ${river_id}
2796 AND official=0 2807 AND official=0
2797 AND fed_state_id IS NULL ORDER BY name 2808 AND fed_state_id IS NULL ORDER BY name
2798 </dc:statement> 2809 </dc:statement>
2799 <hws_fed_unknown> 2810 <hws_fed_unknown>
2800 <dc:call-macro name="hwspoints_by_kind"/> 2811 <dc:call-macro name="hwspoints_by_kind" />
2801 </hws_fed_unknown> 2812 </hws_fed_unknown>
2802 </dc:context> 2813 </dc:context>
2803 </inofficial> 2814 </inofficial>
2804 </hws_points> 2815 </hws_points>
2805 </dc:macro> 2816 </dc:macro>
2810 availble 2821 availble
2811 </dc:comment> 2822 </dc:comment>
2812 2823
2813 <dc:macro name="hwslines_by_kind_factory"> 2824 <dc:macro name="hwslines_by_kind_factory">
2814 <dc:for-each> 2825 <dc:for-each>
2815 <hws factory="wmshwslinesfactory" target_out="{$out}" ids="{$river_id};{$hws_name}" name="{$hws_name}"/> 2826 <hws factory="wmshwslinesfactory" target_out="{$out}" ids="{$river_id};{$hws_name}" name="{$hws_name}" />
2816 </dc:for-each> 2827 </dc:for-each>
2817 </dc:macro> 2828 </dc:macro>
2818 2829
2819 <dc:filter expr="$hws_kind=1"> 2830 <dc:filter expr="$hws_kind=1">
2820 <dc:if test="dc:has-result()"> 2831 <dc:if test="dc:has-result()">
2821 <Durchlass> 2832 <Durchlass>
2822 <dc:call-macro name="hwslines_by_kind_factory"/> 2833 <dc:call-macro name="hwslines_by_kind_factory" />
2823 </Durchlass> 2834 </Durchlass>
2824 </dc:if> 2835 </dc:if>
2825 </dc:filter> 2836 </dc:filter>
2826 2837
2827 <dc:filter expr="$hws_kind=2"> 2838 <dc:filter expr="$hws_kind=2">
2828 <dc:if test="dc:has-result()"> 2839 <dc:if test="dc:has-result()">
2829 <Damm> 2840 <Damm>
2830 <dc:call-macro name="hwslines_by_kind_factory"/> 2841 <dc:call-macro name="hwslines_by_kind_factory" />
2831 </Damm> 2842 </Damm>
2832 </dc:if> 2843 </dc:if>
2833 </dc:filter> 2844 </dc:filter>
2834 2845
2835 <dc:filter expr="$hws_kind=3"> 2846 <dc:filter expr="$hws_kind=3">
2836 <dc:if test="dc:has-result()"> 2847 <dc:if test="dc:has-result()">
2837 <Graben> 2848 <Graben>
2838 <dc:call-macro name="hwslines_by_kind_factory"/> 2849 <dc:call-macro name="hwslines_by_kind_factory" />
2839 </Graben> 2850 </Graben>
2840 </dc:if> 2851 </dc:if>
2841 </dc:filter> 2852 </dc:filter>
2842 </dc:macro> 2853 </dc:macro>
2843 2854
2864 WHERE river_id = ${river_id} 2875 WHERE river_id = ${river_id}
2865 AND official=1 2876 AND official=1
2866 AND fed_state_id = ${fed_id} ORDER BY name 2877 AND fed_state_id = ${fed_id} ORDER BY name
2867 </dc:statement> 2878 </dc:statement>
2868 <fedstate description="{$fed_name}"> 2879 <fedstate description="{$fed_name}">
2869 <dc:call-macro name="hwslines_by_kind"/> 2880 <dc:call-macro name="hwslines_by_kind" />
2870 </fedstate> 2881 </fedstate>
2871 </dc:context> 2882 </dc:context>
2872 </dc:for-each> 2883 </dc:for-each>
2873 </dc:context> 2884 </dc:context>
2874 <dc:context> 2885 <dc:context>
2881 AND official=1 2892 AND official=1
2882 AND fed_state_id IS NULL 2893 AND fed_state_id IS NULL
2883 ORDER BY name 2894 ORDER BY name
2884 </dc:statement> 2895 </dc:statement>
2885 <hws_fed_unknown> 2896 <hws_fed_unknown>
2886 <dc:call-macro name="hwslines_by_kind"/> 2897 <dc:call-macro name="hwslines_by_kind" />
2887 </hws_fed_unknown> 2898 </hws_fed_unknown>
2888 </dc:context> 2899 </dc:context>
2889 </official> 2900 </official>
2890 <inofficial> 2901 <inofficial>
2891 <dc:context> 2902 <dc:context>
2908 WHERE river_id = ${river_id} 2919 WHERE river_id = ${river_id}
2909 AND official=0 2920 AND official=0
2910 AND fed_state_id = ${fed_id} ORDER BY name 2921 AND fed_state_id = ${fed_id} ORDER BY name
2911 </dc:statement> 2922 </dc:statement>
2912 <fedstate description="{$fed_name}"> 2923 <fedstate description="{$fed_name}">
2913 <dc:call-macro name="hwslines_by_kind"/> 2924 <dc:call-macro name="hwslines_by_kind" />
2914 </fedstate> 2925 </fedstate>
2915 </dc:context> 2926 </dc:context>
2916 </dc:for-each> 2927 </dc:for-each>
2917 </dc:context> 2928 </dc:context>
2918 <dc:context> 2929 <dc:context>
2924 WHERE river_id = ${river_id} 2935 WHERE river_id = ${river_id}
2925 AND official=0 2936 AND official=0
2926 AND fed_state_id IS NULL ORDER BY name 2937 AND fed_state_id IS NULL ORDER BY name
2927 </dc:statement> 2938 </dc:statement>
2928 <hws_fed_unknown> 2939 <hws_fed_unknown>
2929 <dc:call-macro name="hwslines_by_kind"/> 2940 <dc:call-macro name="hwslines_by_kind" />
2930 </hws_fed_unknown> 2941 </hws_fed_unknown>
2931 </dc:context> 2942 </dc:context>
2932 </inofficial> 2943 </inofficial>
2933 </hws_lines> 2944 </hws_lines>
2934 </dc:macro> 2945 </dc:macro>
2942 WHERE river_id = ${river_id} 2953 WHERE river_id = ${river_id}
2943 </dc:statement> 2954 </dc:statement>
2944 <dc:if test="dc:has-result()"> 2955 <dc:if test="dc:has-result()">
2945 <floodmarks> 2956 <floodmarks>
2946 <dc:for-each> 2957 <dc:for-each>
2947 <floodmark name="{$year}" factory="wmsfloodmarkfactory" target_out="{$out}" ids="{$river_id};{$year};{$year}"/> 2958 <floodmark name="{$year}" factory="wmsfloodmarkfactory" target_out="{$out}" ids="{$river_id};{$year};{$year}" />
2948 </dc:for-each> 2959 </dc:for-each>
2949 </floodmarks> 2960 </floodmarks>
2950 </dc:if> 2961 </dc:if>
2951 </dc:context> 2962 </dc:context>
2952 </dc:macro> 2963 </dc:macro>
2953 2964
2954 <dc:macro name="flood-map-gaugelocations"> 2965 <dc:macro name="flood-map-gaugelocations">
2955 <gaugelocations> 2966 <gaugelocations>
2956 <gauge_points factory="externalwmsfactory" ids="http://www.pegelonline.wsv.de/webservices/gis/wms;Pegelpunkte;Pegelpunkte (WSV)" target_out="{$out}"/> 2967 <gauge_points factory="externalwmsfactory" ids="http://www.pegelonline.wsv.de/webservices/gis/wms;Pegelpunkte;Pegelpunkte (WSV)" target_out="{$out}" />
2957 <gauge_names factory="externalwmsfactory" ids="http://www.pegelonline.wsv.de/webservices/gis/wms;Pegelnamen;Pegelnamen (WSV)" target_out="{$out}"/> 2968 <gauge_names factory="externalwmsfactory" ids="http://www.pegelonline.wsv.de/webservices/gis/wms;Pegelnamen;Pegelnamen (WSV)" target_out="{$out}" />
2958 <gauge_level factory="externalwmsfactory" ids="http://www.pegelonline.wsv.de/webservices/gis/wms;Pegelwasserstand;Aktueller Wasserstand (WSV)" target_out="{$out}"/> 2969 <gauge_level factory="externalwmsfactory" ids="http://www.pegelonline.wsv.de/webservices/gis/wms;Pegelwasserstand;Aktueller Wasserstand (WSV)" target_out="{$out}" />
2959 <gauge_tendency factory="externalwmsfactory" ids="http://www.pegelonline.wsv.de/webservices/gis/wms;TendenzWasserstand;Tendenz des Wasserstands (WSV)" target_out="{$out}"/> 2970 <gauge_tendency factory="externalwmsfactory" ids="http://www.pegelonline.wsv.de/webservices/gis/wms;TendenzWasserstand;Tendenz des Wasserstands (WSV)" target_out="{$out}" />
2960 </gaugelocations> 2971 </gaugelocations>
2961 </dc:macro> 2972 </dc:macro>
2962 2973
2963 <dc:macro name="flood-map-riveraxis"> 2974 <dc:macro name="flood-map-riveraxis">
2964 <dc:context> 2975 <dc:context>
2973 </dc:statement> 2984 </dc:statement>
2974 <dc:if test="dc:has-result()"> 2985 <dc:if test="dc:has-result()">
2975 <axis> 2986 <axis>
2976 <dc:filter expr="$kind_id=1"> 2987 <dc:filter expr="$kind_id=1">
2977 <dc:for-each> 2988 <dc:for-each>
2978 <actual description="{$kind_name}" ids="{$river_id};{$kind_name};{$kind_id}" factory="riveraxis" target_out="{$out}"/> 2989 <actual description="{$kind_name}" ids="{$river_id};{$kind_name};{$kind_id}" factory="riveraxis" target_out="{$out}" />
2979 </dc:for-each> 2990 </dc:for-each>
2980 </dc:filter> 2991 </dc:filter>
2981 <dc:filter expr="$kind_id!=1"> 2992 <dc:filter expr="$kind_id!=1">
2982 <other> 2993 <other>
2983 <dc:for-each> 2994 <dc:for-each>
2984 <misc-axis description="{$layer_name}" ids="{$river_id};{$layer_name};{$kind_id}" factory="riveraxis" target_out="{$out}"/> 2995 <misc-axis description="{$layer_name}" ids="{$river_id};{$layer_name};{$kind_id}" factory="riveraxis" target_out="{$out}" />
2985 </dc:for-each> 2996 </dc:for-each>
2986 </other> 2997 </other>
2987 </dc:filter> 2998 </dc:filter>
2988 </axis> 2999 </axis>
2989 </dc:if> 3000 </dc:if>
2994 <dc:context> 3005 <dc:context>
2995 <dc:statement> 3006 <dc:statement>
2996 SELECT DISTINCT 1 FROM river_axes_km WHERE river_id = ${river_id} 3007 SELECT DISTINCT 1 FROM river_axes_km WHERE river_id = ${river_id}
2997 </dc:statement> 3008 </dc:statement>
2998 <dc:for-each> 3009 <dc:for-each>
2999 <kilometrage factory="wmskmfactory" ids="{$river_id}" target_out="{$out}"/> 3010 <kilometrage factory="wmskmfactory" ids="{$river_id}" target_out="{$out}" />
3000 </dc:for-each> 3011 </dc:for-each>
3001 </dc:context> 3012 </dc:context>
3002 </dc:macro> 3013 </dc:macro>
3003 3014
3004 <dc:macro name="flood-map-fixpoints"> 3015 <dc:macro name="flood-map-fixpoints">
3008 FROM fixpoints 3019 FROM fixpoints
3009 WHERE river_id = ${river_id} 3020 WHERE river_id = ${river_id}
3010 GROUP BY name 3021 GROUP BY name
3011 </dc:statement> 3022 </dc:statement>
3012 <dc:for-each> 3023 <dc:for-each>
3013 <fixpoints factory="wmsfixpointsfactory" target_out="{$out}" ids="{$river_id};{$name}"/> 3024 <fixpoints factory="wmsfixpointsfactory" target_out="{$out}" ids="{$river_id};{$name}" />
3014 </dc:for-each> 3025 </dc:for-each>
3015 </dc:context> 3026 </dc:context>
3016 </dc:macro> 3027 </dc:macro>
3017 3028
3018 <dc:macro name="flood-map-qps"> 3029 <dc:macro name="flood-map-qps">
3028 </dc:statement> 3039 </dc:statement>
3029 <dc:if test="dc:has-result()"> 3040 <dc:if test="dc:has-result()">
3030 <qps> 3041 <qps>
3031 <dc:filter expr="$kind_id=1"> 3042 <dc:filter expr="$kind_id=1">
3032 <dc:for-each> 3043 <dc:for-each>
3033 <actual description="{$kind_name}" factory="wmsqpsfactory" target_out="{$out}" ids="{$river_id};{$kind_name};{$kind_id}"/> 3044 <actual description="{$kind_name}" factory="wmsqpsfactory" target_out="{$out}" ids="{$river_id};{$kind_name};{$kind_id}" />
3034 </dc:for-each> 3045 </dc:for-each>
3035 </dc:filter> 3046 </dc:filter>
3036 <dc:filter expr="$kind_id = 0"> 3047 <dc:filter expr="$kind_id = 0">
3037 <dc:if test="dc:has-result()"> 3048 <dc:if test="dc:has-result()">
3038 <other> 3049 <other>
3039 <dc:for-each> 3050 <dc:for-each>
3040 <misc-qps description="{$layer_name}" factory="wmsqpsfactory" target_out="{$out}" ids="{$river_id};{$layer_name};{$kind_id}"/> 3051 <misc-qps description="{$layer_name}" factory="wmsqpsfactory" target_out="{$out}" ids="{$river_id};{$layer_name};{$kind_id}" />
3041 </dc:for-each> 3052 </dc:for-each>
3042 </other> 3053 </other>
3043 </dc:if> 3054 </dc:if>
3044 </dc:filter> 3055 </dc:filter>
3045 </qps> 3056 </qps>
3060 WHERE river_id = ${river_id} 3071 WHERE river_id = ${river_id}
3061 </dc:statement> 3072 </dc:statement>
3062 <dc:if test="dc:has-result()"> 3073 <dc:if test="dc:has-result()">
3063 <dc:filter expr="$building_kind_id!=0"> 3074 <dc:filter expr="$building_kind_id!=0">
3064 <dc:for-each> 3075 <dc:for-each>
3065 <buildings description="{$building_kind}" factory="wmsbuildingsfactory" target_out="{$out}" ids="{$river_id};{$building_kind};{$building_kind_id}"/> 3076 <buildings description="{$building_kind}" factory="wmsbuildingsfactory" target_out="{$out}" ids="{$river_id};{$building_kind};{$building_kind_id}" />
3066 </dc:for-each> 3077 </dc:for-each>
3067 </dc:filter> 3078 </dc:filter>
3068 <dc:filter expr="$building_kind_id=0"> 3079 <dc:filter expr="$building_kind_id=0">
3069 <other> 3080 <other>
3070 <dc:for-each> 3081 <dc:for-each>
3071 <buildings description="{$building_name}" factory="wmsbuildingsfactory" target_out="{$out}" ids="{$river_id};{$building_name}"/> 3082 <buildings description="{$building_name}" factory="wmsbuildingsfactory" target_out="{$out}" ids="{$river_id};{$building_name}" />
3072 </dc:for-each> 3083 </dc:for-each>
3073 </other> 3084 </other>
3074 </dc:filter> 3085 </dc:filter>
3075 </dc:if> 3086 </dc:if>
3076 </dc:context> 3087 </dc:context>
3084 WHERE river_id = ${river_id} 3095 WHERE river_id = ${river_id}
3085 </dc:statement> 3096 </dc:statement>
3086 <dc:if test="dc:has-result()"> 3097 <dc:if test="dc:has-result()">
3087 <jetties> 3098 <jetties>
3088 <dc:for-each> 3099 <dc:for-each>
3089 <jetty description="{$jetty_kind}" factory="wmsjettiesfactory" target_out="{$out}" ids="{$river_id};{$jetty_kind};{$jetty_kind_id}"/> 3100 <jetty description="{$jetty_kind}" factory="wmsjettiesfactory" target_out="{$out}" ids="{$river_id};{$jetty_kind};{$jetty_kind_id}" />
3090 </dc:for-each> 3101 </dc:for-each>
3091 </jetties> 3102 </jetties>
3092 </dc:if> 3103 </dc:if>
3093 </dc:context> 3104 </dc:context>
3094 </buildings> 3105 </buildings>
3096 3107
3097 <dc:macro name="officiallines_user"> 3108 <dc:macro name="officiallines_user">
3098 <dc:if test="dc:contains($parameters, 'official-lines')"> 3109 <dc:if test="dc:contains($parameters, 'official-lines')">
3099 <dc:container-context container="official-lines"> 3110 <dc:container-context container="official-lines">
3100 <dc:properties> 3111 <dc:properties>
3101 <dc:property name="name" alias="olname"/> 3112 <dc:property name="name" alias="olname" />
3102 <dc:property name="wstId" alias="wstid"/> 3113 <dc:property name="wstId" alias="wstid" />
3103 <dc:property name="columnPos" alias="wstcolpos"/> 3114 <dc:property name="columnPos" alias="wstcolpos" />
3104 </dc:properties> 3115 </dc:properties>
3105 <dc:if test="dc:has-result()"> 3116 <dc:if test="dc:has-result()">
3106 <officiallines> 3117 <officiallines>
3107 <dc:for-each> 3118 <dc:for-each>
3108 <column name="{$olname}" ids="official-wstv-{$wstcolpos}-{$wstid}" factory="staticwqkms" target_out="{$out}"/> 3119 <column name="{$olname}" ids="official-wstv-{$wstcolpos}-{$wstid}" factory="staticwqkms" target_out="{$out}" />
3109 </dc:for-each> 3120 </dc:for-each>
3110 </officiallines> 3121 </officiallines>
3111 </dc:if> 3122 </dc:if>
3112 </dc:container-context> 3123 </dc:container-context>
3113 </dc:if> 3124 </dc:if>
3114 </dc:macro> 3125 </dc:macro>
3115 3126
3116 <!-- sediment loads --> 3127 <!-- sediment loads -->
3117 <dc:macro name="sedimentload_off_epoch_filter"> 3128 <dc:macro name="sedimentload_off_epoch_filter">
3118 <dc:if test="dc:has-result()"> 3129 <dc:if test="dc:has-result()">
3119 <dc:variable name="sq_time_id" type="number" expr="number($sq_ti_id)"/> 3130 <dc:variable name="sq_time_id" type="number" expr="number($sq_ti_id)" />
3120 <dc:if test="string-length(dc:get('epochs')) &gt; 0"> 3131 <dc:if test="string-length(dc:get('epochs')) &gt; 0">
3121 <dc:variable name="start" type="number" expr="dc:min-number(dc:find-all('\d{4}', $epochs))"/> 3132 <dc:variable name="start" type="number" expr="dc:min-number(dc:find-all('\d{4}', $epochs))" />
3122 <dc:variable name="end" type="number" expr="dc:max-number(dc:find-all('\d{4}', $epochs))"/> 3133 <dc:variable name="end" type="number" expr="dc:max-number(dc:find-all('\d{4}', $epochs))" />
3123 </dc:if> 3134 </dc:if>
3124 <dc:if test="string-length(dc:get('years')) &gt; 0"> 3135 <dc:if test="string-length(dc:get('years')) &gt; 0">
3125 <dc:variable name="start" type="number" expr="dc:min-number(dc:find-all('\d{4}', $years))"/> 3136 <dc:variable name="start" type="number" expr="dc:min-number(dc:find-all('\d{4}', $years))" />
3126 <dc:variable name="end" type="number" expr="dc:max-number(dc:find-all('\d{4}', $years))"/> 3137 <dc:variable name="end" type="number" expr="dc:max-number(dc:find-all('\d{4}', $years))" />
3127 </dc:if> 3138 </dc:if>
3128 <dc:filter expr="$kind = 'official' and 3139 <dc:filter expr="$kind = 'official' and
3129 $sqid = $sq_time_id and 3140 $sqid = $sq_time_id and
3130 not(number($end) &lt; 3141 not(number($end) &lt;
3131 number(dc:date-format('yyyy', $startyear)) 3142 number(dc:date-format('yyyy', $startyear))
3132 or number($start) &gt; 3143 or number($start) &gt;
3133 number(dc:date-format('yyyy', $endyear)))"> 3144 number(dc:date-format('yyyy', $endyear)))">
3134 <dc:macro-body/> 3145 <dc:macro-body />
3135 </dc:filter> 3146 </dc:filter>
3136 </dc:if> 3147 </dc:if>
3137 </dc:macro> 3148 </dc:macro>
3138 3149
3139 <dc:macro name="sedimentload_off_epochs"> 3150 <dc:macro name="sedimentload_off_epochs">
3140 <dc:context> 3151 <dc:context>
3141 <dc:call-macro name="sedimentload_stations_statement"/> 3152 <dc:call-macro name="sedimentload_stations_statement" />
3142 <dc:call-macro name="sedimentload_off_epoch_filter"> 3153 <dc:call-macro name="sedimentload_off_epoch_filter">
3143 <dc:call-macro name="loads"> 3154 <dc:call-macro name="loads">
3144 <dc:call-macro name="load"/> 3155 <dc:call-macro name="load" />
3145 </dc:call-macro> 3156 </dc:call-macro>
3146 </dc:call-macro> 3157 </dc:call-macro>
3147 </dc:context> 3158 </dc:context>
3148 <dc:context> 3159 <dc:context>
3149 <dc:call-macro name="sedimentload_ls_statement"/> 3160 <dc:call-macro name="sedimentload_ls_statement" />
3150 <dc:call-macro name="sedimentload_off_epoch_filter"> 3161 <dc:call-macro name="sedimentload_off_epoch_filter">
3151 <dc:call-macro name="loads"> 3162 <dc:call-macro name="loads">
3152 <dc:call-macro name="load_ls"/> 3163 <dc:call-macro name="load_ls" />
3153 </dc:call-macro> 3164 </dc:call-macro>
3154 </dc:call-macro> 3165 </dc:call-macro>
3155 </dc:context> 3166 </dc:context>
3156 </dc:macro> 3167 </dc:macro>
3157 3168
3176 JOIN wst_ranges wr ON wc.id = wr.wst_column_id 3187 JOIN wst_ranges wr ON wc.id = wr.wst_column_id
3177 WHERE w.river_id = ${river_id} AND 3188 WHERE w.river_id = ${river_id} AND
3178 NOT((${tokm} &lt; wr.a) or (${fromkm} &gt; wr.b)) 3189 NOT((${tokm} &lt; wr.a) or (${fromkm} &gt; wr.b))
3179 ORDER BY wst_column_position 3190 ORDER BY wst_column_position
3180 </dc:statement> 3191 </dc:statement>
3181 <dc:macro-body/> 3192 <dc:macro-body />
3182 </dc:context> 3193 </dc:context>
3183 </dc:macro> 3194 </dc:macro>
3184 3195
3185 <dc:macro name="all-user-artifacts"> 3196 <dc:macro name="all-user-artifacts">
3186 <dc:context connection="user"> 3197 <dc:context connection="user">
3199 CAST(COALESCE(ma.ld_locations, '') AS VARCHAR(255)) AS ld_l, 3210 CAST(COALESCE(ma.ld_locations, '') AS VARCHAR(255)) AS ld_l,
3200 CAST(COALESCE(ma.ld_from, '') AS VARCHAR(255)) AS ld_f, 3211 CAST(COALESCE(ma.ld_from, '') AS VARCHAR(255)) AS ld_f,
3201 CAST(COALESCE(ma.ld_to, '') AS VARCHAR(255)) AS ld_t, 3212 CAST(COALESCE(ma.ld_to, '') AS VARCHAR(255)) AS ld_t,
3202 o.name AS out_name, 3213 o.name AS out_name,
3203 o.id AS out_id, 3214 o.id AS out_id,
3204 f.name AS facet_name, 3215 f.name AS
3216 facet_name,
3205 f.num AS facet_num, 3217 f.num AS facet_num,
3206 f.description AS facet_description, 3218 f.description AS facet_description,
3207 f.id AS fid 3219 f.id AS fid
3208 FROM users u 3220 FROM users u
3209 JOIN 3221 JOIN
3213 JOIN facets f ON f.out_id = o.id 3225 JOIN facets f ON f.out_id = o.id
3214 WHERE u.gid = CAST(${user-id} AS UUID) 3226 WHERE u.gid = CAST(${user-id} AS UUID)
3215 AND ma.gid &lt;&gt; CAST(${artifact-id} AS uuid) 3227 AND ma.gid &lt;&gt; CAST(${artifact-id} AS uuid)
3216 AND f.name NOT LIKE '%empty.facet%' 3228 AND f.name NOT LIKE '%empty.facet%'
3217 AND EXISTS ( 3229 AND EXISTS (
3218 SELECT id 3230 SELECT
3231 id
3219 FROM artifact_data ad 3232 FROM artifact_data ad
3220 WHERE ad.artifact_id = ma.id 3233 WHERE ad.artifact_id = ma.id
3221 AND k = 'river' 3234 AND k = 'river'
3222 AND v = ${river}) 3235 AND v = ${river})
3223 </dc:statement> 3236 </dc:statement>
3224 <dc:virtual-column name="deffrom" type="number" expr="dc:fromValue($ld_m, $ld_l, $ld_f)"> 3237 <dc:virtual-column name="deffrom" type="number" expr="dc:fromValue($ld_m, $ld_l, $ld_f)">
3225 <dc:virtual-column name="defto" type="number" expr="dc:toValue($ld_m, $ld_l, $ld_t)"> 3238 <dc:virtual-column name="defto" type="number" expr="dc:toValue($ld_m, $ld_l, $ld_t)">
3226 <dc:macro-body/> 3239 <dc:macro-body />
3227 </dc:virtual-column> 3240 </dc:virtual-column>
3228 </dc:virtual-column> 3241 </dc:virtual-column>
3229 </dc:context> 3242 </dc:context>
3230 </dc:macro> 3243 </dc:macro>
3231 3244
3234 Apply KM Filtering but pass 3247 Apply KM Filtering but pass
3235 sq_ facets with no regard about their location. 3248 sq_ facets with no regard about their location.
3236 </dc:comment> 3249 </dc:comment>
3237 <dc:filter expr="not($deffrom &gt; $tokm or $defto &lt; $fromkm) or 3250 <dc:filter expr="not($deffrom &gt; $tokm or $defto &lt; $fromkm) or
3238 starts-with($facet_name, 'sq_')"> 3251 starts-with($facet_name, 'sq_')">
3239 <dc:macro-body/> 3252 <dc:macro-body />
3240 </dc:filter> 3253 </dc:filter>
3241 </dc:macro> 3254 </dc:macro>
3242 3255
3243 <dc:macro name="artifact-range"> 3256 <dc:macro name="artifact-range">
3244 <dc:choose> 3257 <dc:choose>
3245 <dc:when test="dc:coalesce(dc:get('ld_locations'), ' ') != ' '"> 3258 <dc:when test="dc:coalesce(dc:get('ld_locations'), ' ') != ' '">
3246 <dc:variable name="fromkm" type="number" expr="dc:min-number(dc:find-all('\d*\.?\d*', 3259 <dc:variable name="fromkm" type="number" expr="dc:min-number(dc:find-all('\d*\.?\d*',
3247 dc:get('ld_locations')))"/> 3260 dc:get('ld_locations')))" />
3248 <dc:variable name="tokm" type="number" expr="dc:max-number(dc:find-all('\d*\.?\d*', 3261 <dc:variable name="tokm" type="number" expr="dc:max-number(dc:find-all('\d*\.?\d*',
3249 dc:get('ld_locations')))"/> 3262 dc:get('ld_locations')))" />
3250 </dc:when> 3263 </dc:when>
3251 <dc:otherwise> 3264 <dc:otherwise>
3252 <dc:variable name="fromkm" type="number" expr="dc:fromValue(dc:get('ld_mode'), 3265 <dc:variable name="fromkm" type="number" expr="dc:fromValue(dc:get('ld_mode'),
3253 dc:get('ld_locations'), dc:get('ld_from'))"/> 3266 dc:get('ld_locations'), dc:get('ld_from'))" />
3254 <dc:variable name="tokm" type="number" expr="dc:toValue(dc:get('ld_mode'), 3267 <dc:variable name="tokm" type="number" expr="dc:toValue(dc:get('ld_mode'),
3255 dc:get('ld_locations'), dc:get('ld_to'))"/> 3268 dc:get('ld_locations'), dc:get('ld_to'))" />
3256 <dc:if test="$fromkm > $tokm"> 3269 <dc:if test="$fromkm > $tokm">
3257 <dc:message>Inverting KM filter.</dc:message> 3270 <dc:message>Inverting KM filter.</dc:message>
3258 <dc:variable name="fromkm" type="number" expr="dc:toValue(dc:get('ld_mode'), 3271 <dc:variable name="fromkm" type="number" expr="dc:toValue(dc:get('ld_mode'),
3259 dc:get('ld_locations'), dc:get('ld_to'))"/> 3272 dc:get('ld_locations'), dc:get('ld_to'))" />
3260 <dc:variable name="tokm" type="number" expr="dc:fromValue(dc:get('ld_mode'), 3273 <dc:variable name="tokm" type="number" expr="dc:fromValue(dc:get('ld_mode'),
3261 dc:get('ld_locations'), dc:get('ld_from'))"/> 3274 dc:get('ld_locations'), dc:get('ld_from'))" />
3262 </dc:if> 3275 </dc:if>
3263 </dc:otherwise> 3276 </dc:otherwise>
3264 </dc:choose> 3277 </dc:choose>
3265 <dc:macro-body/> 3278 <dc:macro-body />
3266 </dc:macro> 3279 </dc:macro>
3267 3280
3268 <dc:macro name="sinfo_flowdepths"> 3281 <dc:macro name="sinfo_flowdepths">
3269 <dc:filter expr="$a_state = 'state.sinfo.flow_depth' and 3282 <dc:filter expr="$a_state = 'state.sinfo.flow_depth' and
3270 ( $facet_name = 'sinfo_facet_flow_depth' or $facet_name = 'sinfo_facet_flow_depth.filtered' or 3283 ( $facet_name = 'sinfo_facet_flow_depth' or $facet_name = 'sinfo_facet_flow_depth.filtered' or
3274 <sinfo_flow_depths> 3287 <sinfo_flow_depths>
3275 <dc:call-macro name="collection-group"> 3288 <dc:call-macro name="collection-group">
3276 <sinfo_flow_depth description="{dc:group-key()}"> 3289 <sinfo_flow_depth description="{dc:group-key()}">
3277 <dc:for-each> 3290 <dc:for-each>
3278 <dc:element name="${facet_name}"> 3291 <dc:element name="${facet_name}">
3279 <dc:attribute name="factory" value="sinfo"/> 3292 <dc:attribute name="factory" value="sinfo" />
3280 <dc:attribute name="target_out" value="${out}"/> 3293 <dc:attribute name="target_out" value="${out}" />
3281 <dc:attribute name="description" value="${facet_description}"/> 3294 <dc:attribute name="description" value="${facet_description}" />
3282 <dc:attribute name="ids" value="${facet_num}"/> 3295 <dc:attribute name="ids" value="${facet_num}" />
3283 <dc:attribute name="artifact-id" value="${a_gid}"/> 3296 <dc:attribute name="artifact-id" value="${a_gid}" />
3284 <dc:attribute name="out" value="${out_name}"/> 3297 <dc:attribute name="out" value="${out_name}" />
3285 </dc:element> 3298 </dc:element>
3286 </dc:for-each> 3299 </dc:for-each>
3287 </sinfo_flow_depth> 3300 </sinfo_flow_depth>
3288 </dc:call-macro> 3301 </dc:call-macro>
3289 </sinfo_flow_depths> 3302 </sinfo_flow_depths>
3299 <sinfo_flow_depths_minmax> 3312 <sinfo_flow_depths_minmax>
3300 <dc:call-macro name="collection-group"> 3313 <dc:call-macro name="collection-group">
3301 <sinfo_flow_depth_minmax description="{dc:group-key()}"> 3314 <sinfo_flow_depth_minmax description="{dc:group-key()}">
3302 <dc:for-each> 3315 <dc:for-each>
3303 <dc:element name="${facet_name}"> 3316 <dc:element name="${facet_name}">
3304 <dc:attribute name="factory" value="sinfo"/> 3317 <dc:attribute name="factory" value="sinfo" />
3305 <dc:attribute name="target_out" value="${out}"/> 3318 <dc:attribute name="target_out" value="${out}" />
3306 <dc:attribute name="description" value="${facet_description}"/> 3319 <dc:attribute name="description" value="${facet_description}" />
3307 <dc:attribute name="ids" value="${facet_num}"/> 3320 <dc:attribute name="ids" value="${facet_num}" />
3308 <dc:attribute name="artifact-id" value="${a_gid}"/> 3321 <dc:attribute name="artifact-id" value="${a_gid}" />
3309 <dc:attribute name="out" value="${out_name}"/> 3322 <dc:attribute name="out" value="${out_name}" />
3310 </dc:element> 3323 </dc:element>
3311 </dc:for-each> 3324 </dc:for-each>
3312 </sinfo_flow_depth_minmax> 3325 </sinfo_flow_depth_minmax>
3313 </dc:call-macro> 3326 </dc:call-macro>
3314 </sinfo_flow_depths_minmax> 3327 </sinfo_flow_depths_minmax>
3315 </dc:if> 3328 </dc:if>
3316 </dc:filter> 3329 </dc:filter>
3317 </dc:macro> 3330 </dc:macro>
3318 3331
3319 <dc:macro name="sinfo_flow_depth_development"> 3332 <dc:macro name="sinfo_flow_depth_development">
3320 <dc:filter expr="$a_state = 'state.sinfo.flow_depth_development' and 3333 <dc:filter
3334 expr="$a_state = 'state.sinfo.flow_depth_development' and
3321 ( $facet_name = 'sinfo_facet_flow_depth_development' or $facet_name = 'sinfo_facet_flow_depth_development.filtered' or 3335 ( $facet_name = 'sinfo_facet_flow_depth_development' or $facet_name = 'sinfo_facet_flow_depth_development.filtered' or
3322 $facet_name = 'sinfo_facet_flow_depth_development_per_year' or $facet_name = 'sinfo_facet_flow_depth_development_per_year.filtered' or 3336 $facet_name = 'sinfo_facet_flow_depth_development_per_year' or $facet_name = 'sinfo_facet_flow_depth_development_per_year.filtered' or
3323 $facet_name = 'sinfo_facet_flow_depth_current' or $facet_name = 'sinfo_facet_flow_depth_current.filtered' or 3337 $facet_name = 'sinfo_facet_flow_depth_current' or $facet_name = 'sinfo_facet_flow_depth_current.filtered' or
3324 $facet_name = 'sinfo_facet_flow_depth_historical' or $facet_name = 'sinfo_facet_flow_depth_historical.filtered' or 3338 $facet_name = 'sinfo_facet_flow_depth_historical' or $facet_name = 'sinfo_facet_flow_depth_historical.filtered' or
3325 $facet_name = 'sinfo_facet_waterlevel_difference' or $facet_name = 'sinfo_facet_waterlevel_difference.filtered' or 3339 $facet_name = 'sinfo_facet_waterlevel_difference' or $facet_name = 'sinfo_facet_waterlevel_difference.filtered' or
3328 <sinfo_flow_depth_developments> 3342 <sinfo_flow_depth_developments>
3329 <dc:call-macro name="collection-group"> 3343 <dc:call-macro name="collection-group">
3330 <sinfo_flow_depth_development description="{dc:group-key()}"> 3344 <sinfo_flow_depth_development description="{dc:group-key()}">
3331 <dc:for-each> 3345 <dc:for-each>
3332 <dc:element name="${facet_name}"> 3346 <dc:element name="${facet_name}">
3333 <dc:attribute name="factory" value="sinfo"/> 3347 <dc:attribute name="factory" value="sinfo" />
3334 <dc:attribute name="target_out" value="${out}"/> 3348 <dc:attribute name="target_out" value="${out}" />
3335 <dc:attribute name="description" value="${facet_description}"/> 3349 <dc:attribute name="description" value="${facet_description}" />
3336 <dc:attribute name="ids" value="${facet_num}"/> 3350 <dc:attribute name="ids" value="${facet_num}" />
3337 <dc:attribute name="artifact-id" value="${a_gid}"/> 3351 <dc:attribute name="artifact-id" value="${a_gid}" />
3338 <dc:attribute name="out" value="${out_name}"/> 3352 <dc:attribute name="out" value="${out_name}" />
3339 </dc:element> 3353 </dc:element>
3340 </dc:for-each> 3354 </dc:for-each>
3341 </sinfo_flow_depth_development> 3355 </sinfo_flow_depth_development>
3342 </dc:call-macro> 3356 </dc:call-macro>
3343 </sinfo_flow_depth_developments> 3357 </sinfo_flow_depth_developments>
3344 </dc:if> 3358 </dc:if>
3345 </dc:filter> 3359 </dc:filter>
3346 </dc:macro> 3360 </dc:macro>
3347 3361
3348 <!--
3349 <dc:macro name="sinfo_waterlevel_difference">
3350 <dc:filter expr="$facet_name = 'sinfo_facet_waterlevel_difference.filtered'">
3351 <dc:if test="dc:has-result()">
3352 <sinfo_waterlevel_differences>
3353 <dc:call-macro name="collection-group">
3354 <sinfo_waterlevel_difference description="{dc:group-key()}">
3355 <dc:for-each>
3356 <dc:element name="${facet_name}">
3357 <dc:attribute name="factory" value="sinfo"/>
3358 <dc:attribute name="target_out" value="${out}"/>
3359 <dc:attribute name="description" value="${facet_description}"/>
3360 <dc:attribute name="ids" value="${facet_num}"/>
3361 <dc:attribute name="artifact-id" value="${a_gid}"/>
3362 <dc:attribute name="out" value="${out_name}"/>
3363 </dc:element>
3364 </dc:for-each>
3365 </sinfo_waterlevel_difference>
3366 </dc:call-macro>
3367 </sinfo_waterlevel_differences>
3368 </dc:if>
3369 </dc:filter>
3370 </dc:macro>
3371 -->
3372
3373 <!--
3374 <dc:macro name="sinfo_bedheight_difference">
3375 <dc:filter expr="$facet_name = 'sinfo_facet_bedheight_difference.filtered'">
3376 <dc:if test="dc:has-result()">
3377 <sinfo_bedheight_differences>
3378 <dc:call-macro name="collection-group">
3379 <sinfo_bedheight_difference description="{dc:group-key()}">
3380 <dc:for-each>
3381 <dc:element name="${facet_name}">
3382 <dc:attribute name="factory" value="sinfo"/>
3383 <dc:attribute name="target_out" value="${out}"/>
3384 <dc:attribute name="description" value="${facet_description}"/>
3385 <dc:attribute name="ids" value="${facet_num}"/>
3386 <dc:attribute name="artifact-id" value="${a_gid}"/>
3387 <dc:attribute name="out" value="${out_name}"/>
3388 </dc:element>
3389 </dc:for-each>
3390 </sinfo_bedheight_difference>
3391 </dc:call-macro>
3392 </sinfo_bedheight_differences>
3393 </dc:if>
3394 </dc:filter>
3395 </dc:macro>
3396 -->
3397
3398 <dc:macro name="sinfo_tkh"> 3362 <dc:macro name="sinfo_tkh">
3399 <dc:filter expr="$a_state = 'state.sinfo.transport_bodies_heights' and 3363 <dc:filter
3364 expr="$a_state = 'state.sinfo.transport_bodies_heights' and
3400 ( $facet_name = 'sinfo_facet_tkh' or 3365 ( $facet_name = 'sinfo_facet_tkh' or
3401 $facet_name = 'sinfo_facet_flow_depth' or $facet_name = 'sinfo_facet_flow_depth.filtered' or 3366 $facet_name = 'sinfo_facet_flow_depth' or $facet_name = 'sinfo_facet_flow_depth.filtered' or
3402 $facet_name = 'sinfo_facet_velocity' or $facet_name = 'sinfo_facet_velocity.filtered' or 3367 $facet_name = 'sinfo_facet_velocity' or $facet_name = 'sinfo_facet_velocity.filtered' or
3403 $facet_name = 'sinfo_facet_tau' or $facet_name = 'sinfo_facet_tau.filtered' or 3368 $facet_name = 'sinfo_facet_tau' or $facet_name = 'sinfo_facet_tau.filtered' or
3404 $facet_name = 'sinfo_facet_d50' or $facet_name = 'sinfo_facet_d50.filtered' )"> 3369 $facet_name = 'sinfo_facet_d50' or $facet_name = 'sinfo_facet_d50.filtered' )">
3406 <sinfo_tkhs> 3371 <sinfo_tkhs>
3407 <dc:call-macro name="collection-group"> 3372 <dc:call-macro name="collection-group">
3408 <sinfo_tkh description="{dc:group-key()}"> 3373 <sinfo_tkh description="{dc:group-key()}">
3409 <dc:for-each> 3374 <dc:for-each>
3410 <dc:element name="${facet_name}"> 3375 <dc:element name="${facet_name}">
3411 <dc:attribute name="factory" value="sinfo"/> 3376 <dc:attribute name="factory" value="sinfo" />
3412 <dc:attribute name="target_out" value="${out}"/> 3377 <dc:attribute name="target_out" value="${out}" />
3413 <dc:attribute name="description" value="${facet_description}"/> 3378 <dc:attribute name="description" value="${facet_description}" />
3414 <dc:attribute name="ids" value="${facet_num}"/> 3379 <dc:attribute name="ids" value="${facet_num}" />
3415 <dc:attribute name="artifact-id" value="${a_gid}"/> 3380 <dc:attribute name="artifact-id" value="${a_gid}" />
3416 <dc:attribute name="out" value="${out_name}"/> 3381 <dc:attribute name="out" value="${out_name}" />
3417 </dc:element> 3382 </dc:element>
3418 </dc:for-each> 3383 </dc:for-each>
3419 </sinfo_tkh> 3384 </sinfo_tkh>
3420 </dc:call-macro> 3385 </dc:call-macro>
3421 </sinfo_tkhs> 3386 </sinfo_tkhs>
3431 MIN(s.filename) || '&lt;br /&gt;' 3396 MIN(s.filename) || '&lt;br /&gt;'
3432 || MIN(s.kmrange_info) || ']&lt;br /&gt;' 3397 || MIN(s.kmrange_info) || ']&lt;br /&gt;'
3433 || MIN(s.year_from) || ' - ' || MIN(s.year_to) || '&lt;br /&gt;' AS info 3398 || MIN(s.year_from) || ' - ' || MIN(s.year_to) || '&lt;br /&gt;' AS info
3434 FROM channel s INNER JOIN channel_values v ON s.id=v.channel_id 3399 FROM channel s INNER JOIN channel_values v ON s.id=v.channel_id
3435 WHERE (s.river_id=${river_id}) 3400 WHERE (s.river_id=${river_id})
3436 AND (v.station BETWEEN ${fromkm}-0.0001 AND ${tokm}+0.0001) 3401 AND (v.station BETWEEN
3402 ${fromkm}-0.0001 AND ${tokm}+0.0001)
3437 GROUP BY s.id 3403 GROUP BY s.id
3438 ORDER BY MIN(s.year_to) DESC; 3404 ORDER BY MIN(s.year_to) DESC;
3439 </dc:statement> 3405 </dc:statement>
3440 <dc:if test="dc:has-result()"> 3406 <dc:if test="dc:has-result()">
3441 <dc:for-each> 3407 <dc:for-each>
3442 <channelseries name="{$seriesname}" ids="channelx-{$id}-{$seriesname}" factory="channelf" target_out="{$out}" info="{$info}"/> 3408 <channelseries name="{$seriesname}" ids="channelx-{$id}-{$seriesname}" factory="channelf" target_out="{$out}" info="{$info}" />
3443 </dc:for-each> 3409 </dc:for-each>
3444 </dc:if> 3410 </dc:if>
3445 </dc:context> 3411 </dc:context>
3446 </dc:macro> 3412 </dc:macro>
3447 3413
3448 <!-- tkh imported from CSV-files for S-INFO --> 3414 <!-- tkh imported from CSV-files for S-INFO -->
3449 <dc:macro name="sinfo_predefined_tkh-berechnung"> 3415 <dc:macro name="sinfo_predefined_tkh-berechnung">
3450 <predefined_tkh_berechnung> 3416 <predefined_tkh_berechnung>
3451 <dc:variable name="tkh_groupname" expr="'berechnung'"/> 3417 <dc:variable name="tkh_groupname" expr="'berechnung'" />
3452 <dc:call-macro name="sinfo_predefined_tkh"/> 3418 <dc:call-macro name="sinfo_predefined_tkh" />
3453 </predefined_tkh_berechnung> 3419 </predefined_tkh_berechnung>
3454 </dc:macro> 3420 </dc:macro>
3455 3421
3456 <dc:macro name="sinfo_predefined_tkh-messung"> 3422 <dc:macro name="sinfo_predefined_tkh-messung">
3457 <predefined_tkh_messung> 3423 <predefined_tkh_messung>
3458 <dc:variable name="tkh_groupname" expr="'messung'"/> 3424 <dc:variable name="tkh_groupname" expr="'messung'" />
3459 <dc:call-macro name="sinfo_predefined_tkh"/> 3425 <dc:call-macro name="sinfo_predefined_tkh" />
3460 </predefined_tkh_messung> 3426 </predefined_tkh_messung>
3461 </dc:macro> 3427 </dc:macro>
3462 3428
3463 <dc:macro name="sinfo_predefined_tkh"> 3429 <dc:macro name="sinfo_predefined_tkh">
3464 <dc:context> 3430 <dc:context>
3468 MIN(s.filename) || '&lt;br /&gt;' 3434 MIN(s.filename) || '&lt;br /&gt;'
3469 || MIN(s.kmrange_info) || ']&lt;br /&gt;' 3435 || MIN(s.kmrange_info) || ']&lt;br /&gt;'
3470 || MIN(s.sounding_info) || '&lt;br /&gt;' 3436 || MIN(s.sounding_info) || '&lt;br /&gt;'
3471 || MIN(s.evaluation_by) AS info 3437 || MIN(s.evaluation_by) AS info
3472 FROM tkh_column sc INNER JOIN tkh s ON sc.tkh_id=s.id 3438 FROM tkh_column sc INNER JOIN tkh s ON sc.tkh_id=s.id
3473 INNER JOIN tkh_values v ON sc.id=v.tkh_column_id 3439 INNER JOIN tkh_values
3440 v ON sc.id=v.tkh_column_id
3474 WHERE (s.river_id=${river_id}) 3441 WHERE (s.river_id=${river_id})
3475 AND (lower(s.groupname)=${tkh_groupname}) 3442 AND (lower(s.groupname)=${tkh_groupname})
3476 AND (v.station BETWEEN ${fromkm}-0.0001 AND ${tokm}+0.0001) 3443 AND (v.station BETWEEN ${fromkm}-0.0001 AND ${tokm}+0.0001)
3477 GROUP BY sc.tkh_id, sc.id 3444 GROUP BY sc.tkh_id, sc.id
3478 ORDER BY sc.id 3445 ORDER BY sc.id
3479 </dc:statement> 3446 </dc:statement>
3480 <dc:if test="dc:has-result()"> 3447 <dc:if test="dc:has-result()">
3481 <dc:group expr="$tkh_name"> 3448 <dc:group expr="$tkh_name">
3482 <tkhx name="{dc:group-key()}"> 3449 <tkhx name="{dc:group-key()}">
3483 <dc:for-each> 3450 <dc:for-each>
3484 <tkhcolumn name="{$tkh_col_name}" ids="tkhx-{$tkh_col_id}-{$tkh_id}" factory="tkhxf" target_out="{$out}" info="{$info}"/> 3451 <tkhcolumn name="{$tkh_col_name}" ids="tkhx-{$tkh_col_id}-{$tkh_id}" factory="tkhxf" target_out="{$out}" info="{$info}" />
3485 </dc:for-each> 3452 </dc:for-each>
3486 </tkhx> 3453 </tkhx>
3487 </dc:group> 3454 </dc:group>
3488 </dc:if> 3455 </dc:if>
3489 </dc:context> 3456 </dc:context>
3490 </dc:macro> 3457 </dc:macro>
3491 3458
3492 <!-- depth_evolution imported from CSV-files for S-INFO --> 3459 <!-- depth_evolution imported from CSV-files for S-INFO -->
3493 <dc:macro name="sinfo_predefined_depthevol-aktuell"> 3460 <dc:macro name="sinfo_predefined_depthevol-aktuell">
3494 <predefined_depthevol_aktuell> 3461 <predefined_depthevol_aktuell>
3495 <dc:variable name="depthevol_groupname" expr="'aktuell'"/> 3462 <dc:variable name="depthevol_groupname" expr="'aktuell'" />
3496 <dc:call-macro name="sinfo_predefined_depthevol"/> 3463 <dc:call-macro name="sinfo_predefined_depthevol" />
3497 </predefined_depthevol_aktuell> 3464 </predefined_depthevol_aktuell>
3498 </dc:macro> 3465 </dc:macro>
3499 3466
3500 <dc:macro name="sinfo_predefined_depthevol-etappe"> 3467 <dc:macro name="sinfo_predefined_depthevol-etappe">
3501 <predefined_depthevol_etappe> 3468 <predefined_depthevol_etappe>
3502 <dc:variable name="depthevol_groupname" expr="'etappe'"/> 3469 <dc:variable name="depthevol_groupname" expr="'etappe'" />
3503 <dc:call-macro name="sinfo_predefined_depthevol"/> 3470 <dc:call-macro name="sinfo_predefined_depthevol" />
3504 </predefined_depthevol_etappe> 3471 </predefined_depthevol_etappe>
3505 </dc:macro> 3472 </dc:macro>
3506 3473
3507 <dc:macro name="sinfo_predefined_depthevol"> 3474 <dc:macro name="sinfo_predefined_depthevol">
3508 <dc:context> 3475 <dc:context>
3510 SELECT s.id AS depthevol_id, MIN(s.filename) AS depthevol_name, MIN(v.station) AS km_min, MAX(v.station) AS km_max, 3477 SELECT s.id AS depthevol_id, MIN(s.filename) AS depthevol_name, MIN(v.station) AS km_min, MAX(v.station) AS km_max,
3511 MIN(s.filename) || '&lt;br /&gt;' 3478 MIN(s.filename) || '&lt;br /&gt;'
3512 || MIN(s.kmrange_info) || ']&lt;br /&gt;' 3479 || MIN(s.kmrange_info) || ']&lt;br /&gt;'
3513 || MIN(s.start_year) || ' - ' || MIN(s.reference_year) || '&lt;br /&gt;' 3480 || MIN(s.start_year) || ' - ' || MIN(s.reference_year) || '&lt;br /&gt;'
3514 || MIN(s.old_sounding) || ' - ' || MIN(s.curr_sounding) || '&lt;br /&gt;' 3481 || MIN(s.old_sounding) || ' - ' || MIN(s.curr_sounding) || '&lt;br /&gt;'
3515 || MIN(s.old_glw) || ' - ' || MIN(s.curr_glw) AS info 3482 || MIN(s.old_glw) || ' - ' ||
3483 MIN(s.curr_glw) AS info
3516 FROM depth_evolution s INNER JOIN depth_evolution_values v ON s.id=v.depth_evolution_id 3484 FROM depth_evolution s INNER JOIN depth_evolution_values v ON s.id=v.depth_evolution_id
3517 WHERE (s.river_id=${river_id}) 3485 WHERE (s.river_id=${river_id})
3518 AND (lower(s.groupname)=${depthevol_groupname}) 3486 AND (lower(s.groupname)=${depthevol_groupname})
3519 AND (v.station BETWEEN ${fromkm}-0.0001 AND ${tokm}+0.0001) 3487 AND (v.station BETWEEN ${fromkm}-0.0001 AND ${tokm}+0.0001)
3520 GROUP BY s.id 3488 GROUP BY s.id
3521 ORDER BY s.id 3489 ORDER BY s.id
3522 </dc:statement> 3490 </dc:statement>
3523 <dc:for-each> 3491 <dc:for-each>
3524 <depth_evol name="{$depthevol_name}" ids="depthevolx-{$depthevol_id}-{$depthevol_name}" factory="depthevolxf" target_out="{$out}" info="{$info}"/> 3492 <depth_evol name="{$depthevol_name}" ids="depthevolx-{$depthevol_id}-{$depthevol_name}" factory="depthevolxf" target_out="{$out}" info="{$info}" />
3525 </dc:for-each> 3493 </dc:for-each>
3526 </dc:context> 3494 </dc:context>
3527 </dc:macro> 3495 </dc:macro>
3528 3496
3529 <!-- flow depth imported from CSV-files for S-INFO --> 3497 <!-- flow depth imported from CSV-files for S-INFO -->
3530 <dc:macro name="sinfo_predefined_flowdepth-m"> 3498 <dc:macro name="sinfo_predefined_flowdepth-m">
3531 <dc:call-macro name="sinfo_predefined_flowdepth-m1"/> 3499 <dc:call-macro name="sinfo_predefined_flowdepth-m1" />
3532 </dc:macro> 3500 </dc:macro>
3533 3501
3534 <dc:macro name="sinfo_predefined_flowdepth-m1"> 3502 <dc:macro name="sinfo_predefined_flowdepth-m1">
3535 <dc:context> 3503 <dc:context>
3536 <dc:statement> 3504 <dc:statement>
3538 MIN(s.filename) AS flowdepth_name, MIN(v.station) AS km_min, MAX(v.station) AS km_max, 3506 MIN(s.filename) AS flowdepth_name, MIN(v.station) AS km_min, MAX(v.station) AS km_max,
3539 MIN(s.filename) || '&lt;br /&gt;' 3507 MIN(s.filename) || '&lt;br /&gt;'
3540 || MIN(s.kmrange_info) || ']&lt;br /&gt;' 3508 || MIN(s.kmrange_info) || ']&lt;br /&gt;'
3541 || MIN(s.sounding_info) || '&lt;br /&gt;' 3509 || MIN(s.sounding_info) || '&lt;br /&gt;'
3542 || MIN(s.evaluation_by) AS info 3510 || MIN(s.evaluation_by) AS info
3543 FROM flow_depth_column sc INNER JOIN flow_depth s ON sc.flow_depth_id=s.id 3511 FROM flow_depth_column sc INNER JOIN
3512 flow_depth s ON sc.flow_depth_id=s.id
3544 INNER JOIN flow_depth_values v ON sc.id=v.flow_depth_column_id 3513 INNER JOIN flow_depth_values v ON sc.id=v.flow_depth_column_id
3545 WHERE (s.river_id=${river_id}) 3514 WHERE (s.river_id=${river_id})
3546 AND (v.station BETWEEN ${fromkm}-0.0001 AND ${tokm}+0.0001) 3515 AND (v.station BETWEEN ${fromkm}-0.0001 AND ${tokm}+0.0001)
3547 GROUP BY sc.flow_depth_id, sc.id 3516 GROUP BY sc.flow_depth_id, sc.id
3548 ORDER BY sc.id 3517 ORDER BY sc.id
3549 </dc:statement> 3518 </dc:statement>
3550 <dc:if test="dc:has-result()"> 3519 <dc:if test="dc:has-result()">
3551 <dc:group expr="$flowdepth_name"> 3520 <dc:group expr="$flowdepth_name">
3552 <sinfo_predefined_flowdepth> 3521 <sinfo_predefined_flowdepth>
3553 <dc:for-each> 3522 <dc:for-each>
3554 <flowdepthcolumn name="{$flowdepth_col_name}" ids="flowdepthx-{$flowdepth_col_id}-{$flowdepth_id}" factory="flowdepthxf" target_out="{$out}" info="{$info}"/> 3523 <flowdepthcolumn name="{$flowdepth_col_name}" ids="flowdepthx-{$flowdepth_col_id}-{$flowdepth_id}" factory="flowdepthxf" target_out="{$out}" info="{$info}" />
3555 </dc:for-each> 3524 </dc:for-each>
3556 </sinfo_predefined_flowdepth> 3525 </sinfo_predefined_flowdepth>
3557 </dc:group> 3526 </dc:group>
3558 </dc:if> 3527 </dc:if>
3559 </dc:context> 3528 </dc:context>
3567 MIN(x.name) AS typename, 3536 MIN(x.name) AS typename,
3568 MIN(s.filename) || '&lt;br /&gt;' 3537 MIN(s.filename) || '&lt;br /&gt;'
3569 || MIN(s.kmrange_info) || '&lt;br /&gt;' 3538 || MIN(s.kmrange_info) || '&lt;br /&gt;'
3570 || MIN(s.year) || '&lt;br /&gt;' AS info 3539 || MIN(s.year) || '&lt;br /&gt;' AS info
3571 FROM infrastructure s INNER JOIN infrastructure_values v ON s.id=v.infrastructure_id 3540 FROM infrastructure s INNER JOIN infrastructure_values v ON s.id=v.infrastructure_id
3572 INNER JOIN annotation_types x ON s.annotation_type_id=x.id 3541 INNER JOIN annotation_types x ON
3542 s.annotation_type_id=x.id
3573 WHERE (s.river_id=${river_id}) 3543 WHERE (s.river_id=${river_id})
3574 AND (v.station BETWEEN ${fromkm}-0.0001 AND ${tokm}+0.0001) 3544 AND (v.station BETWEEN ${fromkm}-0.0001 AND ${tokm}+0.0001)
3575 GROUP BY s.id 3545 GROUP BY s.id
3576 ORDER BY MIN(s.filename) DESC; 3546 ORDER BY MIN(s.filename) DESC;
3577 </dc:statement> 3547 </dc:statement>
3578 <dc:if test="dc:has-result()"> 3548 <dc:if test="dc:has-result()">
3579 <dc:for-each> 3549 <dc:for-each>
3580 <infrastructureseries name="{$seriesname}" ids="infrastructurex-{$id}-{$seriesname}" factory="infrastructuref" target_out="{$out}" info="{$info}"/> 3550 <infrastructureseries name="{$seriesname}" ids="infrastructurex-{$id}-{$seriesname}" factory="infrastructuref" target_out="{$out}" info="{$info}" />
3581 </dc:for-each> 3551 </dc:for-each>
3582 </dc:if> 3552 </dc:if>
3583 </dc:context> 3553 </dc:context>
3584 </dc:macro> 3554 </dc:macro>
3585 3555
3591 MIN(s.filename) || '&lt;br /&gt;' 3561 MIN(s.filename) || '&lt;br /&gt;'
3592 || MIN(s.kmrange_info) || '&lt;br /&gt;' 3562 || MIN(s.kmrange_info) || '&lt;br /&gt;'
3593 || MIN(s.year) || '&lt;br /&gt;' AS info 3563 || MIN(s.year) || '&lt;br /&gt;' AS info
3594 FROM collision s INNER JOIN collision_values v ON s.id=v.collision_id 3564 FROM collision s INNER JOIN collision_values v ON s.id=v.collision_id
3595 WHERE (s.river_id=${river_id}) 3565 WHERE (s.river_id=${river_id})
3596 AND (v.station BETWEEN ${fromkm}-0.0001 AND ${tokm}+0.0001) 3566 AND (v.station BETWEEN ${fromkm}-0.0001 AND
3567 ${tokm}+0.0001)
3597 GROUP BY s.id 3568 GROUP BY s.id
3598 ORDER BY MIN(s.year) ASC; 3569 ORDER BY MIN(s.year) ASC;
3599 </dc:statement> 3570 </dc:statement>
3600 <dc:if test="dc:has-result()"> 3571 <dc:if test="dc:has-result()">
3601 <dc:for-each> 3572 <dc:for-each>
3602 <collisionseries name="{$seriesname}" ids="collisionx-{$id}-{$year}-{${$seriesname}" factory="collisionf" target_out="{$out}" info="{$info}"/> 3573 <collisionseries name="{$seriesname}" ids="collisionx-{$id}-{$year}-{$seriesname}" factory="collisionf" target_out="{$out}" info="{$info}" />
3603 </dc:for-each> 3574 </dc:for-each>
3604 </dc:if> 3575 </dc:if>
3605 </dc:context> 3576 </dc:context>
3606 </dc:macro> 3577 </dc:macro>
3607 3578
3608 </datacage> 3579 </datacage>
3609 </dc:template> 3580 </dc:template>

http://dive4elements.wald.intevation.org