[Dive4elements-commits] [PATCH 2 of 5] Add buildings of kind 0 to data cage

Wald Commits scm-commit at wald.intevation.org
Tue Mar 26 17:35:45 CET 2013


# HG changeset patch
# User Andre Heinecke <aheinecke at intevation.de>
# Date 1364296036 -3600
# Node ID 70026e3b6af31499147a8449e8c74fadf006c68f
# Parent  fd07bcaff88079813892dfccb9a2f467976ad845
Add buildings of kind 0 to data cage

diff -r fd07bcaff880 -r 70026e3b6af3 flys-artifacts/doc/conf/meta-data.xml
--- 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>


More information about the Dive4elements-commits mailing list