changeset 1185:c5f494a9749d

Added a DEM section to the floodmap section in the datacage configuration. flys-artifacts/trunk@2780 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Fri, 16 Sep 2011 13:26:08 +0000
parents 7552ae1061d7
children be8b5c06a1f8
files flys-artifacts/ChangeLog flys-artifacts/doc/conf/meta-data.xml
diffstat 2 files changed, 27 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Fri Sep 16 11:37:43 2011 +0000
+++ b/flys-artifacts/ChangeLog	Fri Sep 16 13:26:08 2011 +0000
@@ -1,3 +1,8 @@
+2011-09-16  Ingo Weinzierl <ingo@intevation.de>
+
+	* doc/conf/meta-data.xml: Added a section for DEMs to the floodmap
+	  section.
+
 2011-09-16  Felix Wolfsteller <felix.wolfsteller@intevation.de>
 
  Fix build.
--- a/flys-artifacts/doc/conf/meta-data.xml	Fri Sep 16 11:37:43 2011 +0000
+++ b/flys-artifacts/doc/conf/meta-data.xml	Fri Sep 16 13:26:08 2011 +0000
@@ -233,6 +233,9 @@
                   <dc:when test="dc:contains($parameters, 'recommended')">
                     <dc:call-macro name="flood-map-recommended"/>
                   </dc:when>
+                  <dc:when test="dc:contains($parameters, 'dem')">
+                    <dc:call-macro name="flood-map-dem"/>
+                  </dc:when>
                   <dc:otherwise>
                     <dc:call-macro name="flood-map-complete"/>
                   </dc:otherwise>
@@ -255,6 +258,24 @@
                       </background>
                   </rastermap>
               </dc:macro>
+              <dc:macro name="flood-map-dem">
+                <dems>
+                  <dc:context>
+                    <dc:statement>
+                      SELECT id    AS dem_id,
+                             lower AS dem_lower,
+                             upper AS dem_upper
+                      FROM dem WHERE river_id = ${river_id}
+                    </dc:statement>
+                    <dc:elements>
+                      <dem>
+                        <dc:attribute name="name" value="${dem_lower} - ${dem_upper}"/>
+                        <dc:attribute name="db-id" value="${dem_id}"/>
+                      </dem>
+                    </dc:elements>
+                  </dc:context>
+                </dems>
+              </dc:macro>
               <dc:macro name="flood-map-complete">
                   <kilometrage>
                       <riveraxis>
@@ -268,6 +289,7 @@
                           <dc:attribute name="ids" value="${river_id}"/>
                       </background>
                   </rastermap>
+                  <dc:call-macro name="flood-map-dem"/>
               </dc:macro>
           </dc:if>
         </river>

http://dive4elements.wald.intevation.org