comparison artifacts/doc/conf/meta-data.xml @ 7193:7fabae60428b double-precision

Merged changes from default into double-precision branch.
author Tom Gottfried <tom@intevation.de>
date Fri, 27 Sep 2013 17:36:50 +0200
parents 7bd19eff9bca
children c0349b54c604
comparison
equal deleted inserted replaced
7016:28748bb1b676 7193:7fabae60428b
139 <dc:call-macro name="basedata_5_flood-protections"/> 139 <dc:call-macro name="basedata_5_flood-protections"/>
140 <dc:call-macro name="hyks"/> 140 <dc:call-macro name="hyks"/>
141 </dc:when> 141 </dc:when>
142 <dc:when test="$out = 'longitudinal_section'"> 142 <dc:when test="$out = 'longitudinal_section'">
143 <dc:call-macro name="longitudinal-section-prototype"/> 143 <dc:call-macro name="longitudinal-section-prototype"/>
144 <dc:call-macro name="bedheight_differences"/>
144 </dc:when> 145 </dc:when>
145 <dc:when test="$out = 'w_differences'"> 146 <dc:when test="$out = 'w_differences'">
146 <dc:call-macro name="longitudinal-section-prototype"/> 147 <dc:call-macro name="longitudinal-section-prototype"/>
147 <dc:call-macro name="bedheight_differences"/> 148 <dc:call-macro name="bedheight_differences"/>
148 </dc:when> 149 </dc:when>
164 <dc:when test="$out = 'discharge_curve'"> 165 <dc:when test="$out = 'discharge_curve'">
165 <dc:call-macro name="historical_discharge_curve"/> 166 <dc:call-macro name="historical_discharge_curve"/>
166 <dc:call-macro name="discharge_table_gauge"/> 167 <dc:call-macro name="discharge_table_gauge"/>
167 <dc:call-macro name="basedata_2_fixations_wqkms"/> 168 <dc:call-macro name="basedata_2_fixations_wqkms"/>
168 <dc:call-macro name="basedata_5_flood-protections"/> 169 <dc:call-macro name="basedata_5_flood-protections"/>
169 <dc:call-macro name="basedata_0"/> 170 <dc:call-macro name="basedata_0_wq"/>
170 <dc:call-macro name="basedata_1_additionals"/> 171 <dc:call-macro name="basedata_1_additionals"/>
171 <dc:call-macro name="basedata_4_heightmarks-points"/> 172 <dc:call-macro name="basedata_4_heightmarks-points"/>
172 <computed_discharge_curve> 173 <computed_discharge_curve>
173 <dc:call-macro name="mainvalues"/> 174 <dc:call-macro name="mainvalues"/>
174 </computed_discharge_curve> 175 </computed_discharge_curve>
283 <dc:when test="$out = 'computed_discharge_curve'"> 284 <dc:when test="$out = 'computed_discharge_curve'">
284 <dc:call-macro name="historical_discharge_curve"/> 285 <dc:call-macro name="historical_discharge_curve"/>
285 <dc:call-macro name="discharge_table_gauge"/> 286 <dc:call-macro name="discharge_table_gauge"/>
286 <dc:call-macro name="basedata_2_fixations_wqkms"/> 287 <dc:call-macro name="basedata_2_fixations_wqkms"/>
287 <dc:call-macro name="basedata_5_flood-protections"/> 288 <dc:call-macro name="basedata_5_flood-protections"/>
288 <dc:call-macro name="basedata_0"/> 289 <dc:call-macro name="basedata_0_wq"/>
289 <dc:call-macro name="basedata_1_additionals"/> 290 <dc:call-macro name="basedata_1_additionals_wq"/>
290 <dc:call-macro name="basedata_4_heightmarks-points"/> 291 <dc:call-macro name="basedata_4_heightmarks-points"/>
291 <computed_discharge_curve> 292 <computed_discharge_curve>
292 <dc:call-macro name="mainvalues"/> 293 <dc:call-macro name="mainvalues"/>
293 </computed_discharge_curve> 294 </computed_discharge_curve>
294 </dc:when> 295 </dc:when>
351 <dc:iterate var="out" container="artifact-outs"> 352 <dc:iterate var="out" container="artifact-outs">
352 <dc:choose> 353 <dc:choose>
353 <dc:when test="$out = 'longitudinal_section'"> 354 <dc:when test="$out = 'longitudinal_section'">
354 <dc:call-macro name="longitudinal"/> 355 <dc:call-macro name="longitudinal"/>
355 <dc:call-macro name="differences"/> 356 <dc:call-macro name="differences"/>
357 <dc:call-macro name="bedheight_differences"/>
358 <dc:call-macro name="bedquality-bed"/>
359 <dc:call-macro name="bedquality-load"/>
360 <dc:call-macro name="flow-velocity"/>
361 <dc:call-macro name="sediment-load"/>
362 <dc:call-macro name="bedquality-density"/>
363 <dc:call-macro name="bedquality-porosity"/>
364 <dc:call-macro name="waterlevels-discharge"/>
365 <dc:call-macro name="differenceable-fix"/>
366 <dc:call-macro name="delta-wt-ls"/>
367 <dc:call-macro name="longitudinal-section"/>
356 </dc:when> 368 </dc:when>
357 <dc:when test="$out = 'discharge_longitudinal_section'"> 369 <dc:when test="$out = 'discharge_longitudinal_section'">
358 <dc:call-macro name="longitudinal"/> 370 <dc:call-macro name="longitudinal"/>
359 <dc:call-macro name="differences"/> 371 <dc:call-macro name="differences"/>
360 </dc:when> 372 </dc:when>
399 <dc:call-macro name="flood-map"/> 411 <dc:call-macro name="flood-map"/>
400 </dc:when> 412 </dc:when>
401 <dc:when test="$out = 'bedheight_middle'"> 413 <dc:when test="$out = 'bedheight_middle'">
402 <dc:call-macro name="waterlevels-discharge"/> 414 <dc:call-macro name="waterlevels-discharge"/>
403 <dc:call-macro name="differenceable-fix"/> 415 <dc:call-macro name="differenceable-fix"/>
416 <dc:call-macro name="differences"/>
404 </dc:when> 417 </dc:when>
405 <dc:when test="$out = 'floodmap-hws'"> 418 <dc:when test="$out = 'floodmap-hws'">
406 <dc:call-macro name="floodmap-hws-user"/> 419 <dc:call-macro name="floodmap-hws-user"/>
407 </dc:when> 420 </dc:when>
408 <dc:when test="$out = 'flow_velocity'"> 421 <dc:when test="$out = 'flow_velocity'">
483 </dc:filter> 496 </dc:filter>
484 </dc:macro> 497 </dc:macro>
485 498
486 499
487 <dc:macro name="historical_discharge_curve"> 500 <dc:macro name="historical_discharge_curve">
501 <dc:variable name="refgauge" type="number" expr="$reference_gauge"/>
488 <dc:context> 502 <dc:context>
489 <dc:statement> 503 <dc:statement>
490 SELECT g.id AS gauge_id, 504 SELECT g.id AS gauge_id,
491 g.name AS gauge_name, 505 g.name AS gauge_name,
492 dt.id AS dt_id, 506 dt.id AS dt_id,
493 t.start_time AS start_time, 507 t.start_time AS start_time,
494 t.stop_time AS stop_time, 508 t.stop_time AS stop_time,
495 dt.description AS desc, 509 dt.bfg_id AS bfg_id
496 dt.bfg_id AS bfg_id
497 FROM gauges g 510 FROM gauges g
498 JOIN discharge_tables dt ON g.id = dt.gauge_id 511 JOIN discharge_tables dt ON g.id = dt.gauge_id
499 LEFT JOIN time_intervals t ON dt.time_interval_id = t.id 512 LEFT JOIN time_intervals t ON dt.time_interval_id = t.id
500 WHERE g.river_id = ${river_id} 513 WHERE g.river_id = ${river_id}
501 AND dt.kind &lt;&gt; 0 514 AND dt.kind &lt;&gt; 0
502 AND g.station = ${fromkm} 515 AND ((g.station = ${fromkm} AND g.station = ${tokm})
503 AND g.station = ${tokm} 516 OR g.official_number = ${refgauge})
504 ORDER BY start_time 517 ORDER BY start_time
505 </dc:statement> 518 </dc:statement>
506 <dc:if test="dc:has-result()"> 519 <dc:if test="dc:has-result()">
507 <historical_discharge_curves> 520 <historical_discharge_curves>
508 <dc:group expr="$gauge_name"> 521 <dc:group expr="$gauge_name">
509 <dc:for-each> 522 <dc:for-each>
510 <dc:variable name="combined_desc" expr="concat($bfg_id, ' ', dc:date-format('dd.MM.yyyy', $start_time), ' - ', dc:date-format('dd.MM.yyyy', $stop_time))"/> 523 <dc:variable name="combined_desc" expr="concat($bfg_id, ' ', dc:date-format('dd.MM.yyyy', $start_time), ' - ', dc:date-format('dd.MM.yyyy', $stop_time))"/>
511 <dc:message>
512 Hallo ANDRE23 {dc:dump-variables()}
513 </dc:message>
514 <histdis name="{$combined_desc}" 524 <histdis name="{$combined_desc}"
515 description="{$combined_desc}" 525 description="{$combined_desc}"
516 factory="gaugedischarge" target_out="{$out}" 526 factory="gaugedischarge" target_out="{$out}"
517 ids="{$gauge_name};{$dt_id};{$combined_desc}"/> 527 ids="{$gauge_name};{$dt_id};{$combined_desc}"/>
518 </dc:for-each> 528 </dc:for-each>
875 <dc:element name="${facet_name}"> 885 <dc:element name="${facet_name}">
876 <dc:attribute name="factory" value="minfo"/> 886 <dc:attribute name="factory" value="minfo"/>
877 <dc:attribute name="target_out" value="${out}"/> 887 <dc:attribute name="target_out" value="${out}"/>
878 <dc:attribute name="description" value="${facet_description}"/> 888 <dc:attribute name="description" value="${facet_description}"/>
879 <dc:attribute name="ids" value="${facet_num}-${facet_name}"/> 889 <dc:attribute name="ids" value="${facet_num}-${facet_name}"/>
880 <dc:attribute name="artifact-id" value="${a_id}"/> 890 <dc:attribute name="artifact-id" value="${a_gid}"/>
881 <dc:attribute name="out" value="bed_longitudinal_section"/> 891 <dc:attribute name="out" value="bed_longitudinal_section"/>
882 </dc:element> 892 </dc:element>
883 </dc:for-each> 893 </dc:for-each>
884 </quality-bed> 894 </quality-bed>
885 </dc:group> 895 </dc:group>
899 <dc:element name="${facet_name}"> 909 <dc:element name="${facet_name}">
900 <dc:attribute name="factory" value="minfo"/> 910 <dc:attribute name="factory" value="minfo"/>
901 <dc:attribute name="target_out" value="${out}"/> 911 <dc:attribute name="target_out" value="${out}"/>
902 <dc:attribute name="description" value="${facet_description}"/> 912 <dc:attribute name="description" value="${facet_description}"/>
903 <dc:attribute name="ids" value="${facet_num}-${facet_name}"/> 913 <dc:attribute name="ids" value="${facet_num}-${facet_name}"/>
904 <dc:attribute name="artifact-id" value="${a_id}"/> 914 <dc:attribute name="artifact-id" value="${a_gid}"/>
905 <dc:attribute name="out" value="bed_longitudinal_section"/> 915 <dc:attribute name="out" value="bed_longitudinal_section"/>
906 </dc:element> 916 </dc:element>
907 </dc:for-each> 917 </dc:for-each>
908 </quality-load> 918 </quality-load>
909 </dc:group> 919 </dc:group>
924 <dc:element name="${facet_name}"> 934 <dc:element name="${facet_name}">
925 <dc:attribute name="factory" value="minfo"/> 935 <dc:attribute name="factory" value="minfo"/>
926 <dc:attribute name="target_out" value="${out}"/> 936 <dc:attribute name="target_out" value="${out}"/>
927 <dc:attribute name="description" value="${facet_description}"/> 937 <dc:attribute name="description" value="${facet_description}"/>
928 <dc:attribute name="ids" value="${facet_num}-${facet_name}"/> 938 <dc:attribute name="ids" value="${facet_num}-${facet_name}"/>
929 <dc:attribute name="artifact-id" value="${a_id}"/> 939 <dc:attribute name="artifact-id" value="${a_gid}"/>
930 <dc:attribute name="out" value="bed_longitudinal_section"/> 940 <dc:attribute name="out" value="bed_longitudinal_section"/>
931 </dc:element> 941 </dc:element>
932 </dc:for-each> 942 </dc:for-each>
933 </density> 943 </density>
934 </dc:group> 944 </dc:group>
949 <dc:element name="${facet_name}"> 959 <dc:element name="${facet_name}">
950 <dc:attribute name="factory" value="minfo"/> 960 <dc:attribute name="factory" value="minfo"/>
951 <dc:attribute name="target_out" value="${out}"/> 961 <dc:attribute name="target_out" value="${out}"/>
952 <dc:attribute name="description" value="${facet_description}"/> 962 <dc:attribute name="description" value="${facet_description}"/>
953 <dc:attribute name="ids" value="${facet_num}-${facet_name}"/> 963 <dc:attribute name="ids" value="${facet_num}-${facet_name}"/>
954 <dc:attribute name="artifact-id" value="${a_id}"/> 964 <dc:attribute name="artifact-id" value="${a_gid}"/>
955 <dc:attribute name="out" value="bed_longitudinal_section"/> 965 <dc:attribute name="out" value="bed_longitudinal_section"/>
956 </dc:element> 966 </dc:element>
957 </dc:for-each> 967 </dc:for-each>
958 </porosity> 968 </porosity>
959 </dc:group> 969 </dc:group>
976 <dc:element name="${facet_name}"> 986 <dc:element name="${facet_name}">
977 <dc:attribute name="factory" value="minfo"/> 987 <dc:attribute name="factory" value="minfo"/>
978 <dc:attribute name="target_out" value="${out}"/> 988 <dc:attribute name="target_out" value="${out}"/>
979 <dc:attribute name="description" value="${facet_description}"/> 989 <dc:attribute name="description" value="${facet_description}"/>
980 <dc:attribute name="ids" value="${facet_num}-${facet_name}"/> 990 <dc:attribute name="ids" value="${facet_num}-${facet_name}"/>
981 <dc:attribute name="artifact-id" value="${a_id}"/> 991 <dc:attribute name="artifact-id" value="${a_gid}"/>
982 <dc:attribute name="out" value="flow_velocity"/> 992 <dc:attribute name="out" value="flow_velocity"/>
983 </dc:element> 993 </dc:element>
984 </dc:for-each> 994 </dc:for-each>
985 </flow> 995 </flow>
986 </dc:group> 996 </dc:group>
999 <dc:element name="${facet_name}"> 1009 <dc:element name="${facet_name}">
1000 <dc:attribute name="factory" value="minfo"/> 1010 <dc:attribute name="factory" value="minfo"/>
1001 <dc:attribute name="target_out" value="${out}"/> 1011 <dc:attribute name="target_out" value="${out}"/>
1002 <dc:attribute name="description" value="${facet_description}"/> 1012 <dc:attribute name="description" value="${facet_description}"/>
1003 <dc:attribute name="ids" value="${facet_num}-${facet_name}"/> 1013 <dc:attribute name="ids" value="${facet_num}-${facet_name}"/>
1004 <dc:attribute name="artifact-id" value="${a_id}"/> 1014 <dc:attribute name="artifact-id" value="${a_gid}"/>
1005 <dc:attribute name="out" value="sedimentload_ls"/> 1015 <dc:attribute name="out" value="sedimentload_ls"/>
1006 </dc:element> 1016 </dc:element>
1007 </dc:for-each> 1017 </dc:for-each>
1008 </load> 1018 </load>
1009 </dc:group> 1019 </dc:group>
1038 1048
1039 <dc:macro name="waterlevels-discharge"> 1049 <dc:macro name="waterlevels-discharge">
1040 <dc:filter expr="$out_name = 'discharge_longitudinal_section' and $facet_name = 'discharge_longitudinal_section.w'"> 1050 <dc:filter expr="$out_name = 'discharge_longitudinal_section' and $facet_name = 'discharge_longitudinal_section.w'">
1041 <dc:if test="dc:has-result()"> 1051 <dc:if test="dc:has-result()">
1042 <waterlevels-discharge> 1052 <waterlevels-discharge>
1043 <dc:group expr="concat($oid, ' ', $river, ' ', $a_id, ' ', dc:date-format('dd.MM.yyyy - H:mm:ss', $a_creation), ' ', $collection_name)"> 1053 <dc:group expr="concat($oid, ' ', $river, ' ', $a_gid, ' ', dc:date-format('dd.MM.yyyy - H:mm:ss', $a_creation), ' ', $collection_name)">
1044 <discharge description="{dc:group-key()}"> 1054 <discharge description="{dc:group-key()}">
1045 <dc:for-each> 1055 <dc:for-each>
1046 <dc:element name="${facet_name}"> 1056 <dc:element name="${facet_name}">
1047 <dc:attribute name="factory" value="winfo"/> 1057 <dc:attribute name="factory" value="winfo"/>
1048 <dc:attribute name="target_out" value="${out}"/> 1058 <dc:attribute name="target_out" value="${out}"/>
1049 <dc:attribute name="description" value="${facet_description}"/> 1059 <dc:attribute name="description" value="${facet_description}"/>
1050 <dc:attribute name="ids" value="${facet_num}-${facet_name}"/> 1060 <dc:attribute name="ids" value="${facet_num}-${facet_name}"/>
1051 <dc:attribute name="artifact-id" value="${a_id}"/> 1061 <dc:attribute name="artifact-id" value="${a_gid}"/>
1052 <dc:attribute name="out" value="longitudinal_section"/> 1062 <dc:attribute name="out" value="longitudinal_section"/>
1053 </dc:element> 1063 </dc:element>
1054 </dc:for-each> 1064 </dc:for-each>
1055 </discharge> 1065 </discharge>
1056 </dc:group> 1066 </dc:group>
1208 <dc:call-macro name="basedata_2_fixations"/> 1218 <dc:call-macro name="basedata_2_fixations"/>
1209 <dc:call-macro name="basedata_4_heightmarks-points"/> 1219 <dc:call-macro name="basedata_4_heightmarks-points"/>
1210 <dc:call-macro name="basedata_3_officials"/> 1220 <dc:call-macro name="basedata_3_officials"/>
1211 <dc:call-macro name="basedata_5_flood-protections"/> 1221 <dc:call-macro name="basedata_5_flood-protections"/>
1212 <dc:call-macro name="annotations_per_type"/> 1222 <dc:call-macro name="annotations_per_type"/>
1213 </dc:macro> 1223 <minfo>
1224 <dc:call-macro name="basedata_6_delta_w"/>
1225 <dc:call-macro name="basedata_7_waterlevels"/>
1226 <dc:call-macro name="minfo-heights"/>
1227 <dc:call-macro name="sounding-width"/>
1228 <dc:call-macro name="yields"/>
1229 </minfo>
1230 </dc:macro>
1231
1232 <dc:macro name="yields">
1233 <yields>
1234 <years>
1235 <dc:context>
1236 <dc:statement>
1237 SELECT DISTINCT
1238 sy.id AS syid,
1239 sy.description AS description,
1240 ti.start_time AS year
1241 FROM sediment_yield sy
1242 JOIN rivers r ON sy.river_id = r.id
1243 JOIN sediment_yield_values syv ON sy.id = syv.sediment_yield_id
1244 JOIN time_intervals ti ON sy.time_interval_id = ti.id
1245 WHERE r.name = 'Elbe'
1246 AND ti.stop_time IS NULL
1247 AND syv.station BETWEEN ${fromkm} AND ${tokm}
1248 </dc:statement>
1249 <dc:if test="dc:has-result()">
1250 <dc:for-each>
1251 <year description="{$description}"
1252 factory="sedimentyield"
1253 target_out="{$out}"
1254 info="infome"
1255 ids="{$syid}" />
1256 </dc:for-each>
1257 </dc:if>
1258 </dc:context>
1259 </years>
1260 <epochs>
1261 <dc:context>
1262 <dc:statement>
1263 SELECT DISTINCT
1264 sy.id AS syid,
1265 sy.description AS description,
1266 ti.start_time AS year
1267 FROM sediment_yield sy
1268 JOIN rivers r ON sy.river_id = r.id
1269 JOIN sediment_yield_values syv ON sy.id = syv.sediment_yield_id
1270 JOIN time_intervals ti ON sy.time_interval_id = ti.id
1271 WHERE r.name = 'Elbe'
1272 AND ti.stop_time IS NOT NULL
1273 AND syv.station BETWEEN ${fromkm} AND ${tokm}
1274 </dc:statement>
1275 <dc:if test="dc:has-result()">
1276 <dc:for-each>
1277 <epoch description="{$description}"
1278 factory="sedimentyield"
1279 target_out="{$out}"
1280 info="infome"
1281 ids="{$syid}" />
1282 </dc:for-each>
1283 </dc:if>
1284 </dc:context>
1285 </epochs>
1286
1287 </yields>
1288 </dc:macro>
1289
1214 1290
1215 <dc:macro name="basedata_5_flood-protections"> 1291 <dc:macro name="basedata_5_flood-protections">
1216 <dc:filter expr="$kind=5"> 1292 <dc:filter expr="$kind=5">
1217 <dc:if test="dc:has-result()"> 1293 <dc:if test="dc:has-result()">
1218 <flood_protections> 1294 <flood_protections>
1304 </additionals> 1380 </additionals>
1305 </dc:if> 1381 </dc:if>
1306 </dc:filter> 1382 </dc:filter>
1307 </dc:macro> 1383 </dc:macro>
1308 1384
1385
1386 <dc:macro name="basedata_7_waterlevels">
1387 <dc:filter expr="$kind=7">
1388 <dc:if test="dc:has-result()">
1389 <wlevel>
1390 <dc:group expr="dc:replace($wst_description, 'CSV/', '')">
1391 <relativepoint name="{dc:group-key()}">
1392 <dc:for-each>
1393 <column name="{$wst_column_name}"
1394 ids="additionals-wstv-{$wst_column_position}-{$wst_id}"
1395 factory="staticwqkms" target_out="{$out}"
1396 info="{$info} [km {$deffrom} - {$defto}]"/>
1397 </dc:for-each>
1398 </relativepoint>
1399 </dc:group>
1400 </wlevel>
1401 </dc:if>
1402 </dc:filter>
1403 </dc:macro>
1404
1405
1309 <dc:macro name="basedata_6_delta_w"> 1406 <dc:macro name="basedata_6_delta_w">
1310 <dc:filter expr="$kind=6"> 1407 <dc:filter expr="$kind=6">
1311 <dc:if test="dc:has-result()"> 1408 <dc:if test="dc:has-result()">
1312 <delta_w> 1409 <delta_w>
1313 <dc:group expr="$wst_description"> 1410 <delta_w_cm>
1314 <relativepoint name="{dc:group-key()}"> 1411 <dc:filter expr="contains($wst_description, 'cm.csv')">
1315 <dc:for-each> 1412 <dc:group expr="dc:replace($wst_description, 'CSV/', '')">
1316 <column name="{$wst_column_name}" 1413 <relativepoint name="{dc:group-key()}">
1317 ids="delta_w-wstv-{$wst_column_position}-{$wst_id}" 1414 <dc:for-each>
1318 factory="staticwkms" target_out="{$out}" 1415 <column name="{$wst_column_name}"
1319 info="{$info} [km {$deffrom} - {$defto}]"/> 1416 ids="delta_w-wstv-{$wst_column_position}-{$wst_id}"
1320 </dc:for-each> 1417 factory="staticwkms" target_out="{$out}"
1321 </relativepoint> 1418 info="{$info} [km {$deffrom} - {$defto}]"/>
1322 </dc:group> 1419 </dc:for-each>
1420 </relativepoint>
1421 </dc:group>
1422 </dc:filter>
1423 </delta_w_cm>
1424 <delta_w_cma>
1425 <dc:filter expr="contains($wst_description, 'cm-a.csv')">
1426 <dc:group expr="dc:replace($wst_description, 'CSV/', '')">
1427 <relativepoint name="{dc:group-key()}">
1428 <dc:for-each>
1429 <column name="{$wst_column_name}"
1430 ids="delta_w-wstv-{$wst_column_position}-{$wst_id}"
1431 factory="staticwkms" target_out="{$out}"
1432 info="{$info} [km {$deffrom} - {$defto}]"/>
1433 </dc:for-each>
1434 </relativepoint>
1435 </dc:group>
1436 </dc:filter>
1437 </delta_w_cma>
1323 </delta_w> 1438 </delta_w>
1324 </dc:if> 1439 </dc:if>
1325 </dc:filter> 1440 </dc:filter>
1326 </dc:macro> 1441 </dc:macro>
1327 1442
1335 FROM gauges g 1450 FROM gauges g
1336 JOIN discharge_tables dt ON g.id = dt.gauge_id 1451 JOIN discharge_tables dt ON g.id = dt.gauge_id
1337 LEFT JOIN time_intervals t ON dt.time_interval_id = t.id 1452 LEFT JOIN time_intervals t ON dt.time_interval_id = t.id
1338 WHERE g.river_id = ${river_id} 1453 WHERE g.river_id = ${river_id}
1339 AND dt.kind = 0 1454 AND dt.kind = 0
1340 AND g.station = ${fromkm} 1455 AND ((g.station = ${fromkm} AND g.station = ${tokm})
1341 AND g.station = ${tokm} 1456 OR g.official_number = ${refgauge})
1342 </dc:statement> 1457 </dc:statement>
1343 <dc:if test="dc:has-result()"> 1458 <dc:if test="dc:has-result()">
1344 <current_gauge> 1459 <dc:for-each>
1345 <dc:for-each> 1460 <current_gauge factory="gaugedischarge" target_out="{$out}"
1346 <gauge name="{$gauge_name} ({dc:date-format('dd.MM.yyyy', $start_time)})" 1461 ids="{$gauge_name}"/>
1347 factory="gaugedischarge" target_out="{$out}" 1462 </dc:for-each>
1348 ids="{$gauge_name}"/>
1349 </dc:for-each>
1350 </current_gauge>
1351 </dc:if> 1463 </dc:if>
1352 </dc:context> 1464 </dc:context>
1353 </dc:macro> 1465 </dc:macro>
1354 1466
1355 <dc:macro name="qsectors"> 1467 <dc:macro name="qsectors">

http://dive4elements.wald.intevation.org