[Dive4elements-commits] [PATCH 1 of 3] Fix old calculations datacage parts
Wald Commits
scm-commit at wald.intevation.org
Fri May 24 09:23:39 CEST 2013
# HG changeset patch
# User Andre Heinecke <aheinecke at intevation.de>
# Date 1369380130 -7200
# Node ID cdd9759b15b6745405c2d954f214695733274588
# Parent 4bd8bbbcdf688ada2b7c53800ee0ead643a7ecdf
Fix old calculations datacage parts.
- Move the basdata waterlevels out of the user part into
the non-recommendations and guard them against showing up
in the inline datacage (state.winfo.uesk.wsp)
- Add recommendation handling to the user specific part,
currently only for official lines
- Fix group expressions for heightmarks
- Call for-each around the macro-body for basedata additionals
to make the variables of the database statement available in that
macro
diff -r 4bd8bbbcdf68 -r cdd9759b15b6 artifacts/doc/conf/meta-data.xml
--- a/artifacts/doc/conf/meta-data.xml Thu May 23 18:14:31 2013 +0200
+++ b/artifacts/doc/conf/meta-data.xml Fri May 24 09:22:10 2013 +0200
@@ -254,6 +254,15 @@
<dc:call-macro name="bed-heights-epoch"/>
</bedheights>
</dc:when>
+ <dc:when test="$out = 'waterlevels'">
+ <dc:if test="current-state-id != 'state.winfo.uesk.wsp'">
+ <dc:call-macro name="basedata_0"/>
+ <dc:call-macro name="basedata_1_additionals"/>
+ <dc:call-macro name="basedata_2_fixations"/>
+ <dc:call-macro name="basedata_4_heightmarks-points"/>
+ <dc:call-macro name="basedata_5_flood-protections"/>
+ </dc:if>
+ </dc:when>
</dc:choose>
</dc:iterate>
</dc:otherwise>
@@ -265,102 +274,115 @@
<dc:macro name="generate-user-content">
<dc:call-macro name="user-range">
<dc:call-macro name="km-filtered-userdata">
- <dc:iterate var="out" container="artifact-outs">
- <dc:choose>
- <dc:when test="$out = 'longitudinal_section'">
- <dc:call-macro name="longitudinal"/>
- <dc:call-macro name="differences"/>
- <dc:call-macro name="officiallines_user"/>
- </dc:when>
- <dc:when test="$out = 'discharge_longitudinal_section'">
- <dc:call-macro name="longitudinal"/>
- <dc:call-macro name="differences"/>
- </dc:when>
- <dc:when test="$out = 'w_differences'">
- <dc:call-macro name="longitudinal"/>
- <dc:call-macro name="differences"/>
- </dc:when>
- <dc:when test="$out = 'fix_deltawt_curve'">
- <dc:call-macro name="delta-wt"/>
- </dc:when>
- <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>
- <dc:when test="$out = 'fix_longitudinal_section_curve'">
- <dc:call-macro name="longitudinal-section"/>
- </dc:when>
- <dc:when test="$out = 'fix_derivate_curve'">
- <dc:call-macro name="fix-derivate-curve"/>
- </dc:when>
- <dc:when test="$out = 'fix_wq_curve'">
- <dc:call-macro name="fix-wq-curve"/>
- </dc:when>
- <dc:when test="$out = 'duration_curve'">
- <dc:call-macro name="duration-curve"/>
- </dc:when>
- <dc:when test="$out = 'waterlevels'">
- <dc:call-macro name="basedata_0"/>
- <dc:call-macro name="basedata_1_additionals"/>
- <dc:call-macro name="basedata_2_fixations"/>
- <dc:call-macro name="basedata_4_heightmarks-points"/>
- <dc:call-macro name="basedata_5_flood-protections"/>
- <dc:call-macro name="waterlevels-fix"/>
- </dc:when>
- <dc:when test="$out = 'fix_wq_curve'">
- <dc:call-macro name="waterlevels-fix"/>
- </dc:when>
- <dc:when test="$out = 'floodmap'">
- <dc:call-macro name="flood-map"/>
- </dc:when>
- <dc:when test="$out = 'map'">
- <dc:call-macro name="flood-map"/>
- </dc:when>
- <dc:when test="$out = 'bedheight_middle'">
- <dc:call-macro name="waterlevels-discharge"/>
- <dc:call-macro name="waterlevels-fix"/>
- </dc:when>
- <dc:when test="$out = 'floodmap-hws'">
- <dc:call-macro name="floodmap-hws-user"/>
- </dc:when>
- <dc:when test="$out = 'flow_velocity'">
- <dc:call-macro name="bedquality-bed"/>
- <dc:call-macro name="bedquality-load"/>
- </dc:when>
- <dc:when test="$out = 'bed_longitudinal_section'">
- <dc:call-macro name="bedquality-bed"/>
- <dc:call-macro name="bedquality-load"/>
- <dc:call-macro name="bedquality-density"/>
- <dc:call-macro name="bedquality-porosity"/>
- </dc:when>
- <dc:when test="$out = 'sedimentload_ls'">
- <dc:call-macro name="differences"/>
- <dc:call-macro name="bedheight-differences"/>
- <dc:call-macro name="flow-velocity"/>
- <dc:call-macro name="sediment-load"/>
- </dc:when>
- <dc:when test="$out = 'bed_difference_year'">
- <dc:call-macro name="waterlevels-discharge"/>
- <dc:call-macro name="bedheight-differences"/>
- <dc:call-macro name="differences"/>
- <dc:call-macro name="waterlevels-fix"/>
- <dc:call-macro name="delta-wt-ls"/>
- </dc:when>
- <dc:when test="$out = 'bed_difference_epoch'">
- <dc:call-macro name="waterlevels-discharge"/>
- <dc:call-macro name="bedheight-differences"/>
- <dc:call-macro name="differences"/>
- <dc:call-macro name="waterlevels-fix"/>
- <dc:call-macro name="delta-wt-ls"/>
- </dc:when>
- </dc:choose>
- </dc:iterate>
- </dc:call-macro>
+ <dc:choose>
+ <dc:when test="dc:contains($parameters, 'recommended')">
+ <dc:comment>
+ Recommendations (client shall load immediately).
+ </dc:comment>
+ <dc:iterate var="out" container="artifact-outs">
+ <dc:choose>
+ <dc:when test="$out = 'longitudinal_section'">
+ <dc:call-macro name="officiallines_user"/>
+ </dc:when>
+ </dc:choose>
+ </dc:iterate>
+ </dc:when>
+ <dc:otherwise>
+ <dc:comment>
+ Non Recommendations
+ </dc:comment>
+ <dc:iterate var="out" container="artifact-outs">
+ <dc:choose>
+ <dc:when test="$out = 'longitudinal_section'">
+ <dc:call-macro name="longitudinal"/>
+ <dc:call-macro name="differences"/>
+ </dc:when>
+ <dc:when test="$out = 'discharge_longitudinal_section'">
+ <dc:call-macro name="longitudinal"/>
+ <dc:call-macro name="differences"/>
+ </dc:when>
+ <dc:when test="$out = 'w_differences'">
+ <dc:call-macro name="longitudinal"/>
+ <dc:call-macro name="differences"/>
+ </dc:when>
+ <dc:when test="$out = 'fix_deltawt_curve'">
+ <dc:call-macro name="delta-wt"/>
+ </dc:when>
+ <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>
+ <dc:when test="$out = 'fix_longitudinal_section_curve'">
+ <dc:call-macro name="longitudinal-section"/>
+ </dc:when>
+ <dc:when test="$out = 'fix_derivate_curve'">
+ <dc:call-macro name="fix-derivate-curve"/>
+ </dc:when>
+ <dc:when test="$out = 'fix_wq_curve'">
+ <dc:call-macro name="fix-wq-curve"/>
+ </dc:when>
+ <dc:when test="$out = 'duration_curve'">
+ <dc:call-macro name="duration-curve"/>
+ </dc:when>
+ <dc:when test="$out = 'waterlevels'">
+ <dc:call-macro name="waterlevels-fix"/>
+ </dc:when>
+ <dc:when test="$out = 'fix_wq_curve'">
+ <dc:call-macro name="waterlevels-fix"/>
+ </dc:when>
+ <dc:when test="$out = 'floodmap'">
+ <dc:call-macro name="flood-map"/>
+ </dc:when>
+ <dc:when test="$out = 'map'">
+ <dc:call-macro name="flood-map"/>
+ </dc:when>
+ <dc:when test="$out = 'bedheight_middle'">
+ <dc:call-macro name="waterlevels-discharge"/>
+ <dc:call-macro name="waterlevels-fix"/>
+ </dc:when>
+ <dc:when test="$out = 'floodmap-hws'">
+ <dc:call-macro name="floodmap-hws-user"/>
+ </dc:when>
+ <dc:when test="$out = 'flow_velocity'">
+ <dc:call-macro name="bedquality-bed"/>
+ <dc:call-macro name="bedquality-load"/>
+ </dc:when>
+ <dc:when test="$out = 'bed_longitudinal_section'">
+ <dc:call-macro name="bedquality-bed"/>
+ <dc:call-macro name="bedquality-load"/>
+ <dc:call-macro name="bedquality-density"/>
+ <dc:call-macro name="bedquality-porosity"/>
+ </dc:when>
+ <dc:when test="$out = 'sedimentload_ls'">
+ <dc:call-macro name="differences"/>
+ <dc:call-macro name="bedheight-differences"/>
+ <dc:call-macro name="flow-velocity"/>
+ <dc:call-macro name="sediment-load"/>
+ </dc:when>
+ <dc:when test="$out = 'bed_difference_year'">
+ <dc:call-macro name="waterlevels-discharge"/>
+ <dc:call-macro name="bedheight-differences"/>
+ <dc:call-macro name="differences"/>
+ <dc:call-macro name="waterlevels-fix"/>
+ <dc:call-macro name="delta-wt-ls"/>
+ </dc:when>
+ <dc:when test="$out = 'bed_difference_epoch'">
+ <dc:call-macro name="waterlevels-discharge"/>
+ <dc:call-macro name="bedheight-differences"/>
+ <dc:call-macro name="differences"/>
+ <dc:call-macro name="waterlevels-fix"/>
+ <dc:call-macro name="delta-wt-ls"/>
+ </dc:when>
+ </dc:choose>
+ </dc:iterate>
+ </dc:otherwise>
+ </dc:choose>
+ </dc:call-macro>
</dc:call-macro>
</dc:macro>
@@ -1294,7 +1316,7 @@
<dc:filter expr="$kind=4">
<dc:if test="dc:has-result()">
<heightmarks>
- <dc:group expr="{dc:replace($wst_description, 'HW-Marken/', '')}">
+ <dc:group expr="dc:replace($wst_description, 'HW-Marken/', '')">
<heightmark name="dc:group-key()">
<dc:for-each>
<column name="{$wst_column_name}"
@@ -1313,7 +1335,7 @@
<dc:filter expr="$kind=4">
<dc:if test="dc:has-result()">
<heightmarks>
- <dc:group expr="{dc:replace($wst_description, 'HW-Marken/', '')}">
+ <dc:group expr="dc:replace($wst_description, 'HW-Marken/', '')">
<relativepoint name="dc:group-key()">
<dc:for-each>
<column name="{$wst_column_name}"
@@ -1644,7 +1666,9 @@
<additionals>
<dc:group expr="dc:replace($wst_description, 'Zus.Längsschnitte/', '')">
<additional name="{dc:group-key()}">
- <dc:macro-body/>
+ <dc:for-each>
+ <dc:macro-body/>
+ </dc:for-each>
</additional>
</dc:group>
</additionals>
More information about the Dive4elements-commits
mailing list