comparison artifacts/doc/conf/meta-data.xml @ 8306:33d90858b2dc

Remove duplications from discharge prototypes and put it all together.
author "Tom Gottfried <tom@intevation.de>"
date Mon, 22 Sep 2014 18:17:47 +0200
parents 2869a2e482e5
children 60212ed56023
comparison
equal deleted inserted replaced
8305:f5ed7698c4db 8306:33d90858b2dc
180 <dc:call-macro name="longitudinal-section-prototype"/> 180 <dc:call-macro name="longitudinal-section-prototype"/>
181 </dc:when> 181 </dc:when>
182 <dc:comment> Discharge curves </dc:comment> 182 <dc:comment> Discharge curves </dc:comment>
183 <dc:when test="$out = 'historical_discharge_wq'"> 183 <dc:when test="$out = 'historical_discharge_wq'">
184 <dc:call-macro name="discharge-curve-prototype"/> 184 <dc:call-macro name="discharge-curve-prototype"/>
185 <dc:call-macro name="basedata_5_flood-protections"/>
186 <dc:call-macro name="basedata_0"/>
187 <dc:call-macro name="basedata_1_additionals"/>
188 <dc:call-macro name="basedata_4_heightmarks-points"/>
189 <computed_discharge_curve>
190 <dc:call-macro name="mainvalues"/>
191 </computed_discharge_curve>
192 </dc:when> 185 </dc:when>
193 <dc:when test="$out = 'discharge_curve'"> 186 <dc:when test="$out = 'discharge_curve'">
194 <dc:call-macro name="discharge-prototype"/> 187 <dc:call-macro name="discharge-curve-prototype"/>
195 <computed_discharge_curve>
196 <dc:call-macro name="mainvalues"/>
197 </computed_discharge_curve>
198 </dc:when> 188 </dc:when>
199 <dc:when test="$out = 'fix_wq_curve'"> 189 <dc:when test="$out = 'fix_wq_curve'">
200 <dc:call-macro name="discharge-prototype"/> 190 <dc:call-macro name="discharge-curve-prototype"/>
201 </dc:when> 191 </dc:when>
202 <dc:when test="$out = 'computed_discharge_curve'"> 192 <dc:when test="$out = 'computed_discharge_curve'">
203 <dc:call-macro name="discharge-curve-prototype"/> 193 <dc:call-macro name="discharge-curve-prototype"/>
204 <dc:call-macro name="basedata_0_wq"/>
205 <dc:call-macro name="basedata_1_additionals_wq"/>
206 <dc:call-macro name="basedata_5_flood-protections"/>
207 <computed_discharge_curve>
208 <dc:call-macro name="mainvalues"/>
209 </computed_discharge_curve>
210 </dc:when> 194 </dc:when>
211 <dc:when test="starts-with($out, 'sq_relation') or 195 <dc:when test="starts-with($out, 'sq_relation') or
212 $out = 'sq_overview'"> 196 $out = 'sq_overview'">
213 <dc:call-macro name="sqrelations"/> 197 <dc:call-macro name="discharge-curve-prototype"/>
214 </dc:when> 198 </dc:when>
215 <dc:comment> Cross sections </dc:comment> 199 <dc:comment> Cross sections </dc:comment>
216 <dc:when test="$out = 'cross_section'"> 200 <dc:when test="$out = 'cross_section'">
217 <dc:call-macro name="basedata_0"/> 201 <dc:call-macro name="basedata_0"/>
218 <dc:call-macro name="basedata_1_additionals"/> 202 <dc:call-macro name="basedata_1_additionals"/>
476 </dc:filter> 460 </dc:filter>
477 </dc:macro> 461 </dc:macro>
478 462
479 463
480 <dc:macro name="historical_discharge_curve"> 464 <dc:macro name="historical_discharge_curve">
481 <dc:variable name="refgauge" type="number" expr="$reference_gauge"/>
482 <dc:context> 465 <dc:context>
483 <dc:statement> 466 <dc:statement>
484 SELECT g.id AS gauge_id, 467 SELECT g.id AS gauge_id,
485 g.name AS gauge_name, 468 g.name AS gauge_name,
486 dt.id AS dt_id, 469 dt.id AS dt_id,
491 JOIN discharge_tables dt ON g.id = dt.gauge_id 474 JOIN discharge_tables dt ON g.id = dt.gauge_id
492 LEFT JOIN time_intervals t ON dt.time_interval_id = t.id 475 LEFT JOIN time_intervals t ON dt.time_interval_id = t.id
493 WHERE g.river_id = ${river_id} 476 WHERE g.river_id = ${river_id}
494 AND dt.kind &lt;&gt; 0 477 AND dt.kind &lt;&gt; 0
495 AND ((g.station = ${fromkm} AND g.station = ${tokm}) 478 AND ((g.station = ${fromkm} AND g.station = ${tokm})
496 OR g.official_number = ${refgauge}) 479 OR g.official_number = ${reference_gauge})
497 ORDER BY start_time 480 ORDER BY start_time
498 </dc:statement> 481 </dc:statement>
499 <dc:if test="dc:has-result()"> 482 <dc:if test="dc:has-result()">
500 <historical_discharge_curves> 483 <historical_discharge_curves>
501 <dc:group expr="$gauge_name"> 484 <dc:group expr="$gauge_name">
1254 </heightmarks> 1237 </heightmarks>
1255 </dc:if> 1238 </dc:if>
1256 </dc:filter> 1239 </dc:filter>
1257 </dc:macro> 1240 </dc:macro>
1258 1241
1242
1243 <!-- discharge curve prototype -->
1259 <dc:macro name="discharge-curve-prototype"> 1244 <dc:macro name="discharge-curve-prototype">
1260 <dc:call-macro name="discharge_table_gauge"/> 1245 <computed_discharge_curve>
1246 <dc:call-macro name="discharge_table_gauge"/>
1247 <dc:call-macro name="mainvalues"/>
1248 </computed_discharge_curve>
1261 <dc:call-macro name="historical_discharge_curve"/> 1249 <dc:call-macro name="historical_discharge_curve"/>
1262 <dc:call-macro name="basedata_0_wq"/> 1250 <dc:call-macro name="basedata_0_wq"/>
1251 <dc:call-macro name="basedata_1_additionals_wq"/>
1252 <dc:call-macro name="basedata_2_fixations_wqkms"/>
1263 <dc:call-macro name="basedata_3_officials_wq"/> 1253 <dc:call-macro name="basedata_3_officials_wq"/>
1264 <dc:call-macro name="basedata_2_fixations_wqkms"/>
1265 <dc:call-macro name="basedata_4_heightmarks-points"/> 1254 <dc:call-macro name="basedata_4_heightmarks-points"/>
1255 <dc:call-macro name="basedata_5_flood-protections"/>
1256 <minfo>
1257 <dc:call-macro name="sqrelations"/>
1258 <!-- add MINFO-Fixation-Data here -->
1259 <!-- basedata_6_...-->
1260 <!-- basedata_7_...-->
1261 </minfo>
1266 </dc:macro> 1262 </dc:macro>
1267 1263
1268 <dc:macro name="longitudinal-section-prototype"> 1264 <dc:macro name="longitudinal-section-prototype">
1269 <dc:call-macro name="basedata_0"/> 1265 <dc:call-macro name="basedata_0"/>
1270 <dc:call-macro name="basedata_1_additionals"/> 1266 <dc:call-macro name="basedata_1_additionals"/>
1302 <dc:call-macro name="middle_bedheights"/> 1298 <dc:call-macro name="middle_bedheights"/>
1303 <dc:call-macro name="bedheight_differences"/> 1299 <dc:call-macro name="bedheight_differences"/>
1304 <dc:call-macro name="bedquality"/> 1300 <dc:call-macro name="bedquality"/>
1305 <dc:call-macro name="flow-velocity"/> 1301 <dc:call-macro name="flow-velocity"/>
1306 <dc:call-macro name="sediment-load"/> 1302 <dc:call-macro name="sediment-load"/>
1307 </dc:macro>
1308
1309 <dc:macro name="discharge-prototype">
1310 <dc:call-macro name="discharge-curve-prototype"/>
1311 <dc:call-macro name="basedata_5_flood-protections"/>
1312 <dc:call-macro name="basedata_0"/>
1313 <dc:call-macro name="basedata_1_additionals"/>
1314 <dc:call-macro name="basedata_1_additionals_marks"/>
1315 <dc:call-macro name="basedata_4_heightmarks-points"/>
1316 <dc:call-macro name="basedata_1_additionals-relative_point"/>
1317 <dc:call-macro name="basedata_2_fixations_relative_point"/>
1318 <dc:call-macro name="basedata_4_heightmarks-points-relative_points"/>
1319 <dc:call-macro name="basedata_5_flood-protections_relative_points"/>
1320 <dc:call-macro name="mainvalues"/>
1321 <dc:call-macro name="annotations"/>
1322
1323 <computed_discharge_curve>
1324 <dc:call-macro name="mainvalues"/>
1325 </computed_discharge_curve>
1326 </dc:macro> 1303 </dc:macro>
1327 1304
1328 <dc:macro name="porosities"> 1305 <dc:macro name="porosities">
1329 <porosities> 1306 <porosities>
1330 <dc:context> 1307 <dc:context>
1726 JOIN discharge_tables dt ON g.id = dt.gauge_id 1703 JOIN discharge_tables dt ON g.id = dt.gauge_id
1727 LEFT JOIN time_intervals t ON dt.time_interval_id = t.id 1704 LEFT JOIN time_intervals t ON dt.time_interval_id = t.id
1728 WHERE g.river_id = ${river_id} 1705 WHERE g.river_id = ${river_id}
1729 AND dt.kind = 0 1706 AND dt.kind = 0
1730 AND ((g.station = ${fromkm} AND g.station = ${tokm}) 1707 AND ((g.station = ${fromkm} AND g.station = ${tokm})
1731 OR g.official_number = ${refgauge}) 1708 OR g.official_number = ${reference_gauge})
1732 </dc:statement> 1709 </dc:statement>
1733 <dc:if test="dc:has-result()"> 1710 <dc:if test="dc:has-result()">
1734 <dc:for-each> 1711 <dc:for-each>
1735 <current_gauge factory="gaugedischarge" target_out="{$out}" 1712 <current_gauge factory="gaugedischarge" target_out="{$out}"
1736 ids="{$gauge_name}"/> 1713 ids="{$gauge_name}"/>

http://dive4elements.wald.intevation.org