diff flys-artifacts/doc/conf/meta-data.xml @ 5466:ba1bf40a9787

Restructure datacage to have a route_data folder and add QPS in a more detailed manner in that folder
author Andre Heinecke <aheinecke@intevation.de>
date Wed, 27 Mar 2013 15:27:25 +0100
parents f2bcf0fb1efd
children 6aa04b30f7ff
line wrap: on
line diff
--- a/flys-artifacts/doc/conf/meta-data.xml	Wed Mar 27 15:26:28 2013 +0100
+++ b/flys-artifacts/doc/conf/meta-data.xml	Wed Mar 27 15:27:25 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>
@@ -1709,6 +1739,20 @@
               <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"/>
@@ -1716,25 +1760,18 @@
                 <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"/>

http://dive4elements.wald.intevation.org