comparison artifacts/doc/conf/meta-data.xml @ 8434:48ed9019d8a1

For fixation analysis, allow loading discharge curves from multiple gauges on calculation range via datacage.
author "Tom Gottfried <tom@intevation.de>"
date Mon, 20 Oct 2014 12:23:11 +0200
parents f1bc081210ea
children 4fd063703487
comparison
equal deleted inserted replaced
8433:706668b19b04 8434:48ed9019d8a1
1022 <dc:variable name="refgauge" type="number" 1022 <dc:variable name="refgauge" type="number"
1023 expr="dc:get('reference_gauge')"/> 1023 expr="dc:get('reference_gauge')"/>
1024 <dc:context> 1024 <dc:context>
1025 <dc:call-macro name="discharge_curves"/> 1025 <dc:call-macro name="discharge_curves"/>
1026 <dc:filter expr="$kind = 0"> 1026 <dc:filter expr="$kind = 0">
1027 <dc:for-each> 1027 <dc:group expr="$gauge_name">
1028 <current_gauge factory="gaugedischarge" target_out="{$out}" 1028 <gauge name="{dc:group-key()}">
1029 ids="{$gauge_name}"/> 1029 <dc:for-each>
1030 </dc:for-each> 1030 <current_gauge factory="gaugedischarge" target_out="{$out}"
1031 ids="{$gauge_name}"/>
1032 </dc:for-each>
1033 </gauge>
1034 </dc:group>
1031 </dc:filter> 1035 </dc:filter>
1032 </dc:context> 1036 </dc:context>
1033 </dc:macro> 1037 </dc:macro>
1034 1038
1035 <dc:macro name="historical_discharge_curve"> 1039 <dc:macro name="historical_discharge_curve">
1037 expr="dc:get('reference_gauge')"/> 1041 expr="dc:get('reference_gauge')"/>
1038 <dc:context> 1042 <dc:context>
1039 <dc:call-macro name="discharge_curves"/> 1043 <dc:call-macro name="discharge_curves"/>
1040 <dc:filter expr="$kind = 1"> 1044 <dc:filter expr="$kind = 1">
1041 <historical_discharge_curves> 1045 <historical_discharge_curves>
1042 <dc:for-each> 1046 <dc:group expr="$gauge_name">
1043 <dc:variable name="combined_desc" 1047 <gauge name="{dc:group-key()}">
1044 expr="concat($bfg_id, ' ', 1048 <dc:for-each>
1045 dc:date-format('dd.MM.yyyy', $start_time), 1049 <dc:variable name="combined_desc"
1046 ' - ', 1050 expr="concat($bfg_id, ' ',
1047 dc:date-format('dd.MM.yyyy', $stop_time))"/> 1051 dc:date-format('dd.MM.yyyy', $start_time),
1048 <histdis name="{$combined_desc}" 1052 ' - ',
1049 description="{$combined_desc}" 1053 dc:date-format('dd.MM.yyyy', $stop_time))"/>
1050 factory="gaugedischarge" target_out="{$out}" 1054 <histdis name="{$combined_desc}"
1051 ids="{$gauge_name};{$dt_id};{$combined_desc}"/> 1055 description="{$combined_desc}"
1052 </dc:for-each> 1056 factory="gaugedischarge" target_out="{$out}"
1057 ids="{$gauge_name};{$dt_id};{$combined_desc}"/>
1058 </dc:for-each>
1059 </gauge>
1060 </dc:group>
1053 </historical_discharge_curves> 1061 </historical_discharge_curves>
1054 </dc:filter> 1062 </dc:filter>
1055 </dc:context> 1063 </dc:context>
1056 </dc:macro> 1064 </dc:macro>
1057 1065
1065 dt.kind AS kind 1073 dt.kind AS kind
1066 FROM gauges g 1074 FROM gauges g
1067 JOIN discharge_tables dt ON g.id = dt.gauge_id 1075 JOIN discharge_tables dt ON g.id = dt.gauge_id
1068 LEFT JOIN time_intervals t ON dt.time_interval_id = t.id 1076 LEFT JOIN time_intervals t ON dt.time_interval_id = t.id
1069 WHERE g.river_id = ${river_id} 1077 WHERE g.river_id = ${river_id}
1070 AND ((g.station = ${fromkm} AND g.station = ${tokm}) 1078 AND ((g.station BETWEEN ${fromkm} AND ${tokm})
1071 OR g.official_number = ${refgauge}) 1079 OR g.official_number = ${refgauge})
1072 ORDER BY start_time 1080 ORDER BY start_time
1073 </dc:statement> 1081 </dc:statement>
1074 </dc:macro> 1082 </dc:macro>
1075 1083

http://dive4elements.wald.intevation.org