Mercurial > dive4elements > river
diff flys-artifacts/doc/conf/meta-data.xml @ 5312:2c1045a1e3fe
Added new states and transitions to UESK calculation and adjusted states and UI.
TODO: Some refactoring and code cleanup.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Thu, 14 Mar 2013 17:25:00 +0100 |
parents | a75acd0d5fee |
children | 91070b784212 |
line wrap: on
line diff
--- a/flys-artifacts/doc/conf/meta-data.xml Thu Mar 14 17:21:00 2013 +0100 +++ b/flys-artifacts/doc/conf/meta-data.xml Thu Mar 14 17:25:00 2013 +0100 @@ -937,7 +937,7 @@ </discharge_table_nn> </dc:if> - <dc:if test="dc:contains($artifact-outs, 'floodmap')"> + <dc:if test="dc:contains($artifact-outs, 'floodmap') or dc:contains($artifact-outs, 'floodmap-hws')"> <floodmap> <dc:choose> <dc:when test="dc:contains($parameters, 'recommended')"> @@ -946,6 +946,10 @@ <dc:when test="dc:contains($parameters, 'dem')"> <dc:call-macro name="flood-map-dem"/> </dc:when> + <dc:when test="dc:contains($parameters, 'hws')"> + <dc:call-macro name="flood-map-hws-lines" /> + <dc:call-macro name="flood-map-hws-points" /> + </dc:when> <dc:otherwise> <dc:call-macro name="flood-map-complete"/> </dc:otherwise> @@ -993,6 +997,138 @@ </dc:context> </dems> </dc:macro> + <dc:macro name="flood-map-hws-lines"> + <dc:context> + <dc:statement> + SELECT DISTINCT + name AS hws_name, + official AS hws_official, + kind_id AS hws_kind + FROM hws_lines + WHERE river_id = ${river_id} + </dc:statement> + <lines> + <official> + <Durchlass> + <dc:elements filter="$hws_kind=1 and $hws_official=1"> + <hws> + <dc:attribute name="factory" value="hwsfactory"/> + <dc:attribute name="name" value="${hws_name}"/> + </hws> + </dc:elements> + </Durchlass> + <Damm> + <dc:elements filter="$hws_kind=2 and $hws_official=1"> + <hws> + <dc:attribute name="factory" value="hwsfactory"/> + <dc:attribute name="name" value="${hws_name}"/> + </hws> + </dc:elements> + </Damm> + <Graben> + <dc:elements filter="$hws_kind=3 and $hws_official=1"> + <hws> + <dc:attribute name="factory" value="hwsfactory"/> + <dc:attribute name="name" value="${hws_name}"/> + </hws> + </dc:elements> + </Graben> + </official> + <inofficial> + <Durchlass> + <dc:elements filter="$hws_kind=1 and $hws_official=0"> + <hws> + <dc:attribute name="factory" value="hwsfactory"/> + <dc:attribute name="name" value="${hws_name}"/> + </hws> + </dc:elements> + </Durchlass> + <Damn> + <dc:elements filter="$hws_kind=2 and $hws_official=0"> + <hws> + <dc:attribute name="factory" value="hwsfactory"/> + <dc:attribute name="name" value="${hws_name}"/> + </hws> + </dc:elements> + </Damn> + <Graben> + <dc:elements filter="$hws_kind=3 and $hws_official=0"> + <hws> + <dc:attribute name="factory" value="hwsfactory"/> + <dc:attribute name="name" value="${hws_name}"/> + </hws> + </dc:elements> + </Graben> + </inofficial> + </lines> + </dc:context> + </dc:macro> + <dc:macro name="flood-map-hws-points"> + <dc:context> + <dc:statement> + SELECT DISTINCT + name AS hws_points_name, + official AS hws_points_official, + kind_id AS hws_points_kind + FROM hws_points + WHERE river_id = ${river_id} + </dc:statement> + <points> + <official> + <Durchlass> + <dc:elements filter="$hws_points_kind=1 and $hws_points_official=1"> + <hws> + <dc:attribute name="factory" value="hwsfactory"/> + <dc:attribute name="name" value="${hws_points_name}"/> + </hws> + </dc:elements> + </Durchlass> + <Damm> + <dc:elements filter="$hws_points_kind=2 and $hws_points_official=1"> + <hws> + <dc:attribute name="factory" value="hwsfactory"/> + <dc:attribute name="name" value="${hws_points_name}"/> + </hws> + </dc:elements> + </Damm> + <Graben> + <dc:elements filter="$hws_kind=3 and $hws_official=1"> + <hws> + <dc:attribute name="factory" value="hwsfactory"/> + <dc:attribute name="name" value="${hws_points_name}"/> + </hws> + </dc:elements> + </Graben> + </official> + <inofficial> + <Durchlass> + <dc:elements filter="$hws_points_kind=1 and $hws_points_official=0"> + <hws> + <dc:attribute name="factory" value="hwsfactory"/> + <dc:attribute name="name" value="${hws_points_name}"/> + </hws> + </dc:elements> + </Durchlass> + <Damm> + <dc:elements filter="$hws_points_kind=2 and $hws_points_official=0"> + <hws> + <dc:attribute name="factory" value="hwsfactory"/> + <dc:attribute name="name" value="${hws_points_name}"/> + </hws> + </dc:elements> + </Damm> + <Graben> + <dc:elements filter="$hws_points_kind=3 and $hws_points_official=0"> + <hws> + <dc:attribute name="factory" value="hwsfactory"/> + <dc:attribute name="name" value="${hws_points_name}"/> + </hws> + </dc:elements> + </Graben> + </inofficial> + </points> + </dc:context> + </dc:macro> <dc:macro name="flood-map-km"> <dc:context> <dc:statement> @@ -1988,6 +2124,36 @@ </fix_vollmer_wq_curve> </dc:macro> + <dc:macro name="floodmap-hws-user"> + <dc:context> + <dc:statement> + SELECT id AS out_id + FROM outs + WHERE artifact_id = ${a_id} AND name = 'floodmap' + </dc:statement> + <dc:elements> + <dc:context> + <dc:statement> + SELECT name AS facet_name, num as facet_num, description AS facet_description + FROM facets + WHERE out_id = ${out_id} and name = 'floodmap.usershape' + ORDER BY num ASC, name DESC + </dc:statement> + <own-hws> + <dc:elements> + <dc:element name="${facet_name}"> + <dc:attribute name="description" value="${facet_description}"/> + <dc:attribute name="ids" value="${facet_num}"/> + <dc:attribute name="factory" value="winfo"/> + <dc:attribute name="artifact-id" value="${a_gid}"/> + <dc:attribute name="out" value="floodmap"/> + </dc:element> + </dc:elements> + </own-hws> + </dc:context> + </dc:elements> + </dc:context> + </dc:macro> <dc:if test="dc:contains($artifact-outs, 'longitudinal_section') or (dc:contains($artifact-outs, 'discharge_longitudinal_section') or (dc:contains($artifact-outs, 'w_differences')))"> <dc:call-macro name="longitudinal"/> </dc:if> @@ -2030,7 +2196,9 @@ <dc:if test="dc:contains($artifact-outs, 'bedheight_middle')"> <dc:call-macro name="bed-height"/> </dc:if> - + <dc:if test="dc:contains($artifact-outs, 'floodmap-hws')"> + <dc:call-macro name="floodmap-hws-user"/> + </dc:if> </dc:context> </dc:call-macro>