changeset 5435:70026e3b6af3

Add buildings of kind 0 to data cage
author Andre Heinecke <aheinecke@intevation.de>
date Tue, 26 Mar 2013 12:07:16 +0100
parents fd07bcaff880
children 7dcf604a4bf7
files flys-artifacts/doc/conf/meta-data.xml
diffstat 1 files changed, 26 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/doc/conf/meta-data.xml	Tue Mar 26 12:04:52 2013 +0100
+++ b/flys-artifacts/doc/conf/meta-data.xml	Tue Mar 26 12:07:16 2013 +0100
@@ -1526,7 +1526,8 @@
                 bk.name AS building_kind
                 FROM buildings b
                 JOIN building_kinds bk ON b.kind_id = bk.id
-                WHERE river_id = ${river_id}
+                WHERE b.river_id = ${river_id}
+                AND b.kind_id != 0
               </dc:statement>
               <dc:elements>
                 <buildings>
@@ -1536,6 +1537,30 @@
                 </buildings>
               </dc:elements>
             </dc:context>
+            <dc:context>
+              <dc:statement>
+                SELECT DISTINCT
+                b.kind_id AS building_kind_id,
+                b.name AS building_name,
+                bk.name AS building_kind
+                FROM buildings b
+                JOIN building_kinds bk ON b.kind_id = bk.id
+                WHERE river_id = ${river_id}
+                AND kind_id = 0 OR
+                kind_id IS NULL
+              </dc:statement>
+              <dc:elements>
+                <dc:element name="${building_kind}">
+                  <dc:elements>
+                    <buildings>
+                      <dc:attribute name="description" value="${building_name}"/>
+                      <dc:attribute name="factory" value="wmsbuildingsfactory"/>
+                      <dc:attribute name="ids" value="${river_id};${building_name}"/>
+                    </buildings>
+                  </dc:elements>
+                </dc:element>
+              </dc:elements>
+            </dc:context>
           </dc:macro>
             <dc:macro name="flood-map-fixpoints">
               <dc:context>

http://dive4elements.wald.intevation.org