Mercurial > dive4elements > river
diff artifacts/doc/conf/meta-data.xml @ 6717:71da3d4ffb4a 3.0.13
issue1391: Some more unification fix km filtering for calculated discharges
The km filtering still remains a problem for fix and historical
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Tue, 30 Jul 2013 19:14:49 +0200 |
parents | ed9cff319479 |
children | 0db5f3642335 |
line wrap: on
line diff
--- a/artifacts/doc/conf/meta-data.xml Tue Jul 30 18:59:35 2013 +0200 +++ b/artifacts/doc/conf/meta-data.xml Tue Jul 30 19:14:49 2013 +0200 @@ -147,7 +147,7 @@ <dc:call-macro name="longitudinal-section-prototype"/> </dc:when> <dc:when test="$out = 'historical_discharge_wq'"> - <dc:call-macro name="historical-discharge-curve"/> + <dc:call-macro name="historical_discharge_curve"/> <dc:call-macro name="discharge_table_gauge"/> <dc:call-macro name="basedata_2_fixations_wqkms"/> <dc:call-macro name="basedata_5_flood-protections"/> @@ -159,7 +159,7 @@ </computed_discharge_curve> </dc:when> <dc:when test="$out = 'discharge_curve'"> - <dc:call-macro name="historical-discharge-curve"/> + <dc:call-macro name="historical_discharge_curve"/> <dc:call-macro name="discharge_table_gauge"/> <dc:call-macro name="basedata_2_fixations_wqkms"/> <dc:call-macro name="basedata_5_flood-protections"/> @@ -185,13 +185,14 @@ <dc:call-macro name="basedata_5_flood-protections_relative_points"/> </dc:when> <dc:when test="$out = 'fix_wq_curve'"> + <dc:call-macro name="historical_discharge_curve"/> + <dc:call-macro name="discharge_table_gauge"/> <dc:call-macro name="basedata_0_wq"/> <dc:call-macro name="basedata_1_additionals_marks"/> <dc:call-macro name="basedata_2_fixations_wqkms"/> <dc:call-macro name="basedata_3_officials"/> <dc:call-macro name="basedata_4_heightmarks-points"/> <dc:call-macro name="basedata_5_flood-protections_relative_points"/> - <dc:call-macro name="discharge_table_gauge"/> </dc:when> <dc:when test="$out = 'fix_longitudinal_section_curve'"> <dc:call-macro name="longitudinal-section-prototype"/> @@ -277,7 +278,7 @@ </dc:choose> </dc:when> <dc:when test="$out = 'computed_discharge_curve'"> - <dc:call-macro name="historical-discharge-curve"/> + <dc:call-macro name="historical_discharge_curve"/> <dc:call-macro name="discharge_table_gauge"/> <dc:call-macro name="basedata_2_fixations_wqkms"/> <dc:call-macro name="basedata_5_flood-protections"/> @@ -365,9 +366,6 @@ <dc:when test="$out = 'reference_curve'"> <dc:call-macro name="reference-curves"/> </dc:when> - <dc:when test="$out = 'computed_discharge_curve'"> - <dc:call-macro name="computed-discharge-curve"/> - </dc:when> <dc:when test="$out = 'cross_section'"> <dc:call-macro name="waterlevels"/> </dc:when> @@ -378,7 +376,6 @@ <dc:call-macro name="fix-derivate-curve"/> </dc:when> <dc:when test="$out = 'fix_wq_curve'"> - <dc:call-macro name="historical-discharge-curve"/> <dc:call-macro name="fix-wq-curve"/> <dc:call-macro name="waterlevels-fix"/> </dc:when> @@ -484,7 +481,7 @@ </dc:macro> - <dc:macro name="historical-discharge-curve"> + <dc:macro name="historical_discharge_curve"> <dc:context> <dc:statement> SELECT g.id AS gauge_id, @@ -497,10 +494,10 @@ FROM gauges g JOIN discharge_tables dt ON g.id = dt.gauge_id LEFT JOIN time_intervals t ON dt.time_interval_id = t.id - LEFT JOIN ranges r ON g.range_id = r.id WHERE g.river_id = ${river_id} AND dt.kind <> 0 - AND NOT((${tokm} < r.a) or (${fromkm} > r.b)) + AND g.station = ${fromkm} + AND g.station = ${tokm} ORDER BY start_time </dc:statement> <dc:if test="dc:has-result()"> @@ -523,25 +520,6 @@ </dc:macro> - <dc:macro name="computed-discharge-curve"> - <dc:filter expr="$facet_name = 'computed_discharge_curve.q'"> - <dc:if test="dc:has-result()"> - <computed_discharge_curves> - <dc:for-each> - <dc:element name="${facet_name}"> - <dc:attribute name="description" value="${facet_description}"/> - <dc:attribute name="factory" value="winfo"/> - <dc:attribute name="target_out" value="${out}"/> - <dc:attribute name="artifact-id" value="${a_id}"/> - <dc:attribute name="ids" value="${a_id}"/> - <dc:attribute name="out" value="computed_discharge_curve"/> - </dc:element> - </dc:for-each> - </computed_discharge_curves> - </dc:if> - </dc:filter> - </dc:macro> - <dc:macro name="flood-map"> <dc:filter expr="$facet_name = 'floodmap.wsplgen'"> <dc:if test="dc:has-result()"> @@ -1348,20 +1326,25 @@ <dc:context> <dc:statement> SELECT g.id AS gauge_id, - g.name AS gauge_name + g.name AS gauge_name, + t.start_time AS start_time, + t.stop_time AS stop_time FROM gauges g - LEFT JOIN ranges r ON g.range_id = r.id + JOIN discharge_tables dt ON g.id = dt.gauge_id + LEFT JOIN time_intervals t ON dt.time_interval_id = t.id WHERE g.river_id = ${river_id} - AND NOT((${tokm} < r.a) or (${fromkm} > r.b)) + AND dt.kind = 0 + AND g.station = ${fromkm} + AND g.station = ${tokm} </dc:statement> <dc:if test="dc:has-result()"> - <discharge_table_gauge> + <current_gauge> <dc:for-each> - <gauge name="{$gauge_name}" + <gauge name="{$gauge_name} ({dc:date-format('dd.MM.yyyy', $start_time)})" factory="gaugedischarge" target_out="{$out}" ids="{$gauge_name}"/> </dc:for-each> - </discharge_table_gauge> + </current_gauge> </dc:if> </dc:context> </dc:macro>