diff flys-artifacts/doc/conf/meta-data.xml @ 5472:d7bb32f95220

merged.
author Raimund Renkert <rrenkert@intevation.de>
date Wed, 27 Mar 2013 15:59:30 +0100
parents 6aa04b30f7ff
children fcecf635b5e3
line wrap: on
line diff
--- a/flys-artifacts/doc/conf/meta-data.xml	Wed Mar 27 15:57:44 2013 +0100
+++ b/flys-artifacts/doc/conf/meta-data.xml	Wed Mar 27 15:59:30 2013 +0100
@@ -1150,18 +1150,49 @@
             </dc:macro>
             <dc:macro name="flood-map-qps">
               <dc:context>
+                <dc:comment>Grab only the actual first</dc:comment>
                 <dc:statement>
-                  SELECT count(*) as km_exists
-                  FROM cross_section_tracks WHERE river_id = ${river_id}
+                  SELECT DISTINCT
+                  cs.kind_id as kind_id,
+                  ck.name as kind_name
+                  FROM cross_section_tracks cs
+                  JOIN cross_section_track_kinds ck on cs.kind_id = ck.id
+                  WHERE river_id = ${river_id}
+                  AND kind_id=1
                 </dc:statement>
-                 <dc:elements>
-                  <dc:if test="$km_exists>0">
-                    <qps>
+                <dc:if test="dc:has-result()">
+                  <dc:elements>
+                    <actual>
+                      <dc:attribute name="description" value="${kind_name}"/>
                       <dc:attribute name="factory" value="wmsqpsfactory"/>
-                      <dc:attribute name="ids" value="${river_id}"/>
-                    </qps>
-                  </dc:if>
-                </dc:elements>
+                      <dc:attribute name="ids" value="${river_id};${kind_name};${kind_id}"/>
+                    </actual>
+                  </dc:elements>
+                </dc:if>
+              </dc:context>
+              <dc:context>
+                <dc:comment>Now the other tracks</dc:comment>
+                <dc:statement>
+                  SELECT DISTINCT
+                  cs.kind_id as kind_id,
+                  ck.name as kind_name,
+                  cs.name as layer_name
+                  FROM cross_section_tracks cs
+                  JOIN cross_section_track_kinds ck on cs.kind_id = ck.id
+                  WHERE river_id = ${river_id}
+                  AND kind_id=0
+                </dc:statement>
+                <dc:if test="dc:has-result()">
+                  <other>
+                    <dc:elements>
+                      <misc-qps>
+                        <dc:attribute name="description" value="${layer_name}"/>
+                        <dc:attribute name="factory" value="wmsqpsfactory"/>
+                        <dc:attribute name="ids" value="${river_id};${layer_name};${kind_id}"/>
+                      </misc-qps>
+                    </dc:elements>
+                  </other>
+                </dc:if>
               </dc:context>
             </dc:macro>
             <dc:macro name="flood-map-hydr-boundaries">
@@ -1517,7 +1548,6 @@
             </hws_points>
           </dc:macro>
 
-
           <dc:macro name="flood-map-buildings">
             <dc:context>
               <dc:statement>
@@ -1527,7 +1557,7 @@
                 FROM buildings b
                 JOIN building_kinds bk ON b.kind_id = bk.id
                 WHERE b.river_id = ${river_id}
-                AND b.kind_id != 0
+                AND b.kind_id &lt;&gt; 0
               </dc:statement>
               <dc:elements>
                 <buildings>
@@ -1703,6 +1733,26 @@
                 </calculations>
               </uesk>
             </dc:macro>
+
+            <dc:macro name="flood-map-catchments">
+              <dc:attribute name="factory" value="externalwmsfactory"/>
+              <dc:attribute name="ids" value="http://geoportal.bafg.de/wmsproxy/INSPIRE/DrainageBasin;HY.PHYSICALWATERS.CATCHMENTS;Einzugsgebiet"/>
+            </dc:macro>
+
+            <dc:macro name="flood-map-routing">
+              <qps>
+                <dc:call-macro name="flood-map-qps"/>
+              </qps>
+              <riveraxis>
+                <dc:attribute name="factory" value="riveraxis"/>
+                <dc:attribute name="ids" value="${river_id}"/>
+              </riveraxis>
+              <dc:call-macro name="flood-map-km"/>
+              <fixpoints>
+                <dc:call-macro name="flood-map-fixpoints"/>
+              </fixpoints>
+            </dc:macro>
+
             <dc:macro name="flood-map-complete">
                 <buildings>
                   <dc:call-macro name="flood-map-buildings"/>
@@ -1710,35 +1760,26 @@
                 <catchments>
                   <dc:call-macro name="flood-map-catchments"/>
                 </catchments>
-                <fixpoints>
-                  <dc:call-macro name="flood-map-fixpoints"/>
-                </fixpoints>
+                <!-- TODO: HW-Marken -->
+                <hws>
+                  <dc:call-macro name="hwslines"/>
+                  <dc:call-macro name="hwspoints"/>
+                </hws>
+                <route_data>
+                  <dc:call-macro name="flood-map-routing"/>
+                </route_data>
                 <hydrboundaries>
                   <dc:call-macro name="flood-map-hydr-boundaries"/>
                   <dc:call-macro name="flood-map-floodplain"/>
                 </hydrboundaries>
-                <kilometrage>
-                    <riveraxis>
-                        <dc:attribute name="factory" value="riveraxis"/>
-                        <dc:attribute name="ids" value="${river_id}"/>
-                    </riveraxis>
-                  <dc:call-macro name="flood-map-km"/>
-                  <dc:call-macro name="flood-map-qps"/>
-                </kilometrage>
-                <hws>
-                  <dc:call-macro name="hwslines"/>
-                  <dc:call-macro name="hwspoints"/>
-                </hws>
                 <dc:call-macro name="flood-map-uesk"/>
                 <gaugelocations>
                   <dc:call-macro name="flood-map-gaugelocations"/>
                 </gaugelocations>
-                <rastermap>
-                  <background>
-                    <dc:attribute name="factory" value="wmsbackground"/>
-                    <dc:attribute name="ids" value="${river_id}"/>
-                  </background>
-                </rastermap>
+                <background>
+                  <dc:attribute name="factory" value="wmsbackground"/>
+                  <dc:attribute name="ids" value="${river_id}"/>
+                </background>
               </dc:macro>
         </dc:if>
         <dc:if test="dc:contains($artifact-outs, 'minfo-heights')">

http://dive4elements.wald.intevation.org