diff flys-artifacts/doc/conf/meta-data.xml @ 2683:f5af3adb3b95

Improved datacage configuration for floodmaps and maps and modified the WMS layer artifacts to support names for layers. flys-artifacts/trunk@4383 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 10 May 2012 11:14:17 +0000
parents 5afccab9aac1
children 14188f8daefb
line wrap: on
line diff
--- a/flys-artifacts/doc/conf/meta-data.xml	Thu May 10 10:04:12 2012 +0000
+++ b/flys-artifacts/doc/conf/meta-data.xml	Thu May 10 11:14:17 2012 +0000
@@ -622,6 +622,86 @@
                   </dc:elements>
                 </dc:context>
               </dc:macro>
+              <dc:macro name="flood-map-hydr-boundaries">
+                <hydr_boundaries_lines>
+                  <dc:call-macro name="flood-map-hydr-boundaries-lines"/>
+                </hydr_boundaries_lines>
+                <hydr_boundaries_polygons>
+                  <dc:call-macro name="flood-map-hydr-boundaries-poly"/>
+                </hydr_boundaries_polygons>
+              </dc:macro>
+              <dc:macro name="flood-map-hydr-boundaries-lines">
+                <bfg>
+                  <dc:context>
+                    <dc:statement>
+                      SELECT count(*) as km_exists, name as name
+                      FROM hydr_boundaries WHERE river_id = ${river_id} AND kind = 1 GROUP BY name
+                    </dc:statement>
+                     <dc:elements>
+                      <dc:if test="$km_exists>0">
+                        <hydrboundary>
+                          <dc:attribute name="factory" value="wmshydrboundariesfactory"/>
+                          <dc:attribute name="ids" value="${river_id};${name}"/>
+                          <dc:attribute name="name" value="${name}"/>
+                        </hydrboundary>
+                      </dc:if>
+                    </dc:elements>
+                  </dc:context>
+                </bfg>
+                <land>
+                  <dc:context>
+                    <dc:statement>
+                      SELECT count(*) as km_exists, name as name
+                      FROM hydr_boundaries WHERE river_id = ${river_id} AND kind = 2 GROUP BY name
+                    </dc:statement>
+                     <dc:elements>
+                      <dc:if test="$km_exists>0">
+                        <hydrboundary>
+                          <dc:attribute name="factory" value="wmshydrboundariesfactory"/>
+                          <dc:attribute name="ids" value="${river_id};${name}"/>
+                          <dc:attribute name="name" value="${name}"/>
+                        </hydrboundary>
+                      </dc:if>
+                    </dc:elements>
+                  </dc:context>
+                </land>
+              </dc:macro>
+              <dc:macro name="flood-map-hydr-boundaries-poly">
+                <bfg>
+                  <dc:context>
+                    <dc:statement>
+                      SELECT count(*) as km_exists, name as name
+                      FROM hydr_boundaries_poly WHERE river_id = ${river_id} AND kind = 1 GROUP BY name
+                    </dc:statement>
+                     <dc:elements>
+                      <dc:if test="$km_exists>0">
+                        <hws>
+                          <dc:attribute name="factory" value="wmshydrboundariespolyfactory"/>
+                          <dc:attribute name="ids" value="${river_id};${name}"/>
+                          <dc:attribute name="name" value="${name}"/>
+                        </hws>
+                      </dc:if>
+                    </dc:elements>
+                  </dc:context>
+                </bfg>
+                <land>
+                  <dc:context>
+                    <dc:statement>
+                      SELECT count(*) as km_exists, name as name
+                      FROM hydr_boundaries_poly WHERE river_id = ${river_id} AND kind = 2 GROUP BY name
+                    </dc:statement>
+                     <dc:elements>
+                      <dc:if test="$km_exists>0">
+                        <hws>
+                          <dc:attribute name="factory" value="wmshydrboundariespolyfactory"/>
+                          <dc:attribute name="ids" value="${river_id};${name}"/>
+                          <dc:attribute name="name" value="${name}"/>
+                        </hws>
+                      </dc:if>
+                    </dc:elements>
+                  </dc:context>
+                </land>
+              </dc:macro>
               <dc:macro name="flood-map-catchments">
                 <dc:context>
                   <dc:statement>
@@ -630,11 +710,11 @@
                   </dc:statement>
                    <dc:elements>
                     <dc:if test="$km_exists>0">
-                      <catchments>
+                      <catchment>
                         <dc:attribute name="factory" value="wmscatchmentfactory"/>
                         <dc:attribute name="ids" value="${river_id};${name}"/>
                         <dc:attribute name="name" value="${name}"/>
-                      </catchments>
+                      </catchment>
                     </dc:if>
                   </dc:elements>
                 </dc:context>
@@ -658,15 +738,16 @@
               <dc:macro name="flood-map-lines">
                 <dc:context>
                   <dc:statement>
-                    SELECT count(*) as km_exists
-                    FROM lines WHERE river_id = ${river_id}
+                    SELECT count(*) as km_exists, name as name
+                    FROM lines WHERE river_id = ${river_id} GROUP BY name
                   </dc:statement>
                    <dc:elements>
                     <dc:if test="$km_exists>0">
-                      <lines>
+                      <line>
                         <dc:attribute name="factory" value="wmslinefactory"/>
-                        <dc:attribute name="ids" value="${river_id}"/>
-                      </lines>
+                        <dc:attribute name="ids" value="${river_id};${name}"/>
+                        <dc:attribute name="name" value="${name}"/>
+                      </line>
                     </dc:if>
                   </dc:elements>
                 </dc:context>
@@ -674,15 +755,16 @@
               <dc:macro name="flood-map-buildings">
                 <dc:context>
                   <dc:statement>
-                    SELECT count(*) as km_exists
-                    FROM buildings WHERE river_id = ${river_id}
+                    SELECT count(*) as km_exists, name as name
+                    FROM buildings WHERE river_id = ${river_id} GROUP BY name
                   </dc:statement>
                    <dc:elements>
                     <dc:if test="$km_exists>0">
-                      <buildings>
+                      <building>
                         <dc:attribute name="factory" value="wmsbuildingsfactory"/>
-                        <dc:attribute name="ids" value="${river_id}"/>
-                      </buildings>
+                        <dc:attribute name="ids" value="${river_id};${name}"/>
+                        <dc:attribute name="name" value="${name}"/>
+                      </building>
                     </dc:if>
                   </dc:elements>
                 </dc:context>
@@ -690,15 +772,16 @@
               <dc:macro name="flood-map-fixpoints">
                 <dc:context>
                   <dc:statement>
-                    SELECT count(*) as km_exists
-                    FROM fixpoints WHERE river_id = ${river_id}
+                    SELECT count(*) as km_exists, name as name
+                    FROM fixpoints WHERE river_id = ${river_id} GROUP BY name
                   </dc:statement>
                    <dc:elements>
                     <dc:if test="$km_exists>0">
-                      <fixpoints>
+                      <fixpoint>
                         <dc:attribute name="factory" value="wmsfixpointsfactory"/>
-                        <dc:attribute name="ids" value="${river_id}"/>
-                      </fixpoints>
+                        <dc:attribute name="ids" value="${river_id};${name}"/>
+                        <dc:attribute name="name"  value="${name}"/>
+                      </fixpoint>
                     </dc:if>
                   </dc:elements>
                 </dc:context>
@@ -719,7 +802,7 @@
                             <dc:if test="$uesg_exist>0">
                               <floodmaps>
                                 <dc:attribute name="factory" value="wmsfloodmapsfactory"/>
-                                <dc:attribute name="ids" value="${river_id}_${name}"/>
+                                <dc:attribute name="ids" value="${river_id};${name}"/>
                                 <dc:attribute name="name" value="${name}"/>
                               </floodmaps>
                             </dc:if>
@@ -738,7 +821,7 @@
                             <dc:if test="$uesg_exist>0">
                               <floodmaps>
                                 <dc:attribute name="factory" value="wmsfloodmapsfactory"/>
-                                <dc:attribute name="ids" value="${river_id}_${name}"/>
+                                <dc:attribute name="ids" value="${river_id};${name}"/>
                                 <dc:attribute name="name" value="${name}"/>
                               </floodmaps>
                             </dc:if>
@@ -759,7 +842,7 @@
                             <dc:if test="$uesg_exist>0">
                               <floodmaps>
                                 <dc:attribute name="factory" value="wmsfloodmapsfactory"/>
-                                <dc:attribute name="ids" value="${river_id}_${name}"/>
+                                <dc:attribute name="ids" value="${river_id};${name}"/>
                                 <dc:attribute name="name" value="${name}"/>
                               </floodmaps>
                             </dc:if>
@@ -778,7 +861,7 @@
                             <dc:if test="$uesg_exist>0">
                               <floodmaps>
                                 <dc:attribute name="factory" value="wmsfloodmapsfactory"/>
-                                <dc:attribute name="ids" value="${river_id}_${name}"/>
+                                <dc:attribute name="ids" value="${river_id};${name}"/>
                                 <dc:attribute name="name" value="${name}"/>
                               </floodmaps>
                             </dc:if>
@@ -790,6 +873,22 @@
                 </uesk>
               </dc:macro>
               <dc:macro name="flood-map-complete">
+                  <buildings>
+                    <dc:call-macro name="flood-map-buildings"/>
+                  </buildings>
+                  <catchments>
+                    <dc:call-macro name="flood-map-catchments"/>
+                  </catchments>
+                  <fixpoints>
+                    <dc:call-macro name="flood-map-fixpoints"/>
+                  </fixpoints>
+                  <hws>
+                    <dc:call-macro name="flood-map-hws"/>
+                  </hws>
+                  <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"/>
@@ -797,18 +896,11 @@
                       </riveraxis>
                     <dc:call-macro name="flood-map-km"/>
                     <dc:call-macro name="flood-map-qps"/>
-                    <dc:call-macro name="flood-map-floodplain"/>
+                  </kilometrage>
+                  <lines>
                     <dc:call-macro name="flood-map-lines"/>
-                    <dc:call-macro name="flood-map-buildings"/>
-                    <dc:call-macro name="flood-map-fixpoints"/>
-                  </kilometrage>
+                  </lines>
                   <dc:call-macro name="flood-map-uesk"/>
-                  <catchments>
-                    <dc:call-macro name="flood-map-catchments"/>
-                  </catchments>
-                  <hws>
-                    <dc:call-macro name="flood-map-hws"/>
-                  </hws>
                   <rastermap>
                       <background>
                           <dc:attribute name="factory" value="wmsbackground"/>

http://dive4elements.wald.intevation.org