[Dive4elements-commits] [PATCH 3 of 6] Datacage config and out generator for morphologic width

Wald Commits scm-commit at wald.intevation.org
Thu Apr 18 14:19:45 CEST 2013


# HG changeset patch
# User Raimund Renkert <rrenkert at intevation.de>
# Date 1366287430 -7200
# Node ID a6dc4c232da218978592292d0c701cf411cb5981
# Parent  34882dc70543a7d00cd480a600e7b4caa5b7883c
Datacage config and out generator for morphologic width.

diff -r 34882dc70543 -r a6dc4c232da2 flys-artifacts/doc/conf/meta-data.xml
--- a/flys-artifacts/doc/conf/meta-data.xml	Thu Apr 18 14:15:54 2013 +0200
+++ b/flys-artifacts/doc/conf/meta-data.xml	Thu Apr 18 14:17:10 2013 +0200
@@ -613,7 +613,7 @@
         </dc:macro>
 
         <dc:macro name="morph_width">
-          <morph-width>
+          <morph_width>
             <dc:context>
               <dc:statement>
                 SELECT id   AS width_id
@@ -636,7 +636,7 @@
                 </dc:context>
               </dc:for-each>
             </dc:context>
-          </morph-width>
+          </morph_width>
         </dc:macro>
 
         <dc:macro name="longitudinal-section-prototype">
@@ -782,6 +782,7 @@
               <dc:call-macro name="basedata_2_fixations"/>
               <dc:call-macro name="basedata_3_officials"/>
               <dc:call-macro name="annotations_per_type"/>
+              <dc:call-macro name="morph_width"/>
             </dc:if>
            <dc:comment comment="--- non-recommendations---"/>
           </dc:otherwise>
diff -r 34882dc70543 -r a6dc4c232da2 flys-artifacts/src/main/java/de/intevation/flys/exports/minfo/BedDifferenceYearGenerator.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/minfo/BedDifferenceYearGenerator.java	Thu Apr 18 14:15:54 2013 +0200
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/minfo/BedDifferenceYearGenerator.java	Thu Apr 18 14:17:10 2013 +0200
@@ -10,6 +10,7 @@
 import de.intevation.flys.artifacts.model.WKms;
 import de.intevation.flys.artifacts.model.minfo.BedDiffYearResult;
 import de.intevation.flys.artifacts.model.minfo.BedDifferencesResult;
+import de.intevation.flys.artifacts.model.minfo.MorphologicWidth;
 import de.intevation.flys.exports.StyledSeriesBuilder;
 import de.intevation.flys.exports.fixings.FixChartGenerator;
 import de.intevation.flys.exports.process.KMIndexProcessor;
@@ -48,7 +49,7 @@
     public static final String I18N_CHART_TITLE_DEFAULT = "Sohlenhöhen Differenz";
     public static final String I18N_XAXIS_LABEL_DEFAULT = "Fluss-Km";
     public static final String I18N_YAXIS_LABEL_DEFAULT = "delta S [m]";
-    public static final String I18N_SECOND_YAXIS_LABEL_DEFAULT = "Morph. Breite [m]";
+    public static final String I18N_SECOND_YAXIS_LABEL_DEFAULT = "Breite [m]";
     public static final String I18N_THIRD_YAXIS_LABEL_DEFAULT = "Höhe [m]";
     public static final String I18N_DW_YAXIS_LABEL_DEFAULT  =
             "delta W [cm]";
@@ -152,6 +153,14 @@
                 (BedDiffYearResult)bundle.getData(context),
                 bundle, attr, visible, 1);
         }
+        else if (name.equals(MORPHOLOGIC_WIDTH)) {
+            doMorphologicWidthOut(
+                (MorphologicWidth)bundle.getData(context),
+                bundle,
+                attr,
+                visible,
+                0);
+        }
         else if (processor.canHandle(name)) {
             processor.doOut(this, bundle, attr, visible, YAXIS.dW.idx);
         }
@@ -177,6 +186,18 @@
         }
     }
 
+    private void doMorphologicWidthOut(
+        MorphologicWidth data,
+        ArtifactAndFacet bundle,
+        Document attr,
+        boolean visible,
+        int i) {
+        XYSeries series = new StyledXYSeries(bundle.getFacetDescription(), attr);
+        StyledSeriesBuilder.addPoints(series, data.getAsArray(), true);
+
+        addAxisSeries(series, YAXIS.M.idx, visible);
+    }
+
     private void doBedDifferenceHeightsOut(
         BedDiffYearResult data,
         ArtifactAndFacet bundle,


More information about the Dive4elements-commits mailing list